Re: powerpc: Remove use of 4level-fixup.h for ppc32
From: Christoph Hellwig <hch@lst.de>
Date: 2007-05-07 08:24:46
On Mon, May 07, 2007 at 03:35:27PM +1000, David Gibson wrote:
quoted hunk ↗ jump to hunk
===================================================================--- working-2.6.orig/include/asm-powerpc/page.h 2007-05-07 14:24:21.000000000 +1000 +++ working-2.6/include/asm-powerpc/page.h 2007-05-07 15:30:04.000000000 +1000@@ -121,9 +121,11 @@ typedef struct { pte_t pte; } real_pte_t #endif /* PMD level */ +#ifdef CONFIG_PPC64 typedef struct { unsigned long pmd; } pmd_t; #define pmd_val(x) ((x).pmd) #define __pmd(x) ((pmd_t) { (x) }) +#endif /* PUD level exusts only on 4k pages */ #if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES)@@ -159,9 +161,11 @@ typedef unsigned long real_pte_t; #endif +#if defined (CONFIG_PPC64) typedef unsigned long pmd_t; #define pmd_val(x) (x) #define __pmd(x) (x) +#endif
This should be one bit CONFIG_PPC64 block with a nested !CONFIG_PPC_64K_PAGES block inbetween.
#if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES) typedef unsigned long pud_t;
also extending down here. Unfortunately the page.h you patch seems to be different already from the one in current mainline so I don't have the full picture at hand, but it would be nice to only have a few ifdef blocks in the header. Except for that little nitpick the patch looks good.