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:
parent
b966cd6b28
commit
29c337a034
|
@ -22,23 +22,6 @@ static inline int cpu_to_node(int cpu)
|
|||
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[];
|
||||
/* FIXME: This is dumb, recalculating every time. But simple. */
|
||||
static const struct cpumask *cpumask_of_node(int node)
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
/*
|
||||
* 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])
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 parent_node(node) (node)
|
||||
#define node_to_cpumask(node) (hub_data(node)->h_cpus)
|
||||
#define cpumask_of_node(node) (&hub_data(node)->h_cpus)
|
||||
struct pci_bus;
|
||||
extern int pcibus_to_node(struct pci_bus *);
|
||||
|
|
|
@ -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
|
||||
* node_to_cpumask
|
||||
* cpumask_of_node
|
||||
*/
|
||||
static struct node_data null_node = {
|
||||
.hub = {
|
||||
|
|
|
@ -17,11 +17,6 @@ static inline int cpu_to_node(int cpu)
|
|||
|
||||
#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])
|
||||
|
||||
int of_node_to_nid(struct device_node *device);
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#define cpu_to_node(cpu) ((void)(cpu),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 pcibus_to_node(bus) ((void)(bus), -1)
|
||||
|
|
|
@ -12,22 +12,8 @@ static inline int cpu_to_node(int cpu)
|
|||
|
||||
#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])
|
||||
|
||||
/*
|
||||
* 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;
|
||||
#ifdef CONFIG_PCI
|
||||
extern int pcibus_to_node(struct pci_bus *pbus);
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
#ifndef parent_node
|
||||
#define parent_node(node) ((void)(node),0)
|
||||
#endif
|
||||
#ifndef node_to_cpumask
|
||||
#define node_to_cpumask(node) ((void)node, cpu_online_map)
|
||||
#endif
|
||||
#ifndef cpumask_of_node
|
||||
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
|
||||
#endif
|
||||
|
@ -55,18 +52,4 @@
|
|||
|
||||
#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 */
|
||||
|
|
Loading…
Reference in New Issue