Skip to contentSkip to conversation

microblaze: tag highmem_setup() with __meminit

PATCH In review David Hildenbrand 3 participants 4 messages Mar 1, 2021 – Mar 2, 2021

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

PATCH 1/1 microblaze: tag highmem_setup() with __meminit

With commit a0cd7a7c4bc0 ("mm: simplify free_highmem_page() and free_reserved_page()") the kernel test robot complains about a warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x23ac): Section mismatch in
reference from the function highmem_setup() to the function .meminit.text:memblock_is_reserved()

This has been broken ever since microblaze added highmem support, because memblock_is_reserved() was already tagged with "__init" back then - most probably the function always got inlined, so we never stumbled over it.

Fixes 2f2f371f8907 ("microblaze: Highmem support")
Cc Andrew Morton <[email protected]>
Cc Michal Simek <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Arvind Sankar <[email protected]>
Cc Ira Weiny <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Anshuman Khandual <[email protected]>
---
 arch/microblaze/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/mm/init.c +1 -1
index 181e48782e6c..05cf1fb3f5ff 100644
@@ -52,7 +52,7 @@ static void __init highmem_init(void)
 	pkmap_page_table = virt_to_kpte(PKMAP_BASE);
 }
 
-static void highmem_setup(void)
+static void __meminit highmem_setup(void)
 {
 	unsigned long pfn;
 
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · David Hildenbrand

With commit a0cd7a7c4bc0 ("mm: simplify free_highmem_page() and free_reserved_page()") the kernel test robot complains about a warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x23ac): Section mismatch in
reference from the function highmem_setup() to the function .meminit.text:memblock_is_reserved()

This has been broken ever since microblaze added highmem support, because memblock_is_reserved() was already tagged with "__init" back then - most probably the function always got inlined, so we never stumbled over it.

It might be good to point out that we need __meminit instead of __init because microblaze platform does not define CONFIG_ARCH_KEEP_MEMBLOCK, and __init_memblock fallsback to that.

(I had to go and look as I was puzzled :-) )

Quoted 35 lines
Fixes 2f2f371f8907 ("microblaze: Highmem support")
Cc Andrew Morton <[email protected]>
Cc Michal Simek <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Arvind Sankar <[email protected]>
Cc Ira Weiny <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Anshuman Khandual <[email protected]>
---
 arch/microblaze/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/mm/init.c +1 -1
index 181e48782e6c..05cf1fb3f5ff 100644
@@ -52,7 +52,7 @@ static void __init highmem_init(void)
 	pkmap_page_table = virt_to_kpte(PKMAP_BASE);
 }
 
-static void highmem_setup(void)
+static void __meminit highmem_setup(void)
 {
 	unsigned long pfn;
 
Signature · 1 line
2.29.2
Signature · 2 lines
Oscar Salvador
SUSE L3
#2 lore raw
Quoted 13 lines · Oscar Salvador
Quoted 11 lines · David Hildenbrand

With commit a0cd7a7c4bc0 ("mm: simplify free_highmem_page() and free_reserved_page()") the kernel test robot complains about a warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x23ac): Section mismatch in
reference from the function highmem_setup() to the function .meminit.text:memblock_is_reserved()

This has been broken ever since microblaze added highmem support, because memblock_is_reserved() was already tagged with "__init" back then - most probably the function always got inlined, so we never stumbled over it.

Quoted 7 lines

It might be good to point out that we need __meminit instead of __init because microblaze platform does not define CONFIG_ARCH_KEEP_MEMBLOCK, and __init_memblock fallsback to that.

(I had to go and look as I was puzzled :-) )

Thanks!

Whoever feels like picking this up (@Andrew?) can you add

"We need __meminit because __init_memblock defaults to that without CONFIG_ARCH_KEEP_MEMBLOCK" and __init_memblock is not used outside memblock code.

Signature · 3 lines
Thanks,

David / dhildenb
maintainer
#3 lore raw
Quoted 23 lines · David Hildenbrand
Quoted 14 lines · Oscar Salvador
Quoted 7 lines · David Hildenbrand

With commit a0cd7a7c4bc0 ("mm: simplify free_highmem_page() and free_reserved_page()") the kernel test robot complains about a warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x23ac): Section mismatch in reference from the function highmem_setup() to the function .meminit.text:memblock_is_reserved()

Quoted 5 lines

This has been broken ever since microblaze added highmem support, because memblock_is_reserved() was already tagged with "__init" back then -
most probably the function always got inlined, so we never stumbled over it.

Quoted 7 lines

It might be good to point out that we need __meminit instead of __init because microblaze platform does not define CONFIG_ARCH_KEEP_MEMBLOCK, and __init_memblock fallsback to that.

(I had to go and look as I was puzzled :-) )

Quoted 8 lines

Thanks!

Whoever feels like picking this up (@Andrew?) can you add

"We need __meminit because __init_memblock defaults to that without CONFIG_ARCH_KEEP_MEMBLOCK" and __init_memblock is not used outside memblock code.

Applied with this line added.

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs