|
@@ -53,7 +53,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
|
|
|
|
|
|
#ifndef CONFIG_PPC_64K_PAGES
|
|
|
|
|
|
-#define pgd_populate(MM, PGD, PUD) pgd_set(PGD, __pgtable_ptr_val(PUD))
|
|
|
+#define pgd_populate(MM, PGD, PUD) pgd_set(PGD, (unsigned long)PUD)
|
|
|
|
|
|
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
|
|
|
{
|
|
@@ -68,19 +68,19 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
|
|
|
|
|
|
static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
|
|
{
|
|
|
- pud_set(pud, __pgtable_ptr_val(pmd));
|
|
|
+ pud_set(pud, (unsigned long)pmd);
|
|
|
}
|
|
|
|
|
|
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
|
|
|
pte_t *pte)
|
|
|
{
|
|
|
- pmd_set(pmd, __pgtable_ptr_val(pte));
|
|
|
+ pmd_set(pmd, (unsigned long)pte);
|
|
|
}
|
|
|
|
|
|
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
|
|
pgtable_t pte_page)
|
|
|
{
|
|
|
- pmd_set(pmd, __pgtable_ptr_val(page_address(pte_page)));
|
|
|
+ pmd_set(pmd, (unsigned long)page_address(pte_page));
|
|
|
}
|
|
|
|
|
|
#define pmd_pgtable(pmd) pmd_page(pmd)
|
|
@@ -171,45 +171,23 @@ extern void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift);
|
|
|
extern void __tlb_remove_table(void *_table);
|
|
|
#endif
|
|
|
|
|
|
-#ifndef __PAGETABLE_PUD_FOLDED
|
|
|
-/* book3s 64 is 4 level page table */
|
|
|
-static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
|
|
|
-{
|
|
|
- pgd_set(pgd, __pgtable_ptr_val(pud));
|
|
|
-}
|
|
|
-
|
|
|
-static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
|
|
|
-{
|
|
|
- return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE),
|
|
|
- GFP_KERNEL|__GFP_REPEAT);
|
|
|
-}
|
|
|
-
|
|
|
-static inline void pud_free(struct mm_struct *mm, pud_t *pud)
|
|
|
-{
|
|
|
- kmem_cache_free(PGT_CACHE(PUD_INDEX_SIZE), pud);
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
-static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
|
|
-{
|
|
|
- pud_set(pud, __pgtable_ptr_val(pmd));
|
|
|
-}
|
|
|
+#define pud_populate(mm, pud, pmd) pud_set(pud, (unsigned long)pmd)
|
|
|
|
|
|
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
|
|
|
pte_t *pte)
|
|
|
{
|
|
|
- pmd_set(pmd, __pgtable_ptr_val(pte));
|
|
|
+ pmd_set(pmd, (unsigned long)pte);
|
|
|
}
|
|
|
|
|
|
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
|
|
pgtable_t pte_page)
|
|
|
{
|
|
|
- pmd_set(pmd, __pgtable_ptr_val(pte_page));
|
|
|
+ pmd_set(pmd, (unsigned long)pte_page);
|
|
|
}
|
|
|
|
|
|
static inline pgtable_t pmd_pgtable(pmd_t pmd)
|
|
|
{
|
|
|
- return (pgtable_t)pmd_page_vaddr(pmd);
|
|
|
+ return (pgtable_t)(pmd_val(pmd) & ~PMD_MASKED_BITS);
|
|
|
}
|
|
|
|
|
|
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
|
|
@@ -255,11 +233,11 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
|
|
|
|
|
|
#define __pmd_free_tlb(tlb, pmd, addr) \
|
|
|
pgtable_free_tlb(tlb, pmd, PMD_CACHE_INDEX)
|
|
|
-#ifndef __PAGETABLE_PUD_FOLDED
|
|
|
+#ifndef CONFIG_PPC_64K_PAGES
|
|
|
#define __pud_free_tlb(tlb, pud, addr) \
|
|
|
pgtable_free_tlb(tlb, pud, PUD_INDEX_SIZE)
|
|
|
|
|
|
-#endif /* __PAGETABLE_PUD_FOLDED */
|
|
|
+#endif /* CONFIG_PPC_64K_PAGES */
|
|
|
|
|
|
#define check_pgt_cache() do { } while (0)
|
|
|
|