[PATCH] powerpc: Fixup for STRICT_MM_TYPECHECKS
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 20 Feb 2006 03:05:56 +0000 (14:05 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 24 Feb 2006 03:05:58 +0000 (14:05 +1100)
Currently ARCH=powerpc will not compile when STRICT_MM_TYPECHECKS is
turned on and CONFIG_64K_PAGES is turned off.  This corrects the
problem.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/pgtable-4k.h

index e9590c06ad9276541a191ec1f3a3057452c7bde9..35f92813464cc9de7e4705d3919ce44df51505f5 100644 (file)
 /* shift to put page number into pte */
 #define PTE_RPN_SHIFT  (17)
 
-#define __real_pte(e,p)                ((real_pte_t)(e))
-#define __rpte_to_pte(r)       (r)
-#define __rpte_to_hidx(r,index)        (pte_val((r)) >> 12)
+#ifdef STRICT_MM_TYPECHECKS
+#define __real_pte(e,p)                ((real_pte_t){(e)})
+#define __rpte_to_pte(r)       ((r).pte)
+#else
+#define __real_pte(e,p)                (e)
+#define __rpte_to_pte(r)       (__pte(r))
+#endif
+#define __rpte_to_hidx(r,index)        (pte_val(__rpte_to_pte(r)) >> 12)
 
 #define pte_iterate_hashed_subpages(rpte, psize, va, index, shift)       \
        do {                                                             \