linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, x86: fix native_pud_clear build error
@ 2017-03-14 12:12 Arnd Bergmann
  2017-03-14 16:49 ` Jiang, Dave
  2017-03-14 19:34 ` [tip:x86/urgent] mm, x86: Fix " tip-bot for Arnd Bergmann
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-03-14 12:12 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Andrew Morton
  Cc: Arnd Bergmann, Dave Jiang, Thomas Garnier, Kees Cook,
	Dave Hansen, Hugh Dickins, Borislav Petkov, linux-kernel

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/include/asm/pgtable-3level.h | 3 ---
 arch/x86/include/asm/pgtable.h        | 2 +-
 2 files changed, 1 insertion(+), 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)
 	*(tmp + 1) = 0;
 }
 
-#if !defined(CONFIG_SMP) || (defined(CONFIG_HIGHMEM64G) && \
-		defined(CONFIG_PARAVIRT))
 static inline void native_pud_clear(pud_t *pudp)
 {
 }
-#endif
 
 static inline void pud_clear(pud_t *pudp)
 {
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);
 # define set_pud(pudp, pud)		native_set_pud(pudp, pud)
 #endif
 
-#ifndef __PAGETABLE_PMD_FOLDED
+#ifndef __PAGETABLE_PUD_FOLDED
 #define pud_clear(pud)			native_pud_clear(pud)
 #endif
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm, x86: fix native_pud_clear build error
  2017-03-14 12:12 [PATCH] mm, x86: fix native_pud_clear build error Arnd Bergmann
@ 2017-03-14 16:49 ` Jiang, Dave
  2017-03-14 19:34 ` [tip:x86/urgent] mm, x86: Fix " tip-bot for Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: Jiang, Dave @ 2017-03-14 16:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Andrew Morton,
	Thomas Garnier, Kees Cook, Dave Hansen, Hugh Dickins,
	Borislav Petkov, linux-kernel

On Tue, Mar 14, 2017 at 01:12:53PM +0100, Arnd Bergmann wrote:
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Ackedy-by: Dave Jiang <dave.jiang@intel.com>

Thanks for catching this Arnd. I built with all the other configs that were
failing before and they all passed.

> ---
>  arch/x86/include/asm/pgtable-3level.h | 3 ---
>  arch/x86/include/asm/pgtable.h        | 2 +-
>  2 files changed, 1 insertion(+), 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)
>  	*(tmp + 1) = 0;
>  }
>  
> -#if !defined(CONFIG_SMP) || (defined(CONFIG_HIGHMEM64G) && \
> -		defined(CONFIG_PARAVIRT))
>  static inline void native_pud_clear(pud_t *pudp)
>  {
>  }
> -#endif
>  
>  static inline void pud_clear(pud_t *pudp)
>  {
> 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);
>  # define set_pud(pudp, pud)		native_set_pud(pudp, pud)
>  #endif
>  
> -#ifndef __PAGETABLE_PMD_FOLDED
> +#ifndef __PAGETABLE_PUD_FOLDED
>  #define pud_clear(pud)			native_pud_clear(pud)
>  #endif
>  
> -- 
> 2.9.0
> 

-- 

Dave Jiang
Software Engineer, Data Center Group
Intel Corp.
dave.jiang@intel.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] mm, x86: Fix native_pud_clear build error
  2017-03-14 12:12 [PATCH] mm, x86: fix native_pud_clear build error Arnd Bergmann
  2017-03-14 16:49 ` Jiang, Dave
@ 2017-03-14 19:34 ` tip-bot for Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Arnd Bergmann @ 2017-03-14 19:34 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: dave.jiang, arnd, hughd, keescook, linux-kernel, thgarnie, mingo,
	bp, tglx, dave.hansen, akpm, hpa

Commit-ID:  d434936e4cbb10181463622962f30b989d3e9e19
Gitweb:     http://git.kernel.org/tip/d434936e4cbb10181463622962f30b989d3e9e19
Author:     Arnd Bergmann <arnd@arndb.de>
AuthorDate: Tue, 14 Mar 2017 13:12:53 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 14 Mar 2017 20:30:30 +0100

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Thomas Garnier <thgarnie@google.com>
Link: http://lkml.kernel.org/r/20170314121330.182155-1-arnd@arndb.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/include/asm/pgtable-3level.h | 3 ---
 arch/x86/include/asm/pgtable.h        | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index 72277b1..50d35e3 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)
 	*(tmp + 1) = 0;
 }
 
-#if !defined(CONFIG_SMP) || (defined(CONFIG_HIGHMEM64G) && \
-		defined(CONFIG_PARAVIRT))
 static inline void native_pud_clear(pud_t *pudp)
 {
 }
-#endif
 
 static inline void pud_clear(pud_t *pudp)
 {
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 1cfb36b..585ee0d 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);
 # define set_pud(pudp, pud)		native_set_pud(pudp, pud)
 #endif
 
-#ifndef __PAGETABLE_PMD_FOLDED
+#ifndef __PAGETABLE_PUD_FOLDED
 #define pud_clear(pud)			native_pud_clear(pud)
 #endif
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-14 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 12:12 [PATCH] mm, x86: fix native_pud_clear build error Arnd Bergmann
2017-03-14 16:49 ` Jiang, Dave
2017-03-14 19:34 ` [tip:x86/urgent] mm, x86: Fix " tip-bot for Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).