dma-mapping: x86: use asm-generic/dma-mapping-common.h
[safe/jmp/linux-2.6] / arch / x86 / include / asm / k8.h
index 2bbaf43..c2d1f3b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ASM_X86__K8_H
-#define ASM_X86__K8_H
+#ifndef _ASM_X86_K8_H
+#define _ASM_X86_K8_H
 
 #include <linux/pci.h>
 
@@ -12,4 +12,17 @@ extern int cache_k8_northbridges(void);
 extern void k8_flush_garts(void);
 extern int k8_scan_nodes(unsigned long start, unsigned long end);
 
-#endif /* ASM_X86__K8_H */
+#ifdef CONFIG_K8_NB
+static inline struct pci_dev *node_to_k8_nb_misc(int node)
+{
+       return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL;
+}
+#else
+static inline struct pci_dev *node_to_k8_nb_misc(int node)
+{
+       return NULL;
+}
+#endif
+
+
+#endif /* _ASM_X86_K8_H */