From e21dc2b8376df0c2546796272518db3230b597d4 Mon Sep 17 00:00:00 2001 From: Alex Chiang Date: Mon, 22 Feb 2010 12:12:00 -0700 Subject: [PATCH] --- yaml --- r: 188091 b: refs/heads/master c: 149fe9c293f76803206648270ca24fc2604d5f01 h: refs/heads/master i: 188089: b2e1a77dae1dd0ed080b55316eb2baaf6af7e1d8 188087: 778c1ddaa05114a685286d08ae499ffa2687c813 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/processor_core.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 2609e14ca0a7..08967e2548f2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eae701ceadf5aa3fc3b334029ef71f6885ef1cde +refs/heads/master: 149fe9c293f76803206648270ca24fc2604d5f01 diff --git a/trunk/drivers/acpi/processor_core.c b/trunk/drivers/acpi/processor_core.c index ee9bce18c084..791ac7b0f8df 100644 --- a/trunk/drivers/acpi/processor_core.c +++ b/trunk/drivers/acpi/processor_core.c @@ -43,8 +43,6 @@ static struct dmi_system_id __cpuinitdata processor_idle_dmi_table[] = { }; #ifdef CONFIG_SMP -static struct acpi_table_madt *madt; - static int map_lapic_id(struct acpi_subtable_header *entry, u32 acpi_id, int *apic_id) { @@ -100,8 +98,17 @@ static int map_lsapic_id(struct acpi_subtable_header *entry, static int map_madt_entry(int type, u32 acpi_id) { unsigned long madt_end, entry; + static struct acpi_table_madt *madt; + static int read_madt; int apic_id = -1; + if (!read_madt) { + if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, + (struct acpi_table_header **)&madt))) + madt = NULL; + read_madt++; + } + if (!madt) return apic_id; @@ -335,13 +342,6 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) void __init acpi_early_processor_set_pdc(void) { - -#ifdef CONFIG_SMP - if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, - (struct acpi_table_header **)&madt))) - madt = NULL; -#endif - /* * Check whether the system is DMI table. If yes, OSPM * should not use mwait for CPU-states.