Skip to content

Commit

Permalink
[PATCH] powerpc: Fixup for STRICT_MM_TYPECHECKS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Gibson authored and Paul Mackerras committed Feb 24, 2006
1 parent c6622f6 commit 20f4eb3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions include/asm-powerpc/pgtable-4k.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@
/* 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 { \
Expand Down

0 comments on commit 20f4eb3

Please sign in to comment.