summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/topology.h')
-rw-r--r--include/asm-powerpc/topology.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h
index 87362a0..92f3e55 100644
--- a/include/asm-powerpc/topology.h
+++ b/include/asm-powerpc/topology.h
@@ -2,7 +2,6 @@
#define _ASM_POWERPC_TOPOLOGY_H
#ifdef __KERNEL__
-#include <linux/config.h>
struct sys_device;
struct device_node;
@@ -32,8 +31,13 @@ static inline int node_to_first_cpu(int node)
int of_node_to_nid(struct device_node *device);
-#define pcibus_to_node(node) (-1)
-#define pcibus_to_cpumask(bus) (cpu_online_map)
+struct pci_bus;
+extern int pcibus_to_node(struct pci_bus *bus);
+
+#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
+ CPU_MASK_ALL : \
+ node_to_cpumask(pcibus_to_node(bus)) \
+ )
/* sched_domains SD_NODE_INIT for PPC64 machines */
#define SD_NODE_INIT (struct sched_domain) { \
OpenPOWER on IntegriCloud