Skip to contentSkip to conversation

Remove the parent_node() for each arch

PATCH Applied Dou Liyang 9 participants 24 messages Jul 26, 2017 – Aug 18, 2017

Subsystems (9)
x86 PowerPC MIPS arm64 +5 more subsystems

v1 of 2 Applied 1/11 Latest is v2 →

lore
Share & tools
lore

Dou Liyang

author
#0 lore raw

cover Remove the parent_node() for each arch

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.

Dou Liyang (11):
arm64: numa: Remove the unused parent_node() macro
ia64: topology: Remove the unused parent_node() macro metag/numa: Remove the unused parent_node() macro
MIPS: numa: Remove the unused parent_node() macro powerpc/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 x86/topology: Remove the unused parent_node() macro
asm-generic: numa: Remove the unused parent_node() macro

 arch/arm64/include/asm/numa.h                    | 3 ---
 arch/ia64/include/asm/topology.h                 | 7 -------
 arch/metag/include/asm/topology.h                | 1 -
 arch/mips/include/asm/mach-ip27/topology.h       | 1 -
 arch/mips/include/asm/mach-loongson64/topology.h | 1 -
 arch/powerpc/include/asm/topology.h              | 2 --
 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 ------
 arch/x86/include/asm/topology.h                  | 6 ------
 include/asm-generic/topology.h                   | 3 ---
 12 files changed, 39 deletions(-)
Signature · 1 line
2.5.5
author
#1 lore raw

PATCH 1/11 arm64: numa: 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 ARM64 platform is unnecessary.

Remove it for cleanup.

Cc Michael Ellerman <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 arch/arm64/include/asm/numa.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/numa.h +0 -3
index bf466d1..ef7b238 100644
@@ -7,9 +7,6 @@
 
 #define NR_NODE_MEMBLKS		(MAX_NUMNODES * 2)
 
-/* currently, arm64 implements flat NUMA topology */
-#define parent_node(node)	(node)
-
 int __node_distance(int from, int to);
 #define node_distance(a, b) __node_distance(a, b)
 
Signature · 1 line
2.5.5
Acked-by on v1 1/11
#2 lore raw

Re: [PATCH 01/11] arm64: numa: Remove the unused parent_node() macro

Quoted 21 lines · 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 ARM64 platform is unnecessary.

Remove it for cleanup.

Cc Michael Ellerman <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 arch/arm64/include/asm/numa.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/numa.h +0 -0
index bf466d1..ef7b238 100644

arch/arm64/include/asm/numa.h line 12

Quoted 6 lines
arch/arm64/include/asm/numa.h +0 -3
@@ -7,9 +7,6 @@
 
 #define NR_NODE_MEMBLKS		(MAX_NUMNODES * 2)
 
-/* currently, arm64 implements flat NUMA topology */
-#define parent_node(node)	(node)
-

Where you intending for this to go via the arm64 tree?

Will

author
#3 lore raw

Re: [PATCH 01/11] arm64: numa: Remove the unused parent_node() macro

Hi will,

Quoted 25 lines · Will Deacon
Quoted 24 lines · 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 ARM64 platform is unnecessary.

Remove it for cleanup.

Cc Michael Ellerman <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 arch/arm64/include/asm/numa.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/numa.h +0 -0
index bf466d1..ef7b238 100644
@@ -7,9 +7,6 @@
 
 #define NR_NODE_MEMBLKS		(MAX_NUMNODES * 2)
 
Quoted 8 lines

arch/arm64/include/asm/numa.h line 12

Quoted 3 lines
arch/arm64/include/asm/numa.h +0 -3
-/* currently, arm64 implements flat NUMA topology */
-#define parent_node(node)	(node)
-

Where you intending for this to go via the arm64 tree?

I intend for this to go to upstream tree. shall we?

Thanks

dou.

Quoted 4 lines

Will

maintainer Applied
#4 lore raw

Re: [PATCH 01/11] arm64: numa: Remove the unused parent_node() macro

Quoted 34 lines · Dou Liyang

Hi will,

Quoted 31 lines · Will Deacon
Quoted 21 lines · 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 ARM64 platform is unnecessary.

Remove it for cleanup.

Cc Michael Ellerman <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 arch/arm64/include/asm/numa.h | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/include/asm/numa.h +0 -0
index bf466d1..ef7b238 100644

arch/arm64/include/asm/numa.h line 12

Quoted 6 lines
arch/arm64/include/asm/numa.h +0 -3
@@ -7,9 +7,6 @@
 
 #define NR_NODE_MEMBLKS		(MAX_NUMNODES * 2)
 
-/* currently, arm64 implements flat NUMA topology */
-#define parent_node(node)	(node)
-
Quoted 3 lines
Quoted 1 line

Where you intending for this to go via the arm64 tree?

I intend for this to go to upstream tree. shall we?

Queued for 4.14. Thanks.

Signature · 1 line
Catalin
author
#5 lore raw

PATCH 2/11 ia64: 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 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
#6 lore raw

PATCH 3/11 metag/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 METAG architecture is unnecessary.

Remove it for cleanup.

---
 arch/metag/include/asm/topology.h | 1 -
 1 file changed, 1 deletion(-)
arch/metag/include/asm/topology.h +0 -1
index e95f874..707c7f7 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 4/11 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
author
#8 lore raw

PATCH 5/11 powerpc/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 POWERPC platform is unnecessary.

Remove it for cleanup.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
---
 arch/powerpc/include/asm/topology.h | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/include/asm/topology.h +0 -2
index dc4e159..2d84bca 100644
@@ -16,8 +16,6 @@ struct device_node;
 
 #include <asm/mmzone.h>
 
-#define parent_node(node)	(node)
-
 #define cpumask_of_node(node) ((node) == -1 ?				\
 			       cpu_all_mask :				\
 			       node_to_cpumask_map[node])
