]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memcg-add-hugetlb-extension-fix
authorDavid Rientjes <rientjes@google.com>
Thu, 3 May 2012 05:43:37 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:24 +0000 (15:46 +1000)
Fix UML build:

mm/memcontrol.c:256:30: error: 'HUGE_MAX_HSTATE' undeclared here (not in a function)

Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/powerpc/include/asm/page.h
arch/tile/include/asm/page.h
arch/x86/include/asm/page_types.h
include/linux/hugetlb.h

index f072e974f8a2cc615ed5b025327e316568d37010..dacddc68880baa788218a9ebe1e2376b6b50b9f5 100644 (file)
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_HUGETLB_PAGE
 extern unsigned int HPAGE_SHIFT;
+#define HUGE_MAX_HSTATE                (MMU_PAGE_COUNT-1)
 #else
 #define HPAGE_SHIFT PAGE_SHIFT
 #endif
 #define HPAGE_SIZE             ((1UL) << HPAGE_SHIFT)
 #define HPAGE_MASK             (~(HPAGE_SIZE - 1))
 #define HUGETLB_PAGE_ORDER     (HPAGE_SHIFT - PAGE_SHIFT)
-#define HUGE_MAX_HSTATE                (MMU_PAGE_COUNT-1)
 #endif
 
 /* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */
index 9d9131e5c5529fbb67aee9d19d9dcab6e81f6c68..1cbfd748cfa704b55450b3e53d8a57f643a8dd41 100644 (file)
@@ -136,9 +136,8 @@ static inline __attribute_const__ int get_order(unsigned long size)
 
 #define HUGETLB_PAGE_ORDER     (HPAGE_SHIFT - PAGE_SHIFT)
 
-#define HUGE_MAX_HSTATE                6
-
 #ifdef CONFIG_HUGETLB_PAGE
+#define HUGE_MAX_HSTATE                6
 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
 #endif
 
index e21fdd10479f88e339e1e7351da837c563361635..6456ee16e0e02ececb9b7927ede81cf92ee58f0c 100644 (file)
@@ -25,7 +25,9 @@
 #define HPAGE_MASK             (~(HPAGE_SIZE - 1))
 #define HUGETLB_PAGE_ORDER     (HPAGE_SHIFT - PAGE_SHIFT)
 
+#ifdef CONFIG_HUGETLB_PAGE
 #define HUGE_MAX_HSTATE 2
+#endif
 
 #define PAGE_OFFSET            ((unsigned long)__PAGE_OFFSET)
 
index bdafb641aa11daa194b2057dcb5ce0b57bf28b70..4df09e94539263d420762ace792c7e0ef6dee912 100644 (file)
@@ -322,6 +322,7 @@ static inline int hstate_index(struct hstate *h)
 
 #else
 struct hstate {};
+#define HUGE_MAX_HSTATE 0
 #define alloc_huge_page_node(h, nid) NULL
 #define alloc_bootmem_huge_page(h) NULL
 #define hstate_file(f) NULL