aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/pgtable-4k.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/pgtable-4k.h')
-rw-r--r--include/asm-powerpc/pgtable-4k.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h
index 80a7832d2721..b2e18629932a 100644
--- a/include/asm-powerpc/pgtable-4k.h
+++ b/include/asm-powerpc/pgtable-4k.h
@@ -62,9 +62,14 @@
62/* shift to put page number into pte */ 62/* shift to put page number into pte */
63#define PTE_RPN_SHIFT (17) 63#define PTE_RPN_SHIFT (17)
64 64
65#define __real_pte(e,p) ((real_pte_t)(e)) 65#ifdef STRICT_MM_TYPECHECKS
66#define __rpte_to_pte(r) (r) 66#define __real_pte(e,p) ((real_pte_t){(e)})
67#define __rpte_to_hidx(r,index) (pte_val((r)) >> 12) 67#define __rpte_to_pte(r) ((r).pte)
68#else
69#define __real_pte(e,p) (e)
70#define __rpte_to_pte(r) (__pte(r))
71#endif
72#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> 12)
68 73
69#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \ 74#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
70 do { \ 75 do { \