Skip to contentSkip to conversation

arm64:mm: delete max_mapnr init.

RFC PATCH New Ganapatrao Kulkarni 3 participants 4 messages Sep 11, 2014 arm64

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 arm64:mm: delete max_mapnr init.

setting max_mapnr results in to error, if enabled with CONFIG_NUMA, which i have to replace with function set_max_mapnr.
However this variable is not used in arm64(with default defconfig) and better to delete instead.

---
 arch/arm64/mm/init.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/mm/init.c +0 -1
index 5472c24..548bd01 100644
@@ -256,7 +256,6 @@ static void __init free_unused_memmap(void)
  */
 void __init mem_init(void)
 {
-	max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
 
 #ifndef CONFIG_SPARSEMEM_VMEMMAP
 	free_unused_memmap();
Signature · 1 line
1.8.1.4
#1 lore raw

RFC PATCH 1/1 arm64:mm: delete max_mapnr init.

Quoted 15 lines · Ganapatrao Kulkarni

setting max_mapnr results in to error, if enabled with CONFIG_NUMA, which i have to replace with function set_max_mapnr.
However this variable is not used in arm64(with default defconfig) and better to delete instead.

---
 arch/arm64/mm/init.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/mm/init.c +0 -0
index 5472c24..548bd01 100644

arch/arm64/mm/init.c static void __init free_unused_memmap(void) · line 259

Quoted 4 lines
arch/arm64/mm/init.c +0 -1
@@ -256,7 +256,6 @@ static void __init free_unused_memmap(void)
  */
 void __init mem_init(void)
 {
-	max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;

I think it's cleaner to call set_max_mapnr in case this grows a use in core code outside of pfn_valid (which we always override).

Will

#2 lore raw

RFC PATCH 1/1 arm64:mm: delete max_mapnr init.

Hi Will,

Quoted 11 lines · Will Deacon
Quoted 10 lines · Ganapatrao Kulkarni

setting max_mapnr results in to error, if enabled with CONFIG_NUMA, which i have to replace with function set_max_mapnr.
However this variable is not used in arm64(with default defconfig) and better to delete instead.

---
 arch/arm64/mm/init.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 12 lines

arch/arm64/mm/init.c static void __init free_unused_memmap(void) · line 259

Quoted 9 lines
arch/arm64/mm/init.c +0 -1
index 5472c24..548bd01 100644
@@ -256,7 +256,6 @@ static void __init free_unused_memmap(void)
  */
 void __init mem_init(void)
 {
-     max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;

I think it's cleaner to call set_max_mapnr in case this grows a use in core code outside of pfn_valid (which we always override).

agreed, thanks for your comment.
shall i send you the patch for this?

Quoted 2 lines

Will

thanks
ganapat

#3 lore raw

RFC PATCH 1/1 arm64:mm: delete max_mapnr init.

Quoted 24 lines · Ganapatrao Kulkarni
Quoted 11 lines · Will Deacon
Quoted 10 lines · Ganapatrao Kulkarni

setting max_mapnr results in to error, if enabled with CONFIG_NUMA, which i have to replace with function set_max_mapnr.
However this variable is not used in arm64(with default defconfig) and better to delete instead.

---
 arch/arm64/mm/init.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 12 lines

arch/arm64/mm/init.c static void __init free_unused_memmap(void) · line 259

Quoted 9 lines
arch/arm64/mm/init.c +0 -1
index 5472c24..548bd01 100644
@@ -256,7 +256,6 @@ static void __init free_unused_memmap(void)
  */
 void __init mem_init(void)
 {
-     max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;

I think it's cleaner to call set_max_mapnr in case this grows a use in core code outside of pfn_valid (which we always override).

Quoted 2 lines

agreed, thanks for your comment.
shall i send you the patch for this?

Yes, please. Given that we don't support NUMA in mainline, the patch will be queued for 3.18 (via Catalin).

Will