[PATCH] ppc64 need HPAGE_SHIFT when huge pages disabled

Andy Whitcroft apw at shadowen.org
Fri Nov 18 04:00:31 EST 2005


With the new powerpc architecture we don't seem to be able to disable
huge pages anymore.

    mm/built-in.o(.toc1+0xae0): undefined reference to `HPAGE_SHIFT'
    make: *** [.tmp_vmlinux1] Error 1

We seem to need to define HPAGE_SHIFT to something when HUGETLB_PAGE isn't
defined.  This patch defines it to 0 when we have no support.

How does this look?  Against 2.6.15-rc1-mm1.

Signed-off-by: Andy Whitcroft <apw at shadowen.org>
---
diff -upN reference/include/asm-powerpc/page_64.h current/include/asm-powerpc/page_64.h
--- reference/include/asm-powerpc/page_64.h
+++ current/include/asm-powerpc/page_64.h
@@ -86,7 +86,11 @@ static inline void copy_page(void *to, v
 extern u64 ppc64_pft_size;
 
 /* Large pages size */
+#ifdef CONFIG_HUGETLB_PAGE
 extern unsigned int HPAGE_SHIFT;
+#else
+#define HPAGE_SHIFT 0
+#endif
 #define HPAGE_SIZE		((1UL) << HPAGE_SHIFT)
 #define HPAGE_MASK		(~(HPAGE_SIZE - 1))
 #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)



More information about the Linuxppc64-dev mailing list