diff options
Diffstat (limited to 'drivers/acpi/processor_pdc.c')
-rw-r--r-- | drivers/acpi/processor_pdc.c | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 30e4dc0cdf3..e306ba9aa34 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c | |||
@@ -125,6 +125,8 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) | |||
125 | return status; | 125 | return status; |
126 | } | 126 | } |
127 | 127 | ||
128 | static int early_pdc_done; | ||
129 | |||
128 | void acpi_processor_set_pdc(acpi_handle handle) | 130 | void acpi_processor_set_pdc(acpi_handle handle) |
129 | { | 131 | { |
130 | struct acpi_object_list *obj_list; | 132 | struct acpi_object_list *obj_list; |
@@ -132,6 +134,9 @@ void acpi_processor_set_pdc(acpi_handle handle) | |||
132 | if (arch_has_acpi_pdc() == false) | 134 | if (arch_has_acpi_pdc() == false) |
133 | return; | 135 | return; |
134 | 136 | ||
137 | if (early_pdc_done) | ||
138 | return; | ||
139 | |||
135 | obj_list = acpi_processor_alloc_pdc(); | 140 | obj_list = acpi_processor_alloc_pdc(); |
136 | if (!obj_list) | 141 | if (!obj_list) |
137 | return; | 142 | return; |
@@ -144,6 +149,36 @@ void acpi_processor_set_pdc(acpi_handle handle) | |||
144 | } | 149 | } |
145 | EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); | 150 | EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); |
146 | 151 | ||
152 | static int early_pdc_optin; | ||
153 | static int set_early_pdc_optin(const struct dmi_system_id *id) | ||
154 | { | ||
155 | early_pdc_optin = 1; | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static int param_early_pdc_optin(char *s) | ||
160 | { | ||
161 | early_pdc_optin = 1; | ||
162 | return 1; | ||
163 | } | ||
164 | __setup("acpi_early_pdc_eval", param_early_pdc_optin); | ||
165 | |||
166 | static struct dmi_system_id __cpuinitdata early_pdc_optin_table[] = { | ||
167 | { | ||
168 | set_early_pdc_optin, "HP Envy", { | ||
169 | DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), | ||
170 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Envy") }, NULL}, | ||
171 | { | ||
172 | set_early_pdc_optin, "HP Pavilion dv6", { | ||
173 | DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), | ||
174 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv6") }, NULL}, | ||
175 | { | ||
176 | set_early_pdc_optin, "HP Pavilion dv7", { | ||
177 | DMI_MATCH(DMI_BIOS_VENDOR, "Hewlett-Packard"), | ||
178 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv7") }, NULL}, | ||
179 | {}, | ||
180 | }; | ||
181 | |||
147 | static acpi_status | 182 | static acpi_status |
148 | early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) | 183 | early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) |
149 | { | 184 | { |
@@ -151,7 +186,7 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
151 | return AE_OK; | 186 | return AE_OK; |
152 | } | 187 | } |
153 | 188 | ||
154 | void acpi_early_processor_set_pdc(void) | 189 | void __init acpi_early_processor_set_pdc(void) |
155 | { | 190 | { |
156 | /* | 191 | /* |
157 | * Check whether the system is DMI table. If yes, OSPM | 192 | * Check whether the system is DMI table. If yes, OSPM |
@@ -159,7 +194,16 @@ void acpi_early_processor_set_pdc(void) | |||
159 | */ | 194 | */ |
160 | dmi_check_system(processor_idle_dmi_table); | 195 | dmi_check_system(processor_idle_dmi_table); |
161 | 196 | ||
197 | /* | ||
198 | * Allow systems to opt-in to early _PDC evaluation. | ||
199 | */ | ||
200 | dmi_check_system(early_pdc_optin_table); | ||
201 | if (!early_pdc_optin) | ||
202 | return; | ||
203 | |||
162 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, | 204 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, |
163 | ACPI_UINT32_MAX, | 205 | ACPI_UINT32_MAX, |
164 | early_init_pdc, NULL, NULL, NULL); | 206 | early_init_pdc, NULL, NULL, NULL); |
207 | |||
208 | early_pdc_done = 1; | ||
165 | } | 209 | } |