From b4ea9299df1fa04dbd51840f60918a63ff6a8a44 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 30 Jan 2008 13:30:38 +0100 Subject: 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 Signed-off-by: Ingo Molnar --- include/asm-x86/pci.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/asm-x86/pci.h') diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h index 6983730..c61190c 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 +#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 -- cgit v1.1