Signature · 1 line
2.5.5
reviewer Acked-by on v1 5/11
#9 lore raw

Re: [PATCH 05/11] powerpc/topology: Remove the unused parent_node() macro

Quoted 13 lines · 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 POWERPC platform is unnecessary.

Remove it for cleanup.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Quoted 3 lines
---
 arch/powerpc/include/asm/topology.h | 2 --
 1 file changed, 2 deletions(-)

Thanks for doing this series.

cheers

author
#10 lore raw

Re: [PATCH 05/11] powerpc/topology: Remove the unused parent_node() macro

Hi Michael,

Quoted 19 lines · Michael Ellerman
Quoted 13 lines · 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 POWERPC platform is unnecessary.

Remove it for cleanup.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
Quoted 3 lines
---
 arch/powerpc/include/asm/topology.h | 2 --
 1 file changed, 2 deletions(-)
Quoted 2 lines

Thanks for doing this series.

It's my pleasure. :)

Sincerely,

dou

Quoted 6 lines

cheers

#11 lore raw

Re: [PATCH 05/11] powerpc/topology: Remove the unused parent_node() macro

Quoted 22 lines · Dou Liyang

Hi Michael,

Quoted 19 lines · Michael Ellerman
Quoted 16 lines · 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 POWERPC platform is unnecessary.

Remove it for cleanup.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Michael Ellerman <[email protected]>
---
 arch/powerpc/include/asm/topology.h | 2 --
 1 file changed, 2 deletions(-)
Quoted 3 lines
Quoted 1 line

Thanks for doing this series.

It's my pleasure. :)

Seems other arch maintainers are merging these patches individually, so I grabbed this one and put it in the powerpc tree.

cheers

#12 lore raw

Re: [05/11] powerpc/topology: Remove the unused parent_node() macro

In reply to Dou Liyang
Quoted 7 lines · 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 POWERPC platform is unnecessary.

Remove it for cleanup.

Quoted 7 lines

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7baebe54a64af44dc34d0bd51462f0

cheers

author
#13 lore raw

PATCH 6/11 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.

Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Michael Holzheu <[email protected]>
---
 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
#14 lore raw

Re: [PATCH 06/11] s390/topology: Remove the unused parent_node() macro

Quoted 7 lines · 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.

Quoted 7 lines
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Michael Holzheu <[email protected]>

---

Are arch maintainers supposed to pick these patches up?

In any case: Acked-by: Heiko Carstens <[email protected]>

author
#15 lore raw

Re: [PATCH 06/11] s390/topology: Remove the unused parent_node() macro

Hi Heiko,

Quoted 16 lines · Heiko Carstens
Quoted 7 lines · 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.

Quoted 7 lines
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Michael Holzheu <[email protected]>

---

Quoted 2 lines

Are arch maintainers supposed to pick these patches up?

Yes, As Michael said, It seems these patches are merging individually.

can you merge this patch in s390 tree?

Quoted 3 lines

In any case: Acked-by: Heiko Carstens <[email protected]>

Thanks,
dou.

author
#16 lore raw

PATCH 7/11 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
#17 lore raw

PATCH 8/11 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
maintainer Acked-by on v1 8/11
#18 lore raw

Re: [PATCH 08/11] sparc64/topology: Remove the unused parent_node() macro

From: Dou Liyang <[email protected]>
Date: Wed, 26 Jul 2017 21:34:33 +0800

Quoted 9 lines

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.

author
#19 lore raw

PATCH 9/11 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
Acked-by on v1 9/11
#20 lore raw

Re: [PATCH 09/11] tile/topology: Remove the unused parent_node() macro

Quoted 5 lines · 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.

Quoted 8 lines

Remove it for cleanup.

---
  arch/tile/include/asm/topology.h | 6 ------
  1 file changed, 6 deletions(-)
Signature · 2 lines
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
author
#21 lore raw

PATCH 10/11 x86/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 X86 platform is unnecessary.

Remove it for cleanup.

---
 arch/x86/include/asm/topology.h | 6 ------
 1 file changed, 6 deletions(-)
arch/x86/include/asm/topology.h +0 -6
index 6358a85..c1d2a98 100644
@@ -75,12 +75,6 @@ static inline const struct cpumask *cpumask_of_node(int node)
 
 extern void setup_node_to_cpumask_map(void);
 
-/*
- * 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)
 
 extern int __node_distance(int, int);
Signature · 1 line
2.5.5
#22 lore raw

[tip:sched/core] x86/topology: Remove the unused parent_node() macro

x86/topology: Remove the unused parent_node() macro
Commit-ID:  dbe04493eddfaa89756ec9af8dde56206290182a
Gitweb:     http://git.kernel.org/tip/dbe04493eddfaa89756ec9af8dde56206290182a
Author:     Dou Liyang <[email protected]>
AuthorDate: Wed, 26 Jul 2017 21:34:35 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 27 Jul 2017 10:53:00 +0200

x86/topology: Remove the unused parent_node() macro

Commit:

a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()")

... removed the last user of parent_node(), so remove the macro.

---
 arch/x86/include/asm/topology.h | 6 ------
 1 file changed, 6 deletions(-)
arch/x86/include/asm/topology.h +0 -6
index 6358a85..c1d2a98 100644
@@ -75,12 +75,6 @@ static inline const struct cpumask *cpumask_of_node(int node)
 
 extern void setup_node_to_cpumask_map(void);
 
-/*
- * 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)
 
 extern int __node_distance(int, int);
author
#23 lore raw

PATCH 11/11 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 fc824e2..a91d842 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
 #define cpumask_of_node(node)	((void)node, cpu_online_mask)
 #endif
Signature · 1 line
2.5.5