aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/topology.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-06-06 10:09:39 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-09 07:21:08 -0400
commit318facbee05417fb432603a8309a10cdb942a87b (patch)
tree753d84a8213b9e6639e661d329d5473b35e6c191 /include/asm-powerpc/topology.h
parent507279db1819aacf4022e790b3fc8bc8cf56debf (diff)
[PATCH] powerpc: implement pcibus_to_node and pcibus_to_cpumask
On 64bit powerpc we can find out what node a pci bus hangs off, so implement the topology.h macros that export this information. For 32bit this seems a little more difficult, but I don't know of 32bit powerpc NUMA machines either, so let's leave it out for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/topology.h')
-rw-r--r--include/asm-powerpc/topology.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h
index 87362a05542b..b7abd423c570 100644
--- a/include/asm-powerpc/topology.h
+++ b/include/asm-powerpc/topology.h
@@ -32,8 +32,13 @@ static inline int node_to_first_cpu(int node)
32 32
33int of_node_to_nid(struct device_node *device); 33int of_node_to_nid(struct device_node *device);
34 34
35#ifdef CONFIG_PPC64
36#define pcibus_to_node(bus) (of_node_to_nid(bus->sysdata))
37#define pcibus_to_cpumask(bus) (node_to_cpumask(of_node_to_nid(bus->sysdata)))
38#else
35#define pcibus_to_node(node) (-1) 39#define pcibus_to_node(node) (-1)
36#define pcibus_to_cpumask(bus) (cpu_online_map) 40#define pcibus_to_cpumask(bus) (cpu_online_map)
41#endif
37 42
38/* sched_domains SD_NODE_INIT for PPC64 machines */ 43/* sched_domains SD_NODE_INIT for PPC64 machines */
39#define SD_NODE_INIT (struct sched_domain) { \ 44#define SD_NODE_INIT (struct sched_domain) { \