From: Randy Dunlap <rdunlap@infradead.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Oscar Salvador <osalvador@suse.de>, X86 ML <x86@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux MM <linux-mm@kvack.org>
Subject: Re: linux-next: Tree for Apr 6 (arch/x86/mm/init_64.c)
Date: Tue, 6 Apr 2021 11:39:47 -0700 [thread overview]
Message-ID: <a7895e6e-b00a-4b75-6506-ca38af495829@infradead.org> (raw)
In-Reply-To: <58d0c74b-ef4d-447b-9285-3d2c192fd3eb@infradead.org>
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;
}
next prev parent reply other threads:[~2021-04-06 18:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 12:31 linux-next: Tree for Apr 6 Stephen Rothwell
2021-04-06 18:32 ` linux-next: Tree for Apr 6 (arch/x86/mm/init_64.c) Randy Dunlap
2021-04-06 18:39 ` Randy Dunlap [this message]
2021-04-06 19:57 ` Oscar Salvador
2021-04-06 22:25 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7895e6e-b00a-4b75-6506-ca38af495829@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=osalvador@suse.de \
--cc=sfr@canb.auug.org.au \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).