Commit 259b8fb4 authored by Martin J. Bligh's avatar Martin J. Bligh Committed by Linus Torvalds

[PATCH] provide pcibus_to_cpumask from topology

Patch from Matthew Dobson

Provide a pcibus_to_cpumask function in the topology infrastructure to
access the pre-existing array.
parent 1c050f9d
......@@ -47,6 +47,9 @@
#ifndef node_to_memblk
#define node_to_memblk(node) (0)
#endif
#ifndef pcibus_to_cpumask
#define pcibus_to_cpumask(bus) (cpu_online_map)
#endif
/* Cross-node load balancing interval. */
#ifndef NODE_BALANCE_RATE
......
......@@ -29,6 +29,8 @@
#ifdef CONFIG_NUMA
#include <asm/mpspec.h>
/* Mappings between logical cpu number and node number */
extern volatile unsigned long node_2_cpu_mask[];
extern volatile int cpu_2_node[];
......@@ -61,6 +63,12 @@ static inline int node_to_first_cpu(int node)
/* Returns the number of the first MemBlk on Node 'node' */
#define node_to_memblk(node) (node)
/* Returns the number of the node containing PCI bus 'bus' */
static inline unsigned long pcibus_to_cpumask(int bus)
{
return node_to_cpumask(mp_bus_id_to_node[bus]);
}
/* Cross-node load balancing interval. */
#define NODE_BALANCE_RATE 100
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment