|
@@ -22,11 +22,11 @@ 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])
|
|
|
+
|
|
|
static inline int node_to_first_cpu(int node)
|
|
|
{
|
|
|
- cpumask_t tmp;
|
|
|
- tmp = node_to_cpumask(node);
|
|
|
- return first_cpu(tmp);
|
|
|
+ return cpumask_first(cpumask_of_node(node));
|
|
|
}
|
|
|
|
|
|
int of_node_to_nid(struct device_node *device);
|
|
@@ -46,6 +46,10 @@ static inline int pcibus_to_node(struct pci_bus *bus)
|
|
|
node_to_cpumask(pcibus_to_node(bus)) \
|
|
|
)
|
|
|
|
|
|
+#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
|
|
|
+ cpu_all_mask : \
|
|
|
+ cpumask_of_node(pcibus_to_node(bus)))
|
|
|
+
|
|
|
/* sched_domains SD_NODE_INIT for PPC64 machines */
|
|
|
#define SD_NODE_INIT (struct sched_domain) { \
|
|
|
.span = CPU_MASK_NONE, \
|