[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191115152352.ddc9539e80b0840d82c7e2db@linux-foundation.org>
Date: Fri, 15 Nov 2019 15:23:52 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Randy Dunlap <rdunlap@...radead.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Joerg Roedel <jroedel@...e.de>, Qian Cai <cai@....pw>,
Shile Zhang <shile.zhang@...ux.alibaba.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: linux-next: build failure after merge of the akpm-current tree
On Fri, 15 Nov 2019 18:19:57 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> Hi all,
>
> [Also reported by Randy Dunlap]
>
> After merging the akpm-current tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> mm/vmalloc.c: In function '__purge_vmap_area_lazy':
> mm/vmalloc.c:1286:8: error: 'SHARED_KERNEL_PMD' undeclared (first use in this function)
> 1286 | if (!SHARED_KERNEL_PMD && boot_cpu_has(X86_FEATURE_PTI))
> | ^~~~~~~~~~~~~~~~~
> mm/vmalloc.c:1286:8: note: each undeclared identifier is reported only once for each function it appears in
> mm/vmalloc.c:1286:29: error: implicit declaration of function 'boot_cpu_has' [-Werror=implicit-function-declaration]
> 1286 | if (!SHARED_KERNEL_PMD && boot_cpu_has(X86_FEATURE_PTI))
> | ^~~~~~~~~~~~
> mm/vmalloc.c:1286:42: error: 'X86_FEATURE_PTI' undeclared (first use in this function)
> 1286 | if (!SHARED_KERNEL_PMD && boot_cpu_has(X86_FEATURE_PTI))
> | ^~~~~~~~~~~~~~~
>
> Caused by commit
>
> 07ef40e149bf ("mm-vmalloc-fix-regression-caused-by-needless-vmalloc_sync_all-fix")
>
> SHARED_KERNEL_PMD, boot_cpu_has() and X86_FEATURE_PTI are only defined
> for X86.
>
> I have reverted that commit for today.
Thanks. So it has to be an ifdef.
--- a/mm/vmalloc.c~mm-vmalloc-fix-regression-caused-by-needless-vmalloc_sync_all-fix-fix
+++ a/mm/vmalloc.c
@@ -1255,17 +1255,17 @@ static bool __purge_vmap_area_lazy(unsig
if (unlikely(valist == NULL))
return false;
- if (IS_ENABLED(CONFIG_X86_PAE)) {
- /*
- * First make sure the mappings are removed from all page-tables
- * before they are freed.
- *
- * This is only needed on x86-32 with !SHARED_KERNEL_PMD, which
- * is the case on a PAE kernel with PTI enabled.
- */
- if (!SHARED_KERNEL_PMD && boot_cpu_has(X86_FEATURE_PTI))
- vmalloc_sync_all();
- }
+#ifdef CONFIG_X86_PAE
+ /*
+ * First make sure the mappings are removed from all pagetables before
+ * they are freed.
+ *
+ * This is only needed on x86-32 with !SHARED_KERNEL_PMD, which is the
+ * case on a PAE kernel with PTI enabled.
+ */
+ if (!SHARED_KERNEL_PMD && boot_cpu_has(X86_FEATURE_PTI))
+ vmalloc_sync_all();
+#endif
/*
* TODO: to calculate a flush range without looping.
_
Powered by blists - more mailing lists