Skip to contentSkip to conversation

mm: Remove mmu_gathers storage from remaining architectures

PATCH Applied Stafford Horne 2 participants 3 messages Feb 5, 2022 – Feb 6, 2022

Subsystems (2)
lore
Share & tools
lore

Stafford Horne

author maintainer
#0 lore raw

PATCH 1/1 mm: Remove mmu_gathers storage from remaining architectures

Originally the mmu_gathers were removed in commit 1c3951769621 ("mm: now that all old mmu_gather code is gone, remove the storage"). However, the openrisc and hexagon architecture were merged around the same time and mmu_gathers was not removed.

This patch removes them from openrisc, hexagon and nds32:

Noticed while cleaning this warning:

arch/openrisc/mm/init.c:41:1: warning: symbol 'mmu_gathers' was not declared. Should it be static?

---
 arch/hexagon/mm/init.c  | 2 --
 arch/nds32/mm/init.c    | 1 -
 arch/openrisc/mm/init.c | 2 --
 3 files changed, 5 deletions(-)
arch/hexagon/mm/init.c +0 -2
index f01e91e10d95..3167a3b5c97b 100644
@@ -29,8 +29,6 @@ int max_kernel_seg = 0x303;
 /*  indicate pfn's of high memory  */
 unsigned long highstart_pfn, highend_pfn;
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 /* Default cache attribute for newly created page tables */
 unsigned long _dflt_cache_att = CACHEDEF;
 
arch/nds32/mm/init.c +0 -1
index f63f839738c4..825c85cab1a1 100644
@@ -18,7 +18,6 @@
 #include <asm/tlb.h>
 #include <asm/page.h>
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 DEFINE_SPINLOCK(anon_alias_lock);
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 
arch/openrisc/mm/init.c +0 -2
index 97305bde1b16..3a021ab6f1ae 100644
@@ -38,8 +38,6 @@
 
 int mem_init_done;
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 static void __init zone_sizes_init(void)
 {
 	unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
Signature · 1 line
2.31.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Stafford Horne

Originally the mmu_gathers were removed in commit 1c3951769621 ("mm: now that all old mmu_gather code is gone, remove the storage"). However, the openrisc and hexagon architecture were merged around the same time and mmu_gathers was not removed.

Quoted 7 lines

This patch removes them from openrisc, hexagon and nds32:

Noticed while cleaning this warning:

arch/openrisc/mm/init.c:41:1: warning: symbol 'mmu_gathers' was not declared. Should it be static?

Quoted 47 lines
---
 arch/hexagon/mm/init.c  | 2 --
 arch/nds32/mm/init.c    | 1 -
 arch/openrisc/mm/init.c | 2 --
 3 files changed, 5 deletions(-)
arch/hexagon/mm/init.c +0 -2
index f01e91e10d95..3167a3b5c97b 100644
@@ -29,8 +29,6 @@ int max_kernel_seg = 0x303;
 /*  indicate pfn's of high memory  */
 unsigned long highstart_pfn, highend_pfn;
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 /* Default cache attribute for newly created page tables */
 unsigned long _dflt_cache_att = CACHEDEF;
 
arch/nds32/mm/init.c +0 -1
index f63f839738c4..825c85cab1a1 100644
@@ -18,7 +18,6 @@
 #include <asm/tlb.h>
 #include <asm/page.h>
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 DEFINE_SPINLOCK(anon_alias_lock);
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 
arch/openrisc/mm/init.c +0 -2
index 97305bde1b16..3a021ab6f1ae 100644
@@ -38,8 +38,6 @@
 
 int mem_init_done;
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 static void __init zone_sizes_init(void)
 {
 	unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
Signature · 1 line
2.31.1
Signature · 2 lines
Sincerely yours,
Mike.
author maintainer
#2 lore raw
Quoted 8 lines · Mike Rapoport
Quoted 7 lines · Stafford Horne

Originally the mmu_gathers were removed in commit 1c3951769621 ("mm: now that all old mmu_gather code is gone, remove the storage"). However, the openrisc and hexagon architecture were merged around the same time and mmu_gathers was not removed.

This patch removes them from openrisc, hexagon and nds32:

Quoted 7 lines
Quoted 5 lines

Noticed while cleaning this warning:

arch/openrisc/mm/init.c:41:1: warning: symbol 'mmu_gathers' was not declared. Should it be static?

Thank you,

BTW For now my plan is to queue this on my openrisc branch unless someone else wants to pick this up.

-Stafford

Quoted 51 lines
Quoted 47 lines
---
 arch/hexagon/mm/init.c  | 2 --
 arch/nds32/mm/init.c    | 1 -
 arch/openrisc/mm/init.c | 2 --
 3 files changed, 5 deletions(-)
arch/hexagon/mm/init.c +0 -2
index f01e91e10d95..3167a3b5c97b 100644
@@ -29,8 +29,6 @@ int max_kernel_seg = 0x303;
 /*  indicate pfn's of high memory  */
 unsigned long highstart_pfn, highend_pfn;
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 /* Default cache attribute for newly created page tables */
 unsigned long _dflt_cache_att = CACHEDEF;
 
arch/nds32/mm/init.c +0 -1
index f63f839738c4..825c85cab1a1 100644
@@ -18,7 +18,6 @@
 #include <asm/tlb.h>
 #include <asm/page.h>
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 DEFINE_SPINLOCK(anon_alias_lock);
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 
arch/openrisc/mm/init.c +0 -2
index 97305bde1b16..3a021ab6f1ae 100644
@@ -38,8 +38,6 @@
 
 int mem_init_done;
 
-DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-
 static void __init zone_sizes_init(void)
 {
 	unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
Signature · 1 line
2.31.1
Signature · 2 lines
Sincerely yours,
Mike.