Skip to content

Commit

Permalink
cpumask: remove node_to_first_cpu
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rusty Russell committed Mar 30, 2009
1 parent af76aba commit 0451fb2
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 33 deletions.
5 changes: 0 additions & 5 deletions arch/ia64/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
*/
#define parent_node(nid) (nid)

/*
* Returns the number of the first CPU on Node 'node'.
*/
#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))

/*
* Determines the node for a given pci bus
*/
Expand Down
1 change: 0 additions & 1 deletion arch/mips/include/asm/mach-ip27/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
#define parent_node(node) (node)
#define node_to_cpumask(node) (hub_data(node)->h_cpus)
#define cpumask_of_node(node) (&hub_data(node)->h_cpus)
#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
struct pci_bus;
extern int pcibus_to_node(struct pci_bus *);

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/sgi-ip27/ip27-nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ cont_nmi_dump(void)
if (i == 1000) {
for_each_online_node(node)
if (NODEPDA(node)->dump_count == 0) {
cpu = node_to_first_cpu(node);
cpu = cpumask_first(cpumask_of_node(node));
for (n=0; n < CNODE_NUM_CPUS(node); cpu++, n++) {
CPUMASK_SETB(nmied_cpus, cpu);
/*
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ static inline cpumask_t node_to_cpumask(int node)

#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])

static inline int node_to_first_cpu(int node)
{
return cpumask_first(cpumask_of_node(node));
}

int of_node_to_nid(struct device_node *device);

struct pci_bus;
Expand Down
1 change: 0 additions & 1 deletion arch/sh/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#define node_to_cpumask(node) ((void)node, cpu_online_map)
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
#define node_to_first_cpu(node) ((void)(node),0)

#define pcibus_to_node(bus) ((void)(bus), -1)
#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
Expand Down
5 changes: 0 additions & 5 deletions arch/sparc/include/asm/topology_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ static inline cpumask_t node_to_cpumask(int node)
#define node_to_cpumask_ptr_next(v, node) \
v = &(numa_cpumask_lookup_table[node])

static inline int node_to_first_cpu(int node)
{
return cpumask_first(cpumask_of_node(node));
}

struct pci_bus;
#ifdef CONFIG_PCI
extern int pcibus_to_node(struct pci_bus *pbus);
Expand Down
12 changes: 0 additions & 12 deletions arch/x86/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ static inline cpumask_t node_to_cpumask(int node)
{
return cpu_online_map;
}
static inline int node_to_first_cpu(int node)
{
return first_cpu(cpu_online_map);
}

static inline void setup_node_to_cpumask_map(void) { }

Expand All @@ -237,14 +233,6 @@ static inline void setup_node_to_cpumask_map(void) { }

#include <asm-generic/topology.h>

#ifdef CONFIG_NUMA
/* Returns the number of the first CPU on Node 'node'. */
static inline int node_to_first_cpu(int node)
{
return cpumask_first(cpumask_of_node(node));
}
#endif

extern cpumask_t cpu_coregroup_map(int cpu);
extern const struct cpumask *cpu_coregroup_mask(int cpu);

Expand Down
3 changes: 0 additions & 3 deletions include/asm-generic/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
#ifndef cpumask_of_node
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
#endif
#ifndef node_to_first_cpu
#define node_to_first_cpu(node) ((void)(node),0)
#endif
#ifndef pcibus_to_node
#define pcibus_to_node(bus) ((void)(bus), -1)
#endif
Expand Down

0 comments on commit 0451fb2

Please sign in to comment.