@@ -574,7 +574,7 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
INIT_LIST_HEAD(lh);
else
list_add(lh, (struct list_head *) pmd_huge_pte(mm, pmdp));
- pmd_huge_pte(mm, pmdp) = pgtable;
+ pmd_huge_pte(mm, pmdp) = (struct ptdesc *)pgtable;
}
pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp)
@@ -586,12 +586,12 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp)
assert_spin_locked(pmd_lockptr(mm, pmdp));
/* FIFO */
- pgtable = pmd_huge_pte(mm, pmdp);
+ pgtable = (pte_t *)pmd_huge_pte(mm, pmdp);
lh = (struct list_head *) pgtable;
if (list_empty(lh))
pmd_huge_pte(mm, pmdp) = NULL;
else {
- pmd_huge_pte(mm, pmdp) = (pgtable_t) lh->next;
+ pmd_huge_pte(mm, pmdp) = (struct ptdesc *) lh->next;
list_del(lh);
}
ptep = (pte_t *) pgtable;
@@ -278,7 +278,7 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
INIT_LIST_HEAD(lh);
else
list_add(lh, (struct list_head *) pmd_huge_pte(mm, pmdp));
- pmd_huge_pte(mm, pmdp) = pgtable;
+ pmd_huge_pte(mm, pmdp) = (struct ptdesc *)pgtable;
}
pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp)
@@ -289,12 +289,12 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp)
assert_spin_locked(&mm->page_table_lock);
/* FIFO */
- pgtable = pmd_huge_pte(mm, pmdp);
+ pgtable = (pte_t *)pmd_huge_pte(mm, pmdp);
lh = (struct list_head *) pgtable;
if (list_empty(lh))
pmd_huge_pte(mm, pmdp) = NULL;
else {
- pmd_huge_pte(mm, pmdp) = (pgtable_t) lh->next;
+ pmd_huge_pte(mm, pmdp) = (struct ptdesc *) lh->next;
list_del(lh);
}
pte_val(pgtable[0]) = 0;
@@ -462,7 +462,7 @@ struct ptdesc {
struct list_head pt_list;
struct {
unsigned long _pt_pad_1;
- pgtable_t pmd_huge_pte;
+ struct ptdesc *pmd_huge_pte;
};
};
unsigned long __page_mapping;
@@ -948,7 +948,7 @@ struct mm_struct {
struct mmu_notifier_subscriptions *notifier_subscriptions;
#endif
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
- pgtable_t pmd_huge_pte; /* protected by page_table_lock */
+ struct ptdesc *pmd_huge_pte; /* protected by page_table_lock */
#endif
#ifdef CONFIG_NUMA_BALANCING
/*
@@ -171,8 +171,8 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
if (!pmd_huge_pte(mm, pmdp))
INIT_LIST_HEAD(&pgtable->lru);
else
- list_add(&pgtable->lru, &pmd_huge_pte(mm, pmdp)->lru);
- pmd_huge_pte(mm, pmdp) = pgtable;
+ list_add(&pgtable->lru, &pmd_huge_pte(mm, pmdp)->pt_list);
+ pmd_huge_pte(mm, pmdp) = page_ptdesc(pgtable);
}
#endif
@@ -180,17 +180,17 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
/* no "address" argument so destroys page coloring of some arch */
pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp)
{
- pgtable_t pgtable;
+ struct ptdesc *ptdesc;
assert_spin_locked(pmd_lockptr(mm, pmdp));
/* FIFO */
- pgtable = pmd_huge_pte(mm, pmdp);
- pmd_huge_pte(mm, pmdp) = list_first_entry_or_null(&pgtable->lru,
- struct page, lru);
+ ptdesc = pmd_huge_pte(mm, pmdp);
+ pmd_huge_pte(mm, pmdp) = list_first_entry_or_null(&ptdesc->pt_list,
+ struct ptdesc, pt_list);
if (pmd_huge_pte(mm, pmdp))
- list_del(&pgtable->lru);
- return pgtable;
+ list_del(&ptdesc->pt_list);
+ return ptdesc_page(ptdesc);
}
#endif