Skip to contentSkip to conversation

linux-next: build warnings after merge of the mm tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Jul 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the mm tree, today's linux-next build (powerpc allyesconfig) produced these warnings:

Quoted 8 lines

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" <[email protected]>
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)

---
 arch/powerpc/mm/book3s64/radix_pgtable.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/mm/book3s64/radix_pgtable.c +3 -3
index 59aaa30a7c0d..96679018e7fb 100644
@@ -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;
Signature · 1 line
2.41.0
#2 lore raw

Hi Aneesh,

Quoted 5 lines · On Thu, 27 Jul 2023 10:16:19 +0530 "Aneesh Kumar K.V"…

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 ?

Please just keep it with the patch that exposed this situation i.e. in Andrew's tree.

Signature · 2 lines
Cheers,
Stephen Rothwell