aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/acpi/boot.c18
-rw-r--r--arch/i386/kernel/acpi/earlyquirk.c2
-rw-r--r--arch/i386/pci/mmconfig.c24
-rw-r--r--arch/x86_64/kernel/early-quirks.c4
-rw-r--r--arch/x86_64/mm/srat.c48
-rw-r--r--arch/x86_64/pci/mmconfig.c29
-rw-r--r--drivers/acpi/blacklist.c2
-rw-r--r--drivers/acpi/ec.c3
-rw-r--r--drivers/acpi/numa.c77
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c18
-rw-r--r--drivers/char/tpm/tpm_bios.c8
-rw-r--r--drivers/firmware/pcdp.c2
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c10
-rw-r--r--include/asm-i386/mach-es7000/mach_mpparse.h17
-rw-r--r--include/linux/acpi.h123
15 files changed, 135 insertions, 250 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 5fafbacdd4c..2147511ea78 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -166,7 +166,7 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
166 166
167#ifdef CONFIG_PCI_MMCONFIG 167#ifdef CONFIG_PCI_MMCONFIG
168/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ 168/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */
169struct acpi_table_mcfg_config *pci_mmcfg_config; 169struct acpi_mcfg_allocation *pci_mmcfg_config;
170int pci_mmcfg_config_num; 170int pci_mmcfg_config_num;
171 171
172int __init acpi_parse_mcfg(struct acpi_table_header *header) 172int __init acpi_parse_mcfg(struct acpi_table_header *header)
@@ -179,17 +179,13 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
179 return -EINVAL; 179 return -EINVAL;
180 180
181 mcfg = (struct acpi_table_mcfg *)header; 181 mcfg = (struct acpi_table_mcfg *)header;
182 if (!mcfg) {
183 printk(KERN_WARNING PREFIX "Unable to map MCFG\n");
184 return -ENODEV;
185 }
186 182
187 /* how many config structures do we have */ 183 /* how many config structures do we have */
188 pci_mmcfg_config_num = 0; 184 pci_mmcfg_config_num = 0;
189 i = header->length - sizeof(struct acpi_table_mcfg); 185 i = header->length - sizeof(struct acpi_table_mcfg);
190 while (i >= sizeof(struct acpi_table_mcfg_config)) { 186 while (i >= sizeof(struct acpi_mcfg_allocation)) {
191 ++pci_mmcfg_config_num; 187 ++pci_mmcfg_config_num;
192 i -= sizeof(struct acpi_table_mcfg_config); 188 i -= sizeof(struct acpi_mcfg_allocation);
193 }; 189 };
194 if (pci_mmcfg_config_num == 0) { 190 if (pci_mmcfg_config_num == 0) {
195 printk(KERN_ERR PREFIX "MMCONFIG has no entries\n"); 191 printk(KERN_ERR PREFIX "MMCONFIG has no entries\n");
@@ -206,7 +202,7 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
206 202
207 memcpy(pci_mmcfg_config, &mcfg[1], config_size); 203 memcpy(pci_mmcfg_config, &mcfg[1], config_size);
208 for (i = 0; i < pci_mmcfg_config_num; ++i) { 204 for (i = 0; i < pci_mmcfg_config_num; ++i) {
209 if (pci_mmcfg_config[i].base_reserved) { 205 if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
210 printk(KERN_ERR PREFIX 206 printk(KERN_ERR PREFIX
211 "MMCONFIG not in low 4GB of memory\n"); 207 "MMCONFIG not in low 4GB of memory\n");
212 kfree(pci_mmcfg_config); 208 kfree(pci_mmcfg_config);
@@ -220,14 +216,14 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
220#endif /* CONFIG_PCI_MMCONFIG */ 216#endif /* CONFIG_PCI_MMCONFIG */
221 217
222#ifdef CONFIG_X86_LOCAL_APIC 218#ifdef CONFIG_X86_LOCAL_APIC
223static int __init acpi_parse_madt(struct acpi_table_header *header) 219static int __init acpi_parse_madt(struct acpi_table_header *table)
224{ 220{
225 struct acpi_table_madt *madt = NULL; 221 struct acpi_table_madt *madt = NULL;
226 222
227 if (!header|| !cpu_has_apic) 223 if (!cpu_has_apic)
228 return -EINVAL; 224 return -EINVAL;
229 225
230 madt = (struct acpi_table_madt *)header; 226 madt = (struct acpi_table_madt *)table;
231 if (!madt) { 227 if (!madt) {
232 printk(KERN_WARNING PREFIX "Unable to map MADT\n"); 228 printk(KERN_WARNING PREFIX "Unable to map MADT\n");
233 return -ENODEV; 229 return -ENODEV;
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c
index 4261c8501b7..bf86f7662d8 100644
--- a/arch/i386/kernel/acpi/earlyquirk.c
+++ b/arch/i386/kernel/acpi/earlyquirk.c
@@ -30,7 +30,7 @@ static int __init check_bridge(int vendor, int device)
30 is enabled. */ 30 is enabled. */
31 if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { 31 if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
32 nvidia_hpet_detected = 0; 32 nvidia_hpet_detected = 0;
33 acpi_table_parse("HPET", nvidia_hpet_check); 33 acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
34 if (nvidia_hpet_detected == 0) { 34 if (nvidia_hpet_detected == 0) {
35 acpi_skip_timer_override = 1; 35 acpi_skip_timer_override = 1;
36 printk(KERN_INFO "Nvidia board " 36 printk(KERN_INFO "Nvidia board "
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index 80522e331e3..5700220dcf5 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -36,7 +36,7 @@ static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32);
36static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) 36static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
37{ 37{
38 int cfg_num = -1; 38 int cfg_num = -1;
39 struct acpi_table_mcfg_config *cfg; 39 struct acpi_mcfg_allocation *cfg;
40 40
41 if (seg == 0 && bus < MAX_CHECK_BUS && 41 if (seg == 0 && bus < MAX_CHECK_BUS &&
42 test_bit(PCI_SLOT(devfn) + 32*bus, fallback_slots)) 42 test_bit(PCI_SLOT(devfn) + 32*bus, fallback_slots))
@@ -48,11 +48,11 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
48 break; 48 break;
49 } 49 }
50 cfg = &pci_mmcfg_config[cfg_num]; 50 cfg = &pci_mmcfg_config[cfg_num];
51 if (cfg->pci_segment_group_number != seg) 51 if (cfg->pci_segment != seg)
52 continue; 52 continue;
53 if ((cfg->start_bus_number <= bus) && 53 if ((cfg->start_bus_number <= bus) &&
54 (cfg->end_bus_number >= bus)) 54 (cfg->end_bus_number >= bus))
55 return cfg->base_address; 55 return cfg->address;
56 } 56 }
57 57
58 /* Handle more broken MCFG tables on Asus etc. 58 /* Handle more broken MCFG tables on Asus etc.
@@ -60,9 +60,9 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
60 this applies to all busses. */ 60 this applies to all busses. */
61 cfg = &pci_mmcfg_config[0]; 61 cfg = &pci_mmcfg_config[0];
62 if (pci_mmcfg_config_num == 1 && 62 if (pci_mmcfg_config_num == 1 &&
63 cfg->pci_segment_group_number == 0 && 63 cfg->pci_segment == 0 &&
64 (cfg->start_bus_number | cfg->end_bus_number) == 0) 64 (cfg->start_bus_number | cfg->end_bus_number) == 0)
65 return cfg->base_address; 65 return cfg->address;
66 66
67 /* Fall back to type 0 */ 67 /* Fall back to type 0 */
68 return 0; 68 return 0;
@@ -125,7 +125,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
125 unsigned long flags; 125 unsigned long flags;
126 u32 base; 126 u32 base;
127 127
128 if ((bus > 255) || (devfn > 255) || (reg > 4095)) 128 if ((bus > 255) || (devfn > 255) || (reg > 4095))
129 return -EINVAL; 129 return -EINVAL;
130 130
131 base = get_base_addr(seg, bus, devfn); 131 base = get_base_addr(seg, bus, devfn);
@@ -199,19 +199,19 @@ void __init pci_mmcfg_init(int type)
199 if ((pci_probe & PCI_PROBE_MMCONF) == 0) 199 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
200 return; 200 return;
201 201
202 acpi_table_parse("MCFG", acpi_parse_mcfg); 202 acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
203 if ((pci_mmcfg_config_num == 0) || 203 if ((pci_mmcfg_config_num == 0) ||
204 (pci_mmcfg_config == NULL) || 204 (pci_mmcfg_config == NULL) ||
205 (pci_mmcfg_config[0].base_address == 0)) 205 (pci_mmcfg_config[0].address == 0))
206 return; 206 return;
207 207
208 /* Only do this check when type 1 works. If it doesn't work 208 /* Only do this check when type 1 works. If it doesn't work
209 assume we run on a Mac and always use MCFG */ 209 assume we run on a Mac and always use MCFG */
210 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address, 210 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].address,
211 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, 211 pci_mmcfg_config[0].address + MMCONFIG_APER_MIN,
212 E820_RESERVED)) { 212 E820_RESERVED)) {
213 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", 213 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %lx is not E820-reserved\n",
214 pci_mmcfg_config[0].base_address); 214 (unsigned long)pci_mmcfg_config[0].address);
215 printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); 215 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
216 return; 216 return;
217 } 217 }
diff --git a/arch/x86_64/kernel/early-quirks.c b/arch/x86_64/kernel/early-quirks.c
index 49802f1bee9..bd30d138113 100644
--- a/arch/x86_64/kernel/early-quirks.c
+++ b/arch/x86_64/kernel/early-quirks.c
@@ -32,7 +32,7 @@ static void via_bugs(void)
32 32
33static int nvidia_hpet_detected __initdata; 33static int nvidia_hpet_detected __initdata;
34 34
35static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) 35static int __init nvidia_hpet_check(struct acpi_table_header *header)
36{ 36{
37 nvidia_hpet_detected = 1; 37 nvidia_hpet_detected = 1;
38 return 0; 38 return 0;
@@ -53,7 +53,7 @@ static void nvidia_bugs(void)
53 return; 53 return;
54 54
55 nvidia_hpet_detected = 0; 55 nvidia_hpet_detected = 0;
56 acpi_table_parse(ACPI_HPET, nvidia_hpet_check); 56 acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
57 if (nvidia_hpet_detected == 0) { 57 if (nvidia_hpet_detected == 0) {
58 acpi_skip_timer_override = 1; 58 acpi_skip_timer_override = 1;
59 printk(KERN_INFO "Nvidia board " 59 printk(KERN_INFO "Nvidia board "
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 1087e150a21..2efe215fc76 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -101,7 +101,7 @@ static __init inline int srat_disabled(void)
101static __init int slit_valid(struct acpi_table_slit *slit) 101static __init int slit_valid(struct acpi_table_slit *slit)
102{ 102{
103 int i, j; 103 int i, j;
104 int d = slit->localities; 104 int d = slit->locality_count;
105 for (i = 0; i < d; i++) { 105 for (i = 0; i < d; i++) {
106 for (j = 0; j < d; j++) { 106 for (j = 0; j < d; j++) {
107 u8 val = slit->entry[d*i + j]; 107 u8 val = slit->entry[d*i + j];
@@ -127,18 +127,18 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
127 127
128/* Callback for Proximity Domain -> LAPIC mapping */ 128/* Callback for Proximity Domain -> LAPIC mapping */
129void __init 129void __init
130acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) 130acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
131{ 131{
132 int pxm, node; 132 int pxm, node;
133 if (srat_disabled()) 133 if (srat_disabled())
134 return; 134 return;
135 if (pa->header.length != sizeof(struct acpi_table_processor_affinity)) { 135 if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) {
136 bad_srat(); 136 bad_srat();
137 return; 137 return;
138 } 138 }
139 if (pa->flags.enabled == 0) 139 if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
140 return; 140 return;
141 pxm = pa->proximity_domain; 141 pxm = pa->proximity_domain_lo;
142 node = setup_node(pxm); 142 node = setup_node(pxm);
143 if (node < 0) { 143 if (node < 0) {
144 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); 144 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
@@ -254,21 +254,21 @@ static int reserve_hotadd(int node, unsigned long start, unsigned long end)
254 /* Looks good */ 254 /* Looks good */
255 255
256 if (nd->start == nd->end) { 256 if (nd->start == nd->end) {
257 nd->start = start; 257 nd->start = start;
258 nd->end = end; 258 nd->end = end;
259 changed = 1; 259 changed = 1;
260 } else { 260 } else {
261 if (nd->start == end) { 261 if (nd->start == end) {
262 nd->start = start; 262 nd->start = start;
263 changed = 1; 263 changed = 1;
264 } 264 }
265 if (nd->end == start) { 265 if (nd->end == start) {
266 nd->end = end; 266 nd->end = end;
267 changed = 1; 267 changed = 1;
268 } 268 }
269 if (!changed) 269 if (!changed)
270 printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n"); 270 printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n");
271 } 271 }
272 272
273 ret = update_end_of_memory(nd->end); 273 ret = update_end_of_memory(nd->end);
274 274
@@ -279,7 +279,7 @@ static int reserve_hotadd(int node, unsigned long start, unsigned long end)
279 279
280/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ 280/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
281void __init 281void __init
282acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) 282acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
283{ 283{
284 struct bootnode *nd, oldnode; 284 struct bootnode *nd, oldnode;
285 unsigned long start, end; 285 unsigned long start, end;
@@ -288,16 +288,17 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
288 288
289 if (srat_disabled()) 289 if (srat_disabled())
290 return; 290 return;
291 if (ma->header.length != sizeof(struct acpi_table_memory_affinity)) { 291 if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) {
292 bad_srat(); 292 bad_srat();
293 return; 293 return;
294 } 294 }
295 if (ma->flags.enabled == 0) 295 if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0)
296 return; 296 return;
297 if (ma->flags.hot_pluggable && !save_add_info()) 297
298 if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info())
298 return; 299 return;
299 start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); 300 start = ma->base_address;
300 end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); 301 end = start + ma->length;
301 pxm = ma->proximity_domain; 302 pxm = ma->proximity_domain;
302 node = setup_node(pxm); 303 node = setup_node(pxm);
303 if (node < 0) { 304 if (node < 0) {
@@ -337,7 +338,8 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
337 push_node_boundaries(node, nd->start >> PAGE_SHIFT, 338 push_node_boundaries(node, nd->start >> PAGE_SHIFT,
338 nd->end >> PAGE_SHIFT); 339 nd->end >> PAGE_SHIFT);
339 340
340 if (ma->flags.hot_pluggable && (reserve_hotadd(node, start, end) < 0)) { 341 if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) &&
342 (reserve_hotadd(node, start, end) < 0)) {
341 /* Ignore hotadd region. Undo damage */ 343 /* Ignore hotadd region. Undo damage */
342 printk(KERN_NOTICE "SRAT: Hotplug region ignored\n"); 344 printk(KERN_NOTICE "SRAT: Hotplug region ignored\n");
343 *nd = oldnode; 345 *nd = oldnode;
@@ -394,7 +396,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
394 396
395 /* First clean up the node list */ 397 /* First clean up the node list */
396 for (i = 0; i < MAX_NUMNODES; i++) { 398 for (i = 0; i < MAX_NUMNODES; i++) {
397 cutoff_node(i, start, end); 399 cutoff_node(i, start, end);
398 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { 400 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {
399 unparse_node(i); 401 unparse_node(i);
400 node_set_offline(i); 402 node_set_offline(i);
@@ -426,7 +428,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
426 if (!node_online(i)) 428 if (!node_online(i))
427 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 429 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
428 430
429 for (i = 0; i < NR_CPUS; i++) { 431 for (i = 0; i < NR_CPUS; i++) {
430 if (cpu_to_node[i] == NUMA_NO_NODE) 432 if (cpu_to_node[i] == NUMA_NO_NODE)
431 continue; 433 continue;
432 if (!node_isset(cpu_to_node[i], nodes_parsed)) 434 if (!node_isset(cpu_to_node[i], nodes_parsed))
@@ -461,7 +463,7 @@ int __node_distance(int a, int b)
461 463
462 if (!acpi_slit) 464 if (!acpi_slit)
463 return a == b ? 10 : 20; 465 return a == b ? 10 : 20;
464 index = acpi_slit->localities * node_to_pxm(a); 466 index = acpi_slit->locality_count * node_to_pxm(a);
465 return acpi_slit->entry[index + node_to_pxm(b)]; 467 return acpi_slit->entry[index + node_to_pxm(b)];
466} 468}
467 469
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c
index f8b6b2800a6..faabb6e87f1 100644
--- a/arch/x86_64/pci/mmconfig.c
+++ b/arch/x86_64/pci/mmconfig.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG 2 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG
3 * 3 *
4 * This is an 64bit optimized version that always keeps the full mmconfig 4 * This is an 64bit optimized version that always keeps the full mmconfig
5 * space mapped. This allows lockless config space operation. 5 * space mapped. This allows lockless config space operation.
6 */ 6 */
@@ -25,7 +25,7 @@ static DECLARE_BITMAP(fallback_slots, 32*MAX_CHECK_BUS);
25 25
26/* Static virtual mapping of the MMCONFIG aperture */ 26/* Static virtual mapping of the MMCONFIG aperture */
27struct mmcfg_virt { 27struct mmcfg_virt {
28 struct acpi_table_mcfg_config *cfg; 28 struct acpi_mcfg_allocation *cfg;
29 char __iomem *virt; 29 char __iomem *virt;
30}; 30};
31static struct mmcfg_virt *pci_mmcfg_virt; 31static struct mmcfg_virt *pci_mmcfg_virt;
@@ -33,14 +33,14 @@ static struct mmcfg_virt *pci_mmcfg_virt;
33static char __iomem *get_virt(unsigned int seg, unsigned bus) 33static char __iomem *get_virt(unsigned int seg, unsigned bus)
34{ 34{
35 int cfg_num = -1; 35 int cfg_num = -1;
36 struct acpi_table_mcfg_config *cfg; 36 struct acpi_mcfg_allocation *cfg;
37 37
38 while (1) { 38 while (1) {
39 ++cfg_num; 39 ++cfg_num;
40 if (cfg_num >= pci_mmcfg_config_num) 40 if (cfg_num >= pci_mmcfg_config_num)
41 break; 41 break;
42 cfg = pci_mmcfg_virt[cfg_num].cfg; 42 cfg = pci_mmcfg_virt[cfg_num].cfg;
43 if (cfg->pci_segment_group_number != seg) 43 if (cfg->pci_segment != seg)
44 continue; 44 continue;
45 if ((cfg->start_bus_number <= bus) && 45 if ((cfg->start_bus_number <= bus) &&
46 (cfg->end_bus_number >= bus)) 46 (cfg->end_bus_number >= bus))
@@ -52,7 +52,7 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus)
52 this applies to all busses. */ 52 this applies to all busses. */
53 cfg = &pci_mmcfg_config[0]; 53 cfg = &pci_mmcfg_config[0];
54 if (pci_mmcfg_config_num == 1 && 54 if (pci_mmcfg_config_num == 1 &&
55 cfg->pci_segment_group_number == 0 && 55 cfg->pci_segment == 0 &&
56 (cfg->start_bus_number | cfg->end_bus_number) == 0) 56 (cfg->start_bus_number | cfg->end_bus_number) == 0)
57 return pci_mmcfg_virt[0].virt; 57 return pci_mmcfg_virt[0].virt;
58 58
@@ -170,19 +170,19 @@ void __init pci_mmcfg_init(int type)
170 if ((pci_probe & PCI_PROBE_MMCONF) == 0) 170 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
171 return; 171 return;
172 172
173 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); 173 acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
174 if ((pci_mmcfg_config_num == 0) || 174 if ((pci_mmcfg_config_num == 0) ||
175 (pci_mmcfg_config == NULL) || 175 (pci_mmcfg_config == NULL) ||
176 (pci_mmcfg_config[0].base_address == 0)) 176 (pci_mmcfg_config[0].address == 0))
177 return; 177 return;
178 178
179 /* Only do this check when type 1 works. If it doesn't work 179 /* Only do this check when type 1 works. If it doesn't work
180 assume we run on a Mac and always use MCFG */ 180 assume we run on a Mac and always use MCFG */
181 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address, 181 if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].address,
182 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, 182 pci_mmcfg_config[0].address + MMCONFIG_APER_MIN,
183 E820_RESERVED)) { 183 E820_RESERVED)) {
184 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", 184 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %lx is not E820-reserved\n",
185 pci_mmcfg_config[0].base_address); 185 (unsigned long)pci_mmcfg_config[0].address);
186 printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); 186 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
187 return; 187 return;
188 } 188 }
@@ -194,15 +194,16 @@ void __init pci_mmcfg_init(int type)
194 } 194 }
195 for (i = 0; i < pci_mmcfg_config_num; ++i) { 195 for (i = 0; i < pci_mmcfg_config_num; ++i) {
196 pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i]; 196 pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i];
197 pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address, 197 pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].address,
198 MMCONFIG_APER_MAX); 198 MMCONFIG_APER_MAX);
199 if (!pci_mmcfg_virt[i].virt) { 199 if (!pci_mmcfg_virt[i].virt) {
200 printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " 200 printk(KERN_ERR "PCI: Cannot map mmconfig aperture for "
201 "segment %d\n", 201 "segment %d\n",
202 pci_mmcfg_config[i].pci_segment_group_number); 202 pci_mmcfg_config[i].pci_segment);
203 return; 203 return;
204 } 204 }
205 printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address); 205 printk(KERN_INFO "PCI: Using MMCONFIG at %lx\n",
206 (unsigned long)pci_mmcfg_config[i].address);
206 } 207 }
207 208
208 unreachable_devices(); 209 unreachable_devices();
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index bdc169bc054..c8f4cac9d84 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -79,7 +79,7 @@ static int __init blacklist_by_year(void)
79{ 79{
80 int year = dmi_get_year(DMI_BIOS_DATE); 80 int year = dmi_get_year(DMI_BIOS_DATE);
81 /* Doesn't exist? Likely an old system */ 81 /* Doesn't exist? Likely an old system */
82 if (year == -1) 82 if (year == -1)
83 return 1; 83 return 1;
84 /* 0? Likely a buggy new BIOS */ 84 /* 0? Likely a buggy new BIOS */
85 if (year == 0) 85 if (year == 0)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 710364e6c58..743ce27fa0b 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -872,7 +872,8 @@ static int __init acpi_ec_get_real_ecdt(void)
872 acpi_status status; 872 acpi_status status;
873 struct acpi_table_ecdt *ecdt_ptr; 873 struct acpi_table_ecdt *ecdt_ptr;
874 874
875 status = acpi_get_table("ECDT", 1, (struct acpi_table_header **)&ecdt_ptr); 875 status = acpi_get_table(ACPI_SIG_ECDT, 1,
876 (struct acpi_table_header **)&ecdt_ptr);
876 if (ACPI_FAILURE(status)) 877 if (ACPI_FAILURE(status))
877 return -ENODEV; 878 return -ENODEV;
878 879
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index bd96a704592..4a9faff4c01 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -45,7 +45,7 @@ int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS]
45int __cpuinitdata node_to_pxm_map[MAX_NUMNODES] 45int __cpuinitdata node_to_pxm_map[MAX_NUMNODES]
46 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; 46 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
47 47
48extern int __init acpi_table_parse_madt_family(enum acpi_table_id id, 48extern int __init acpi_table_parse_madt_family(char *id,
49 unsigned long madt_size, 49 unsigned long madt_size,
50 int entry_id, 50 int entry_id,
51 acpi_madt_entry_handler handler, 51 acpi_madt_entry_handler handler,
@@ -89,7 +89,7 @@ void __cpuinit acpi_unmap_pxm_to_node(int node)
89 node_clear(node, nodes_found_map); 89 node_clear(node, nodes_found_map);
90} 90}
91 91
92void __init acpi_table_print_srat_entry(acpi_table_entry_header * header) 92void __init acpi_table_print_srat_entry(struct acpi_subtable_header * header)
93{ 93{
94 94
95 ACPI_FUNCTION_NAME("acpi_table_print_srat_entry"); 95 ACPI_FUNCTION_NAME("acpi_table_print_srat_entry");
@@ -99,36 +99,35 @@ void __init acpi_table_print_srat_entry(acpi_table_entry_header * header)
99 99
100 switch (header->type) { 100 switch (header->type) {
101 101
102 case ACPI_SRAT_PROCESSOR_AFFINITY: 102 case ACPI_SRAT_TYPE_CPU_AFFINITY:
103#ifdef ACPI_DEBUG_OUTPUT 103#ifdef ACPI_DEBUG_OUTPUT
104 { 104 {
105 struct acpi_table_processor_affinity *p = 105 struct acpi_srat_cpu_affinity *p =
106 (struct acpi_table_processor_affinity *)header; 106 (struct acpi_srat_cpu_affinity *)header;
107 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 107 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
108 "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n", 108 "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
109 p->apic_id, p->lsapic_eid, 109 p->apic_id, p->local_sapic_eid,
110 p->proximity_domain, 110 p->proximity_domain_lo,
111 p->flags. 111 (p->flags & ACPI_SRAT_CPU_ENABLED)?
112 enabled ? "enabled" : "disabled")); 112 "enabled" : "disabled"));
113 } 113 }
114#endif /* ACPI_DEBUG_OUTPUT */ 114#endif /* ACPI_DEBUG_OUTPUT */
115 break; 115 break;
116 116
117 case ACPI_SRAT_MEMORY_AFFINITY: 117 case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
118#ifdef ACPI_DEBUG_OUTPUT 118#ifdef ACPI_DEBUG_OUTPUT
119 { 119 {
120 struct acpi_table_memory_affinity *p = 120 struct acpi_srat_mem_affinity *p =
121 (struct acpi_table_memory_affinity *)header; 121 (struct acpi_srat_mem_affinity *)header;
122 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 122 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
123 "SRAT Memory (0x%08x%08x length 0x%08x%08x type 0x%x) in proximity domain %d %s%s\n", 123 "SRAT Memory (0x%lx length 0x%lx type 0x%x) in proximity domain %d %s%s\n",
124 p->base_addr_hi, p->base_addr_lo, 124 (unsigned long)p->base_address,
125 p->length_hi, p->length_lo, 125 (unsigned long)p->length,
126 p->memory_type, p->proximity_domain, 126 p->memory_type, p->proximity_domain,
127 p->flags. 127 (p->flags & ACPI_SRAT_MEM_ENABLED)?
128 enabled ? "enabled" : "disabled", 128 "enabled" : "disabled",
129 p->flags. 129 (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)?
130 hot_pluggable ? " hot-pluggable" : 130 " hot-pluggable" : ""));
131 ""));
132 } 131 }
133#endif /* ACPI_DEBUG_OUTPUT */ 132#endif /* ACPI_DEBUG_OUTPUT */
134 break; 133 break;
@@ -141,18 +140,18 @@ void __init acpi_table_print_srat_entry(acpi_table_entry_header * header)
141 } 140 }
142} 141}
143 142
144static int __init acpi_parse_slit(unsigned long phys_addr, unsigned long size) 143static int __init acpi_parse_slit(struct acpi_table_header *table)
145{ 144{
146 struct acpi_table_slit *slit; 145 struct acpi_table_slit *slit;
147 u32 localities; 146 u32 localities;
148 147
149 if (!phys_addr || !size) 148 if (!table)
150 return -EINVAL; 149 return -EINVAL;
151 150
152 slit = (struct acpi_table_slit *)__va(phys_addr); 151 slit = (struct acpi_table_slit *)table;
153 152
154 /* downcast just for %llu vs %lu for i386/ia64 */ 153 /* downcast just for %llu vs %lu for i386/ia64 */
155 localities = (u32) slit->localities; 154 localities = (u32) slit->locality_count;
156 155
157 acpi_numa_slit_init(slit); 156 acpi_numa_slit_init(slit);
158 157
@@ -160,12 +159,12 @@ static int __init acpi_parse_slit(unsigned long phys_addr, unsigned long size)
160} 159}
161 160
162static int __init 161static int __init
163acpi_parse_processor_affinity(acpi_table_entry_header * header, 162acpi_parse_processor_affinity(struct acpi_subtable_header * header,
164 const unsigned long end) 163 const unsigned long end)
165{ 164{
166 struct acpi_table_processor_affinity *processor_affinity; 165 struct acpi_srat_cpu_affinity *processor_affinity;
167 166
168 processor_affinity = (struct acpi_table_processor_affinity *)header; 167 processor_affinity = (struct acpi_srat_cpu_affinity *)header;
169 if (!processor_affinity) 168 if (!processor_affinity)
170 return -EINVAL; 169 return -EINVAL;
171 170
@@ -178,12 +177,12 @@ acpi_parse_processor_affinity(acpi_table_entry_header * header,
178} 177}
179 178
180static int __init 179static int __init
181acpi_parse_memory_affinity(acpi_table_entry_header * header, 180acpi_parse_memory_affinity(struct acpi_subtable_header * header,
182 const unsigned long end) 181 const unsigned long end)
183{ 182{
184 struct acpi_table_memory_affinity *memory_affinity; 183 struct acpi_srat_mem_affinity *memory_affinity;
185 184
186 memory_affinity = (struct acpi_table_memory_affinity *)header; 185 memory_affinity = (struct acpi_srat_mem_affinity *)header;
187 if (!memory_affinity) 186 if (!memory_affinity)
188 return -EINVAL; 187 return -EINVAL;
189 188
@@ -195,23 +194,23 @@ acpi_parse_memory_affinity(acpi_table_entry_header * header,
195 return 0; 194 return 0;
196} 195}
197 196
198static int __init acpi_parse_srat(unsigned long phys_addr, unsigned long size) 197static int __init acpi_parse_srat(struct acpi_table_header *table)
199{ 198{
200 struct acpi_table_srat *srat; 199 struct acpi_table_srat *srat;
201 200
202 if (!phys_addr || !size) 201 if (!table)
203 return -EINVAL; 202 return -EINVAL;
204 203
205 srat = (struct acpi_table_srat *)__va(phys_addr); 204 srat = (struct acpi_table_srat *)table;
206 205
207 return 0; 206 return 0;
208} 207}
209 208
210int __init 209int __init
211acpi_table_parse_srat(enum acpi_srat_entry_id id, 210acpi_table_parse_srat(enum acpi_srat_type id,
212 acpi_madt_entry_handler handler, unsigned int max_entries) 211 acpi_madt_entry_handler handler, unsigned int max_entries)
213{ 212{
214 return acpi_table_parse_madt_family(ACPI_SRAT, 213 return acpi_table_parse_madt_family(ACPI_SIG_SRAT,
215 sizeof(struct acpi_table_srat), id, 214 sizeof(struct acpi_table_srat), id,
216 handler, max_entries); 215 handler, max_entries);
217} 216}
@@ -221,17 +220,17 @@ int __init acpi_numa_init(void)
221 int result; 220 int result;
222 221
223 /* SRAT: Static Resource Affinity Table */ 222 /* SRAT: Static Resource Affinity Table */
224 result = acpi_table_parse(ACPI_SRAT, acpi_parse_srat); 223 result = acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat);
225 224
226 if (result > 0) { 225 if (result > 0) {
227 result = acpi_table_parse_srat(ACPI_SRAT_PROCESSOR_AFFINITY, 226 result = acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
228 acpi_parse_processor_affinity, 227 acpi_parse_processor_affinity,
229 NR_CPUS); 228 NR_CPUS);
230 result = acpi_table_parse_srat(ACPI_SRAT_MEMORY_AFFINITY, acpi_parse_memory_affinity, NR_NODE_MEMBLKS); // IA64 specific 229 result = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, acpi_parse_memory_affinity, NR_NODE_MEMBLKS); // IA64 specific
231 } 230 }
232 231
233 /* SLIT: System Locality Information Table */ 232 /* SLIT: System Locality Information Table */
234 result = acpi_table_parse(ACPI_SLIT, acpi_parse_slit); 233 result = acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit);
235 234
236 acpi_numa_arch_fixup(); 235 acpi_numa_arch_fixup();
237 return 0; 236 return 0;
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index f1afd26a509..a7b33d2f599 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1802,7 +1802,7 @@ static __devinit int try_init_acpi(struct SPMITable *spmi)
1802 return -ENODEV; 1802 return -ENODEV;
1803 } 1803 }
1804 1804
1805 if (spmi->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) 1805 if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
1806 addr_space = IPMI_MEM_ADDR_SPACE; 1806 addr_space = IPMI_MEM_ADDR_SPACE;
1807 else 1807 else
1808 addr_space = IPMI_IO_ADDR_SPACE; 1808 addr_space = IPMI_IO_ADDR_SPACE;
@@ -1848,19 +1848,19 @@ static __devinit int try_init_acpi(struct SPMITable *spmi)
1848 info->irq_setup = NULL; 1848 info->irq_setup = NULL;
1849 } 1849 }
1850 1850
1851 if (spmi->addr.register_bit_width) { 1851 if (spmi->addr.bit_width) {
1852 /* A (hopefully) properly formed register bit width. */ 1852 /* A (hopefully) properly formed register bit width. */
1853 info->io.regspacing = spmi->addr.register_bit_width / 8; 1853 info->io.regspacing = spmi->addr.bit_width / 8;
1854 } else { 1854 } else {
1855 info->io.regspacing = DEFAULT_REGSPACING; 1855 info->io.regspacing = DEFAULT_REGSPACING;
1856 } 1856 }
1857 info->io.regsize = info->io.regspacing; 1857 info->io.regsize = info->io.regspacing;
1858 info->io.regshift = spmi->addr.register_bit_offset; 1858 info->io.regshift = spmi->addr.bit_offset;
1859 1859
1860 if (spmi->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { 1860 if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
1861 info->io_setup = mem_setup; 1861 info->io_setup = mem_setup;
1862 info->io.addr_type = IPMI_IO_ADDR_SPACE; 1862 info->io.addr_type = IPMI_IO_ADDR_SPACE;
1863 } else if (spmi->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) { 1863 } else if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
1864 info->io_setup = port_setup; 1864 info->io_setup = port_setup;
1865 info->io.addr_type = IPMI_MEM_ADDR_SPACE; 1865 info->io.addr_type = IPMI_MEM_ADDR_SPACE;
1866 } else { 1866 } else {
@@ -1888,10 +1888,8 @@ static __devinit void acpi_find_bmc(void)
1888 return; 1888 return;
1889 1889
1890 for (i = 0; ; i++) { 1890 for (i = 0; ; i++) {
1891 status = acpi_get_firmware_table("SPMI", i+1, 1891 status = acpi_get_table(ACPI_SIG_SPMI, i+1,
1892 ACPI_LOGICAL_ADDRESSING, 1892 (struct acpi_table_header **)&spmi);
1893 (struct acpi_table_header **)
1894 &spmi);
1895 if (status != AE_OK) 1893 if (status != AE_OK)
1896 return; 1894 return;
1897 1895
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
index a611972024e..7fca5f470be 100644
--- a/drivers/char/tpm/tpm_bios.c
+++ b/drivers/char/tpm/tpm_bios.c
@@ -372,10 +372,8 @@ static int read_log(struct tpm_bios_log *log)
372 } 372 }
373 373
374 /* Find TCPA entry in RSDT (ACPI_LOGICAL_ADDRESSING) */ 374 /* Find TCPA entry in RSDT (ACPI_LOGICAL_ADDRESSING) */
375 status = acpi_get_firmware_table(ACPI_TCPA_SIG, 1, 375 status = acpi_get_table(ACPI_SIG_TCPA, 1,
376 ACPI_LOGICAL_ADDRESSING, 376 (struct acpi_table_header **)&buff);
377 (struct acpi_table_header **)
378 &buff);
379 377
380 if (ACPI_FAILURE(status)) { 378 if (ACPI_FAILURE(status)) {
381 printk(KERN_ERR "%s: ERROR - Could not get TCPA table\n", 379 printk(KERN_ERR "%s: ERROR - Could not get TCPA table\n",
@@ -409,7 +407,7 @@ static int read_log(struct tpm_bios_log *log)
409 407
410 log->bios_event_log_end = log->bios_event_log + len; 408 log->bios_event_log_end = log->bios_event_log + len;
411 409
412 acpi_os_map_memory(start, len, (void *) &virt); 410 virt = acpi_os_map_memory(start, len);
413 411
414 memcpy(log->bios_event_log, virt, len); 412 memcpy(log->bios_event_log, virt, len);
415 413
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c
index c2ad72fefd9..2b4b76e8bd7 100644
--- a/drivers/firmware/pcdp.c
+++ b/drivers/firmware/pcdp.c
@@ -26,7 +26,7 @@ setup_serial_console(struct pcdp_uart *uart)
26 static char options[64], *p = options; 26 static char options[64], *p = options;
27 char parity; 27 char parity;
28 28
29 mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); 29 mmio = (uart->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
30 p += sprintf(p, "console=uart,%s,0x%lx", 30 p += sprintf(p, "console=uart,%s,0x%lx",
31 mmio ? "mmio" : "io", uart->addr.address); 31 mmio ? "mmio" : "io", uart->addr.address);
32 if (uart->baud) { 32 if (uart->baud) {
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index bd1faebf61a..fca978fb158 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -773,13 +773,13 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base)
773 goto out; 773 goto out;
774 774
775 table = obj->buffer.pointer; 775 table = obj->buffer.pointer;
776 switch (((acpi_table_entry_header *)table)->type) { 776 switch (((struct acpi_subtable_header *)table)->type) {
777 case ACPI_MADT_IOSAPIC: 777 case ACPI_MADT_TYPE_IO_SAPIC:
778 *gsi_base = ((struct acpi_table_iosapic *)table)->global_irq_base; 778 *gsi_base = ((struct acpi_madt_io_sapic *)table)->global_irq_base;
779 result = 0; 779 result = 0;
780 break; 780 break;
781 case ACPI_MADT_IOAPIC: 781 case ACPI_MADT_TYPE_IO_APIC:
782 *gsi_base = ((struct acpi_table_ioapic *)table)->global_irq_base; 782 *gsi_base = ((struct acpi_madt_io_apic *)table)->global_irq_base;
783 result = 0; 783 result = 0;
784 break; 784 break;
785 default: 785 default:
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h
index 99f66be240b..24990e546da 100644
--- a/include/asm-i386/mach-es7000/mach_mpparse.h
+++ b/include/asm-i386/mach-es7000/mach_mpparse.h
@@ -3,13 +3,13 @@
3 3
4#include <linux/acpi.h> 4#include <linux/acpi.h>
5 5
6static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 6static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
7 struct mpc_config_translation *translation) 7 struct mpc_config_translation *translation)
8{ 8{
9 Dprintk("Bus #%d is %s\n", m->mpc_busid, name); 9 Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
10} 10}
11 11
12static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, 12static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
13 struct mpc_config_translation *translation) 13 struct mpc_config_translation *translation)
14{ 14{
15} 15}
@@ -22,7 +22,7 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
22 char *productid) 22 char *productid)
23{ 23{
24 if (mpc->mpc_oemptr) { 24 if (mpc->mpc_oemptr) {
25 struct mp_config_oemtable *oem_table = 25 struct mp_config_oemtable *oem_table =
26 (struct mp_config_oemtable *)mpc->mpc_oemptr; 26 (struct mp_config_oemtable *)mpc->mpc_oemptr;
27 if (!strncmp(oem, "UNISYS", 6)) 27 if (!strncmp(oem, "UNISYS", 6))
28 return parse_unisys_oem((char *)oem_table); 28 return parse_unisys_oem((char *)oem_table);
@@ -31,12 +31,13 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
31} 31}
32 32
33#ifdef CONFIG_ACPI 33#ifdef CONFIG_ACPI
34
34static inline int es7000_check_dsdt(void) 35static inline int es7000_check_dsdt(void)
35{ 36{
36 struct acpi_table_header *header = NULL; 37 struct acpi_table_header header;
37 if(!acpi_get_table_header_early(ACPI_DSDT, &header)) 38 memcpy(&header, 0, sizeof(struct acpi_table_header));
38 acpi_table_print(header, 0); 39 acpi_get_table_header(ACPI_SIG_DSDT, 0, &header);
39 if (!strncmp(header->oem_id, "UNISYS", 6)) 40 if (!strncmp(header.oem_id, "UNISYS", 6))
40 return 1; 41 return 1;
41 return 0; 42 return 0;
42} 43}
@@ -44,7 +45,7 @@ static inline int es7000_check_dsdt(void)
44/* Hook from generic ACPI tables.c */ 45/* Hook from generic ACPI tables.c */
45static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) 46static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
46{ 47{
47 unsigned long oem_addr; 48 unsigned long oem_addr;
48 if (!find_unisys_acpi_oem_table(&oem_addr)) { 49 if (!find_unisys_acpi_oem_table(&oem_addr)) {
49 if (es7000_check_dsdt()) 50 if (es7000_check_dsdt())
50 return parse_unisys_oem((char *)oem_addr); 51 return parse_unisys_oem((char *)oem_addr);
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index fac7a7b1f5f..815f1fb4ce2 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -53,11 +53,6 @@ enum acpi_irq_model_id {
53 53
54extern enum acpi_irq_model_id acpi_irq_model; 54extern enum acpi_irq_model_id acpi_irq_model;
55 55
56typedef struct {
57 u8 type;
58 u8 length;
59} __attribute__ ((packed)) acpi_table_entry_header;
60
61enum acpi_interrupt_id { 56enum acpi_interrupt_id {
62 ACPI_INTERRUPT_PMI = 1, 57 ACPI_INTERRUPT_PMI = 1,
63 ACPI_INTERRUPT_INIT, 58 ACPI_INTERRUPT_INIT,
@@ -67,74 +62,6 @@ enum acpi_interrupt_id {
67 62
68#define ACPI_SPACE_MEM 0 63#define ACPI_SPACE_MEM 0
69 64
70struct acpi_gen_regaddr {
71 u8 space_id;
72 u8 bit_width;
73 u8 bit_offset;
74 u8 resv;
75 u32 addrl;
76 u32 addrh;
77} __attribute__ ((packed));
78
79/*
80 * Simple Boot Flags
81 * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx
82 */
83struct acpi_table_sbf
84{
85 u8 sbf_signature[4];
86 u32 sbf_len;
87 u8 sbf_revision;
88 u8 sbf_csum;
89 u8 sbf_oemid[6];
90 u8 sbf_oemtable[8];
91 u8 sbf_revdata[4];
92 u8 sbf_creator[4];
93 u8 sbf_crearev[4];
94 u8 sbf_cmos;
95 u8 sbf_spare[3];
96} __attribute__ ((packed));
97
98/*
99 * System Resource Affinity Table (SRAT)
100 * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx
101 */
102
103enum acpi_srat_entry_id {
104 ACPI_SRAT_PROCESSOR_AFFINITY = 0,
105 ACPI_SRAT_MEMORY_AFFINITY,
106 ACPI_SRAT_ENTRY_COUNT
107};
108
109struct acpi_table_processor_affinity {
110 acpi_table_entry_header header;
111 u8 proximity_domain;
112 u8 apic_id;
113 struct {
114 u32 enabled:1;
115 u32 reserved:31;
116 } flags;
117 u8 lsapic_eid;
118 u8 reserved[7];
119} __attribute__ ((packed));
120
121struct acpi_table_memory_affinity {
122 acpi_table_entry_header header;
123 u8 proximity_domain;
124 u8 reserved1[5];
125 u32 base_addr_lo;
126 u32 base_addr_hi;
127 u32 length_lo;
128 u32 length_hi;
129 u32 memory_type; /* See acpi_address_range_id */
130 struct {
131 u32 enabled:1;
132 u32 hot_pluggable:1;
133 u32 reserved:30;
134 } flags;
135 u64 reserved2;
136} __attribute__ ((packed));
137
138enum acpi_address_range_id { 65enum acpi_address_range_id {
139 ACPI_ADDRESS_RANGE_MEMORY = 1, 66 ACPI_ADDRESS_RANGE_MEMORY = 1,
140 ACPI_ADDRESS_RANGE_RESERVED = 2, 67 ACPI_ADDRESS_RANGE_RESERVED = 2,
@@ -144,46 +71,9 @@ enum acpi_address_range_id {
144}; 71};
145 72
146 73
147/* PCI MMCONFIG */
148
149/* Defined in PCI Firmware Specification 3.0 */
150struct acpi_table_mcfg_config {
151 u32 base_address;
152 u32 base_reserved;
153 u16 pci_segment_group_number;
154 u8 start_bus_number;
155 u8 end_bus_number;
156 u8 reserved[4];
157} __attribute__ ((packed));
158
159/* Table Handlers */ 74/* Table Handlers */
160 75
161enum acpi_table_id { 76typedef int (*acpi_table_handler) (struct acpi_table_header *table);
162 ACPI_TABLE_UNKNOWN = 0,
163 ACPI_APIC,
164 ACPI_BOOT,
165 ACPI_DBGP,
166 ACPI_DSDT,
167 ACPI_ECDT,
168 ACPI_ETDT,
169 ACPI_FADT,
170 ACPI_FACS,
171 ACPI_OEMX,
172 ACPI_PSDT,
173 ACPI_SBST,
174 ACPI_SLIT,
175 ACPI_SPCR,
176 ACPI_SRAT,
177 ACPI_SSDT,
178 ACPI_SPMI,
179 ACPI_HPET,
180 ACPI_MCFG,
181 ACPI_TABLE_COUNT
182};
183
184typedef int (*acpi_table_handler) (struct acpi_table_header *header);
185
186extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT];
187 77
188typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); 78typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
189 79
@@ -196,11 +86,10 @@ int acpi_numa_init (void);
196int acpi_table_init (void); 86int acpi_table_init (void);
197int acpi_table_parse (char *id, acpi_table_handler handler); 87int acpi_table_parse (char *id, acpi_table_handler handler);
198int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); 88int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries);
199int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); 89int acpi_table_parse_srat (enum acpi_srat_type id, acpi_madt_entry_handler handler, unsigned int max_entries);
200int acpi_parse_mcfg (struct acpi_table_header *header); 90int acpi_parse_mcfg (struct acpi_table_header *header);
201void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr);
202void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); 91void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
203void acpi_table_print_srat_entry (acpi_table_entry_header *srat); 92void acpi_table_print_srat_entry (struct acpi_subtable_header *srat);
204 93
205/* the following four functions are architecture-dependent */ 94/* the following four functions are architecture-dependent */
206#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT 95#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
@@ -211,8 +100,8 @@ void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
211#define acpi_numa_arch_fixup() do {} while (0) 100#define acpi_numa_arch_fixup() do {} while (0)
212#else 101#else
213void acpi_numa_slit_init (struct acpi_table_slit *slit); 102void acpi_numa_slit_init (struct acpi_table_slit *slit);
214void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); 103void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
215void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); 104void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
216void acpi_numa_arch_fixup(void); 105void acpi_numa_arch_fixup(void);
217#endif 106#endif
218 107
@@ -227,7 +116,7 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
227 116
228extern int acpi_mp_config; 117extern int acpi_mp_config;
229 118
230extern struct acpi_table_mcfg_config *pci_mmcfg_config; 119extern struct acpi_mcfg_allocation *pci_mmcfg_config;
231extern int pci_mmcfg_config_num; 120extern int pci_mmcfg_config_num;
232 121
233extern int sbf_port; 122extern int sbf_port;