* [PATCH] x86: hide unused allocate_percpu_fixmap_ptes
@ 2017-12-18 13:43 Arnd Bergmann
2017-12-30 8:36 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-12-18 13:43 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Arnd Bergmann, Ingo Molnar, H. Peter Anvin, x86, Andy Lutomirski,
Borislav Petkov, Peter Zijlstra, Thomas Garnier, Ricardo Neri,
linux-kernel
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 <arnd@arndb.de>
---
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
static void __init
set_percpu_fixmap_pages(int idx, void *ptr, int pages, pgprot_t prot)
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: hide unused allocate_percpu_fixmap_ptes
2017-12-18 13:43 [PATCH] x86: hide unused allocate_percpu_fixmap_ptes Arnd Bergmann
@ 2017-12-30 8:36 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2017-12-30 8:36 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Andy Lutomirski, Borislav Petkov, Peter Zijlstra, Thomas Garnier,
Ricardo Neri, linux-kernel
* Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-30 8:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 13:43 [PATCH] x86: hide unused allocate_percpu_fixmap_ptes Arnd Bergmann
2017-12-30 8:36 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®