Skip to content

Commit

Permalink
[PATCH] ppc64 need HPAGE_SHIFT when huge pages disabled
Browse files Browse the repository at this point in the history
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 PAGE_SHIFT when we have no support.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Nov 18, 2005
1 parent c0e4852 commit b50ce23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/asm-powerpc/page_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ static inline void copy_page(void *to, void *from)
extern u64 ppc64_pft_size;

/* Large pages size */
#ifdef CONFIG_HUGETLB_PAGE
extern unsigned int HPAGE_SHIFT;
#else
#define HPAGE_SHIFT PAGE_SHIFT
#endif
#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
Expand Down

0 comments on commit b50ce23

Please sign in to comment.