summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pci.h
diff options
context:
space:
mode:
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