]> Pileus Git - ~andy/linux/blob - arch/x86/include/asm/amd_nb.h
x86-64, NUMA: Kill {acpi|amd|dummy}_scan_nodes()
[~andy/linux] / 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 struct amd_nb_bus_dev_range {
7         u8 bus;
8         u8 dev_base;
9         u8 dev_limit;
10 };
11
12 extern const struct pci_device_id amd_nb_misc_ids[];
13 extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
14 struct bootnode;
15
16 extern int early_is_amd_nb(u32 value);
17 extern int amd_cache_northbridges(void);
18 extern void amd_flush_garts(void);
19 extern int amd_numa_init(void);
20 extern int amd_get_subcaches(int);
21 extern int amd_set_subcaches(int, int);
22
23 #ifdef CONFIG_NUMA_EMU
24 extern void amd_fake_nodes(const struct bootnode *nodes, int nr_nodes);
25 #endif
26
27 struct amd_northbridge {
28         struct pci_dev *misc;
29         struct pci_dev *link;
30 };
31
32 struct amd_northbridge_info {
33         u16 num;
34         u64 flags;
35         struct amd_northbridge *nb;
36 };
37 extern struct amd_northbridge_info amd_northbridges;
38
39 #define AMD_NB_GART                     0x1
40 #define AMD_NB_L3_INDEX_DISABLE         0x2
41 #define AMD_NB_L3_PARTITIONING          0x4
42
43 #ifdef CONFIG_AMD_NB
44
45 static inline int amd_nb_num(void)
46 {
47         return amd_northbridges.num;
48 }
49
50 static inline int amd_nb_has_feature(int feature)
51 {
52         return ((amd_northbridges.flags & feature) == feature);
53 }
54
55 static inline struct amd_northbridge *node_to_amd_nb(int node)
56 {
57         return (node < amd_northbridges.num) ? &amd_northbridges.nb[node] : NULL;
58 }
59
60 #else
61
62 #define amd_nb_num(x)           0
63 #define amd_nb_has_feature(x)   false
64 #define node_to_amd_nb(x)       NULL
65
66 #endif
67
68
69 #endif /* _ASM_X86_AMD_NB_H */