2017-09-01 02:56:51

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 0/7] 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: [email protected]
Cc: Ralf Baechle <[email protected]>
Cc: James Hogan <[email protected]>
Cc: [email protected]
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Michael Holzheu <[email protected]>
Cc: [email protected]
Cc: Yoshinori Sato <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: [email protected]
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: Chris Metcalf <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: [email protected]
Cc: [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(-)

--
2.5.5




2017-09-01 02:56:55

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 4/7] sh/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 SUPERH platform is unnecessary.

Remove it for cleanup.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: [email protected]
---
arch/sh/include/asm/topology.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index 358e3f5..6931f50 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -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)

--
2.5.5



2017-09-01 02:57:12

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 5/7] sparc64/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 SPARC64 platform is unnecessary.

Remove it for cleanup.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Acked-by: David S. Miller <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
---
arch/sparc/include/asm/topology_64.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index ad5293f..0fcc9a0 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -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])
--
2.5.5



2017-09-01 02:57:28

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 7/7] asm-generic: 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 generic situation is unnecessary.

Remove it for cleanup.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: [email protected]
---
include/asm-generic/topology.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 5d2add1..2388737 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -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)
--
2.5.5



2017-09-01 02:57:27

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 3/7] s390/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 S390 platform is unnecessary.

Remove it for cleanup.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Acked-by: Heiko Carstens <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Michael Holzheu <[email protected]>
Cc: [email protected]
---
arch/s390/include/asm/topology.h | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h
index fa1bfce..5222da1 100644
--- a/arch/s390/include/asm/topology.h
+++ b/arch/s390/include/asm/topology.h
@@ -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)
--
2.5.5



2017-09-01 02:58:00

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 6/7] tile/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 tile platform is unnecessary.

Remove it for cleanup.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Acked-by: Chris Metcalf <[email protected]>
Cc: Chris Metcalf <[email protected]>
---
arch/tile/include/asm/topology.h | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/tile/include/asm/topology.h b/arch/tile/include/asm/topology.h
index b11d5fc..635a0a4 100644
--- a/arch/tile/include/asm/topology.h
+++ b/arch/tile/include/asm/topology.h
@@ -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)
{
--
2.5.5



2017-09-01 02:56:48

by Dou Liyang

[permalink] [raw]
Subject: [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.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: [email protected]
---
arch/ia64/include/asm/topology.h | 7 -------
1 file changed, 7 deletions(-)

diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 3ad8f69..82f9bf7 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -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
--
2.5.5



2017-09-01 02:58:20

by Dou Liyang

[permalink] [raw]
Subject: [PATCH v2 2/7] MIPS: 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() macros in both IP27 and Loongson64 are unnecessary.

Remove it for cleanup.

Reported-by: Michael Ellerman <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: James Hogan <[email protected]>
Cc: [email protected]
---
arch/mips/include/asm/mach-ip27/topology.h | 1 -
arch/mips/include/asm/mach-loongson64/topology.h | 1 -
2 files changed, 2 deletions(-)

diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
index defd135..3fb7a0e 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -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)
diff --git a/arch/mips/include/asm/mach-loongson64/topology.h b/arch/mips/include/asm/mach-loongson64/topology.h
index 0d8f3b5..bcb8856 100644
--- a/arch/mips/include/asm/mach-loongson64/topology.h
+++ b/arch/mips/include/asm/mach-loongson64/topology.h
@@ -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;
--
2.5.5



2017-09-01 08:43:03

by Ralf Baechle

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

On Fri, Sep 01, 2017 at 10:56:34AM +0800, Dou Liyang wrote:

> 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

2017-09-01 08:54:08

by Dou Liyang

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

Hi Ralf,

At 09/01/2017 04:42 PM, Ralf Baechle wrote:
> On Fri, Sep 01, 2017 at 10:56:34AM +0800, Dou Liyang wrote:
>
>> 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
> Thanks,
>
> Ralf
>
>
>