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-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management and ACPI updates from Rafael Wysocki:
"These are fixes mostly (intel_pstate, ACPI core, ACPI EC driver,
cpupower tool), a new CPU ID for the Intel RAPL driver and one
intel_pstate driver improvement that didn't make it to my previous
pull requests due to timing.

Specifics:

- Fix a build warning in the intel_pstate driver showing up in
non-SMP builds (Borislav Petkov)

- Change one of the intel_pstate's P-state selection parameters for
Baytrail and Cherrytrail CPUs to significantly improve performance
at the cost of a small increase in energy consumption (Kristen
Carlson Accardi)

- Fix a NULL pointer dereference in the ACPI EC driver due to an
unsafe list walk in the query handler removal routine (Chris
Bainbridge)

- Get rid of a false-positive lockdep warning in the ACPI container
hot-remove code (Rafael J Wysocki)

- Prevent the ACPI device enumeration code from creating device
objects of a wrong type in some cases (Rafael J Wysocki)

- Add Skylake processors support to the Intel RAPL power capping
driver (Brian Bian)

- Drop the stale MAINTAINERS entry for the ACPI dock driver that is
regarded as part of the ACPI core and maintained along with it now
(Chao Yu)

- Fix cpupower tool breakage caused by a library API change in libpci
3.3.0 (Lucas Stach)"

* tag 'pm+acpi-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / scan: Add a scan handler for PRP0001
ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler()
MAINTAINERS: remove maintainship entry of docking station driver
powercap / RAPL: Add support for Intel Skylake processors
cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning
intel_pstate: Change the setpoint for Atom params
cpupower: fix breakage from libpci API change

