summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-06-25 14:15:36 -0700
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-06-26 09:11:05 +1000
commit3766a1abc53164f058d74f950599c797cb3fe302 (patch)
treee68b37bda9d162a3806f2a4905782af658706d9c /Documentation
parent5459ae1431f5d22ab10fa8b56fb16c018289fdfc (diff)
downloadlinux-stable-3766a1abc53164f058d74f950599c797cb3fe302.tar.gz
linux-stable-3766a1abc53164f058d74f950599c797cb3fe302.tar.bz2
linux-stable-3766a1abc53164f058d74f950599c797cb3fe302.zip
mm/thp: define HPAGE_PMD_* constants as BUILD_BUG() if !THP
Currently, HPAGE_PMD_* constans rely on PMD_SHIFT regardless of CONFIG_TRANSPARENT_HUGEPAGE. PMD_SHIFT is not defined everywhere (e.g. arm nommu case). It means we can't use anything like this in generic code: if (PageTransHuge(page)) zero_huge_user(page, 0, HPAGE_PMD_SIZE); else clear_highpage(page); For !THP case, PageTransHuge() is 0 and compiler can eliminate zero_huge_user() call. But it still need to be valid C expression, means HPAGE_PMD_SIZE has to expand to something compiler can understand. Previously, HPAGE_PMD_* were defined to BUILD_BUG() for !THP. Let's come back to it. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions