diff options
author | Mel Gorman <mel@csn.ul.ie> | 2007-11-28 19:21:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-29 12:24:51 -0500 |
commit | ba72cb8cb0cdc0a65b3abe9a387f1a26bfd49b8a (patch) | |
tree | c0617d342aba6525d7dbc9d607da754468385383 /arch/powerpc | |
parent | ee592a5bd5180cc1ffaf5acd7bf1e91e0d854a08 (diff) |
Fix boot problem with iSeries lacking hugepage support
Ordinarily the size of a pageblock is determined at compile-time based on the
hugepage size. On PPC64, the hugepage size is determined at runtime based on
what is supported by the machine. With legacy machines such as iSeries that
do not support hugepages, HPAGE_SHIFT is 0. This results in pageblock_order
being set to -PAGE_SHIFT and a crash results shortly afterwards.
This patch adds a function to select a sensible value for pageblock order by
default when HUGETLB_PAGE_SIZE_VARIABLE is set. It checks that HPAGE_SHIFT
is a sensible value before using the hugepage size; if it is not MAX_ORDER-1
is used.
This is a fix for 2.6.24.
Credit goes to Stephen Rothwell for identifying the bug and testing candidate
patches. Additional credit goes to Andy Whitcroft for spotting a problem
with respects to IA-64 before releasing. Additional credit to David Gibson
for testing with the libhugetlbfs test suite.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 18f397ca05ef..232c298c933f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -187,6 +187,11 @@ config FORCE_MAX_ZONEORDER | |||
187 | default "9" if PPC_64K_PAGES | 187 | default "9" if PPC_64K_PAGES |
188 | default "13" | 188 | default "13" |
189 | 189 | ||
190 | config HUGETLB_PAGE_SIZE_VARIABLE | ||
191 | bool | ||
192 | depends on HUGETLB_PAGE | ||
193 | default y | ||
194 | |||
190 | config MATH_EMULATION | 195 | config MATH_EMULATION |
191 | bool "Math emulation" | 196 | bool "Math emulation" |
192 | depends on 4xx || 8xx || E200 || PPC_MPC832x || E500 | 197 | depends on 4xx || 8xx || E200 || PPC_MPC832x || E500 |