From patchwork Tue Jan 19 23:55:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Chiang X-Patchwork-Id: 73983 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0JNthws005326 for ; Tue, 19 Jan 2010 23:55:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754168Ab0ASXzm (ORCPT ); Tue, 19 Jan 2010 18:55:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756008Ab0ASXzm (ORCPT ); Tue, 19 Jan 2010 18:55:42 -0500 Received: from g4t0015.houston.hp.com ([15.201.24.18]:43767 "EHLO g4t0015.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750Ab0ASXzl (ORCPT ); Tue, 19 Jan 2010 18:55:41 -0500 Received: from g4t0018.houston.hp.com (g4t0018.houston.hp.com [16.234.32.27]) by g4t0015.houston.hp.com (Postfix) with ESMTP id 476678052; Tue, 19 Jan 2010 23:55:41 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g4t0018.houston.hp.com (Postfix) with ESMTP id 32E1E10058; Tue, 19 Jan 2010 23:55:41 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 201BCCF0017; Tue, 19 Jan 2010 16:55:41 -0700 (MST) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w1lv9Zn2L4Sb; Tue, 19 Jan 2010 16:55:41 -0700 (MST) Received: by ldl (Postfix, from userid 17609) id 0A7D4CF0012; Tue, 19 Jan 2010 16:55:41 -0700 (MST) Date: Tue, 19 Jan 2010 16:55:41 -0700 From: Alex Chiang To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel Subject: [PATCH] ACPI: processor: restrict early _PDC to opt-in platforms Message-ID: <20100119235541.GL11010@ldl.fc.hp.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 30e4dc0..f336437 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c @@ -144,6 +144,29 @@ void acpi_processor_set_pdc(acpi_handle handle) } EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); +static int early_pdc_optin; +static int set_early_pdc_optin(const struct dmi_system_id *id) +{ + early_pdc_optin = 1; + return 0; +} + +static struct dmi_system_id __cpuinitdata early_pdc_optin_table[] = { + { + set_early_pdc_optin, "HP Envy", { + DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Envy") }, NULL}, + { + set_early_pdc_optin, "HP Pavilion dv6", { + DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv6") }, NULL}, + { + set_early_pdc_optin, "HP Pavilion dv7", { + DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv7") }, NULL}, + {}, +}; + static acpi_status early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) { @@ -159,6 +182,13 @@ void acpi_early_processor_set_pdc(void) */ dmi_check_system(processor_idle_dmi_table); + /* + * Allow systems to opt-in to early _PDC evaluation. + */ + dmi_check_system(early_pdc_optin_table); + if (!early_pdc_optin) + return; + acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, early_init_pdc, NULL, NULL, NULL);