diff options
author | Len Brown <len.brown@intel.com> | 2007-02-06 15:31:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-06 15:31:00 -0500 |
commit | 57e1c5c87db512629dd44ddeb882a5aaf0e4299e (patch) | |
tree | e71e8a132d4f696beeae1bdab59efeed9517ba66 /arch/i386/kernel | |
parent | 62d0cfcb27cf755cebdc93ca95dabc83608007cd (diff) | |
parent | 76a2e849df47697706024262a8bbb83432b8bde7 (diff) |
Pull test into release branch
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 235 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/earlyquirk.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 15 | ||||
-rw-r--r-- | arch/i386/kernel/mpparse.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/srat.c | 84 |
5 files changed, 150 insertions, 192 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index cbcb2c27f48b..e94aff6888ca 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -66,7 +66,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return | |||
66 | 66 | ||
67 | #define BAD_MADT_ENTRY(entry, end) ( \ | 67 | #define BAD_MADT_ENTRY(entry, end) ( \ |
68 | (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ | 68 | (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ |
69 | ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) | 69 | ((struct acpi_subtable_header *)entry)->length < sizeof(*entry)) |
70 | 70 | ||
71 | #define PREFIX "ACPI: " | 71 | #define PREFIX "ACPI: " |
72 | 72 | ||
@@ -79,7 +79,7 @@ int acpi_ioapic; | |||
79 | int acpi_strict; | 79 | int acpi_strict; |
80 | EXPORT_SYMBOL(acpi_strict); | 80 | EXPORT_SYMBOL(acpi_strict); |
81 | 81 | ||
82 | acpi_interrupt_flags acpi_sci_flags __initdata; | 82 | u8 acpi_sci_flags __initdata; |
83 | int acpi_sci_override_gsi __initdata; | 83 | int acpi_sci_override_gsi __initdata; |
84 | int acpi_skip_timer_override __initdata; | 84 | int acpi_skip_timer_override __initdata; |
85 | int acpi_use_timer_override __initdata; | 85 | int acpi_use_timer_override __initdata; |
@@ -92,11 +92,6 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; | |||
92 | #warning ACPI uses CMPXCHG, i486 and later hardware | 92 | #warning ACPI uses CMPXCHG, i486 and later hardware |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #define MAX_MADT_ENTRIES 256 | ||
96 | u8 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] = | ||
97 | {[0 ... MAX_MADT_ENTRIES - 1] = 0xff }; | ||
98 | EXPORT_SYMBOL(x86_acpiid_to_apicid); | ||
99 | |||
100 | /* -------------------------------------------------------------------------- | 95 | /* -------------------------------------------------------------------------- |
101 | Boot-time Configuration | 96 | Boot-time Configuration |
102 | -------------------------------------------------------------------------- */ | 97 | -------------------------------------------------------------------------- */ |
@@ -166,30 +161,26 @@ char *__acpi_map_table(unsigned long phys, unsigned long size) | |||
166 | 161 | ||
167 | #ifdef CONFIG_PCI_MMCONFIG | 162 | #ifdef CONFIG_PCI_MMCONFIG |
168 | /* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ | 163 | /* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ |
169 | struct acpi_table_mcfg_config *pci_mmcfg_config; | 164 | struct acpi_mcfg_allocation *pci_mmcfg_config; |
170 | int pci_mmcfg_config_num; | 165 | int pci_mmcfg_config_num; |
171 | 166 | ||
172 | int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | 167 | int __init acpi_parse_mcfg(struct acpi_table_header *header) |
173 | { | 168 | { |
174 | struct acpi_table_mcfg *mcfg; | 169 | struct acpi_table_mcfg *mcfg; |
175 | unsigned long i; | 170 | unsigned long i; |
176 | int config_size; | 171 | int config_size; |
177 | 172 | ||
178 | if (!phys_addr || !size) | 173 | if (!header) |
179 | return -EINVAL; | 174 | return -EINVAL; |
180 | 175 | ||
181 | mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); | 176 | mcfg = (struct acpi_table_mcfg *)header; |
182 | if (!mcfg) { | ||
183 | printk(KERN_WARNING PREFIX "Unable to map MCFG\n"); | ||
184 | return -ENODEV; | ||
185 | } | ||
186 | 177 | ||
187 | /* how many config structures do we have */ | 178 | /* how many config structures do we have */ |
188 | pci_mmcfg_config_num = 0; | 179 | pci_mmcfg_config_num = 0; |
189 | i = size - sizeof(struct acpi_table_mcfg); | 180 | i = header->length - sizeof(struct acpi_table_mcfg); |
190 | while (i >= sizeof(struct acpi_table_mcfg_config)) { | 181 | while (i >= sizeof(struct acpi_mcfg_allocation)) { |
191 | ++pci_mmcfg_config_num; | 182 | ++pci_mmcfg_config_num; |
192 | i -= sizeof(struct acpi_table_mcfg_config); | 183 | i -= sizeof(struct acpi_mcfg_allocation); |
193 | }; | 184 | }; |
194 | if (pci_mmcfg_config_num == 0) { | 185 | if (pci_mmcfg_config_num == 0) { |
195 | printk(KERN_ERR PREFIX "MMCONFIG has no entries\n"); | 186 | printk(KERN_ERR PREFIX "MMCONFIG has no entries\n"); |
@@ -204,9 +195,9 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | |||
204 | return -ENOMEM; | 195 | return -ENOMEM; |
205 | } | 196 | } |
206 | 197 | ||
207 | memcpy(pci_mmcfg_config, &mcfg->config, config_size); | 198 | memcpy(pci_mmcfg_config, &mcfg[1], config_size); |
208 | for (i = 0; i < pci_mmcfg_config_num; ++i) { | 199 | for (i = 0; i < pci_mmcfg_config_num; ++i) { |
209 | if (mcfg->config[i].base_reserved) { | 200 | if (pci_mmcfg_config[i].address > 0xFFFFFFFF) { |
210 | printk(KERN_ERR PREFIX | 201 | printk(KERN_ERR PREFIX |
211 | "MMCONFIG not in low 4GB of memory\n"); | 202 | "MMCONFIG not in low 4GB of memory\n"); |
212 | kfree(pci_mmcfg_config); | 203 | kfree(pci_mmcfg_config); |
@@ -220,24 +211,24 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | |||
220 | #endif /* CONFIG_PCI_MMCONFIG */ | 211 | #endif /* CONFIG_PCI_MMCONFIG */ |
221 | 212 | ||
222 | #ifdef CONFIG_X86_LOCAL_APIC | 213 | #ifdef CONFIG_X86_LOCAL_APIC |
223 | static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) | 214 | static int __init acpi_parse_madt(struct acpi_table_header *table) |
224 | { | 215 | { |
225 | struct acpi_table_madt *madt = NULL; | 216 | struct acpi_table_madt *madt = NULL; |
226 | 217 | ||
227 | if (!phys_addr || !size || !cpu_has_apic) | 218 | if (!cpu_has_apic) |
228 | return -EINVAL; | 219 | return -EINVAL; |
229 | 220 | ||
230 | madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); | 221 | madt = (struct acpi_table_madt *)table; |
231 | if (!madt) { | 222 | if (!madt) { |
232 | printk(KERN_WARNING PREFIX "Unable to map MADT\n"); | 223 | printk(KERN_WARNING PREFIX "Unable to map MADT\n"); |
233 | return -ENODEV; | 224 | return -ENODEV; |
234 | } | 225 | } |
235 | 226 | ||
236 | if (madt->lapic_address) { | 227 | if (madt->address) { |
237 | acpi_lapic_addr = (u64) madt->lapic_address; | 228 | acpi_lapic_addr = (u64) madt->address; |
238 | 229 | ||
239 | printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n", | 230 | printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n", |
240 | madt->lapic_address); | 231 | madt->address); |
241 | } | 232 | } |
242 | 233 | ||
243 | acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id); | 234 | acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id); |
@@ -246,21 +237,17 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) | |||
246 | } | 237 | } |
247 | 238 | ||
248 | static int __init | 239 | static int __init |
249 | acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | 240 | acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) |
250 | { | 241 | { |
251 | struct acpi_table_lapic *processor = NULL; | 242 | struct acpi_madt_local_apic *processor = NULL; |
252 | 243 | ||
253 | processor = (struct acpi_table_lapic *)header; | 244 | processor = (struct acpi_madt_local_apic *)header; |
254 | 245 | ||
255 | if (BAD_MADT_ENTRY(processor, end)) | 246 | if (BAD_MADT_ENTRY(processor, end)) |
256 | return -EINVAL; | 247 | return -EINVAL; |
257 | 248 | ||
258 | acpi_table_print_madt_entry(header); | 249 | acpi_table_print_madt_entry(header); |
259 | 250 | ||
260 | /* Record local apic id only when enabled */ | ||
261 | if (processor->flags.enabled) | ||
262 | x86_acpiid_to_apicid[processor->acpi_id] = processor->id; | ||
263 | |||
264 | /* | 251 | /* |
265 | * We need to register disabled CPU as well to permit | 252 | * We need to register disabled CPU as well to permit |
266 | * counting disabled CPUs. This allows us to size | 253 | * counting disabled CPUs. This allows us to size |
@@ -269,18 +256,18 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | |||
269 | * when we use CPU hotplug. | 256 | * when we use CPU hotplug. |
270 | */ | 257 | */ |
271 | mp_register_lapic(processor->id, /* APIC ID */ | 258 | mp_register_lapic(processor->id, /* APIC ID */ |
272 | processor->flags.enabled); /* Enabled? */ | 259 | processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */ |
273 | 260 | ||
274 | return 0; | 261 | return 0; |
275 | } | 262 | } |
276 | 263 | ||
277 | static int __init | 264 | static int __init |
278 | acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, | 265 | acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, |
279 | const unsigned long end) | 266 | const unsigned long end) |
280 | { | 267 | { |
281 | struct acpi_table_lapic_addr_ovr *lapic_addr_ovr = NULL; | 268 | struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL; |
282 | 269 | ||
283 | lapic_addr_ovr = (struct acpi_table_lapic_addr_ovr *)header; | 270 | lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header; |
284 | 271 | ||
285 | if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) | 272 | if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) |
286 | return -EINVAL; | 273 | return -EINVAL; |
@@ -291,11 +278,11 @@ acpi_parse_lapic_addr_ovr(acpi_table_entry_header * header, | |||
291 | } | 278 | } |
292 | 279 | ||
293 | static int __init | 280 | static int __init |
294 | acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) | 281 | acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end) |
295 | { | 282 | { |
296 | struct acpi_table_lapic_nmi *lapic_nmi = NULL; | 283 | struct acpi_madt_local_apic_nmi *lapic_nmi = NULL; |
297 | 284 | ||
298 | lapic_nmi = (struct acpi_table_lapic_nmi *)header; | 285 | lapic_nmi = (struct acpi_madt_local_apic_nmi *)header; |
299 | 286 | ||
300 | if (BAD_MADT_ENTRY(lapic_nmi, end)) | 287 | if (BAD_MADT_ENTRY(lapic_nmi, end)) |
301 | return -EINVAL; | 288 | return -EINVAL; |
@@ -313,11 +300,11 @@ acpi_parse_lapic_nmi(acpi_table_entry_header * header, const unsigned long end) | |||
313 | #ifdef CONFIG_X86_IO_APIC | 300 | #ifdef CONFIG_X86_IO_APIC |
314 | 301 | ||
315 | static int __init | 302 | static int __init |
316 | acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end) | 303 | acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end) |
317 | { | 304 | { |
318 | struct acpi_table_ioapic *ioapic = NULL; | 305 | struct acpi_madt_io_apic *ioapic = NULL; |
319 | 306 | ||
320 | ioapic = (struct acpi_table_ioapic *)header; | 307 | ioapic = (struct acpi_madt_io_apic *)header; |
321 | 308 | ||
322 | if (BAD_MADT_ENTRY(ioapic, end)) | 309 | if (BAD_MADT_ENTRY(ioapic, end)) |
323 | return -EINVAL; | 310 | return -EINVAL; |
@@ -342,11 +329,11 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) | |||
342 | polarity = 3; | 329 | polarity = 3; |
343 | 330 | ||
344 | /* Command-line over-ride via acpi_sci= */ | 331 | /* Command-line over-ride via acpi_sci= */ |
345 | if (acpi_sci_flags.trigger) | 332 | if (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) |
346 | trigger = acpi_sci_flags.trigger; | 333 | trigger = (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2; |
347 | 334 | ||
348 | if (acpi_sci_flags.polarity) | 335 | if (acpi_sci_flags & ACPI_MADT_POLARITY_MASK) |
349 | polarity = acpi_sci_flags.polarity; | 336 | polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK; |
350 | 337 | ||
351 | /* | 338 | /* |
352 | * mp_config_acpi_legacy_irqs() already setup IRQs < 16 | 339 | * mp_config_acpi_legacy_irqs() already setup IRQs < 16 |
@@ -357,51 +344,52 @@ static void __init acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) | |||
357 | 344 | ||
358 | /* | 345 | /* |
359 | * stash over-ride to indicate we've been here | 346 | * stash over-ride to indicate we've been here |
360 | * and for later update of acpi_fadt | 347 | * and for later update of acpi_gbl_FADT |
361 | */ | 348 | */ |
362 | acpi_sci_override_gsi = gsi; | 349 | acpi_sci_override_gsi = gsi; |
363 | return; | 350 | return; |
364 | } | 351 | } |
365 | 352 | ||
366 | static int __init | 353 | static int __init |
367 | acpi_parse_int_src_ovr(acpi_table_entry_header * header, | 354 | acpi_parse_int_src_ovr(struct acpi_subtable_header * header, |
368 | const unsigned long end) | 355 | const unsigned long end) |
369 | { | 356 | { |
370 | struct acpi_table_int_src_ovr *intsrc = NULL; | 357 | struct acpi_madt_interrupt_override *intsrc = NULL; |
371 | 358 | ||
372 | intsrc = (struct acpi_table_int_src_ovr *)header; | 359 | intsrc = (struct acpi_madt_interrupt_override *)header; |
373 | 360 | ||
374 | if (BAD_MADT_ENTRY(intsrc, end)) | 361 | if (BAD_MADT_ENTRY(intsrc, end)) |
375 | return -EINVAL; | 362 | return -EINVAL; |
376 | 363 | ||
377 | acpi_table_print_madt_entry(header); | 364 | acpi_table_print_madt_entry(header); |
378 | 365 | ||
379 | if (intsrc->bus_irq == acpi_fadt.sci_int) { | 366 | if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { |
380 | acpi_sci_ioapic_setup(intsrc->global_irq, | 367 | acpi_sci_ioapic_setup(intsrc->global_irq, |
381 | intsrc->flags.polarity, | 368 | intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, |
382 | intsrc->flags.trigger); | 369 | (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2); |
383 | return 0; | 370 | return 0; |
384 | } | 371 | } |
385 | 372 | ||
386 | if (acpi_skip_timer_override && | 373 | if (acpi_skip_timer_override && |
387 | intsrc->bus_irq == 0 && intsrc->global_irq == 2) { | 374 | intsrc->source_irq == 0 && intsrc->global_irq == 2) { |
388 | printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); | 375 | printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); |
389 | return 0; | 376 | return 0; |
390 | } | 377 | } |
391 | 378 | ||
392 | mp_override_legacy_irq(intsrc->bus_irq, | 379 | mp_override_legacy_irq(intsrc->source_irq, |
393 | intsrc->flags.polarity, | 380 | intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, |
394 | intsrc->flags.trigger, intsrc->global_irq); | 381 | (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2, |
382 | intsrc->global_irq); | ||
395 | 383 | ||
396 | return 0; | 384 | return 0; |
397 | } | 385 | } |
398 | 386 | ||
399 | static int __init | 387 | static int __init |
400 | acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) | 388 | acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end) |
401 | { | 389 | { |
402 | struct acpi_table_nmi_src *nmi_src = NULL; | 390 | struct acpi_madt_nmi_source *nmi_src = NULL; |
403 | 391 | ||
404 | nmi_src = (struct acpi_table_nmi_src *)header; | 392 | nmi_src = (struct acpi_madt_nmi_source *)header; |
405 | 393 | ||
406 | if (BAD_MADT_ENTRY(nmi_src, end)) | 394 | if (BAD_MADT_ENTRY(nmi_src, end)) |
407 | return -EINVAL; | 395 | return -EINVAL; |
@@ -417,7 +405,7 @@ acpi_parse_nmi_src(acpi_table_entry_header * header, const unsigned long end) | |||
417 | 405 | ||
418 | /* | 406 | /* |
419 | * acpi_pic_sci_set_trigger() | 407 | * acpi_pic_sci_set_trigger() |
420 | * | 408 | * |
421 | * use ELCR to set PIC-mode trigger type for SCI | 409 | * use ELCR to set PIC-mode trigger type for SCI |
422 | * | 410 | * |
423 | * If a PIC-mode SCI is not recognized or gives spurious IRQ7's | 411 | * If a PIC-mode SCI is not recognized or gives spurious IRQ7's |
@@ -511,7 +499,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
511 | { | 499 | { |
512 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 500 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
513 | union acpi_object *obj; | 501 | union acpi_object *obj; |
514 | struct acpi_table_lapic *lapic; | 502 | struct acpi_madt_local_apic *lapic; |
515 | cpumask_t tmp_map, new_map; | 503 | cpumask_t tmp_map, new_map; |
516 | u8 physid; | 504 | u8 physid; |
517 | int cpu; | 505 | int cpu; |
@@ -529,10 +517,10 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
529 | return -EINVAL; | 517 | return -EINVAL; |
530 | } | 518 | } |
531 | 519 | ||
532 | lapic = (struct acpi_table_lapic *)obj->buffer.pointer; | 520 | lapic = (struct acpi_madt_local_apic *)obj->buffer.pointer; |
533 | 521 | ||
534 | if ((lapic->header.type != ACPI_MADT_LAPIC) || | 522 | if (lapic->header.type != ACPI_MADT_TYPE_LOCAL_APIC || |
535 | (!lapic->flags.enabled)) { | 523 | !(lapic->lapic_flags & ACPI_MADT_ENABLED)) { |
536 | kfree(buffer.pointer); | 524 | kfree(buffer.pointer); |
537 | return -EINVAL; | 525 | return -EINVAL; |
538 | } | 526 | } |
@@ -544,7 +532,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
544 | buffer.pointer = NULL; | 532 | buffer.pointer = NULL; |
545 | 533 | ||
546 | tmp_map = cpu_present_map; | 534 | tmp_map = cpu_present_map; |
547 | mp_register_lapic(physid, lapic->flags.enabled); | 535 | mp_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED); |
548 | 536 | ||
549 | /* | 537 | /* |
550 | * If mp_register_lapic successfully generates a new logical cpu | 538 | * If mp_register_lapic successfully generates a new logical cpu |
@@ -566,14 +554,6 @@ EXPORT_SYMBOL(acpi_map_lsapic); | |||
566 | 554 | ||
567 | int acpi_unmap_lsapic(int cpu) | 555 | int acpi_unmap_lsapic(int cpu) |
568 | { | 556 | { |
569 | int i; | ||
570 | |||
571 | for_each_possible_cpu(i) { | ||
572 | if (x86_acpiid_to_apicid[i] == x86_cpu_to_apicid[cpu]) { | ||
573 | x86_acpiid_to_apicid[i] = -1; | ||
574 | break; | ||
575 | } | ||
576 | } | ||
577 | x86_cpu_to_apicid[cpu] = -1; | 557 | x86_cpu_to_apicid[cpu] = -1; |
578 | cpu_clear(cpu, cpu_present_map); | 558 | cpu_clear(cpu, cpu_present_map); |
579 | num_processors--; | 559 | num_processors--; |
@@ -619,42 +599,36 @@ acpi_scan_rsdp(unsigned long start, unsigned long length) | |||
619 | return 0; | 599 | return 0; |
620 | } | 600 | } |
621 | 601 | ||
622 | static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) | 602 | static int __init acpi_parse_sbf(struct acpi_table_header *table) |
623 | { | 603 | { |
624 | struct acpi_table_sbf *sb; | 604 | struct acpi_table_boot *sb; |
625 | |||
626 | if (!phys_addr || !size) | ||
627 | return -EINVAL; | ||
628 | 605 | ||
629 | sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size); | 606 | sb = (struct acpi_table_boot *)table; |
630 | if (!sb) { | 607 | if (!sb) { |
631 | printk(KERN_WARNING PREFIX "Unable to map SBF\n"); | 608 | printk(KERN_WARNING PREFIX "Unable to map SBF\n"); |
632 | return -ENODEV; | 609 | return -ENODEV; |
633 | } | 610 | } |
634 | 611 | ||
635 | sbf_port = sb->sbf_cmos; /* Save CMOS port */ | 612 | sbf_port = sb->cmos_index; /* Save CMOS port */ |
636 | 613 | ||
637 | return 0; | 614 | return 0; |
638 | } | 615 | } |
639 | 616 | ||
640 | #ifdef CONFIG_HPET_TIMER | 617 | #ifdef CONFIG_HPET_TIMER |
641 | 618 | ||
642 | static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) | 619 | static int __init acpi_parse_hpet(struct acpi_table_header *table) |
643 | { | 620 | { |
644 | struct acpi_table_hpet *hpet_tbl; | 621 | struct acpi_table_hpet *hpet_tbl; |
645 | struct resource *hpet_res; | 622 | struct resource *hpet_res; |
646 | resource_size_t res_start; | 623 | resource_size_t res_start; |
647 | 624 | ||
648 | if (!phys || !size) | 625 | hpet_tbl = (struct acpi_table_hpet *)table; |
649 | return -EINVAL; | ||
650 | |||
651 | hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size); | ||
652 | if (!hpet_tbl) { | 626 | if (!hpet_tbl) { |
653 | printk(KERN_WARNING PREFIX "Unable to map HPET\n"); | 627 | printk(KERN_WARNING PREFIX "Unable to map HPET\n"); |
654 | return -ENODEV; | 628 | return -ENODEV; |
655 | } | 629 | } |
656 | 630 | ||
657 | if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) { | 631 | if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) { |
658 | printk(KERN_WARNING PREFIX "HPET timers must be located in " | 632 | printk(KERN_WARNING PREFIX "HPET timers must be located in " |
659 | "memory.\n"); | 633 | "memory.\n"); |
660 | return -1; | 634 | return -1; |
@@ -667,29 +641,28 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) | |||
667 | hpet_res->name = (void *)&hpet_res[1]; | 641 | hpet_res->name = (void *)&hpet_res[1]; |
668 | hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 642 | hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
669 | snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, | 643 | snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, |
670 | "HPET %u", hpet_tbl->number); | 644 | "HPET %u", hpet_tbl->sequence); |
671 | hpet_res->end = (1 * 1024) - 1; | 645 | hpet_res->end = (1 * 1024) - 1; |
672 | } | 646 | } |
673 | 647 | ||
674 | #ifdef CONFIG_X86_64 | 648 | #ifdef CONFIG_X86_64 |
675 | vxtime.hpet_address = hpet_tbl->addr.addrl | | 649 | vxtime.hpet_address = hpet_tbl->address.address; |
676 | ((long)hpet_tbl->addr.addrh << 32); | ||
677 | 650 | ||
678 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", | 651 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", |
679 | hpet_tbl->id, vxtime.hpet_address); | 652 | hpet_tbl->id, vxtime.hpet_address); |
680 | 653 | ||
681 | res_start = vxtime.hpet_address; | 654 | res_start = vxtime.hpet_address; |
682 | #else /* X86 */ | 655 | #else /* X86 */ |
683 | { | 656 | { |
684 | extern unsigned long hpet_address; | 657 | extern unsigned long hpet_address; |
685 | 658 | ||
686 | hpet_address = hpet_tbl->addr.addrl; | 659 | hpet_address = hpet_tbl->address.address; |
687 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", | 660 | printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", |
688 | hpet_tbl->id, hpet_address); | 661 | hpet_tbl->id, hpet_address); |
689 | 662 | ||
690 | res_start = hpet_address; | 663 | res_start = hpet_address; |
691 | } | 664 | } |
692 | #endif /* X86 */ | 665 | #endif /* X86 */ |
693 | 666 | ||
694 | if (hpet_res) { | 667 | if (hpet_res) { |
695 | hpet_res->start = res_start; | 668 | hpet_res->start = res_start; |
@@ -707,42 +680,28 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) | |||
707 | extern u32 pmtmr_ioport; | 680 | extern u32 pmtmr_ioport; |
708 | #endif | 681 | #endif |
709 | 682 | ||
710 | static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) | 683 | static int __init acpi_parse_fadt(struct acpi_table_header *table) |
711 | { | 684 | { |
712 | struct fadt_descriptor *fadt = NULL; | ||
713 | |||
714 | fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size); | ||
715 | if (!fadt) { | ||
716 | printk(KERN_WARNING PREFIX "Unable to map FADT\n"); | ||
717 | return 0; | ||
718 | } | ||
719 | /* initialize sci_int early for INT_SRC_OVR MADT parsing */ | ||
720 | acpi_fadt.sci_int = fadt->sci_int; | ||
721 | |||
722 | /* initialize rev and apic_phys_dest_mode for x86_64 genapic */ | ||
723 | acpi_fadt.revision = fadt->revision; | ||
724 | acpi_fadt.force_apic_physical_destination_mode = | ||
725 | fadt->force_apic_physical_destination_mode; | ||
726 | 685 | ||
727 | #ifdef CONFIG_X86_PM_TIMER | 686 | #ifdef CONFIG_X86_PM_TIMER |
728 | /* detect the location of the ACPI PM Timer */ | 687 | /* detect the location of the ACPI PM Timer */ |
729 | if (fadt->revision >= FADT2_REVISION_ID) { | 688 | if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) { |
730 | /* FADT rev. 2 */ | 689 | /* FADT rev. 2 */ |
731 | if (fadt->xpm_tmr_blk.address_space_id != | 690 | if (acpi_gbl_FADT.xpm_timer_block.space_id != |
732 | ACPI_ADR_SPACE_SYSTEM_IO) | 691 | ACPI_ADR_SPACE_SYSTEM_IO) |
733 | return 0; | 692 | return 0; |
734 | 693 | ||
735 | pmtmr_ioport = fadt->xpm_tmr_blk.address; | 694 | pmtmr_ioport = acpi_gbl_FADT.xpm_timer_block.address; |
736 | /* | 695 | /* |
737 | * "X" fields are optional extensions to the original V1.0 | 696 | * "X" fields are optional extensions to the original V1.0 |
738 | * fields, so we must selectively expand V1.0 fields if the | 697 | * fields, so we must selectively expand V1.0 fields if the |
739 | * corresponding X field is zero. | 698 | * corresponding X field is zero. |
740 | */ | 699 | */ |
741 | if (!pmtmr_ioport) | 700 | if (!pmtmr_ioport) |
742 | pmtmr_ioport = fadt->V1_pm_tmr_blk; | 701 | pmtmr_ioport = acpi_gbl_FADT.pm_timer_block; |
743 | } else { | 702 | } else { |
744 | /* FADT rev. 1 */ | 703 | /* FADT rev. 1 */ |
745 | pmtmr_ioport = fadt->V1_pm_tmr_blk; | 704 | pmtmr_ioport = acpi_gbl_FADT.pm_timer_block; |
746 | } | 705 | } |
747 | if (pmtmr_ioport) | 706 | if (pmtmr_ioport) |
748 | printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", | 707 | printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", |
@@ -784,13 +743,13 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
784 | if (!cpu_has_apic) | 743 | if (!cpu_has_apic) |
785 | return -ENODEV; | 744 | return -ENODEV; |
786 | 745 | ||
787 | /* | 746 | /* |
788 | * Note that the LAPIC address is obtained from the MADT (32-bit value) | 747 | * Note that the LAPIC address is obtained from the MADT (32-bit value) |
789 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | 748 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). |
790 | */ | 749 | */ |
791 | 750 | ||
792 | count = | 751 | count = |
793 | acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, | 752 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, |
794 | acpi_parse_lapic_addr_ovr, 0); | 753 | acpi_parse_lapic_addr_ovr, 0); |
795 | if (count < 0) { | 754 | if (count < 0) { |
796 | printk(KERN_ERR PREFIX | 755 | printk(KERN_ERR PREFIX |
@@ -800,7 +759,7 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
800 | 759 | ||
801 | mp_register_lapic_address(acpi_lapic_addr); | 760 | mp_register_lapic_address(acpi_lapic_addr); |
802 | 761 | ||
803 | count = acpi_table_parse_madt(ACPI_MADT_LAPIC, acpi_parse_lapic, | 762 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic, |
804 | MAX_APICS); | 763 | MAX_APICS); |
805 | if (!count) { | 764 | if (!count) { |
806 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); | 765 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); |
@@ -813,7 +772,7 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
813 | } | 772 | } |
814 | 773 | ||
815 | count = | 774 | count = |
816 | acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi, 0); | 775 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0); |
817 | if (count < 0) { | 776 | if (count < 0) { |
818 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); | 777 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); |
819 | /* TBD: Cleanup to allow fallback to MPS */ | 778 | /* TBD: Cleanup to allow fallback to MPS */ |
@@ -842,7 +801,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
842 | return -ENODEV; | 801 | return -ENODEV; |
843 | } | 802 | } |
844 | 803 | ||
845 | if (!cpu_has_apic) | 804 | if (!cpu_has_apic) |
846 | return -ENODEV; | 805 | return -ENODEV; |
847 | 806 | ||
848 | /* | 807 | /* |
@@ -855,7 +814,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
855 | } | 814 | } |
856 | 815 | ||
857 | count = | 816 | count = |
858 | acpi_table_parse_madt(ACPI_MADT_IOAPIC, acpi_parse_ioapic, | 817 | acpi_table_parse_madt(ACPI_MADT_TYPE_IO_APIC, acpi_parse_ioapic, |
859 | MAX_IO_APICS); | 818 | MAX_IO_APICS); |
860 | if (!count) { | 819 | if (!count) { |
861 | printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); | 820 | printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); |
@@ -866,7 +825,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
866 | } | 825 | } |
867 | 826 | ||
868 | count = | 827 | count = |
869 | acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, | 828 | acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr, |
870 | NR_IRQ_VECTORS); | 829 | NR_IRQ_VECTORS); |
871 | if (count < 0) { | 830 | if (count < 0) { |
872 | printk(KERN_ERR PREFIX | 831 | printk(KERN_ERR PREFIX |
@@ -880,13 +839,13 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
880 | * pretend we got one so we can set the SCI flags. | 839 | * pretend we got one so we can set the SCI flags. |
881 | */ | 840 | */ |
882 | if (!acpi_sci_override_gsi) | 841 | if (!acpi_sci_override_gsi) |
883 | acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); | 842 | acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0); |
884 | 843 | ||
885 | /* Fill in identity legacy mapings where no override */ | 844 | /* Fill in identity legacy mapings where no override */ |
886 | mp_config_acpi_legacy_irqs(); | 845 | mp_config_acpi_legacy_irqs(); |
887 | 846 | ||
888 | count = | 847 | count = |
889 | acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, | 848 | acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src, |
890 | NR_IRQ_VECTORS); | 849 | NR_IRQ_VECTORS); |
891 | if (count < 0) { | 850 | if (count < 0) { |
892 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); | 851 | printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); |
@@ -908,7 +867,7 @@ static void __init acpi_process_madt(void) | |||
908 | #ifdef CONFIG_X86_LOCAL_APIC | 867 | #ifdef CONFIG_X86_LOCAL_APIC |
909 | int count, error; | 868 | int count, error; |
910 | 869 | ||
911 | count = acpi_table_parse(ACPI_APIC, acpi_parse_madt); | 870 | count = acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt); |
912 | if (count >= 1) { | 871 | if (count >= 1) { |
913 | 872 | ||
914 | /* | 873 | /* |
@@ -1195,7 +1154,7 @@ int __init acpi_boot_table_init(void) | |||
1195 | if (acpi_disabled && !acpi_ht) | 1154 | if (acpi_disabled && !acpi_ht) |
1196 | return 1; | 1155 | return 1; |
1197 | 1156 | ||
1198 | /* | 1157 | /* |
1199 | * Initialize the ACPI boot-time table parser. | 1158 | * Initialize the ACPI boot-time table parser. |
1200 | */ | 1159 | */ |
1201 | error = acpi_table_init(); | 1160 | error = acpi_table_init(); |
@@ -1204,7 +1163,7 @@ int __init acpi_boot_table_init(void) | |||
1204 | return error; | 1163 | return error; |
1205 | } | 1164 | } |
1206 | 1165 | ||
1207 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); | 1166 | acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); |
1208 | 1167 | ||
1209 | /* | 1168 | /* |
1210 | * blacklist may disable ACPI entirely | 1169 | * blacklist may disable ACPI entirely |
@@ -1232,19 +1191,19 @@ int __init acpi_boot_init(void) | |||
1232 | if (acpi_disabled && !acpi_ht) | 1191 | if (acpi_disabled && !acpi_ht) |
1233 | return 1; | 1192 | return 1; |
1234 | 1193 | ||
1235 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); | 1194 | acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); |
1236 | 1195 | ||
1237 | /* | 1196 | /* |
1238 | * set sci_int and PM timer address | 1197 | * set sci_int and PM timer address |
1239 | */ | 1198 | */ |
1240 | acpi_table_parse(ACPI_FADT, acpi_parse_fadt); | 1199 | acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt); |
1241 | 1200 | ||
1242 | /* | 1201 | /* |
1243 | * Process the Multiple APIC Description Table (MADT), if present | 1202 | * Process the Multiple APIC Description Table (MADT), if present |
1244 | */ | 1203 | */ |
1245 | acpi_process_madt(); | 1204 | acpi_process_madt(); |
1246 | 1205 | ||
1247 | acpi_table_parse(ACPI_HPET, acpi_parse_hpet); | 1206 | acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet); |
1248 | 1207 | ||
1249 | return 0; | 1208 | return 0; |
1250 | } | 1209 | } |
@@ -1315,13 +1274,17 @@ static int __init setup_acpi_sci(char *s) | |||
1315 | if (!s) | 1274 | if (!s) |
1316 | return -EINVAL; | 1275 | return -EINVAL; |
1317 | if (!strcmp(s, "edge")) | 1276 | if (!strcmp(s, "edge")) |
1318 | acpi_sci_flags.trigger = 1; | 1277 | acpi_sci_flags = ACPI_MADT_TRIGGER_EDGE | |
1278 | (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK); | ||
1319 | else if (!strcmp(s, "level")) | 1279 | else if (!strcmp(s, "level")) |
1320 | acpi_sci_flags.trigger = 3; | 1280 | acpi_sci_flags = ACPI_MADT_TRIGGER_LEVEL | |
1281 | (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK); | ||
1321 | else if (!strcmp(s, "high")) | 1282 | else if (!strcmp(s, "high")) |
1322 | acpi_sci_flags.polarity = 1; | 1283 | acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_HIGH | |
1284 | (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK); | ||
1323 | else if (!strcmp(s, "low")) | 1285 | else if (!strcmp(s, "low")) |
1324 | acpi_sci_flags.polarity = 3; | 1286 | acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_LOW | |
1287 | (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK); | ||
1325 | else | 1288 | else |
1326 | return -EINVAL; | 1289 | return -EINVAL; |
1327 | return 0; | 1290 | return 0; |
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index 4b60af7f91dd..bf86f7662d8b 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | static int nvidia_hpet_detected __initdata; | 17 | static int nvidia_hpet_detected __initdata; |
18 | 18 | ||
19 | static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) | 19 | static int __init nvidia_hpet_check(struct acpi_table_header *header) |
20 | { | 20 | { |
21 | nvidia_hpet_detected = 1; | 21 | nvidia_hpet_detected = 1; |
22 | return 0; | 22 | return 0; |
@@ -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(ACPI_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/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index e940e00b96c9..a3db9332d652 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -190,7 +190,7 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index) | |||
190 | /* Invoke C3 */ | 190 | /* Invoke C3 */ |
191 | inb(cx_address); | 191 | inb(cx_address); |
192 | /* Dummy op - must do something useless after P_LVL3 read */ | 192 | /* Dummy op - must do something useless after P_LVL3 read */ |
193 | t = inl(acpi_fadt.xpm_tmr_blk.address); | 193 | t = inl(acpi_gbl_FADT.xpm_timer_block.address); |
194 | } | 194 | } |
195 | /* Disable bus ratio bit */ | 195 | /* Disable bus ratio bit */ |
196 | local_irq_disable(); | 196 | local_irq_disable(); |
@@ -250,8 +250,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
250 | outb(3, 0x22); | 250 | outb(3, 0x22); |
251 | } else if ((pr != NULL) && pr->flags.bm_control) { | 251 | } else if ((pr != NULL) && pr->flags.bm_control) { |
252 | /* Disable bus master arbitration */ | 252 | /* Disable bus master arbitration */ |
253 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, | 253 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); |
254 | ACPI_MTX_DO_NOT_LOCK); | ||
255 | } | 254 | } |
256 | switch (longhaul_version) { | 255 | switch (longhaul_version) { |
257 | 256 | ||
@@ -281,8 +280,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
281 | case TYPE_POWERSAVER: | 280 | case TYPE_POWERSAVER: |
282 | if (longhaul_flags & USE_ACPI_C3) { | 281 | if (longhaul_flags & USE_ACPI_C3) { |
283 | /* Don't allow wakeup */ | 282 | /* Don't allow wakeup */ |
284 | acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, | 283 | acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0); |
285 | ACPI_MTX_DO_NOT_LOCK); | ||
286 | do_powersaver(cx->address, clock_ratio_index); | 284 | do_powersaver(cx->address, clock_ratio_index); |
287 | } else { | 285 | } else { |
288 | do_powersaver(0, clock_ratio_index); | 286 | do_powersaver(0, clock_ratio_index); |
@@ -295,8 +293,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
295 | outb(0, 0x22); | 293 | outb(0, 0x22); |
296 | } else if ((pr != NULL) && pr->flags.bm_control) { | 294 | } else if ((pr != NULL) && pr->flags.bm_control) { |
297 | /* Enable bus master arbitration */ | 295 | /* Enable bus master arbitration */ |
298 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, | 296 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); |
299 | ACPI_MTX_DO_NOT_LOCK); | ||
300 | } | 297 | } |
301 | outb(pic2_mask,0xA1); /* restore mask */ | 298 | outb(pic2_mask,0xA1); /* restore mask */ |
302 | outb(pic1_mask,0x21); | 299 | outb(pic1_mask,0x21); |
@@ -414,7 +411,7 @@ static int __init longhaul_get_ranges(void) | |||
414 | highest_speed = calc_speed(maxmult); | 411 | highest_speed = calc_speed(maxmult); |
415 | lowest_speed = calc_speed(minmult); | 412 | lowest_speed = calc_speed(minmult); |
416 | dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, | 413 | dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, |
417 | print_speed(lowest_speed/1000), | 414 | print_speed(lowest_speed/1000), |
418 | print_speed(highest_speed/1000)); | 415 | print_speed(highest_speed/1000)); |
419 | 416 | ||
420 | if (lowest_speed == highest_speed) { | 417 | if (lowest_speed == highest_speed) { |
@@ -498,7 +495,7 @@ static void __init longhaul_setup_voltagescaling(void) | |||
498 | maxvid.mV/1000, maxvid.mV%1000, | 495 | maxvid.mV/1000, maxvid.mV%1000, |
499 | minvid.mV/1000, minvid.mV%1000, | 496 | minvid.mV/1000, minvid.mV%1000, |
500 | numvscales); | 497 | numvscales); |
501 | 498 | ||
502 | j = 0; | 499 | j = 0; |
503 | while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { | 500 | while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { |
504 | speed = longhaul_table[j].frequency; | 501 | speed = longhaul_table[j].frequency; |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 49bff3596bff..4f5983c98669 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -1057,7 +1057,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
1057 | static int gsi_to_irq[MAX_GSI_NUM]; | 1057 | static int gsi_to_irq[MAX_GSI_NUM]; |
1058 | 1058 | ||
1059 | /* Don't set up the ACPI SCI because it's already set up */ | 1059 | /* Don't set up the ACPI SCI because it's already set up */ |
1060 | if (acpi_fadt.sci_int == gsi) | 1060 | if (acpi_gbl_FADT.sci_interrupt == gsi) |
1061 | return gsi; | 1061 | return gsi; |
1062 | 1062 | ||
1063 | ioapic = mp_find_ioapic(gsi); | 1063 | ioapic = mp_find_ioapic(gsi); |
@@ -1114,7 +1114,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
1114 | /* | 1114 | /* |
1115 | * Don't assign IRQ used by ACPI SCI | 1115 | * Don't assign IRQ used by ACPI SCI |
1116 | */ | 1116 | */ |
1117 | if (gsi == acpi_fadt.sci_int) | 1117 | if (gsi == acpi_gbl_FADT.sci_interrupt) |
1118 | gsi = pci_irq++; | 1118 | gsi = pci_irq++; |
1119 | gsi_to_irq[irq] = gsi; | 1119 | gsi_to_irq[irq] = gsi; |
1120 | } else { | 1120 | } else { |
diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c index f7e735c077c3..2a8713ec0f9a 100644 --- a/arch/i386/kernel/srat.c +++ b/arch/i386/kernel/srat.c | |||
@@ -62,19 +62,19 @@ extern void * boot_ioremap(unsigned long, unsigned long); | |||
62 | /* Identify CPU proximity domains */ | 62 | /* Identify CPU proximity domains */ |
63 | static void __init parse_cpu_affinity_structure(char *p) | 63 | static void __init parse_cpu_affinity_structure(char *p) |
64 | { | 64 | { |
65 | struct acpi_table_processor_affinity *cpu_affinity = | 65 | struct acpi_srat_cpu_affinity *cpu_affinity = |
66 | (struct acpi_table_processor_affinity *) p; | 66 | (struct acpi_srat_cpu_affinity *) p; |
67 | 67 | ||
68 | if (!cpu_affinity->flags.enabled) | 68 | if ((cpu_affinity->flags & ACPI_SRAT_CPU_ENABLED) == 0) |
69 | return; /* empty entry */ | 69 | return; /* empty entry */ |
70 | 70 | ||
71 | /* mark this node as "seen" in node bitmap */ | 71 | /* mark this node as "seen" in node bitmap */ |
72 | BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain); | 72 | BMAP_SET(pxm_bitmap, cpu_affinity->proximity_domain_lo); |
73 | 73 | ||
74 | apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain; | 74 | apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain_lo; |
75 | 75 | ||
76 | printk("CPU 0x%02X in proximity domain 0x%02X\n", | 76 | printk("CPU 0x%02X in proximity domain 0x%02X\n", |
77 | cpu_affinity->apic_id, cpu_affinity->proximity_domain); | 77 | cpu_affinity->apic_id, cpu_affinity->proximity_domain_lo); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* | 80 | /* |
@@ -84,28 +84,27 @@ static void __init parse_cpu_affinity_structure(char *p) | |||
84 | static void __init parse_memory_affinity_structure (char *sratp) | 84 | static void __init parse_memory_affinity_structure (char *sratp) |
85 | { | 85 | { |
86 | unsigned long long paddr, size; | 86 | unsigned long long paddr, size; |
87 | unsigned long start_pfn, end_pfn; | 87 | unsigned long start_pfn, end_pfn; |
88 | u8 pxm; | 88 | u8 pxm; |
89 | struct node_memory_chunk_s *p, *q, *pend; | 89 | struct node_memory_chunk_s *p, *q, *pend; |
90 | struct acpi_table_memory_affinity *memory_affinity = | 90 | struct acpi_srat_mem_affinity *memory_affinity = |
91 | (struct acpi_table_memory_affinity *) sratp; | 91 | (struct acpi_srat_mem_affinity *) sratp; |
92 | 92 | ||
93 | if (!memory_affinity->flags.enabled) | 93 | if ((memory_affinity->flags & ACPI_SRAT_MEM_ENABLED) == 0) |
94 | return; /* empty entry */ | 94 | return; /* empty entry */ |
95 | 95 | ||
96 | pxm = memory_affinity->proximity_domain & 0xff; | ||
97 | |||
96 | /* mark this node as "seen" in node bitmap */ | 98 | /* mark this node as "seen" in node bitmap */ |
97 | BMAP_SET(pxm_bitmap, memory_affinity->proximity_domain); | 99 | BMAP_SET(pxm_bitmap, pxm); |
98 | 100 | ||
99 | /* calculate info for memory chunk structure */ | 101 | /* calculate info for memory chunk structure */ |
100 | paddr = memory_affinity->base_addr_hi; | 102 | paddr = memory_affinity->base_address; |
101 | paddr = (paddr << 32) | memory_affinity->base_addr_lo; | 103 | size = memory_affinity->length; |
102 | size = memory_affinity->length_hi; | 104 | |
103 | size = (size << 32) | memory_affinity->length_lo; | ||
104 | |||
105 | start_pfn = paddr >> PAGE_SHIFT; | 105 | start_pfn = paddr >> PAGE_SHIFT; |
106 | end_pfn = (paddr + size) >> PAGE_SHIFT; | 106 | end_pfn = (paddr + size) >> PAGE_SHIFT; |
107 | 107 | ||
108 | pxm = memory_affinity->proximity_domain; | ||
109 | 108 | ||
110 | if (num_memory_chunks >= MAXCHUNKS) { | 109 | if (num_memory_chunks >= MAXCHUNKS) { |
111 | printk("Too many mem chunks in SRAT. Ignoring %lld MBytes at %llx\n", | 110 | printk("Too many mem chunks in SRAT. Ignoring %lld MBytes at %llx\n", |
@@ -132,8 +131,8 @@ static void __init parse_memory_affinity_structure (char *sratp) | |||
132 | printk("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n", | 131 | printk("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n", |
133 | start_pfn, end_pfn, | 132 | start_pfn, end_pfn, |
134 | memory_affinity->memory_type, | 133 | memory_affinity->memory_type, |
135 | memory_affinity->proximity_domain, | 134 | pxm, |
136 | (memory_affinity->flags.hot_pluggable ? | 135 | ((memory_affinity->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ? |
137 | "enabled and removable" : "enabled" ) ); | 136 | "enabled and removable" : "enabled" ) ); |
138 | } | 137 | } |
139 | 138 | ||
@@ -185,10 +184,10 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) | |||
185 | num_memory_chunks = 0; | 184 | num_memory_chunks = 0; |
186 | while (p < end) { | 185 | while (p < end) { |
187 | switch (*p) { | 186 | switch (*p) { |
188 | case ACPI_SRAT_PROCESSOR_AFFINITY: | 187 | case ACPI_SRAT_TYPE_CPU_AFFINITY: |
189 | parse_cpu_affinity_structure(p); | 188 | parse_cpu_affinity_structure(p); |
190 | break; | 189 | break; |
191 | case ACPI_SRAT_MEMORY_AFFINITY: | 190 | case ACPI_SRAT_TYPE_MEMORY_AFFINITY: |
192 | parse_memory_affinity_structure(p); | 191 | parse_memory_affinity_structure(p); |
193 | break; | 192 | break; |
194 | default: | 193 | default: |
@@ -262,31 +261,30 @@ out_fail: | |||
262 | return 0; | 261 | return 0; |
263 | } | 262 | } |
264 | 263 | ||
264 | struct acpi_static_rsdt { | ||
265 | struct acpi_table_rsdt table; | ||
266 | u32 padding[7]; /* Allow for 7 more table entries */ | ||
267 | }; | ||
268 | |||
265 | int __init get_memcfg_from_srat(void) | 269 | int __init get_memcfg_from_srat(void) |
266 | { | 270 | { |
267 | struct acpi_table_header *header = NULL; | 271 | struct acpi_table_header *header = NULL; |
268 | struct acpi_table_rsdp *rsdp = NULL; | 272 | struct acpi_table_rsdp *rsdp = NULL; |
269 | struct acpi_table_rsdt *rsdt = NULL; | 273 | struct acpi_table_rsdt *rsdt = NULL; |
270 | struct acpi_pointer *rsdp_address = NULL; | 274 | acpi_native_uint rsdp_address = 0; |
271 | struct acpi_table_rsdt saved_rsdt; | 275 | struct acpi_static_rsdt saved_rsdt; |
272 | int tables = 0; | 276 | int tables = 0; |
273 | int i = 0; | 277 | int i = 0; |
274 | 278 | ||
275 | if (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, | 279 | rsdp_address = acpi_find_rsdp(); |
276 | rsdp_address))) { | 280 | if (!rsdp_address) { |
277 | printk("%s: System description tables not found\n", | 281 | printk("%s: System description tables not found\n", |
278 | __FUNCTION__); | 282 | __FUNCTION__); |
279 | goto out_err; | 283 | goto out_err; |
280 | } | 284 | } |
281 | 285 | ||
282 | if (rsdp_address->pointer_type == ACPI_PHYSICAL_POINTER) { | 286 | printk("%s: assigning address to rsdp\n", __FUNCTION__); |
283 | printk("%s: assigning address to rsdp\n", __FUNCTION__); | 287 | rsdp = (struct acpi_table_rsdp *)(u32)rsdp_address; |
284 | rsdp = (struct acpi_table_rsdp *) | ||
285 | (u32)rsdp_address->pointer.physical; | ||
286 | } else { | ||
287 | printk("%s: rsdp_address is not a physical pointer\n", __FUNCTION__); | ||
288 | goto out_err; | ||
289 | } | ||
290 | if (!rsdp) { | 288 | if (!rsdp) { |
291 | printk("%s: Didn't find ACPI root!\n", __FUNCTION__); | 289 | printk("%s: Didn't find ACPI root!\n", __FUNCTION__); |
292 | goto out_err; | 290 | goto out_err; |
@@ -295,13 +293,13 @@ int __init get_memcfg_from_srat(void) | |||
295 | printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision, | 293 | printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision, |
296 | rsdp->oem_id); | 294 | rsdp->oem_id); |
297 | 295 | ||
298 | if (strncmp(rsdp->signature, RSDP_SIG,strlen(RSDP_SIG))) { | 296 | if (strncmp(rsdp->signature, ACPI_SIG_RSDP,strlen(ACPI_SIG_RSDP))) { |
299 | printk(KERN_WARNING "%s: RSDP table signature incorrect\n", __FUNCTION__); | 297 | printk(KERN_WARNING "%s: RSDP table signature incorrect\n", __FUNCTION__); |
300 | goto out_err; | 298 | goto out_err; |
301 | } | 299 | } |
302 | 300 | ||
303 | rsdt = (struct acpi_table_rsdt *) | 301 | rsdt = (struct acpi_table_rsdt *) |
304 | boot_ioremap(rsdp->rsdt_address, sizeof(struct acpi_table_rsdt)); | 302 | boot_ioremap(rsdp->rsdt_physical_address, sizeof(struct acpi_table_rsdt)); |
305 | 303 | ||
306 | if (!rsdt) { | 304 | if (!rsdt) { |
307 | printk(KERN_WARNING | 305 | printk(KERN_WARNING |
@@ -310,9 +308,9 @@ int __init get_memcfg_from_srat(void) | |||
310 | goto out_err; | 308 | goto out_err; |
311 | } | 309 | } |
312 | 310 | ||
313 | header = & rsdt->header; | 311 | header = &rsdt->header; |
314 | 312 | ||
315 | if (strncmp(header->signature, RSDT_SIG, strlen(RSDT_SIG))) { | 313 | if (strncmp(header->signature, ACPI_SIG_RSDT, strlen(ACPI_SIG_RSDT))) { |
316 | printk(KERN_WARNING "ACPI: RSDT signature incorrect\n"); | 314 | printk(KERN_WARNING "ACPI: RSDT signature incorrect\n"); |
317 | goto out_err; | 315 | goto out_err; |
318 | } | 316 | } |
@@ -330,9 +328,9 @@ int __init get_memcfg_from_srat(void) | |||
330 | 328 | ||
331 | memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt)); | 329 | memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt)); |
332 | 330 | ||
333 | if (saved_rsdt.header.length > sizeof(saved_rsdt)) { | 331 | if (saved_rsdt.table.header.length > sizeof(saved_rsdt)) { |
334 | printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n", | 332 | printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n", |
335 | saved_rsdt.header.length); | 333 | saved_rsdt.table.header.length); |
336 | goto out_err; | 334 | goto out_err; |
337 | } | 335 | } |
338 | 336 | ||
@@ -341,15 +339,15 @@ int __init get_memcfg_from_srat(void) | |||
341 | for (i = 0; i < tables; i++) { | 339 | for (i = 0; i < tables; i++) { |
342 | /* Map in header, then map in full table length. */ | 340 | /* Map in header, then map in full table length. */ |
343 | header = (struct acpi_table_header *) | 341 | header = (struct acpi_table_header *) |
344 | boot_ioremap(saved_rsdt.entry[i], sizeof(struct acpi_table_header)); | 342 | boot_ioremap(saved_rsdt.table.table_offset_entry[i], sizeof(struct acpi_table_header)); |
345 | if (!header) | 343 | if (!header) |
346 | break; | 344 | break; |
347 | header = (struct acpi_table_header *) | 345 | header = (struct acpi_table_header *) |
348 | boot_ioremap(saved_rsdt.entry[i], header->length); | 346 | boot_ioremap(saved_rsdt.table.table_offset_entry[i], header->length); |
349 | if (!header) | 347 | if (!header) |
350 | break; | 348 | break; |
351 | 349 | ||
352 | if (strncmp((char *) &header->signature, "SRAT", 4)) | 350 | if (strncmp((char *) &header->signature, ACPI_SIG_SRAT, 4)) |
353 | continue; | 351 | continue; |
354 | 352 | ||
355 | /* we've found the srat table. don't need to look at any more tables */ | 353 | /* we've found the srat table. don't need to look at any more tables */ |