mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[PATCH] x86/x86_64: pcibus_to_node
Define pcibus_to_node to be able to figure out which NUMA node contains a given PCI device. This defines pcibus_to_node(bus) in include/linux/topology.h and adjusts the macros for i386 and x86_64 that already provided a way to determine the cpumask of a pci device. x86_64 was changed to not build an array of cpumasks anymore. Instead an array of nodes is build which can be used to generate the cpumask via node_to_cpumask. Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e164f5573b
commit
8c5a09082f
5 changed files with 17 additions and 34 deletions
|
|
@ -60,12 +60,8 @@ static inline int node_to_first_cpu(int node)
|
|||
return first_cpu(mask);
|
||||
}
|
||||
|
||||
/* Returns the number of the node containing PCI bus number 'busnr' */
|
||||
static inline cpumask_t __pcibus_to_cpumask(int busnr)
|
||||
{
|
||||
return node_to_cpumask(mp_bus_id_to_node[busnr]);
|
||||
}
|
||||
#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus->number)
|
||||
#define pcibus_to_node(bus) mp_bus_id_to_node[(bus)->number]
|
||||
#define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus))
|
||||
|
||||
/* sched_domains SD_NODE_INIT for NUMAQ machines */
|
||||
#define SD_NODE_INIT (struct sched_domain) { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue