Skip to contentSkip to conversation

Remove the parent_node() for each arch

PATCH In review Dou Liyang 2 participants 10 messages Sep 1, 2017

Subsystems (6)
lore
Share & tools
lore

Dou Liyang

author
#0 lore raw

v2 cover Remove the parent_node() for each arch

Changelog:

v1 --> v2:
--Remove the patches which have been add to each arch tree individually.
[01/11] arm64 ...Has been added to arm64 tree, Queued for 4.14
[03/11] metag ...Has been added to the -mm tree
[05/11] powerpc ...Has been added to the powerpc tree
[10/11] x86 ...Has been added to the tip sched/core

--Rebase the remaining patches and repost.

Michael reports the parent_node() will never be invoked since the Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of it.

So we start removing it from the topology.h headers for each arch.

Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc James Hogan <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Michael Holzheu <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Rich Felker <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Chris Metcalf <[email protected]>
Cc Arnd Bergmann <[email protected]>

Dou Liyang (7):
ia64: topology: Remove the unused parent_node() macro
MIPS: numa: Remove the unused parent_node() macro s390/topology: Remove the unused parent_node() macro sh/numa: Remove the unused parent_node() macro sparc64/topology: Remove the unused parent_node() macro tile/topology: Remove the unused parent_node() macro
asm-generic: numa: Remove the unused parent_node() macro

 arch/ia64/include/asm/topology.h                 | 7 -------
 arch/mips/include/asm/mach-ip27/topology.h       | 1 -
 arch/mips/include/asm/mach-loongson64/topology.h | 1 -
 arch/s390/include/asm/topology.h                 | 6 ------
 arch/sh/include/asm/topology.h                   | 1 -
 arch/sparc/include/asm/topology_64.h             | 2 --
 arch/tile/include/asm/topology.h                 | 6 ------
 include/asm-generic/topology.h                   | 3 ---
 8 files changed, 27 deletions(-)
Signature · 1 line
2.5.5
author
#1 lore raw

PATCH v2 1/7 ia64: topology: Remove the unused parent_node() macro

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macro in IA64(Itanium) platform is unnecessary.

Remove it for cleanup.

---
 arch/ia64/include/asm/topology.h | 7 -------
 1 file changed, 7 deletions(-)
arch/ia64/include/asm/topology.h +0 -7
index 3ad8f69..82f9bf7 100644
@@ -34,13 +34,6 @@
 			       &node_to_cpu_mask[node])
 
 /*
- * Returns the number of the node containing Node 'nid'.
- * Not implemented here. Multi-level hierarchies detected with
- * the help of node_distance().
- */
-#define parent_node(nid) (nid)
-
-/*
  * Determines the node for a given pci bus
  */
 #define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node
Signature · 1 line
2.5.5
author
#2 lore raw

PATCH v2 2/7 MIPS: numa: Remove the unused parent_node() macro

In reply to Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macros in both IP27 and Loongson64 are unnecessary.

Remove it for cleanup.

---
 arch/mips/include/asm/mach-ip27/topology.h       | 1 -
 arch/mips/include/asm/mach-loongson64/topology.h | 1 -
 2 files changed, 2 deletions(-)
arch/mips/include/asm/mach-ip27/topology.h +0 -1
index defd135..3fb7a0e 100644
@@ -23,7 +23,6 @@ struct cpuinfo_ip27 {
 extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
 
 #define cpu_to_node(cpu)	(sn_cpu_info[(cpu)].p_nodeid)
-#define parent_node(node)	(node)
 #define cpumask_of_node(node)	((node) == -1 ?				\
 				 cpu_all_mask :				\
 				 &hub_data(node)->h_cpus)
arch/mips/include/asm/mach-loongson64/topology.h +0 -1
index 0d8f3b5..bcb8856 100644
@@ -4,7 +4,6 @@
 #ifdef CONFIG_NUMA
 
 #define cpu_to_node(cpu)	(cpu_logical_map(cpu) >> 2)
-#define parent_node(node)	(node)
 #define cpumask_of_node(node)	(&__node_data[(node)]->cpumask)
 
 struct pci_bus;
Signature · 1 line
2.5.5
#3 lore raw

Re: [PATCH v2 2/7] MIPS: numa: Remove the unused parent_node() macro

Quoted 6 lines · Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macros in both IP27 and Loongson64 are unnecessary.

Remove it for cleanup.

I already applied v1.

Thanks,

Ralf

author
#4 lore raw

Re: [PATCH v2 2/7] MIPS: numa: Remove the unused parent_node() macro

