diff options
Diffstat (limited to 'drivers/acpi/processor_pdc.c')
-rw-r--r-- | drivers/acpi/processor_pdc.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 30e4dc0cdf30..7247819dbd80 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) | |||
144 | } | 144 | } |
145 | EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); | 145 | EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); |
146 | 146 | ||
147 | static int early_pdc_optin; | ||
148 | static int set_early_pdc_optin(const struct dmi_system_id *id) | ||
149 | { | ||
150 | early_pdc_optin = 1; | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | static struct dmi_system_id __cpuinitdata early_pdc_optin_table[] = { | ||
155 | { | ||
156 | set_early_pdc_optin, "HP Envy", { | ||
157 | DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), | ||
158 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Envy") }, NULL}, | ||
159 | { | ||
160 | set_early_pdc_optin, "HP Pavilion dv6", { | ||
161 | DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), | ||
162 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv6") }, NULL}, | ||
163 | { | ||
164 | set_early_pdc_optin, "HP Pavilion dv7", { | ||
165 | DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), | ||
166 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv7") }, NULL}, | ||
167 | {}, | ||
168 | }; | ||
169 | |||
147 | static acpi_status | 170 | static acpi_status |
148 | early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) | 171 | early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) |
149 | { | 172 | { |
@@ -151,7 +174,7 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
151 | return AE_OK; | 174 | return AE_OK; |
152 | } | 175 | } |
153 | 176 | ||
154 | void acpi_early_processor_set_pdc(void) | 177 | void __init acpi_early_processor_set_pdc(void) |
155 | { | 178 | { |
156 | /* | 179 | /* |
157 | * Check whether the system is DMI table. If yes, OSPM | 180 | * Check whether the system is DMI table. If yes, OSPM |
@@ -159,6 +182,13 @@ void acpi_early_processor_set_pdc(void) | |||
159 | */ | 182 | */ |
160 | dmi_check_system(processor_idle_dmi_table); | 183 | dmi_check_system(processor_idle_dmi_table); |
161 | 184 | ||
185 | /* | ||
186 | * Allow systems to opt-in to early _PDC evaluation. | ||
187 | */ | ||
188 | dmi_check_system(early_pdc_optin_table); | ||
189 | if (!early_pdc_optin) | ||
190 | return; | ||
191 | |||
162 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, | 192 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, |
163 | ACPI_UINT32_MAX, | 193 | ACPI_UINT32_MAX, |
164 | early_init_pdc, NULL, NULL, NULL); | 194 | early_init_pdc, NULL, NULL, NULL); |