diff options
Diffstat (limited to 'arch/powerpc/include/asm/hugetlb.h')
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index 383da1ab9e23..8d40565ad0c3 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -5,8 +5,6 @@ | |||
5 | #ifdef CONFIG_HUGETLB_PAGE | 5 | #ifdef CONFIG_HUGETLB_PAGE |
6 | #include <asm/page.h> | 6 | #include <asm/page.h> |
7 | 7 | ||
8 | extern struct kmem_cache *hugepte_cache; | ||
9 | |||
10 | #ifdef CONFIG_PPC_BOOK3S_64 | 8 | #ifdef CONFIG_PPC_BOOK3S_64 |
11 | 9 | ||
12 | #include <asm/book3s/64/hugetlb.h> | 10 | #include <asm/book3s/64/hugetlb.h> |
@@ -76,7 +74,9 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr, | |||
76 | unsigned long idx = 0; | 74 | unsigned long idx = 0; |
77 | 75 | ||
78 | pte_t *dir = hugepd_page(hpd); | 76 | pte_t *dir = hugepd_page(hpd); |
79 | #ifndef CONFIG_PPC_FSL_BOOK3E | 77 | #ifdef CONFIG_PPC_8xx |
78 | idx = (addr & ((1UL << pdshift) - 1)) >> PAGE_SHIFT; | ||
79 | #elif !defined(CONFIG_PPC_FSL_BOOK3E) | ||
80 | idx = (addr & ((1UL << pdshift) - 1)) >> hugepd_shift(hpd); | 80 | idx = (addr & ((1UL << pdshift) - 1)) >> hugepd_shift(hpd); |
81 | #endif | 81 | #endif |
82 | 82 | ||
@@ -129,15 +129,14 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm, | |||
129 | static inline void huge_ptep_clear_flush(struct vm_area_struct *vma, | 129 | static inline void huge_ptep_clear_flush(struct vm_area_struct *vma, |
130 | unsigned long addr, pte_t *ptep) | 130 | unsigned long addr, pte_t *ptep) |
131 | { | 131 | { |
132 | pte_t pte; | 132 | huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); |
133 | pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep); | ||
134 | flush_hugetlb_page(vma, addr); | 133 | flush_hugetlb_page(vma, addr); |
135 | } | 134 | } |
136 | 135 | ||
137 | #define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS | 136 | #define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS |
138 | extern int huge_ptep_set_access_flags(struct vm_area_struct *vma, | 137 | int huge_ptep_set_access_flags(struct vm_area_struct *vma, |
139 | unsigned long addr, pte_t *ptep, | 138 | unsigned long addr, pte_t *ptep, |
140 | pte_t pte, int dirty); | 139 | pte_t pte, int dirty); |
141 | 140 | ||
142 | static inline void arch_clear_hugepage_flags(struct page *page) | 141 | static inline void arch_clear_hugepage_flags(struct page *page) |
143 | { | 142 | { |