4/7 provide pcibus_to_cpumask from topology
PATCH 1/1 4/7 provide pcibus_to_cpumask from topology
Patch from Matthew Dobson
Just provides a pcibus_to_cpumask function in the topology infrastructure to access the pre-existing array.
include/asm-generic/topology.h +3 -0
@@ -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
include/asm-i386/topology.h +8 -0
@@ -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[];
@@ -60,6 +62,12 @@ static inline int node_to_first_cpu(int/* 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