diff options
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64/pgtable.h')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/pgtable.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 2e6ada28da64..d8c8d7c9df15 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h | |||
@@ -904,7 +904,7 @@ static inline int pud_none(pud_t pud) | |||
904 | 904 | ||
905 | static inline int pud_present(pud_t pud) | 905 | static inline int pud_present(pud_t pud) |
906 | { | 906 | { |
907 | return (pud_raw(pud) & cpu_to_be64(_PAGE_PRESENT)); | 907 | return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PRESENT)); |
908 | } | 908 | } |
909 | 909 | ||
910 | extern struct page *pud_page(pud_t pud); | 910 | extern struct page *pud_page(pud_t pud); |
@@ -951,7 +951,7 @@ static inline int pgd_none(pgd_t pgd) | |||
951 | 951 | ||
952 | static inline int pgd_present(pgd_t pgd) | 952 | static inline int pgd_present(pgd_t pgd) |
953 | { | 953 | { |
954 | return (pgd_raw(pgd) & cpu_to_be64(_PAGE_PRESENT)); | 954 | return !!(pgd_raw(pgd) & cpu_to_be64(_PAGE_PRESENT)); |
955 | } | 955 | } |
956 | 956 | ||
957 | static inline pte_t pgd_pte(pgd_t pgd) | 957 | static inline pte_t pgd_pte(pgd_t pgd) |
@@ -1258,21 +1258,13 @@ extern pmd_t pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, | |||
1258 | 1258 | ||
1259 | #define pmd_move_must_withdraw pmd_move_must_withdraw | 1259 | #define pmd_move_must_withdraw pmd_move_must_withdraw |
1260 | struct spinlock; | 1260 | struct spinlock; |
1261 | static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, | 1261 | extern int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, |
1262 | struct spinlock *old_pmd_ptl, | 1262 | struct spinlock *old_pmd_ptl, |
1263 | struct vm_area_struct *vma) | 1263 | struct vm_area_struct *vma); |
1264 | { | 1264 | /* |
1265 | if (radix_enabled()) | 1265 | * Hash translation mode use the deposited table to store hash pte |
1266 | return false; | 1266 | * slot information. |
1267 | /* | 1267 | */ |
1268 | * Archs like ppc64 use pgtable to store per pmd | ||
1269 | * specific information. So when we switch the pmd, | ||
1270 | * we should also withdraw and deposit the pgtable | ||
1271 | */ | ||
1272 | return true; | ||
1273 | } | ||
1274 | |||
1275 | |||
1276 | #define arch_needs_pgtable_deposit arch_needs_pgtable_deposit | 1268 | #define arch_needs_pgtable_deposit arch_needs_pgtable_deposit |
1277 | static inline bool arch_needs_pgtable_deposit(void) | 1269 | static inline bool arch_needs_pgtable_deposit(void) |
1278 | { | 1270 | { |