linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm,mm_init: Mark set_high_memory as _init
@ 2025-05-06 11:10 Oscar Salvador
  2025-05-06 11:13 ` Oscar Salvador
  2025-05-06 17:10 ` Mike Rapoport
  0 siblings, 2 replies; 5+ messages in thread
From: Oscar Salvador @ 2025-05-06 11:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Mike Rapoport, linux-mm, linux-kernel, Oscar Salvador

set_high_memory() touches arch_zone_lowest_possible_pfn which is
marked as _initdata, which creates a section mismatch.
Since the only user of the function is free_area_init() which is also marked
as _init, mark set_high_memory() as _init as well.

Signed-off-by: Oscar Salvador <osalvador@suse.de>
---
 mm/mm_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index 80a5370ac6ab..5efec0399e18 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1785,7 +1785,7 @@ static bool arch_has_descending_max_zone_pfns(void)
 	return IS_ENABLED(CONFIG_ARC) && !IS_ENABLED(CONFIG_ARC_HAS_PAE40);
 }
 
-static void set_high_memory(void)
+static void __init set_high_memory(void)
 {
 	phys_addr_t highmem = memblock_end_of_DRAM();
 
-- 
2.49.0



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

* Re: [PATCH] mm,mm_init: Mark set_high_memory as _init
  2025-05-06 11:10 [PATCH] mm,mm_init: Mark set_high_memory as _init Oscar Salvador
@ 2025-05-06 11:13 ` Oscar Salvador
  2025-05-06 17:08   ` Mike Rapoport
  2025-05-06 17:10 ` Mike Rapoport
  1 sibling, 1 reply; 5+ messages in thread
From: Oscar Salvador @ 2025-05-06 11:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Mike Rapoport, linux-mm, linux-kernel

On Tue, May 06, 2025 at 01:10:12PM +0200, Oscar Salvador wrote:
> set_high_memory() touches arch_zone_lowest_possible_pfn which is
> marked as _initdata, which creates a section mismatch.
> Since the only user of the function is free_area_init() which is also marked
> as _init, mark set_high_memory() as _init as well.
> 
> Signed-off-by: Oscar Salvador <osalvador@suse.de>

Of course, the second after I pressed intro I realized I missed:

 Reported-by: kernel test robot <lkp@intel.com>
 Closes: https://lore.kernel.org/oe-kbuild-all/202505060901.Qcs06UoB-lkp@intel.com/

@Andrew: Any chance you could squeeze those? Or should I send v2?

Thanks


-- 
Oscar Salvador
SUSE Labs


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

* Re: [PATCH] mm,mm_init: Mark set_high_memory as _init
  2025-05-06 11:13 ` Oscar Salvador
@ 2025-05-06 17:08   ` Mike Rapoport
  2025-05-06 17:42     ` Oscar Salvador
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2025-05-06 17:08 UTC (permalink / raw)
  To: Oscar Salvador; +Cc: Andrew Morton, linux-mm, linux-kernel

On Tue, May 06, 2025 at 01:13:16PM +0200, Oscar Salvador wrote:
> On Tue, May 06, 2025 at 01:10:12PM +0200, Oscar Salvador wrote:
> > set_high_memory() touches arch_zone_lowest_possible_pfn which is
> > marked as _initdata, which creates a section mismatch.
> > Since the only user of the function is free_area_init() which is also marked
> > as _init, mark set_high_memory() as _init as well.
> > 
> > Signed-off-by: Oscar Salvador <osalvador@suse.de>
> 
> Of course, the second after I pressed intro I realized I missed:
> 
>  Reported-by: kernel test robot <lkp@intel.com>
>  Closes: https://lore.kernel.org/oe-kbuild-all/202505060901.Qcs06UoB-lkp@intel.com/
> 
> @Andrew: Any chance you could squeeze those? Or should I send v2?

I'll pick this one and add the tags, thanks Oscar.
 
> Thanks
> 
> 
> -- 
> Oscar Salvador
> SUSE Labs

-- 
Sincerely yours,
Mike.


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

* Re: [PATCH] mm,mm_init: Mark set_high_memory as _init
  2025-05-06 11:10 [PATCH] mm,mm_init: Mark set_high_memory as _init Oscar Salvador
  2025-05-06 11:13 ` Oscar Salvador
@ 2025-05-06 17:10 ` Mike Rapoport
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2025-05-06 17:10 UTC (permalink / raw)
  To: Andrew Morton, Oscar Salvador; +Cc: Mike Rapoport, linux-mm, linux-kernel

From: Mike Rapoport (Microsoft) <rppt@kernel.org>

On Tue, 06 May 2025 13:10:12 +0200, Oscar Salvador wrote:
> set_high_memory() touches arch_zone_lowest_possible_pfn which is
> marked as _initdata, which creates a section mismatch.
> Since the only user of the function is free_area_init() which is also marked
> as _init, mark set_high_memory() as _init as well.
> 
> 

Applied to fixes branch of memblock.git tree, thanks!

[1/1] mm,mm_init: Mark set_high_memory as _init
      commit: 42e31f0daf80d9f7bc4ab4000f2795ec3ddf5206

tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: fixes

--
Sincerely yours,
Mike.



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

* Re: [PATCH] mm,mm_init: Mark set_high_memory as _init
  2025-05-06 17:08   ` Mike Rapoport
@ 2025-05-06 17:42     ` Oscar Salvador
  0 siblings, 0 replies; 5+ messages in thread
From: Oscar Salvador @ 2025-05-06 17:42 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Andrew Morton, linux-mm, linux-kernel

On Tue, May 06, 2025 at 08:08:09PM +0300, Mike Rapoport wrote:
> I'll pick this one and add the tags, thanks Oscar.

thank you Mike, appreciated ;-)!
 

-- 
Oscar Salvador
SUSE Labs


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

end of thread, other threads:[~2025-05-06 17:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-06 11:10 [PATCH] mm,mm_init: Mark set_high_memory as _init Oscar Salvador
2025-05-06 11:13 ` Oscar Salvador
2025-05-06 17:08   ` Mike Rapoport
2025-05-06 17:42     ` Oscar Salvador
2025-05-06 17:10 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox