diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/mach-generic/mach_mpparse.h | 7 | ||||
-rw-r--r-- | include/asm-x86/mach-numaq/mach_apic.h | 39 | ||||
-rw-r--r-- | include/asm-x86/mach-numaq/mach_mpparse.h | 11 | ||||
-rw-r--r-- | include/asm-x86/mmzone_32.h | 18 | ||||
-rw-r--r-- | include/asm-x86/mpspec.h | 6 | ||||
-rw-r--r-- | include/asm-x86/numaq.h | 5 | ||||
-rw-r--r-- | include/asm-x86/srat.h | 12 |
7 files changed, 35 insertions, 63 deletions
diff --git a/include/asm-x86/mach-generic/mach_mpparse.h b/include/asm-x86/mach-generic/mach_mpparse.h index 0d0b5ba2e9d1..586cadbf3787 100644 --- a/include/asm-x86/mach-generic/mach_mpparse.h +++ b/include/asm-x86/mach-generic/mach_mpparse.h | |||
@@ -1,7 +1,10 @@ | |||
1 | #ifndef _MACH_MPPARSE_H | 1 | #ifndef _MACH_MPPARSE_H |
2 | #define _MACH_MPPARSE_H 1 | 2 | #define _MACH_MPPARSE_H 1 |
3 | 3 | ||
4 | int mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid); | 4 | |
5 | int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | 5 | extern int mps_oem_check(struct mp_config_table *mpc, char *oem, |
6 | char *productid); | ||
7 | |||
8 | extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | ||
6 | 9 | ||
7 | #endif | 10 | #endif |
diff --git a/include/asm-x86/mach-numaq/mach_apic.h b/include/asm-x86/mach-numaq/mach_apic.h index 75a56e5afbe7..d802465e026a 100644 --- a/include/asm-x86/mach-numaq/mach_apic.h +++ b/include/asm-x86/mach-numaq/mach_apic.h | |||
@@ -20,8 +20,14 @@ static inline cpumask_t target_cpus(void) | |||
20 | #define INT_DELIVERY_MODE dest_LowestPrio | 20 | #define INT_DELIVERY_MODE dest_LowestPrio |
21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ | 21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ |
22 | 22 | ||
23 | #define check_apicid_used(bitmap, apicid) physid_isset(apicid, bitmap) | 23 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) |
24 | #define check_apicid_present(bit) physid_isset(bit, phys_cpu_present_map) | 24 | { |
25 | return physid_isset(apicid, bitmap); | ||
26 | } | ||
27 | static inline unsigned long check_apicid_present(int bit) | ||
28 | { | ||
29 | return physid_isset(bit, phys_cpu_present_map); | ||
30 | } | ||
25 | #define apicid_cluster(apicid) (apicid & 0xF0) | 31 | #define apicid_cluster(apicid) (apicid & 0xF0) |
26 | 32 | ||
27 | static inline int apic_id_registered(void) | 33 | static inline int apic_id_registered(void) |
@@ -77,11 +83,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) | |||
77 | return BAD_APICID; | 83 | return BAD_APICID; |
78 | } | 84 | } |
79 | 85 | ||
80 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
81 | { | ||
82 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
83 | } | ||
84 | |||
85 | static inline int apicid_to_node(int logical_apicid) | 86 | static inline int apicid_to_node(int logical_apicid) |
86 | { | 87 | { |
87 | return logical_apicid >> 4; | 88 | return logical_apicid >> 4; |
@@ -95,30 +96,6 @@ static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) | |||
95 | return physid_mask_of_physid(cpu + 4*node); | 96 | return physid_mask_of_physid(cpu + 4*node); |
96 | } | 97 | } |
97 | 98 | ||
98 | struct mpc_config_translation { | ||
99 | unsigned char mpc_type; | ||
100 | unsigned char trans_len; | ||
101 | unsigned char trans_type; | ||
102 | unsigned char trans_quad; | ||
103 | unsigned char trans_global; | ||
104 | unsigned char trans_local; | ||
105 | unsigned short trans_reserved; | ||
106 | }; | ||
107 | |||
108 | static inline int mpc_apic_id(struct mpc_config_processor *m, | ||
109 | struct mpc_config_translation *translation_record) | ||
110 | { | ||
111 | int quad = translation_record->trans_quad; | ||
112 | int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); | ||
113 | |||
114 | printk("Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
115 | m->mpc_apicid, | ||
116 | (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, | ||
117 | (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, | ||
118 | m->mpc_apicver, quad, logical_apicid); | ||
119 | return logical_apicid; | ||
120 | } | ||
121 | |||
122 | extern void *xquad_portio; | 99 | extern void *xquad_portio; |
123 | 100 | ||
124 | static inline void setup_portio_remap(void) | 101 | static inline void setup_portio_remap(void) |
diff --git a/include/asm-x86/mach-numaq/mach_mpparse.h b/include/asm-x86/mach-numaq/mach_mpparse.h index 459b12401187..626aef6b155f 100644 --- a/include/asm-x86/mach-numaq/mach_mpparse.h +++ b/include/asm-x86/mach-numaq/mach_mpparse.h | |||
@@ -1,14 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef __ASM_MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define __ASM_MACH_MPPARSE_H |
3 | 3 | ||
4 | extern void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | 4 | extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, |
5 | struct mpc_config_translation *translation); | 5 | char *productid); |
6 | extern void mpc_oem_pci_bus(struct mpc_config_bus *m, | ||
7 | struct mpc_config_translation *translation); | ||
8 | |||
9 | /* Hook from generic ACPI tables.c */ | ||
10 | static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
11 | { | ||
12 | } | ||
13 | 6 | ||
14 | #endif /* __ASM_MACH_MPPARSE_H */ | 7 | #endif /* __ASM_MACH_MPPARSE_H */ |
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h index ab0012888c44..b2298a227567 100644 --- a/include/asm-x86/mmzone_32.h +++ b/include/asm-x86/mmzone_32.h | |||
@@ -12,11 +12,9 @@ | |||
12 | extern struct pglist_data *node_data[]; | 12 | extern struct pglist_data *node_data[]; |
13 | #define NODE_DATA(nid) (node_data[nid]) | 13 | #define NODE_DATA(nid) (node_data[nid]) |
14 | 14 | ||
15 | #ifdef CONFIG_X86_NUMAQ | 15 | #include <asm/numaq.h> |
16 | #include <asm/numaq.h> | 16 | /* summit or generic arch */ |
17 | #elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */ | 17 | #include <asm/srat.h> |
18 | #include <asm/srat.h> | ||
19 | #endif | ||
20 | 18 | ||
21 | extern int get_memcfg_numa_flat(void); | 19 | extern int get_memcfg_numa_flat(void); |
22 | /* | 20 | /* |
@@ -26,14 +24,11 @@ extern int get_memcfg_numa_flat(void); | |||
26 | */ | 24 | */ |
27 | static inline void get_memcfg_numa(void) | 25 | static inline void get_memcfg_numa(void) |
28 | { | 26 | { |
29 | #ifdef CONFIG_X86_NUMAQ | 27 | |
30 | if (get_memcfg_numaq()) | 28 | if (get_memcfg_numaq()) |
31 | return; | 29 | return; |
32 | #elif defined(CONFIG_ACPI_SRAT) | ||
33 | if (get_memcfg_from_srat()) | 30 | if (get_memcfg_from_srat()) |
34 | return; | 31 | return; |
35 | #endif | ||
36 | |||
37 | get_memcfg_numa_flat(); | 32 | get_memcfg_numa_flat(); |
38 | } | 33 | } |
39 | 34 | ||
@@ -42,7 +37,6 @@ extern int early_pfn_to_nid(unsigned long pfn); | |||
42 | #else /* !CONFIG_NUMA */ | 37 | #else /* !CONFIG_NUMA */ |
43 | 38 | ||
44 | #define get_memcfg_numa get_memcfg_numa_flat | 39 | #define get_memcfg_numa get_memcfg_numa_flat |
45 | #define get_zholes_size(n) (0) | ||
46 | 40 | ||
47 | #endif /* CONFIG_NUMA */ | 41 | #endif /* CONFIG_NUMA */ |
48 | 42 | ||
@@ -83,9 +77,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
83 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ | 77 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ |
84 | }) | 78 | }) |
85 | 79 | ||
86 | #ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */ | ||
87 | #define pfn_valid(pfn) ((pfn) < num_physpages) | ||
88 | #else | ||
89 | static inline int pfn_valid(int pfn) | 80 | static inline int pfn_valid(int pfn) |
90 | { | 81 | { |
91 | int nid = pfn_to_nid(pfn); | 82 | int nid = pfn_to_nid(pfn); |
@@ -94,7 +85,6 @@ static inline int pfn_valid(int pfn) | |||
94 | return (pfn < node_end_pfn(nid)); | 85 | return (pfn < node_end_pfn(nid)); |
95 | return 0; | 86 | return 0; |
96 | } | 87 | } |
97 | #endif /* CONFIG_X86_NUMAQ */ | ||
98 | 88 | ||
99 | #endif /* CONFIG_DISCONTIGMEM */ | 89 | #endif /* CONFIG_DISCONTIGMEM */ |
100 | 90 | ||
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h index 4451d720ee07..6e9c9588b1fc 100644 --- a/include/asm-x86/mpspec.h +++ b/include/asm-x86/mpspec.h | |||
@@ -13,6 +13,12 @@ extern int apic_version[MAX_APICS]; | |||
13 | extern u8 apicid_2_node[]; | 13 | extern u8 apicid_2_node[]; |
14 | extern int pic_mode; | 14 | extern int pic_mode; |
15 | 15 | ||
16 | #ifdef CONFIG_X86_NUMAQ | ||
17 | extern int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
18 | extern int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
19 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
20 | #endif | ||
21 | |||
16 | #define MAX_APICID 256 | 22 | #define MAX_APICID 256 |
17 | 23 | ||
18 | #else | 24 | #else |
diff --git a/include/asm-x86/numaq.h b/include/asm-x86/numaq.h index 739d16484b8c..ef068d2465d6 100644 --- a/include/asm-x86/numaq.h +++ b/include/asm-x86/numaq.h | |||
@@ -157,9 +157,10 @@ struct sys_cfg_data { | |||
157 | struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */ | 157 | struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */ |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static inline unsigned long *get_zholes_size(int nid) | 160 | #else |
161 | static inline int get_memcfg_numaq(void) | ||
161 | { | 162 | { |
162 | return NULL; | 163 | return 0; |
163 | } | 164 | } |
164 | #endif /* CONFIG_X86_NUMAQ */ | 165 | #endif /* CONFIG_X86_NUMAQ */ |
165 | #endif /* NUMAQ_H */ | 166 | #endif /* NUMAQ_H */ |
diff --git a/include/asm-x86/srat.h b/include/asm-x86/srat.h index f4bba131d068..456fe0b5a921 100644 --- a/include/asm-x86/srat.h +++ b/include/asm-x86/srat.h | |||
@@ -27,11 +27,13 @@ | |||
27 | #ifndef _ASM_SRAT_H_ | 27 | #ifndef _ASM_SRAT_H_ |
28 | #define _ASM_SRAT_H_ | 28 | #define _ASM_SRAT_H_ |
29 | 29 | ||
30 | #ifndef CONFIG_ACPI_SRAT | 30 | #ifdef CONFIG_ACPI_SRAT |
31 | #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included | ||
32 | #endif | ||
33 | |||
34 | extern int get_memcfg_from_srat(void); | 31 | extern int get_memcfg_from_srat(void); |
35 | extern unsigned long *get_zholes_size(int); | 32 | #else |
33 | static inline int get_memcfg_from_srat(void) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | #endif | ||
36 | 38 | ||
37 | #endif /* _ASM_SRAT_H_ */ | 39 | #endif /* _ASM_SRAT_H_ */ |