Hi Ralf,

Quoted 11 lines · Ralf Baechle
Quoted 6 lines · Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macros in both IP27 and Loongson64 are unnecessary.

Remove it for cleanup.

I already applied v1.

Thank you very much. :-)

Maybe I missed some message, so I thought it was not yet accepted.

please ignore this patch.

Thanks,
dou

Quoted 6 lines

Thanks,

Ralf

author
#5 lore raw

PATCH v2 3/7 s390/topology: Remove the unused parent_node() macro

In reply to Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macro in S390 platform is unnecessary.

Remove it for cleanup.

---
 arch/s390/include/asm/topology.h | 6 ------
 1 file changed, 6 deletions(-)
arch/s390/include/asm/topology.h +0 -6
index fa1bfce..5222da1 100644
@@ -77,12 +77,6 @@ static inline const struct cpumask *cpumask_of_node(int node)
 	return &node_to_cpumask_map[node];
 }
 
-/*
- * Returns the number of the node containing node 'node'. This
- * architecture is flat, so it is a pretty simple function!
- */
-#define parent_node(node) (node)
-
 #define pcibus_to_node(bus) __pcibus_to_node(bus)
 
 #define node_distance(a, b) __node_distance(a, b)
Signature · 1 line
2.5.5
author
#6 lore raw

PATCH v2 4/7 sh/numa: Remove the unused parent_node() macro

In reply to Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macro in SUPERH platform is unnecessary.

Remove it for cleanup.

---
 arch/sh/include/asm/topology.h | 1 -
 1 file changed, 1 deletion(-)
arch/sh/include/asm/topology.h +0 -1
index 358e3f5..6931f50 100644
@@ -4,7 +4,6 @@
 #ifdef CONFIG_NUMA
 
 #define cpu_to_node(cpu)	((void)(cpu),0)
-#define parent_node(node)	((void)(node),0)
 
 #define cpumask_of_node(node)	((void)node, cpu_online_mask)
 
Signature · 1 line
2.5.5
author
#7 lore raw

PATCH v2 5/7 sparc64/topology: Remove the unused parent_node() macro

In reply to Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macro in SPARC64 platform is unnecessary.

Remove it for cleanup.

---
 arch/sparc/include/asm/topology_64.h | 2 --
 1 file changed, 2 deletions(-)
arch/sparc/include/asm/topology_64.h +0 -2
index ad5293f..0fcc9a0 100644
@@ -10,8 +10,6 @@ static inline int cpu_to_node(int cpu)
 	return numa_cpu_lookup_table[cpu];
 }
 
-#define parent_node(node)	(node)
-
 #define cpumask_of_node(node) ((node) = -1 ?				\
 			       cpu_all_mask :				\
 			       &numa_cpumask_lookup_table[node])
Signature · 1 line
2.5.5
author
#8 lore raw

PATCH v2 6/7 tile/topology: Remove the unused parent_node() macro

In reply to Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macro in tile platform is unnecessary.

Remove it for cleanup.

---
 arch/tile/include/asm/topology.h | 6 ------
 1 file changed, 6 deletions(-)
arch/tile/include/asm/topology.h +0 -6
index b11d5fc..635a0a4 100644
@@ -29,12 +29,6 @@ static inline int cpu_to_node(int cpu)
 	return cpu_2_node[cpu];
 }
 
-/*
- * Returns the number of the node containing Node 'node'.
- * This architecture is flat, so it is a pretty simple function!
- */
-#define parent_node(node) (node)
-
 /* Returns a bitmask of CPUs on Node 'node'. */
 static inline const struct cpumask *cpumask_of_node(int node)
 {
Signature · 1 line
2.5.5
author
#9 lore raw

PATCH v2 7/7 asm-generic: numa: Remove the unused parent_node() macro

In reply to Dou Liyang

Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removes the last user of parent_node().

The parent_node() macro in generic situation is unnecessary.

Remove it for cleanup.

---
 include/asm-generic/topology.h | 3 ---
 1 file changed, 3 deletions(-)
include/asm-generic/topology.h +0 -3
index 5d2add1..2388737 100644
@@ -44,9 +44,6 @@
 #define cpu_to_mem(cpu)		((void)(cpu),0)
 #endif
 
-#ifndef parent_node
-#define parent_node(node)	((void)(node),0)
-#endif
 #ifndef cpumask_of_node
   #ifdef CONFIG_NEED_MULTIPLE_NODES
     #define cpumask_of_node(node)	((node) == 0 ? cpu_online_mask : cpu_none_mask)
Signature · 1 line
2.5.5