diff options
-rw-r--r-- | drivers/acpi/acpi_processor.c | 24 | ||||
-rw-r--r-- | drivers/acpi/blacklist.c | 50 | ||||
-rw-r--r-- | drivers/acpi/button.c | 18 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 7 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 2 | ||||
-rw-r--r-- | drivers/acpi/video_detect.c | 2 |
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) union acpi_object object = { 0 }; struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; struct acpi_processor *pr = acpi_driver_data(device); - int cpu_index, device_declaration = 0; + int apic_id, cpu_index, device_declaration = 0; acpi_status status = AE_OK; static int cpu0_initialized; unsigned long long value; @@ -258,18 +258,21 @@ static int acpi_processor_get_info(struct acpi_device *device) device_declaration = 1; pr->acpi_id = value; } - pr->apic_id = acpi_get_apicid(pr->handle, device_declaration, - pr->acpi_id); - cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id); - /* Handle UP system running SMP kernel, with no LAPIC in MADT */ - if (!cpu0_initialized && (cpu_index == -1) && - (num_online_cpus() == 1)) { - cpu_index = 0; + apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id); + if (apic_id < 0) { + acpi_handle_err(pr->handle, "failed to get CPU APIC ID.\n"); + return -ENODEV; } + pr->apic_id = apic_id; - cpu0_initialized = 1; - + cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id); + if (!cpu0_initialized) { + cpu0_initialized = 1; + /* Handle UP system running SMP kernel, with no LAPIC in MADT */ + if ((cpu_index == -1) && (num_online_cpus() == 1)) + cpu_index = 0; + } pr->id = cpu_index; /* @@ -282,6 +285,7 @@ static int acpi_processor_get_info(struct acpi_device *device) if (ret) return ret; } + /* * On some boxes several processors use the same processor bus id. * 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 = { DMI_MATCH(DMI_PRODUCT_VERSION, "2349D15"), }, }, + { + .callback = dmi_disable_osi_win8, + .ident = "HP ProBook 2013 models", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP ProBook "), + DMI_MATCH(DMI_PRODUCT_NAME, " G1"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "HP EliteBook 2013 models", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook "), + DMI_MATCH(DMI_PRODUCT_NAME, " G1"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "HP ZBook 14", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 14"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "HP ZBook 15", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 15"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "HP ZBook 17", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 17"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "HP EliteBook 8780w", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8780w"), + }, + }, /* * 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 { struct input_dev *input; char phys[32]; /* for input device */ unsigned long pushed; - bool wakeup_enabled; }; static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier); @@ -406,16 +405,6 @@ static int acpi_button_add(struct acpi_device *device) lid_device = device; } - if (device->wakeup.flags.valid) { - /* Button's GPE is run-wake GPE */ - acpi_enable_gpe(device->wakeup.gpe_device, - device->wakeup.gpe_number); - if (!device_may_wakeup(&device->dev)) { - device_set_wakeup_enable(&device->dev, true); - button->wakeup_enabled = true; - } - } - printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); return 0; @@ -432,13 +421,6 @@ static int acpi_button_remove(struct acpi_device *device) { struct acpi_button *button = acpi_driver_data(device); - if (device->wakeup.flags.valid) { - acpi_disable_gpe(device->wakeup.gpe_device, - device->wakeup.gpe_number); - if (button->wakeup_enabled) - device_set_wakeup_enable(&device->dev, false); - } - acpi_button_remove_fs(device); input_unregister_device(button->input); 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) pr_err("Fail in evaluating the _REG object" " of EC device. Broken bios is suspected.\n"); } else { + acpi_disable_gpe(NULL, ec->gpe); acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler); - acpi_disable_gpe(NULL, ec->gpe); return -ENODEV; } } 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) /* Reprogram control registers */ acpi_leave_sleep_state_prep(ACPI_STATE_S4); /* Check the hardware signature */ - if (facs && s4_hardware_signature != facs->hardware_signature) { - printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " - "cannot resume!\n"); - panic("ACPI S4 hardware signature mismatch"); - } + if (facs && s4_hardware_signature != facs->hardware_signature) + pr_crit("ACPI: Hardware changed while hibernated, success doubtful!\n"); /* Restore the NVS memory area */ suspend_nvs_restore(); /* 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, return acpi_thermal_cooling_device_cb(thermal, cdev, false); } -static const struct thermal_zone_device_ops acpi_thermal_zone_ops = { +static struct thermal_zone_device_ops acpi_thermal_zone_ops = { .bind = acpi_thermal_bind_cooling_device, .unbind = acpi_thermal_unbind_cooling_device, .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; static acpi_status acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context, - void **retyurn_value) + void **return_value) { long *cap = context; |