aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/acpi
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-01-04 03:43:42 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-04 03:43:42 -0500
commitbc030d6cb9532877c1c5a3f5e7123344fa24a285 (patch)
treed223d410b868b80d4c0deec192d354a5d06b201a /arch/x86/kernel/acpi
parentd3bd058826aa8b79590cca6c8e6d1557bf576ada (diff)
parent387c31c7e5c9805b0aef8833d1731a5fe7bdea14 (diff)
Merge commit 'v2.6.37-rc8' into x86/apic
Conflicts: arch/x86/include/asm/io_apic.h Merge reason: move to a fresh -rc, resolve the conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r--arch/x86/kernel/acpi/boot.c60
-rw-r--r--arch/x86/kernel/acpi/sleep.c6
2 files changed, 48 insertions, 18 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index f19d6679600f..7235e5fbdb6d 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -518,35 +518,62 @@ int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
518 return 0; 518 return 0;
519} 519}
520 520
521/* 521static int acpi_register_gsi_pic(struct device *dev, u32 gsi,
522 * success: return IRQ number (>=0) 522 int trigger, int polarity)
523 * failure: return < 0
524 */
525int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)
526{ 523{
527 unsigned int irq;
528 unsigned int plat_gsi = gsi;
529
530#ifdef CONFIG_PCI 524#ifdef CONFIG_PCI
531 /* 525 /*
532 * Make sure all (legacy) PCI IRQs are set as level-triggered. 526 * Make sure all (legacy) PCI IRQs are set as level-triggered.
533 */ 527 */
534 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { 528 if (trigger == ACPI_LEVEL_SENSITIVE)
535 if (trigger == ACPI_LEVEL_SENSITIVE) 529 eisa_set_level_irq(gsi);
536 eisa_set_level_irq(gsi);
537 }
538#endif 530#endif
539 531
532 return gsi;
533}
534
535static int acpi_register_gsi_ioapic(struct device *dev, u32 gsi,
536 int trigger, int polarity)
537{
540#ifdef CONFIG_X86_IO_APIC 538#ifdef CONFIG_X86_IO_APIC
541 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { 539 gsi = mp_register_gsi(dev, gsi, trigger, polarity);
542 plat_gsi = mp_register_gsi(dev, gsi, trigger, polarity);
543 }
544#endif 540#endif
541
542 return gsi;
543}
544
545int (*__acpi_register_gsi)(struct device *dev, u32 gsi,
546 int trigger, int polarity) = acpi_register_gsi_pic;
547
548/*
549 * success: return IRQ number (>=0)
550 * failure: return < 0
551 */
552int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)
553{
554 unsigned int irq;
555 unsigned int plat_gsi = gsi;
556
557 plat_gsi = (*__acpi_register_gsi)(dev, gsi, trigger, polarity);
545 irq = gsi_to_irq(plat_gsi); 558 irq = gsi_to_irq(plat_gsi);
546 559
547 return irq; 560 return irq;
548} 561}
549 562
563void __init acpi_set_irq_model_pic(void)
564{
565 acpi_irq_model = ACPI_IRQ_MODEL_PIC;
566 __acpi_register_gsi = acpi_register_gsi_pic;
567 acpi_ioapic = 0;
568}
569
570void __init acpi_set_irq_model_ioapic(void)
571{
572 acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
573 __acpi_register_gsi = acpi_register_gsi_ioapic;
574 acpi_ioapic = 1;
575}
576
550/* 577/*
551 * ACPI based hotplug support for CPU 578 * ACPI based hotplug support for CPU
552 */ 579 */
@@ -1264,8 +1291,7 @@ static void __init acpi_process_madt(void)
1264 */ 1291 */
1265 error = acpi_parse_madt_ioapic_entries(); 1292 error = acpi_parse_madt_ioapic_entries();
1266 if (!error) { 1293 if (!error) {
1267 acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; 1294 acpi_set_irq_model_ioapic();
1268 acpi_ioapic = 1;
1269 1295
1270 smp_found_config = 1; 1296 smp_found_config = 1;
1271 } 1297 }
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index e1252074ea40..69fd72aa5594 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -13,6 +13,10 @@
13#include <asm/segment.h> 13#include <asm/segment.h>
14#include <asm/desc.h> 14#include <asm/desc.h>
15 15
16#ifdef CONFIG_X86_32
17#include <asm/pgtable.h>
18#endif
19
16#include "realmode/wakeup.h" 20#include "realmode/wakeup.h"
17#include "sleep.h" 21#include "sleep.h"
18 22
@@ -91,7 +95,7 @@ int acpi_save_state_mem(void)
91 95
92#ifndef CONFIG_64BIT 96#ifndef CONFIG_64BIT
93 header->pmode_entry = (u32)&wakeup_pmode_return; 97 header->pmode_entry = (u32)&wakeup_pmode_return;
94 header->pmode_cr3 = (u32)(swsusp_pg_dir - __PAGE_OFFSET); 98 header->pmode_cr3 = (u32)__pa(&initial_page_table);
95 saved_magic = 0x12345678; 99 saved_magic = 0x12345678;
96#else /* CONFIG_64BIT */ 100#else /* CONFIG_64BIT */
97 header->trampoline_segment = setup_trampoline() >> 4; 101 header->trampoline_segment = setup_trampoline() >> 4;