Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600693

Re: [PATCH] mm, x86: fix native_pud_clear build error

Path csiph.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From "Jiang, Dave" <dave.jiang@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm, x86: fix native_pud_clear build error
Date Tue, 14 Mar 2017 17:50:02 +0100
Message-ID <tkXO2-2Py-37@gated-at.bofh.it> (permalink)
References <tkTAK-8qq-11@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489510174; x=1521046174; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=JRm3zrd7WbGJ21N9aaCgH6XTIKpD4DXgquWPTYDsjFo=; b=dj3AF3yvLpvduQuPZWCIxTAOGPRhJzWV3Ivuq1I0ny1/GufJjKLldKl8 /BRVznmeQaL42yDzsypsk0FmizOciQ==;
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.36,164,1486454400"; d="scan'208";a="236013165"
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 68
Organization linux.* mail to news gateway
X-Original-Cc Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, Andrew Morton <akpm@linux-foundation.org>, Thomas Garnier <thgarnie@google.com>, Kees Cook <keescook@chromium.org>, Dave Hansen <dave.hansen@linux.intel.com>, Hugh Dickins <hughd@google.com>, Borislav Petkov <bp@suse.de>, linux-kernel@vger.kernel.org
X-Original-Date Tue, 14 Mar 2017 09:49:30 -0700
X-Original-Message-ID <20170314164927.GA28939@djiang5-desk3.ch.intel.com>
X-Original-References <20170314121330.182155-1-arnd@arndb.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1600693

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm, x86: fix native_pud_clear build error Arnd Bergmann <arnd@arndb.de> - 2017-03-14 13:20 +0100
  Re: [PATCH] mm, x86: fix native_pud_clear build error "Jiang, Dave" <dave.jiang@intel.com> - 2017-03-14 17:50 +0100
  [tip:x86/urgent] mm, x86: Fix native_pud_clear build error tip-bot for Arnd Bergmann <tipbot@zytor.com> - 2017-03-14 20:40 +0100

csiph-web