Skip to content

Commit

Permalink
[PATCH] powerpc: implement pcibus_to_node and pcibus_to_cpumask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Paul Mackerras committed Jun 9, 2006
1 parent 507279d commit 318facb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/asm-powerpc/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ static inline int node_to_first_cpu(int node)

int of_node_to_nid(struct device_node *device);

#ifdef CONFIG_PPC64
#define pcibus_to_node(bus) (of_node_to_nid(bus->sysdata))
#define pcibus_to_cpumask(bus) (node_to_cpumask(of_node_to_nid(bus->sysdata)))
#else
#define pcibus_to_node(node) (-1)
#define pcibus_to_cpumask(bus) (cpu_online_map)
#endif

/* sched_domains SD_NODE_INIT for PPC64 machines */
#define SD_NODE_INIT (struct sched_domain) { \
Expand Down

0 comments on commit 318facb

Please sign in to comment.