aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-11-19 05:33:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-19 06:15:59 -0500
commita5c86e986f0b2fe779f13cf53ce6e9f467b03950 (patch)
tree754679947f1e0b014d90ea526eef4f89b9f2afef /include/linux/hugetlb.h
parent208f6f6068836e10d526e87fef6ca4364f4ec068 (diff)
hugetlb: remove dummy definitions of HPAGE_MASK and HPAGE_SIZE
Dummy, non-zero definitions for HPAGE_MASK and HPAGE_SIZE were added in 51c6f666fceb ("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>
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r--include/linux/hugetlb.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 19644e0016bd..d9d6c868b86b 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -110,11 +110,6 @@ static inline void copy_huge_page(struct page *dst, struct page *src)
110 110
111#define hugetlb_change_protection(vma, address, end, newprot) 111#define hugetlb_change_protection(vma, address, end, newprot)
112 112
113#ifndef HPAGE_MASK
114#define HPAGE_MASK PAGE_MASK /* Keep the compiler happy */
115#define HPAGE_SIZE PAGE_SIZE
116#endif
117
118#endif /* !CONFIG_HUGETLB_PAGE */ 113#endif /* !CONFIG_HUGETLB_PAGE */
119 114
120#define HUGETLB_ANON_FILE "anon_hugepage" 115#define HUGETLB_ANON_FILE "anon_hugepage"