]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/THP: don't use HPAGE_SHIFT in transparent hugepage code
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 23 May 2013 00:37:15 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:09:03 +0000 (16:09 +1000)
commit29fdc138e168276f0452262d9df1ee9788b1ce7f
treed0f6f9f6aa25f07c12e1ae6a45a1f2e78c05c598
parent215c07d71f69d4fc5c52a79d032b8c8c31c07d66
mm/THP: don't use HPAGE_SHIFT in transparent hugepage code

For architectures like powerpc that support multiple explicit hugepage
sizes, HPAGE_SHIFT indicate the default explicit hugepage shift.  For THP
to work the hugepage size should be same as PMD_SIZE.  So use PMD_SHIFT
directly.  So move the define outside CONFIG_TRANSPARENT_HUGEPAGE #ifdef
because we want to use these defines in generic code with if
(pmd_trans_huge()) conditional.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/huge_mm.h