Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm+acpi-3.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:

- Recent commits modifying the lists of C-states in the intel_idle
driver introduced bugs leading to crashes on some systems. Two fixes
from Jiang Liu.

- The ACPI AC driver should receive all types of notifications, but
recent change made it ignore some of them. Fix from Alexander Mezin.

- intel_pstate's validity checks for MSRs it depends on are not
sufficient to catch the lack of support in nested KVM setups, so they
are extended to cover that case. From Dirk Brandewie.

- NEC LZ750/LS has a botched up _BIX method in its ACPI tables, so our
ACPI battery driver needs a quirk for it. From Lan Tianyu.

- The tpm_ppi driver sometimes leaks memory allocated by
acpi_get_name(). Fix from Jiang Liu.

* tag 'pm+acpi-3.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
intel_idle: close avn_cstates array with correct marker
Revert "intel_idle: mark states tables with __initdata tag"
ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS
intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters.
ACPI / TPM: fix memory leak when walking ACPI namespace
ACPI / AC: change notification handler type to ACPI_ALL_NOTIFY

+42 -16
+2 -2
drivers/acpi/ac.c
··· 207 207 goto end; 208 208 209 209 result = acpi_install_notify_handler(ACPI_HANDLE(&pdev->dev), 210 - ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler, ac); 210 + ACPI_ALL_NOTIFY, acpi_ac_notify_handler, ac); 211 211 if (result) { 212 212 power_supply_unregister(&ac->charger); 213 213 goto end; ··· 255 255 return -EINVAL; 256 256 257 257 acpi_remove_notify_handler(ACPI_HANDLE(&pdev->dev), 258 - ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler); 258 + ACPI_ALL_NOTIFY, acpi_ac_notify_handler); 259 259 260 260 ac = platform_get_drvdata(pdev); 261 261 if (ac->charger.dev)
+21 -1
drivers/acpi/battery.c
··· 62 62 MODULE_DESCRIPTION("ACPI Battery Driver"); 63 63 MODULE_LICENSE("GPL"); 64 64 65 + static int battery_bix_broken_package; 65 66 static unsigned int cache_time = 1000; 66 67 module_param(cache_time, uint, 0644); 67 68 MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); ··· 417 416 ACPI_EXCEPTION((AE_INFO, status, "Evaluating %s", name)); 418 417 return -ENODEV; 419 418 } 420 - if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)) 419 + 420 + if (battery_bix_broken_package) 421 + result = extract_package(battery, buffer.pointer, 422 + extended_info_offsets + 1, 423 + ARRAY_SIZE(extended_info_offsets) - 1); 424 + else if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)) 421 425 result = extract_package(battery, buffer.pointer, 422 426 extended_info_offsets, 423 427 ARRAY_SIZE(extended_info_offsets)); ··· 760 754 return 0; 761 755 } 762 756 757 + static struct dmi_system_id bat_dmi_table[] = { 758 + { 759 + .ident = "NEC LZ750/LS", 760 + .matches = { 761 + DMI_MATCH(DMI_SYS_VENDOR, "NEC"), 762 + DMI_MATCH(DMI_PRODUCT_NAME, "PC-LZ750LS"), 763 + }, 764 + }, 765 + {}, 766 + }; 767 + 763 768 static int acpi_battery_add(struct acpi_device *device) 764 769 { 765 770 int result = 0; ··· 863 846 { 864 847 if (acpi_disabled) 865 848 return; 849 + 850 + if (dmi_check_system(bat_dmi_table)) 851 + battery_bix_broken_package = 1; 866 852 acpi_bus_register_driver(&acpi_battery_driver); 867 853 } 868 854
+9 -6
drivers/char/tpm/tpm_ppi.c
··· 27 27 static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context, 28 28 void **return_value) 29 29 { 30 - acpi_status status; 30 + acpi_status status = AE_OK; 31 31 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 32 - status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); 33 - if (strstr(buffer.pointer, context) != NULL) { 34 - *return_value = handle; 32 + 33 + if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) { 34 + if (strstr(buffer.pointer, context) != NULL) { 35 + *return_value = handle; 36 + status = AE_CTRL_TERMINATE; 37 + } 35 38 kfree(buffer.pointer); 36 - return AE_CTRL_TERMINATE; 37 39 } 38 - return AE_OK; 40 + 41 + return status; 39 42 } 40 43 41 44 static inline void ppi_assign_params(union acpi_object params[4],
+2 -1
drivers/cpufreq/intel_pstate.c
··· 581 581 } 582 582 583 583 #define ICPU(model, policy) \ 584 - { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&policy } 584 + { X86_VENDOR_INTEL, 6, model, X86_FEATURE_APERFMPERF,\ 585 + (unsigned long)&policy } 585 586 586 587 static const struct x86_cpu_id intel_pstate_cpu_ids[] = { 587 588 ICPU(0x2a, core_params),
+8 -6
drivers/idle/intel_idle.c
··· 123 123 * which is also the index into the MWAIT hint array. 124 124 * Thus C0 is a dummy. 125 125 */ 126 - static struct cpuidle_state nehalem_cstates[] __initdata = { 126 + static struct cpuidle_state nehalem_cstates[] = { 127 127 { 128 128 .name = "C1-NHM", 129 129 .desc = "MWAIT 0x00", ··· 156 156 .enter = NULL } 157 157 }; 158 158 159 - static struct cpuidle_state snb_cstates[] __initdata = { 159 + static struct cpuidle_state snb_cstates[] = { 160 160 { 161 161 .name = "C1-SNB", 162 162 .desc = "MWAIT 0x00", ··· 196 196 .enter = NULL } 197 197 }; 198 198 199 - static struct cpuidle_state ivb_cstates[] __initdata = { 199 + static struct cpuidle_state ivb_cstates[] = { 200 200 { 201 201 .name = "C1-IVB", 202 202 .desc = "MWAIT 0x00", ··· 236 236 .enter = NULL } 237 237 }; 238 238 239 - static struct cpuidle_state hsw_cstates[] __initdata = { 239 + static struct cpuidle_state hsw_cstates[] = { 240 240 { 241 241 .name = "C1-HSW", 242 242 .desc = "MWAIT 0x00", ··· 297 297 .enter = NULL } 298 298 }; 299 299 300 - static struct cpuidle_state atom_cstates[] __initdata = { 300 + static struct cpuidle_state atom_cstates[] = { 301 301 { 302 302 .name = "C1E-ATM", 303 303 .desc = "MWAIT 0x00", ··· 329 329 { 330 330 .enter = NULL } 331 331 }; 332 - static struct cpuidle_state avn_cstates[] __initdata = { 332 + static struct cpuidle_state avn_cstates[] = { 333 333 { 334 334 .name = "C1-AVN", 335 335 .desc = "MWAIT 0x00", ··· 344 344 .exit_latency = 15, 345 345 .target_residency = 45, 346 346 .enter = &intel_idle }, 347 + { 348 + .enter = NULL } 347 349 }; 348 350 349 351 /**