]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlb: remove dummy definitions of HPAGE_MASK and HPAGE_SIZE
authorDavid Rientjes <rientjes@google.com>
Sat, 19 Nov 2011 10:33:57 +0000 (02:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 19 Nov 2011 11:15:59 +0000 (06:15 -0500)
commit7f6e80f43c5a91361c9ece7713e27b665b31b50b
tree754679947f1e0b014d90ea526eef4f89b9f2afef
parent10f5149f1654cf3be3fcf4510b5c1ec92cd7b256
hugetlb: remove dummy definitions of HPAGE_MASK and HPAGE_SIZE

Dummy, non-zero definitions for HPAGE_MASK and HPAGE_SIZE were added in
a74e194e0897 ("mm: ZAP_BLOCK causes redundant work") to avoid a divide
by zero in generic kernel code.

That code has since been removed, but probably should never have been
added in the first place: we don't want HPAGE_SIZE to act like PAGE_SIZE
for code that is working with hugepages, for example, when the
dependency on CONFIG_HUGETLB_PAGE has not been fulfilled.

Because hugepage size can differ from architecture to architecture, each
is required to have their own definitions for both HPAGE_MASK and
HPAGE_SIZE.  This is always done in arch/*/include/asm/page.h.

So, just remove the dummy and dangerous definitions since they are no
longer needed and reveals the correct dependencies.  Tested on
architectures using the definitions with allyesconfig: x86 (even with
thp), hppa, mips, powerpc, s390, sh3, sh4, sparc, and sparc64, and with
defconfig on ia64.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/hugetlb.h