mm: thp: Correct the HPAGE_PMD_ORDER check.
authorSteve Capper <steve.capper@linaro.org>
Tue, 7 May 2013 13:46:03 +0000 (14:46 +0100)
committerSteve Capper <steve.capper@linaro.org>
Fri, 14 Jun 2013 08:40:28 +0000 (09:40 +0100)
commitdfa5e237e935bc6712c9ac2f52a5469a0df85bcf
tree277e0e8f1817893d115d901d1737461e86f255b9
parent53313b2c9130a54dece8595c5a77fd787f340433
mm: thp: Correct the HPAGE_PMD_ORDER check.

All Transparent Huge Pages are allocated by the buddy allocator.

A compile time check is in place that fails when the order of a
transparent huge page is too large to be allocated by the buddy
allocator. Unfortunately that compile time check passes when:
HPAGE_PMD_ORDER == MAX_ORDER
( which is incorrect as the buddy allocator can only allocate
memory of order strictly less than MAX_ORDER. )

This patch updates the compile time check to fail in the above
case.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/huge_mm.h