aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-03-31 00:05:11 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-03-30 07:35:12 -0400
commit0451fb2ebc4f65c265bb51d71a2fc986ebf20218 (patch)
tree6851f5645cd53d9c243b048919ca2a5683e97a64
parentaf76aba00fdcfb21535c9f9872245d14097a4561 (diff)
cpumask: remove node_to_first_cpu
Everyone defines it, and only one person uses it (arch/mips/sgi-ip27/ip27-nmi.c). So just open code it there. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: linux-mips@linux-mips.org
-rw-r--r--arch/ia64/include/asm/topology.h5
-rw-r--r--arch/mips/include/asm/mach-ip27/topology.h1
-rw-r--r--arch/mips/sgi-ip27/ip27-nmi.c2
-rw-r--r--arch/powerpc/include/asm/topology.h5
-rw-r--r--arch/sh/include/asm/topology.h1
-rw-r--r--arch/sparc/include/asm/topology_64.h5
-rw-r--r--arch/x86/include/asm/topology.h12
-rw-r--r--include/asm-generic/topology.h3
8 files changed, 1 insertions, 33 deletions
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 3193f4417e16..f260dcf21515 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -44,11 +44,6 @@
44#define parent_node(nid) (nid) 44#define parent_node(nid) (nid)
45 45
46/* 46/*
47 * Returns the number of the first CPU on Node 'node'.
48 */
49#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
50
51/*
52 * Determines the node for a given pci bus 47 * Determines the node for a given pci bus
53 */ 48 */
54#define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node 49#define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
index 55d481569a1f..07547231e078 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -26,7 +26,6 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
26#define parent_node(node) (node) 26#define parent_node(node) (node)
27#define node_to_cpumask(node) (hub_data(node)->h_cpus) 27#define node_to_cpumask(node) (hub_data(node)->h_cpus)
28#define cpumask_of_node(node) (&hub_data(node)->h_cpus) 28#define cpumask_of_node(node) (&hub_data(node)->h_cpus)
29#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
30struct pci_bus; 29struct pci_bus;
31extern int pcibus_to_node(struct pci_bus *); 30extern int pcibus_to_node(struct pci_bus *);
32 31
diff --git a/arch/mips/sgi-ip27/ip27-nmi.c b/arch/mips/sgi-ip27/ip27-nmi.c
index 64459e7d891b..b174a51a1621 100644
--- a/arch/mips/sgi-ip27/ip27-nmi.c
+++ b/arch/mips/sgi-ip27/ip27-nmi.c
@@ -219,7 +219,7 @@ cont_nmi_dump(void)
219 if (i == 1000) { 219 if (i == 1000) {
220 for_each_online_node(node) 220 for_each_online_node(node)
221 if (NODEPDA(node)->dump_count == 0) { 221 if (NODEPDA(node)->dump_count == 0) {
222 cpu = node_to_first_cpu(node); 222 cpu = cpumask_first(cpumask_of_node(node));
223 for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) { 223 for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) {
224 CPUMASK_SETB(nmied_cpus, cpu); 224 CPUMASK_SETB(nmied_cpus, cpu);
225 /* 225 /*
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 375258559ae6..054a16d68082 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -24,11 +24,6 @@ static inline cpumask_t node_to_cpumask(int node)
24 24
25#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) 25#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
26 26
27static inline int node_to_first_cpu(int node)
28{
29 return cpumask_first(cpumask_of_node(node));
30}
31
32int of_node_to_nid(struct device_node *device); 27int of_node_to_nid(struct device_node *device);
33 28
34struct pci_bus; 29struct pci_bus;
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index 066f0fba590e..a3f239545897 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -33,7 +33,6 @@
33 33
34#define node_to_cpumask(node) ((void)node, cpu_online_map) 34#define node_to_cpumask(node) ((void)node, cpu_online_map)
35#define cpumask_of_node(node) ((void)node, cpu_online_mask) 35#define cpumask_of_node(node) ((void)node, cpu_online_mask)
36#define node_to_first_cpu(node) ((void)(node),0)
37 36
38#define pcibus_to_node(bus) ((void)(bus), -1) 37#define pcibus_to_node(bus) ((void)(bus), -1)
39#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ 38#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index 5bc0b8fd6374..2770f64fdc3b 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -28,11 +28,6 @@ static inline cpumask_t node_to_cpumask(int node)
28#define node_to_cpumask_ptr_next(v, node) \ 28#define node_to_cpumask_ptr_next(v, node) \
29 v = &(numa_cpumask_lookup_table[node]) 29 v = &(numa_cpumask_lookup_table[node])
30 30
31static inline int node_to_first_cpu(int node)
32{
33 return cpumask_first(cpumask_of_node(node));
34}
35
36struct pci_bus; 31struct pci_bus;
37#ifdef CONFIG_PCI 32#ifdef CONFIG_PCI
38extern int pcibus_to_node(struct pci_bus *pbus); 33extern int pcibus_to_node(struct pci_bus *pbus);
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 77cfb2cfb386..744299c0b774 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -217,10 +217,6 @@ static inline cpumask_t node_to_cpumask(int node)
217{ 217{
218 return cpu_online_map; 218 return cpu_online_map;
219} 219}
220static inline int node_to_first_cpu(int node)
221{
222 return first_cpu(cpu_online_map);
223}
224 220
225static inline void setup_node_to_cpumask_map(void) { } 221static inline void setup_node_to_cpumask_map(void) { }
226 222
@@ -237,14 +233,6 @@ static inline void setup_node_to_cpumask_map(void) { }
237 233
238#include <asm-generic/topology.h> 234#include <asm-generic/topology.h>
239 235
240#ifdef CONFIG_NUMA
241/* Returns the number of the first CPU on Node 'node'. */
242static inline int node_to_first_cpu(int node)
243{
244 return cpumask_first(cpumask_of_node(node));
245}
246#endif
247
248extern cpumask_t cpu_coregroup_map(int cpu); 236extern cpumask_t cpu_coregroup_map(int cpu);
249extern const struct cpumask *cpu_coregroup_mask(int cpu); 237extern const struct cpumask *cpu_coregroup_mask(int cpu);
250 238
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 0e9e2bc0ee96..47766b30061a 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -43,9 +43,6 @@
43#ifndef cpumask_of_node 43#ifndef cpumask_of_node
44#define cpumask_of_node(node) ((void)node, cpu_online_mask) 44#define cpumask_of_node(node) ((void)node, cpu_online_mask)
45#endif 45#endif
46#ifndef node_to_first_cpu
47#define node_to_first_cpu(node) ((void)(node),0)
48#endif
49#ifndef pcibus_to_node 46#ifndef pcibus_to_node
50#define pcibus_to_node(bus) ((void)(bus), -1) 47#define pcibus_to_node(bus) ((void)(bus), -1)
51#endif 48#endif