ARM: mm: make use of new memblocks_present() helper
PATCH 1/1 ARM: mm: make use of new memblocks_present() helper
Cleanup the arm_memory_present() function seeing it's very similar to other arches.
The new memblocks_present() helper checks for node ids which the arm version did not. However, this is equivalent seeing HAVE_MEMBLOCK_NODE_MAP should be false in this arch and therefore memblock_get_region_node() should return 0.
--- arch/arm/mm/init.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-)
This is just a resend.
arch/arm/mm/init.c +1 -16
@@ -182,21 +182,6 @@ int pfn_valid(unsigned long pfn)EXPORT_SYMBOL (pfn_valid);#endif -#ifndef CONFIG_SPARSEMEM -static void __init arm_memory_present (void ) -{ -} -#else -static void __init arm_memory_present (void ) -{ -struct memblock_region *reg; - -for_each_memblock (memory, reg) -memory_present (0 ,memblock_region_memory_base_pfn (reg), -memblock_region_memory_end_pfn (reg)); -} -#endif -static bool arm_memblock_steal_permitted = true;phys_addr_t __init arm_memblock_steal (phys_addr_t size,phys_addr_t align)
@@ -292,7 +277,7 @@ void __init bootmem_init(void)* Sparsemem tries to allocate bootmem in memory_present(), * so must be done after the fixed reservations */ -arm_memory_present (); +memblocks_present ();/* * sparse_init() needs the bootmem allocator up and running.
--
2.20.1
Quoted 8 lines · Logan Gunthorpe
Cleanup the
arm_memory_present()function seeing it's very similar to other arches.The new
memblocks_present()helper checks for node ids which the arm version did not. However, this is equivalent seeingHAVE_MEMBLOCK_NODE_MAPshould be false in this arch and thereforememblock_get_region_node()should return 0.
Quoted 6 lines
Signed-off-by Logan Gunthorpe <[email protected]>Cc Russell King <[email protected]>Cc Kees Cook <[email protected]>Cc Philip Derrin <[email protected]>Cc "Steven Rostedt (VMware)" <[email protected]>Cc Nicolas Pitre <[email protected]>
Strangely, I've got a feeling I've already reviewed such patch from a different person...
Quoted 44 lines
--- arch/arm/mm/init.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-)This is just a resend.
arch/arm/mm/init.c +1
-17@@ -182,21 +182,6 @@ int pfn_valid(unsigned long pfn)EXPORT_SYMBOL (pfn_valid);#endif -#ifndef CONFIG_SPARSEMEM -static void __init arm_memory_present (void ) -{ -} -#else -static void __init arm_memory_present (void ) -{ -struct memblock_region *reg; - -for_each_memblock (memory, reg) -memory_present (0 ,memblock_region_memory_base_pfn (reg), -memblock_region_memory_end_pfn (reg)); -} -#endif -static bool arm_memblock_steal_permitted = true;phys_addr_t __init arm_memblock_steal (phys_addr_t size,phys_addr_t align)@@ -292,7 +277,7 @@ void __init bootmem_init(void)* Sparsemem tries to allocate bootmem in memory_present(), * so must be done after the fixed reservations */ -arm_memory_present (); +memblocks_present ();/* * sparse_init() needs the bootmem allocator up and running. -- 2.20.1
Signature · 2 lines
Sincerely yours, Mike.
Quoted 16 lines · Mike Rapoport
Quoted 8 lines · Logan Gunthorpe
Cleanup the
arm_memory_present()function seeing it's very similar to other arches.The new
memblocks_present()helper checks for node ids which the arm version did not. However, this is equivalent seeingHAVE_MEMBLOCK_NODE_MAPshould be false in this arch and thereforememblock_get_region_node()should return 0.Quoted 6 lines
Signed-off-by Logan Gunthorpe <[email protected]>Cc Russell King <[email protected]>Cc Kees Cook <[email protected]>Cc Philip Derrin <[email protected]>Cc "Steven Rostedt (VMware)" <[email protected]>Cc Nicolas Pitre <[email protected]>
Quoted 4 lines
Reviewed-by Mike Rapoport <[email protected]>Strangely, I've got a feeling I've already reviewed such patch from a different person...
You're probably referring to [1] which was for arm64 and was redundant as my patch for that architecture was already picked up by Catalin.
I was the person who originally introduced memblocks_present() and I'm still hoping to get the cleanup patches for the arm and sh arches to be picked up.
Thanks,
Logan
Quoted 19 lines · Logan Gunthorpe
Quoted 16 lines · Mike Rapoport
Quoted 14 lines · Logan Gunthorpe
Cleanup the
arm_memory_present()function seeing it's very similar to other arches.The new
memblocks_present()helper checks for node ids which the arm version did not. However, this is equivalent seeingHAVE_MEMBLOCK_NODE_MAPshould be false in this arch and thereforememblock_get_region_node()should return 0.Signed-off-by Logan Gunthorpe <[email protected]>Cc Russell King <[email protected]>Cc Kees Cook <[email protected]>Cc Philip Derrin <[email protected]>Cc "Steven Rostedt (VMware)" <[email protected]>Cc Nicolas Pitre <[email protected]>
Quoted 7 lines
Quoted 4 lines
Reviewed-by Mike Rapoport <[email protected]>Strangely, I've got a feeling I've already reviewed such patch from a different person...
You're probably referring to [1] which was for arm64 and was redundant as my patch for that architecture was already picked up by Catalin.
I've found the patch [1] I mentioned, and it was for ARM.
Quoted 3 lines
I was the person who originally introduced
memblocks_present()and I'm still hoping to get the cleanup patches for the arm and sh arches to be picked up.
AFAIK, For ARM you'd need to put it into Russel's patch tracking system [2].
Quoted 7 lines
Thanks,
Logan
[1] https://lore.kernel.org/lkml/[email protected]
[2] https://www.arm.linux.org.uk/developer/patches/
Signature · 2 lines
Sincerely yours, Mike.
Quoted 4 lines · Mike Rapoport
Quoted 2 lines
You're probably referring to [1] which was for arm64 and was redundant as my patch for that architecture was already picked up by Catalin.
I've found the patch [1] I mentioned, and it was for ARM.
Ah, well, I wish knew I knew ahead of time that someone was doing my work for me... My initial submission seemed to have been missed[1].
Quoted 1 line
AFAIK, For ARM you'd need to put it into Russel's patch tracking system [2].
Ah, I did not know this.
Logan