[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a7895e6e-b00a-4b75-6506-ca38af495829@infradead.org>
Date: Tue, 6 Apr 2021 11:39:47 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Oscar Salvador <osalvador@...e.de>, X86 ML <x86@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux MM <linux-mm@...ck.org>
Subject: Re: linux-next: Tree for Apr 6 (arch/x86/mm/init_64.c)
On 4/6/21 11:32 AM, Randy Dunlap wrote:
> On 4/6/21 5:31 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> Changes since 20210401:
>>
>
> on x86_64:
> # CONFIG_SPARSEMEM_VMEMMAP is not set
>
>
> gcc (SUSE Linux) 7.5.0
>
>
> ../arch/x86/mm/init_64.c: In function 'remove_pmd_table':
> ../arch/x86/mm/init_64.c:1127:8: error: implicit declaration of function 'vmemmap_pmd_is_unused'; did you mean 'vmemmap_pmd_populate'? [-Werror=implicit-function-declaration]
> vmemmap_pmd_is_unused(addr, next)) {
> ^~~~~~~~~~~~~~~~~~~~~
> vmemmap_pmd_populate
>
>
> Looks like that compound "if" is too much for gcc 7.5.0 to handle:
>
> } else if (IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP) &&
> vmemmap_pmd_is_unused(addr, next)) {
> free_hugepage_table(pmd_page(*pmd),
> altmap);
> spin_lock(&init_mm.page_table_lock);
> pmd_clear(pmd);
> spin_unlock(&init_mm.page_table_lock);
> }
>
>
This is what I am using for now:
---
---
arch/x86/mm/init_64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- linux-next-20210406.orig/arch/x86/mm/init_64.c
+++ linux-next-20210406/arch/x86/mm/init_64.c
@@ -1123,14 +1123,16 @@ remove_pmd_table(pmd_t *pmd_start, unsig
pmd_clear(pmd);
spin_unlock(&init_mm.page_table_lock);
pages++;
- } else if (IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP) &&
- vmemmap_pmd_is_unused(addr, next)) {
+ }
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
+ else if (vmemmap_pmd_is_unused(addr, next)) {
free_hugepage_table(pmd_page(*pmd),
altmap);
spin_lock(&init_mm.page_table_lock);
pmd_clear(pmd);
spin_unlock(&init_mm.page_table_lock);
}
+#endif
continue;
}
Powered by blists - more mailing lists