From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warnings after merge of the mm tree
Date: Thu, 27 Jul 2023 10:16:19 +0530 [thread overview]
Message-ID: <87h6pqvu5g.fsf@linux.ibm.com> (raw)
In-Reply-To: <20230727142844.5e00c84d@canb.auug.org.au>
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi all,
>
> After merging the mm tree, today's linux-next build (powerpc allyesconfig)
> produced these warnings:
>
> WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x230 (section: .text.remove_pte_table) -> free_vmemmap_pages (section: .meminit.text)
> WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x43c (section: .text.remove_pte_table) -> vmemmap_populated (section: .meminit.text)
> WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x4a4 (section: .text.remove_pte_table) -> free_vmemmap_pages (section: .meminit.text)
>
> Introduced by commit
>
> 25081814314b ("powerpc/book3s64/vmemmap: switch radix to use a different vmemmap handling function")
>
I will send this as a separate patch to linuxppc-dev ? Even though the
warning started with this series because it is using functions in
meminit from remove_pte_table, marking remove_pte_table correctly is
applicable outside series that caused this warning ?
From 29ddcbbcae6ec2a7b70015274b2d5c4ec9b6beea Mon Sep 17 00:00:00 2001
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Date: Thu, 27 Jul 2023 10:02:37 +0530
Subject: [PATCH] powerpc/mm: Fix section mismatch warning
remove_pte_table is only called from remove_pmd_table which is marked
__meminit. These functions are used only during memory hotplug and they
also call functions marked __meminit. Mark remote_pte_table also with
__meminit so that we can avoid the section mismatch warning below.
WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x230 (section: .text.remove_pte_table) -> free_vmemmap_pages (section: .meminit.text)
WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x43c (section: .text.remove_pte_table) -> vmemmap_populated (section: .meminit.text)
WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x4a4 (section: .text.remove_pte_table) -> free_vmemmap_pages (section: .meminit.text)
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
arch/powerpc/mm/book3s64/radix_pgtable.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 59aaa30a7c0d..96679018e7fb 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -782,9 +782,9 @@ static void __meminit free_vmemmap_pages(struct page *page,
free_pages((unsigned long)page_address(page), order);
}
-static void remove_pte_table(pte_t *pte_start, unsigned long addr,
- unsigned long end, bool direct,
- struct vmem_altmap *altmap)
+static void __meminit remove_pte_table(pte_t *pte_start, unsigned long addr,
+ unsigned long end, bool direct,
+ struct vmem_altmap *altmap)
{
unsigned long next, pages = 0;
pte_t *pte;
--
2.41.0
next prev parent reply other threads:[~2023-07-27 4:46 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 4:28 linux-next: build warnings after merge of the mm tree Stephen Rothwell
2023-07-27 4:46 ` Aneesh Kumar K.V [this message]
2023-07-27 5:00 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2025-03-05 9:42 Stephen Rothwell
2025-03-05 9:53 ` David Hildenbrand
2025-03-05 10:05 ` David Hildenbrand
2025-02-17 6:10 Stephen Rothwell
2025-02-17 16:28 ` Suren Baghdasaryan
2025-02-10 3:49 Stephen Rothwell
2025-02-09 23:06 Stephen Rothwell
2025-01-06 6:42 Stephen Rothwell
2024-09-11 10:21 Stephen Rothwell
2024-07-01 8:49 Stephen Rothwell
2024-07-02 3:14 ` Andrew Morton
2024-07-02 4:15 ` Jiaqi Yan
2024-07-02 4:33 ` Jiaqi Yan
2024-07-02 6:18 ` Andrew Morton
2024-07-02 6:37 ` Jiaqi Yan
2024-07-02 23:09 ` SeongJae Park
2024-07-02 23:55 ` Jiaqi Yan
2024-07-01 1:01 Stephen Rothwell
2024-07-01 1:13 ` Andrii Nakryiko
2024-07-01 8:28 ` Stephen Rothwell
2024-03-25 1:36 Stephen Rothwell
2024-03-26 2:19 ` Suren Baghdasaryan
2024-03-26 5:44 ` Randy Dunlap
2024-03-26 6:16 ` Suren Baghdasaryan
2024-03-28 4:39 ` Stephen Rothwell
2024-03-28 4:44 ` Stephen Rothwell
2024-03-28 5:35 ` Suren Baghdasaryan
2024-03-29 22:49 ` Stephen Rothwell
2024-03-29 23:01 ` Suren Baghdasaryan
2024-03-29 23:01 ` Suren Baghdasaryan
2024-02-21 5:27 Stephen Rothwell
2024-02-21 17:12 ` SeongJae Park
2023-05-08 4:54 Stephen Rothwell
2023-05-08 16:10 ` Liam R. Howlett
2022-11-22 6:50 Stephen Rothwell
2022-08-23 3:54 Stephen Rothwell
2022-08-23 14:55 ` Liam Howlett
2022-05-11 10:20 Stephen Rothwell
2022-05-11 16:06 ` Johannes Weiner
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=87h6pqvu5g.fsf@linux.ibm.com \
--to=aneesh.kumar@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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