cpumask: remove obsolete node_to_cpumask now everyone uses cpumask_of_node

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2009-09-24 09:34:26 -06:00
parent b966cd6b28
commit 29c337a034
8 changed files with 1 additions and 57 deletions

View file

@ -22,23 +22,6 @@ static inline int cpu_to_node(int cpu)
return node; return node;
} }
static inline cpumask_t node_to_cpumask(int node)
{
cpumask_t node_cpu_mask = CPU_MASK_NONE;
int cpu;
for_each_online_cpu(cpu) {
if (cpu_to_node(cpu) == node)
cpu_set(cpu, node_cpu_mask);
}
#ifdef DEBUG_NUMA
printk("node %d: cpu_mask: %016lx\n", node, node_cpu_mask);
#endif
return node_cpu_mask;
}
extern struct cpumask node_to_cpumask_map[]; extern struct cpumask node_to_cpumask_map[];
/* FIXME: This is dumb, recalculating every time. But simple. */ /* FIXME: This is dumb, recalculating every time. But simple. */
static const struct cpumask *cpumask_of_node(int node) static const struct cpumask *cpumask_of_node(int node)

View file

@ -33,7 +33,6 @@
/* /*
* Returns a bitmask of CPUs on Node 'node'. * Returns a bitmask of CPUs on Node 'node'.
*/ */
#define node_to_cpumask(node) (node_to_cpu_mask[node])
#define cpumask_of_node(node) (&node_to_cpu_mask[node]) #define cpumask_of_node(node) (&node_to_cpu_mask[node])
/* /*

View file

@ -24,7 +24,6 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid) #define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
#define parent_node(node) (node) #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 cpumask_of_node(node) (&hub_data(node)->h_cpus)
struct pci_bus; struct pci_bus;
extern int pcibus_to_node(struct pci_bus *); extern int pcibus_to_node(struct pci_bus *);

View file

@ -421,7 +421,7 @@ static void __init node_mem_init(cnodeid_t node)
/* /*
* A node with nothing. We use it to avoid any special casing in * A node with nothing. We use it to avoid any special casing in
* node_to_cpumask * cpumask_of_node
*/ */
static struct node_data null_node = { static struct node_data null_node = {
.hub = { .hub = {

View file

@ -17,11 +17,6 @@ static inline int cpu_to_node(int cpu)
#define parent_node(node) (node) #define parent_node(node) (node)
static inline cpumask_t node_to_cpumask(int node)
{
return numa_cpumask_lookup_table[node];
}
#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
int of_node_to_nid(struct device_node *device); int of_node_to_nid(struct device_node *device);

View file

@ -31,7 +31,6 @@
#define cpu_to_node(cpu) ((void)(cpu),0) #define cpu_to_node(cpu) ((void)(cpu),0)
#define parent_node(node) ((void)(node),0) #define parent_node(node) ((void)(node),0)
#define node_to_cpumask(node) ((void)node, cpu_online_map)
#define cpumask_of_node(node) ((void)node, cpu_online_mask) #define cpumask_of_node(node) ((void)node, cpu_online_mask)
#define pcibus_to_node(bus) ((void)(bus), -1) #define pcibus_to_node(bus) ((void)(bus), -1)

View file

@ -12,22 +12,8 @@ static inline int cpu_to_node(int cpu)
#define parent_node(node) (node) #define parent_node(node) (node)
static inline cpumask_t node_to_cpumask(int node)
{
return numa_cpumask_lookup_table[node];
}
#define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node])
/*
* Returns a pointer to the cpumask of CPUs on Node 'node'.
* Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
*/
#define node_to_cpumask_ptr(v, node) \
cpumask_t *v = &(numa_cpumask_lookup_table[node])
#define node_to_cpumask_ptr_next(v, node) \
v = &(numa_cpumask_lookup_table[node])
struct pci_bus; struct pci_bus;
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
extern int pcibus_to_node(struct pci_bus *pbus); extern int pcibus_to_node(struct pci_bus *pbus);

View file

@ -37,9 +37,6 @@
#ifndef parent_node #ifndef parent_node
#define parent_node(node) ((void)(node),0) #define parent_node(node) ((void)(node),0)
#endif #endif
#ifndef node_to_cpumask
#define node_to_cpumask(node) ((void)node, cpu_online_map)
#endif
#ifndef cpumask_of_node #ifndef cpumask_of_node
#define cpumask_of_node(node) ((void)node, cpu_online_mask) #define cpumask_of_node(node) ((void)node, cpu_online_mask)
#endif #endif
@ -55,18 +52,4 @@
#endif /* CONFIG_NUMA */ #endif /* CONFIG_NUMA */
/*
* returns pointer to cpumask for specified node
* Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
*/
#ifndef node_to_cpumask_ptr
#define node_to_cpumask_ptr(v, node) \
cpumask_t _##v = node_to_cpumask(node); \
const cpumask_t *v = &_##v
#define node_to_cpumask_ptr_next(v, node) \
_##v = node_to_cpumask(node)
#endif
#endif /* _ASM_GENERIC_TOPOLOGY_H */ #endif /* _ASM_GENERIC_TOPOLOGY_H */