aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-03-16 19:40:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-16 19:56:18 -0400
commitd0f33ac9ae7b2a727fb678235ae37baf1d0608d5 (patch)
tree84202dbebf6238c227c429307de913dabd914256
parent5be9b730b09c45c358bbfe7f51d254e306cccc07 (diff)
mm, x86: fix native_pud_clear build error
We still get a build error in random configurations, after this has been modified a few times: In file included from include/linux/mm.h:68:0, from include/linux/suspend.h:8, from arch/x86/kernel/asm-offsets.c:12: arch/x86/include/asm/pgtable.h:66:26: error: redefinition of 'native_pud_clear' #define pud_clear(pud) native_pud_clear(pud) My interpretation is that the build error comes from a typo in __PAGETABLE_PUD_FOLDED, so fix that typo now, and remove the incorrect #ifdef around the native_pud_clear definition. Fixes: 3e761a42e19c ("mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear()") Fixes: a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent hugepages") Link: http://lkml.kernel.org/r/20170314121330.182155-1-arnd@arndb.de Signed-off-by: Arnd Bergmann <arnd@arndb.de> Ackedy-by: Dave Jiang <dave.jiang@intel.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Garnier <thgarnie@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/x86/include/asm/pgtable-3level.h3
-rw-r--r--arch/x86/include/asm/pgtable.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 72277b1028a5..50d35e3185f5 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -121,12 +121,9 @@ static inline void native_pmd_clear(pmd_t *pmd)
121 *(tmp + 1) = 0; 121 *(tmp + 1) = 0;
122} 122}
123 123
124#if !defined(CONFIG_SMP) || (defined(CONFIG_HIGHMEM64G) && \
125 defined(CONFIG_PARAVIRT))
126static inline void native_pud_clear(pud_t *pudp) 124static inline void native_pud_clear(pud_t *pudp)
127{ 125{
128} 126}
129#endif
130 127
131static inline void pud_clear(pud_t *pudp) 128static inline void pud_clear(pud_t *pudp)
132{ 129{
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 1cfb36b8c024..585ee0d42d18 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -62,7 +62,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
62# define set_pud(pudp, pud) native_set_pud(pudp, pud) 62# define set_pud(pudp, pud) native_set_pud(pudp, pud)
63#endif 63#endif
64 64
65#ifndef __PAGETABLE_PMD_FOLDED 65#ifndef __PAGETABLE_PUD_FOLDED
66#define pud_clear(pud) native_pud_clear(pud) 66#define pud_clear(pud) native_pud_clear(pud)
67#endif 67#endif
68 68