summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pci.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 13:30:38 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:30:38 +0100
commitb4ea9299df1fa04dbd51840f60918a63ff6a8a44 (patch)
treea11ec0c494e37f68a235d2af5c28677c43ebf73d /include/asm-x86/pci.h
parentfe21a445b98c9d52f02f3412d7a2fd39784f3b22 (diff)
downloadop-kernel-dev-b4ea9299df1fa04dbd51840f60918a63ff6a8a44.zip
op-kernel-dev-b4ea9299df1fa04dbd51840f60918a63ff6a8a44.tar.gz
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.h13
1 files changed, 13 insertions, 0 deletions
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 <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
OpenPOWER on IntegriCloud