+51 -22
-6
MAINTAINERS
··· 3278 3278 F: drivers/firmware/dmi_scan.c 3279 3279 F: include/linux/dmi.h 3280 3280 3281 - DOCKING STATION DRIVER 3282 - M: Shaohua Li <shaohua.li@intel.com> 3283 - L: linux-acpi@vger.kernel.org 3284 - S: Supported 3285 - F: drivers/acpi/dock.c 3286 - 3287 3281 DOCUMENTATION 3288 3282 M: Jonathan Corbet <corbet@lwn.net> 3289 3283 L: linux-doc@vger.kernel.org
+1 -1
drivers/acpi/ec.c
··· 861 861 } 862 862 } 863 863 mutex_unlock(&ec->mutex); 864 - list_for_each_entry(handler, &free_list, node) 864 + list_for_each_entry_safe(handler, tmp, &free_list, node) 865 865 acpi_ec_put_query_handler(handler); 866 866 } 867 867 EXPORT_SYMBOL_GPL(acpi_ec_remove_query_handler);
+33 -6
drivers/acpi/scan.c
··· 375 375 struct acpi_device_physical_node *pn; 376 376 bool offline = true; 377 377 378 - mutex_lock(&adev->physical_node_lock); 378 + /* 379 + * acpi_container_offline() calls this for all of the container's 380 + * children under the container's physical_node_lock lock. 381 + */ 382 + mutex_lock_nested(&adev->physical_node_lock, SINGLE_DEPTH_NESTING); 379 383 380 384 list_for_each_entry(pn, &adev->physical_node_list, node) 381 385 if (device_supports_offline(pn->dev) && !pn->dev->offline) { ··· 2392 2388 struct list_head resource_list; 2393 2389 bool is_spi_i2c_slave = false; 2394 2390 2395 - if (!device->pnp.type.platform_id || device->handler) 2396 - return; 2397 - 2398 2391 /* 2399 2392 * Do not enemerate SPI/I2C slaves as they will be enuerated by their 2400 2393 * respective parents. ··· 2403 2402 if (!is_spi_i2c_slave) 2404 2403 acpi_create_platform_device(device); 2405 2404 } 2405 + 2406 + static const struct acpi_device_id generic_device_ids[] = { 2407 + {"PRP0001", }, 2408 + {"", }, 2409 + }; 2410 + 2411 + static int acpi_generic_device_attach(struct acpi_device *adev, 2412 + const struct acpi_device_id *not_used) 2413 + { 2414 + /* 2415 + * Since PRP0001 is the only ID handled here, the test below can be 2416 + * unconditional. 2417 + */ 2418 + if (adev->data.of_compatible) 2419 + acpi_default_enumeration(adev); 2420 + 2421 + return 1; 2422 + } 2423 + 2424 + static struct acpi_scan_handler generic_device_handler = { 2425 + .ids = generic_device_ids, 2426 + .attach = acpi_generic_device_attach, 2427 + }; 2406 2428 2407 2429 static int acpi_scan_attach_handler(struct acpi_device *device) 2408 2430 { ··· 2452 2428 break; 2453 2429 } 2454 2430 } 2455 - if (!ret) 2456 - acpi_default_enumeration(device); 2457 2431 2458 2432 return ret; 2459 2433 } ··· 2493 2471 ret = device_attach(&device->dev); 2494 2472 if (ret < 0) 2495 2473 return; 2474 + 2475 + if (!ret && device->pnp.type.platform_id) 2476 + acpi_default_enumeration(device); 2496 2477 } 2497 2478 device->flags.visited = true; 2498 2479 ··· 2653 2628 acpi_memory_hotplug_init(); 2654 2629 acpi_pnp_init(); 2655 2630 acpi_int340x_thermal_init(); 2631 + 2632 + acpi_scan_add_handler(&generic_device_handler); 2656 2633 2657 2634 mutex_lock(&acpi_scan_lock); 2658 2635 /*
+7 -7
drivers/cpufreq/intel_pstate.c
··· 31 31 #include <asm/div64.h> 32 32 #include <asm/msr.h> 33 33 #include <asm/cpu_device_id.h> 34 + #include <asm/cpufeature.h> 34 35 35 36 #define BYT_RATIOS 0x66a 36 37 #define BYT_VIDS 0x66b ··· 650 649 .pid_policy = { 651 650 .sample_rate_ms = 10, 652 651 .deadband = 0, 653 - .setpoint = 97, 652 + .setpoint = 60, 654 653 .p_gain_pct = 14, 655 654 .d_gain_pct = 0, 656 655 .i_gain_pct = 4, ··· 1201 1200 { 1202 1201 int cpu, rc = 0; 1203 1202 const struct x86_cpu_id *id; 1204 - struct cpu_defaults *cpu_info; 1205 - struct cpuinfo_x86 *c = &boot_cpu_data; 1203 + struct cpu_defaults *cpu_def; 1206 1204 1207 1205 if (no_load) 1208 1206 return -ENODEV; ··· 1217 1217 if (intel_pstate_platform_pwr_mgmt_exists()) 1218 1218 return -ENODEV; 1219 1219 1220 - cpu_info = (struct cpu_defaults *)id->driver_data; 1220 + cpu_def = (struct cpu_defaults *)id->driver_data; 1221 1221 1222 - copy_pid_params(&cpu_info->pid_policy); 1223 - copy_cpu_funcs(&cpu_info->funcs); 1222 + copy_pid_params(&cpu_def->pid_policy); 1223 + copy_cpu_funcs(&cpu_def->funcs); 1224 1224 1225 1225 if (intel_pstate_msrs_not_valid()) 1226 1226 return -ENODEV; ··· 1231 1231 if (!all_cpu_data) 1232 1232 return -ENOMEM; 1233 1233 1234 - if (cpu_has(c,X86_FEATURE_HWP) && !no_hwp) 1234 + if (static_cpu_has_safe(X86_FEATURE_HWP) && !no_hwp) 1235 1235 intel_pstate_hwp_enable(); 1236 1236 1237 1237 if (!hwp_active && hwp_only)
+1
drivers/powercap/intel_rapl.c
··· 1064 1064 RAPL_CPU(0x3f, rapl_defaults_hsw_server),/* Haswell servers */ 1065 1065 RAPL_CPU(0x4f, rapl_defaults_hsw_server),/* Broadwell servers */ 1066 1066 RAPL_CPU(0x45, rapl_defaults_core),/* Haswell ULT */ 1067 + RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */ 1067 1068 RAPL_CPU(0x4C, rapl_defaults_atom),/* Braswell */ 1068 1069 RAPL_CPU(0x4A, rapl_defaults_atom),/* Tangier */ 1069 1070 RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */
+9 -2
tools/power/cpupower/utils/helpers/pci.c
··· 25 25 struct pci_dev *pci_acc_init(struct pci_access **pacc, int domain, int bus, 26 26 int slot, int func, int vendor, int dev) 27 27 { 28 - struct pci_filter filter_nb_link = { domain, bus, slot, func, 29 - vendor, dev }; 28 + struct pci_filter filter_nb_link; 30 29 struct pci_dev *device; 31 30 32 31 *pacc = pci_alloc(); 33 32 if (*pacc == NULL) 34 33 return NULL; 34 + 35 + pci_filter_init(*pacc, &filter_nb_link); 36 + filter_nb_link.domain = domain; 37 + filter_nb_link.bus = bus; 38 + filter_nb_link.slot = slot; 39 + filter_nb_link.func = func; 40 + filter_nb_link.vendor = vendor; 41 + filter_nb_link.device = dev; 35 42 36 43 pci_init(*pacc); 37 44 pci_scan_bus(*pacc);