Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6.git] / arch / x86 / include / asm / amd_nb.h
1 #ifndef _ASM_X86_AMD_NB_H
2 #define _ASM_X86_AMD_NB_H
3
4 #include <linux/pci.h>
5
6 extern struct pci_device_id k8_nb_ids[];
7 struct bootnode;
8
9 extern int early_is_k8_nb(u32 value);
10 extern int cache_k8_northbridges(void);
11 extern void k8_flush_garts(void);
12 extern int k8_get_nodes(struct bootnode *nodes);
13 extern int k8_numa_init(unsigned long start_pfn, unsigned long end_pfn);
14 extern int k8_scan_nodes(void);
15
16 struct k8_northbridge_info {
17         u16 num;
18         u8 gart_supported;
19         struct pci_dev **nb_misc;
20 };
21 extern struct k8_northbridge_info k8_northbridges;
22
23 #ifdef CONFIG_AMD_NB
24
25 static inline struct pci_dev *node_to_k8_nb_misc(int node)
26 {
27         return (node < k8_northbridges.num) ? k8_northbridges.nb_misc[node] : NULL;
28 }
29
30 #else
31
32 static inline struct pci_dev *node_to_k8_nb_misc(int node)
33 {
34         return NULL;
35 }
36 #endif
37
38
39 #endif /* _ASM_X86_AMD_NB_H */