aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpi_processor.c24
-rw-r--r--drivers/acpi/blacklist.c50
-rw-r--r--drivers/acpi/button.c18
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/sleep.c7
-rw-r--r--drivers/acpi/thermal.c2
-rw-r--r--drivers/acpi/video_detect.c2
7 files changed, 69 insertions, 36 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
index d58a2aba0930..c9311be29a64 100644
--- a/drivers/acpi/acpi_processor.c
+++ b/drivers/acpi/acpi_processor.c
@@ -212,7 +212,7 @@ static int acpi_processor_get_info(struct acpi_device *device)
212 union acpi_object object = { 0 }; 212 union acpi_object object = { 0 };
213 struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; 213 struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
214 struct acpi_processor *pr = acpi_driver_data(device); 214 struct acpi_processor *pr = acpi_driver_data(device);
215 int cpu_index, device_declaration = 0; 215 int apic_id, cpu_index, device_declaration = 0;
216 acpi_status status = AE_OK; 216 acpi_status status = AE_OK;
217 static int cpu0_initialized; 217 static int cpu0_initialized;
218 unsigned long long value; 218 unsigned long long value;
@@ -258,18 +258,21 @@ static int acpi_processor_get_info(struct acpi_device *device)
258 device_declaration = 1; 258 device_declaration = 1;
259 pr->acpi_id = value; 259 pr->acpi_id = value;
260 } 260 }
261 pr->apic_id = acpi_get_apicid(pr->handle, device_declaration,
262 pr->acpi_id);
263 cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id);
264 261
265 /* Handle UP system running SMP kernel, with no LAPIC in MADT */ 262 apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id);
266 if (!cpu0_initialized && (cpu_index == -1) && 263 if (apic_id < 0) {
267 (num_online_cpus() == 1)) { 264 acpi_handle_err(pr->handle, "failed to get CPU APIC ID.\n");
268 cpu_index = 0; 265 return -ENODEV;
269 } 266 }
267 pr->apic_id = apic_id;
270 268
271 cpu0_initialized = 1; 269 cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id);
272 270 if (!cpu0_initialized) {
271 cpu0_initialized = 1;
272 /* Handle UP system running SMP kernel, with no LAPIC in MADT */
273 if ((cpu_index == -1) && (num_online_cpus() == 1))
274 cpu_index = 0;
275 }
273 pr->id = cpu_index; 276 pr->id = cpu_index;
274 277
275 /* 278 /*
@@ -282,6 +285,7 @@ static int acpi_processor_get_info(struct acpi_device *device)
282 if (ret) 285 if (ret)
283 return ret; 286 return ret;
284 } 287 }
288
285 /* 289 /*
286 * On some boxes several processors use the same processor bus id. 290 * On some boxes several processors use the same processor bus id.
287 * But they are located in different scope. For example: 291 * But they are located in different scope. For example:
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index 05ee8f61bfb5..10e4964d051a 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -322,6 +322,56 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
322 DMI_MATCH(DMI_PRODUCT_VERSION, "2349D15"), 322 DMI_MATCH(DMI_PRODUCT_VERSION, "2349D15"),
323 }, 323 },
324 }, 324 },
325 {
326 .callback = dmi_disable_osi_win8,
327 .ident = "HP ProBook 2013 models",
328 .matches = {
329 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
330 DMI_MATCH(DMI_PRODUCT_NAME, "HP ProBook "),
331 DMI_MATCH(DMI_PRODUCT_NAME, " G1"),
332 },
333 },
334 {
335 .callback = dmi_disable_osi_win8,
336 .ident = "HP EliteBook 2013 models",
337 .matches = {
338 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
339 DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook "),
340 DMI_MATCH(DMI_PRODUCT_NAME, " G1"),
341 },
342 },
343 {
344 .callback = dmi_disable_osi_win8,
345 .ident = "HP ZBook 14",
346 .matches = {
347 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
348 DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 14"),
349 },
350 },
351 {
352 .callback = dmi_disable_osi_win8,
353 .ident = "HP ZBook 15",
354 .matches = {
355 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
356 DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 15"),
357 },
358 },
359 {
360 .callback = dmi_disable_osi_win8,
361 .ident = "HP ZBook 17",
362 .matches = {
363 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
364 DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 17"),
365 },
366 },
367 {
368 .callback = dmi_disable_osi_win8,
369 .ident = "HP EliteBook 8780w",
370 .matches = {
371 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
372 DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8780w"),
373 },
374 },
325 375
326 /* 376 /*
327 * BIOS invocation of _OSI(Linux) is almost always a BIOS bug. 377 * BIOS invocation of _OSI(Linux) is almost always a BIOS bug.
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 9e3a6cb99f90..11c11f6b8fa1 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -100,7 +100,6 @@ struct acpi_button {
100 struct input_dev *input; 100 struct input_dev *input;
101 char phys[32]; /* for input device */ 101 char phys[32]; /* for input device */
102 unsigned long pushed; 102 unsigned long pushed;
103 bool wakeup_enabled;
104}; 103};
105 104
106static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier); 105static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier);
@@ -406,16 +405,6 @@ static int acpi_button_add(struct acpi_device *device)
406 lid_device = device; 405 lid_device = device;
407 } 406 }
408 407
409 if (device->wakeup.flags.valid) {
410 /* Button's GPE is run-wake GPE */
411 acpi_enable_gpe(device->wakeup.gpe_device,
412 device->wakeup.gpe_number);
413 if (!device_may_wakeup(&device->dev)) {
414 device_set_wakeup_enable(&device->dev, true);
415 button->wakeup_enabled = true;
416 }
417 }
418
419 printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); 408 printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
420 return 0; 409 return 0;
421 410
@@ -432,13 +421,6 @@ static int acpi_button_remove(struct acpi_device *device)
432{ 421{
433 struct acpi_button *button = acpi_driver_data(device); 422 struct acpi_button *button = acpi_driver_data(device);
434 423
435 if (device->wakeup.flags.valid) {
436 acpi_disable_gpe(device->wakeup.gpe_device,
437 device->wakeup.gpe_number);
438 if (button->wakeup_enabled)
439 device_set_wakeup_enable(&device->dev, false);
440 }
441
442 acpi_button_remove_fs(device); 424 acpi_button_remove_fs(device);
443 input_unregister_device(button->input); 425 input_unregister_device(button->input);
444 kfree(button); 426 kfree(button);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 47b1111afc90..959d41acc108 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -753,9 +753,9 @@ static int ec_install_handlers(struct acpi_ec *ec)
753 pr_err("Fail in evaluating the _REG object" 753 pr_err("Fail in evaluating the _REG object"
754 " of EC device. Broken bios is suspected.\n"); 754 " of EC device. Broken bios is suspected.\n");
755 } else { 755 } else {
756 acpi_disable_gpe(NULL, ec->gpe);
756 acpi_remove_gpe_handler(NULL, ec->gpe, 757 acpi_remove_gpe_handler(NULL, ec->gpe,
757 &acpi_ec_gpe_handler); 758 &acpi_ec_gpe_handler);
758 acpi_disable_gpe(NULL, ec->gpe);
759 return -ENODEV; 759 return -ENODEV;
760 } 760 }
761 } 761 }
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 54ab26664039..b718806657cd 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -666,11 +666,8 @@ static void acpi_hibernation_leave(void)
666 /* Reprogram control registers */ 666 /* Reprogram control registers */
667 acpi_leave_sleep_state_prep(ACPI_STATE_S4); 667 acpi_leave_sleep_state_prep(ACPI_STATE_S4);
668 /* Check the hardware signature */ 668 /* Check the hardware signature */
669 if (facs && s4_hardware_signature != facs->hardware_signature) { 669 if (facs && s4_hardware_signature != facs->hardware_signature)
670 printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " 670 pr_crit("ACPI: Hardware changed while hibernated, success doubtful!\n");
671 "cannot resume!\n");
672 panic("ACPI S4 hardware signature mismatch");
673 }
674 /* Restore the NVS memory area */ 671 /* Restore the NVS memory area */
675 suspend_nvs_restore(); 672 suspend_nvs_restore();
676 /* Allow EC transactions to happen. */ 673 /* Allow EC transactions to happen. */
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1fd21ad69c98..8349a555b92b 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -861,7 +861,7 @@ acpi_thermal_unbind_cooling_device(struct thermal_zone_device *thermal,
861 return acpi_thermal_cooling_device_cb(thermal, cdev, false); 861 return acpi_thermal_cooling_device_cb(thermal, cdev, false);
862} 862}
863 863
864static const struct thermal_zone_device_ops acpi_thermal_zone_ops = { 864static struct thermal_zone_device_ops acpi_thermal_zone_ops = {
865 .bind = acpi_thermal_bind_cooling_device, 865 .bind = acpi_thermal_bind_cooling_device,
866 .unbind = acpi_thermal_unbind_cooling_device, 866 .unbind = acpi_thermal_unbind_cooling_device,
867 .get_temp = thermal_get_temp, 867 .get_temp = thermal_get_temp,
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 84875fd4c74f..f0447d3daf2c 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -50,7 +50,7 @@ static bool acpi_video_caps_checked;
50 50
51static acpi_status 51static acpi_status
52acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context, 52acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
53 void **retyurn_value) 53 void **return_value)
54{ 54{
55 long *cap = context; 55 long *cap = context;
56 56