diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-01-30 13:30:38 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:30:38 +0100 |
commit | b4ea9299df1fa04dbd51840f60918a63ff6a8a44 (patch) | |
tree | a11ec0c494e37f68a235d2af5c28677c43ebf73d /include/asm-x86/pci.h | |
parent | x86: adjust numa 32 namespace (diff) | |
download | linux-b4ea9299df1fa04dbd51840f60918a63ff6a8a44.tar.xz linux-b4ea9299df1fa04dbd51840f60918a63ff6a8a44.zip |
x86: consolidate toloplogy_32/64.h
Reorder defines and do white space / coding style cleanups
to get a readable diff.
Also convert the macros to inline functions. Move the pci
related inlines to pci.h
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/pci.h')
-rw-r--r-- | include/asm-x86/pci.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h index 6983730d86fd..c61190cb9e12 100644 --- a/include/asm-x86/pci.h +++ b/include/asm-x86/pci.h @@ -92,6 +92,19 @@ static inline void early_quirks(void) { } /* generic pci stuff */ #include <asm-generic/pci.h> +#ifdef CONFIG_NUMA +/* Returns the node based on pci bus */ +static inline int __pcibus_to_node(struct pci_bus *bus) +{ + struct pci_sysdata *sd = bus->sysdata; + + return sd->node; +} +static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus) +{ + return node_to_cpumask(__pcibus_to_node(bus)); +} +#endif #endif |