From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750974AbdL3IhE (ORCPT ); Sat, 30 Dec 2017 03:37:04 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:40884 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbdL3IhD (ORCPT ); Sat, 30 Dec 2017 03:37:03 -0500 X-Google-Smtp-Source: ACJfBosdzpxGgh6nW/AevTJwwOuUjy1MJURNi1QtEX3hMuccoeS3be5GhkDwLqkaoV31PbMn4aRePw== Date: Sat, 30 Dec 2017 09:36:59 +0100 From: Ingo Molnar To: Arnd Bergmann Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andy Lutomirski , Borislav Petkov , Peter Zijlstra , Thomas Garnier , Ricardo Neri , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: hide unused allocate_percpu_fixmap_ptes Message-ID: <20171230083659.6zp6s4wv27xfo452@gmail.com> References: <20171218134417.3000184-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171218134417.3000184-1-arnd@arndb.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann wrote: > The new function is not always used, causing a warning whenever > CONFIG_CPU_SUP_INTEL is disabled: > > arch/x86/kernel/cpu/common.c:522:20: error: 'allocate_percpu_fixmap_ptes' defined but not used [-Werror=unused-function] > > Hide it in the same #ifdef. > > Fixes: 3015f86f838c ("x86/fixmap: Add debugstore entries to cpu_entry_area") > Signed-off-by: Arnd Bergmann > --- > arch/x86/kernel/cpu/common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index 6444f91e8d3c..6f354416a67f 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -519,11 +519,13 @@ static DEFINE_PER_CPU_PAGE_ALIGNED(struct entry_stack_page, > * Force the population of PMDs for not yet allocated per cpu > * memory like debug store buffers. > */ > +#ifdef CONFIG_CPU_SUP_INTEL > static void __init allocate_percpu_fixmap_ptes(int idx, int pages) > { > for (; pages; pages--, idx--) > __set_fixmap(idx, 0, PAGE_NONE); > } > +#endif Ok, this fix should be moot as the allocate_percpu_fixmap_ptes() is gone from the latest versions of PTI. Thanks, Ingo