]> err.no Git - linux-2.6/commit
mm/hugetlb: don't crash when HPAGE_SHIFT is 0
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 31 Jul 2008 07:07:30 +0000 (00:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Aug 2008 19:46:41 +0000 (12:46 -0700)
commit0ef89d25d3e390dfa7c46772907951744a4067dc
tree768d97175d6df35408733f6fe40cf414b4ac75bd
parentc6de002617c199f80f9a2a713dffc263bdc69b81
mm/hugetlb: don't crash when HPAGE_SHIFT is 0

Some platform decide whether they support huge pages at boot time.  On
these, such as powerpc, HPAGE_SHIFT is a variable, not a constant, and is
set to 0 when there is no such support.

The patches to introduce multiple huge pages support broke that causing
the kernel to crash at boot time on machines such as POWER3 which lack
support for multiple page sizes.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c