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)
committerMark Brown <broonie@linaro.org>
Thu, 15 May 2014 18:59:48 +0000 (19:59 +0100)
commit6991fe93fc746ffe73d88e0fc47b674bf4dad4f9
tree32427d9114383272d9a1b7f3a87a215a70e46b44
parent60061a496643b97b9e36042c5a3af7f286d7f0fa
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