All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] microblaze: tag highmem_setup() with __meminit
@ 2021-03-01 11:47 David Hildenbrand
  2021-03-01 22:18 ` Oscar Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2021-03-01 11:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, David Hildenbrand, kernel test robot, Andrew Morton,
	Michal Simek, Mike Rapoport, Thomas Gleixner, Arvind Sankar,
	Ira Weiny, Randy Dunlap, Oscar Salvador, Anshuman Khandual

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.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 2f2f371f8907 ("microblaze: Highmem support")
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 arch/microblaze/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 181e48782e6c..05cf1fb3f5ff 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -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;
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] microblaze: tag highmem_setup() with __meminit
  2021-03-01 11:47 [PATCH v1] microblaze: tag highmem_setup() with __meminit David Hildenbrand
@ 2021-03-01 22:18 ` Oscar Salvador
  2021-03-02  9:04   ` David Hildenbrand
  0 siblings, 1 reply; 4+ messages in thread
From: Oscar Salvador @ 2021-03-01 22:18 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: linux-kernel, linux-mm, kernel test robot, Andrew Morton,
	Michal Simek, Mike Rapoport, Thomas Gleixner, Arvind Sankar,
	Ira Weiny, Randy Dunlap, Anshuman Khandual

On Mon, Mar 01, 2021 at 12:47:49PM +0100, David Hildenbrand wrote:
> 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 :-) )

Reviewed-by: Oscar Salvador <osalvador@suse.de>

> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 2f2f371f8907 ("microblaze: Highmem support")
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Simek <monstr@monstr.eu>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Arvind Sankar <nivedita@alum.mit.edu>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  arch/microblaze/mm/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
> index 181e48782e6c..05cf1fb3f5ff 100644
> --- a/arch/microblaze/mm/init.c
> +++ b/arch/microblaze/mm/init.c
> @@ -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;
>  
> -- 
> 2.29.2
> 
> 

-- 
Oscar Salvador
SUSE L3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] microblaze: tag highmem_setup() with __meminit
  2021-03-01 22:18 ` Oscar Salvador
@ 2021-03-02  9:04   ` David Hildenbrand
  2021-03-02 13:28     ` Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2021-03-02  9:04 UTC (permalink / raw)
  To: Oscar Salvador
  Cc: linux-kernel, linux-mm, kernel test robot, Andrew Morton,
	Michal Simek, Mike Rapoport, Thomas Gleixner, Arvind Sankar,
	Ira Weiny, Randy Dunlap, Anshuman Khandual

On 01.03.21 23:18, Oscar Salvador wrote:
> On Mon, Mar 01, 2021 at 12:47:49PM +0100, David Hildenbrand wrote:
>> 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 :-) )
> 
> Reviewed-by: Oscar Salvador <osalvador@suse.de>

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.

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] microblaze: tag highmem_setup() with __meminit
  2021-03-02  9:04   ` David Hildenbrand
@ 2021-03-02 13:28     ` Michal Simek
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2021-03-02 13:28 UTC (permalink / raw)
  To: David Hildenbrand, Oscar Salvador
  Cc: linux-kernel, linux-mm, kernel test robot, Andrew Morton,
	Mike Rapoport, Thomas Gleixner, Arvind Sankar, Ira Weiny,
	Randy Dunlap, Anshuman Khandual



On 3/2/21 10:04 AM, David Hildenbrand wrote:
> On 01.03.21 23:18, Oscar Salvador wrote:
>> On Mon, Mar 01, 2021 at 12:47:49PM +0100, David Hildenbrand wrote:
>>> 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 :-) )
>>
>> Reviewed-by: Oscar Salvador <osalvador@suse.de>
> 
> 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


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-02 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 11:47 [PATCH v1] microblaze: tag highmem_setup() with __meminit David Hildenbrand
2021-03-01 22:18 ` Oscar Salvador
2021-03-02  9:04   ` David Hildenbrand
2021-03-02 13:28     ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.