linux/arch
Mel Gorman ba72cb8cb0 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>
2007-11-29 09:24:51 -08:00
..
alpha alpha: fix sg_page breakage 2007-11-27 09:19:39 +01:00
arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-11-16 18:32:08 -08:00
avr32 [AVR32] Export intc_get_pending symbol 2007-11-15 13:47:20 +01:00
blackfin Blackfin arch: fix bug when enable uart1 with uart0 disabled => no initial console 2007-11-21 17:04:41 +08:00
cris ide: move CONFIG_IDE_ETRAX to drivers/ide/Kconfig 2007-11-27 21:35:55 +01:00
frv FRV: Remove the section annotation on free_initmem() 2007-11-09 15:02:25 -08:00
h8300 Kbuild/doc: fix links to Documentation files 2007-10-30 14:26:30 -07:00
ia64 Add IORESOUCE_BUSY flag for System RAM 2007-11-14 18:45:39 -08:00
m32r m32r: Update sys_rt_sigsuspend 2007-11-28 01:24:04 +09:00
m68k m68k: export atari_keyb_init 2007-11-26 19:15:31 -08:00
m68knommu m68knommu: mark mem init functions as __init 2007-10-23 20:45:44 -07:00
mips [MIPS] vpe: Add missing "space" 2007-11-26 17:26:15 +00:00
parisc parisc: fix sg_page() fallout 2007-10-23 09:49:31 +02:00
powerpc Fix boot problem with iSeries lacking hugepage support 2007-11-29 09:24:51 -08:00
ppc [POWERPC] Fix 8xx build breakage due to _tlbie changes 2007-11-20 18:42:00 +11:00
s390 [S390] Add missing die_notifier() call to die(). 2007-11-20 11:13:48 +01:00
sh sh: include ax88796 in the defconfig for r7785rp 2007-11-23 14:39:55 +09:00
sh64 sh64: Kill off duplicate includes. 2007-11-05 12:18:17 +09:00
sparc [SPARC]: Remove duplicate includes. 2007-11-06 21:23:11 -08:00
sparc64 [SPARC]: Remove duplicate includes. 2007-11-06 21:23:11 -08:00
um uml: fix build for !CONFIG_PRINTK 2007-11-14 18:45:43 -08:00
v850 spelling fixes: arch/v850/ 2007-10-20 01:24:05 +02:00
x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 2007-11-26 19:41:28 -08:00
xtensa Kbuild/doc: fix links to Documentation files 2007-10-30 14:26:30 -07:00