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

Pull ACPI and power management fixes from Rafael Wysocki:
"These include a fix for a recent intel_pstate regression, a fix for a
regression in the ACPI-based PCI hotplug (ACPIPHP) code introduced
during the 3.12 cycle, fixes for two bugs in the ACPI core introduced
recently and a MAINTAINERS update related to cpufreq.

Specifics:

- Fix for a recent regression in the intel_pstate driver that
introduced a race condition causing systems to crash during
initialization in some situations. This removes the affected code
altogether. From Dirk Brandewie.

- ACPIPHP fix for a regression introduced during the 3.12 cycle
causing devices to be dropped as a result of bus check
notifications after system resume on some systems due to the way
ACPIPHP interprets _STA return values (arguably incorrectly). From
Mika Westerberg.

- ACPI dock driver fix for a problem causing docking to fail due to a
check that always fails after recent ACPI core changes (found by
code inspection).

- ACPI container driver fix to prevent memory from being leaked in an
error code path after device_register() failures.

- Update of the arm_big_little cpufreq driver maintainer's e-mail
address"

* tag 'pm+acpi-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
MAINTAINERS / cpufreq: update Sudeep's email address
intel_pstate: Remove energy reporting from pstate_sample tracepoint
ACPI / container: Fix error code path in container_device_attach()
ACPI / hotplug / PCI: Relax the checking of _STA return values
ACPI / dock: Use acpi_device_enumerated() to check if dock is present

+21 -22
+1 -1
MAINTAINERS
··· 2367 2367 2368 2368 CPU FREQUENCY DRIVERS - ARM BIG LITTLE 2369 2369 M: Viresh Kumar <viresh.kumar@linaro.org> 2370 - M: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> 2370 + M: Sudeep Holla <sudeep.holla@arm.com> 2371 2371 L: cpufreq@vger.kernel.org 2372 2372 L: linux-pm@vger.kernel.org 2373 2373 W: http://www.arm.com/products/processors/technologies/biglittleprocessing.php
+3 -2
drivers/acpi/container.c
··· 79 79 ACPI_COMPANION_SET(dev, adev); 80 80 dev->release = acpi_container_release; 81 81 ret = device_register(dev); 82 - if (ret) 82 + if (ret) { 83 + put_device(dev); 83 84 return ret; 84 - 85 + } 85 86 adev->driver_data = dev; 86 87 return 1; 87 88 }
+3 -2
drivers/acpi/dock.c
··· 609 609 static void dock_notify(struct dock_station *ds, u32 event) 610 610 { 611 611 acpi_handle handle = ds->handle; 612 - struct acpi_device *ad; 612 + struct acpi_device *adev = NULL; 613 613 int surprise_removal = 0; 614 614 615 615 /* ··· 632 632 switch (event) { 633 633 case ACPI_NOTIFY_BUS_CHECK: 634 634 case ACPI_NOTIFY_DEVICE_CHECK: 635 - if (!dock_in_progress(ds) && acpi_bus_get_device(handle, &ad)) { 635 + acpi_bus_get_device(handle, &adev); 636 + if (!dock_in_progress(ds) && !acpi_device_enumerated(adev)) { 636 637 begin_dock(ds); 637 638 dock(ds); 638 639 if (!dock_present(ds)) {
-9
drivers/cpufreq/intel_pstate.c
··· 51 51 return div_s64((int64_t)x << FRAC_BITS, (int64_t)y); 52 52 } 53 53 54 - static u64 energy_divisor; 55 - 56 54 struct sample { 57 55 int32_t core_pct_busy; 58 56 u64 aperf; ··· 628 630 { 629 631 struct cpudata *cpu = (struct cpudata *) __data; 630 632 struct sample *sample; 631 - u64 energy; 632 633 633 634 intel_pstate_sample(cpu); 634 635 635 636 sample = &cpu->samples[cpu->sample_ptr]; 636 - rdmsrl(MSR_PKG_ENERGY_STATUS, energy); 637 637 638 638 intel_pstate_adjust_busy_pstate(cpu); 639 639 ··· 640 644 cpu->pstate.current_pstate, 641 645 sample->mperf, 642 646 sample->aperf, 643 - div64_u64(energy, energy_divisor), 644 647 sample->freq); 645 648 646 649 intel_pstate_set_sample_time(cpu); ··· 921 926 int cpu, rc = 0; 922 927 const struct x86_cpu_id *id; 923 928 struct cpu_defaults *cpu_info; 924 - u64 units; 925 929 926 930 if (no_load) 927 931 return -ENODEV; ··· 953 959 rc = cpufreq_register_driver(&intel_pstate_driver); 954 960 if (rc) 955 961 goto out; 956 - 957 - rdmsrl(MSR_RAPL_POWER_UNIT, units); 958 - energy_divisor = 1 << ((units >> 8) & 0x1f); /* bits{12:8} */ 959 962 960 963 intel_pstate_debug_expose_params(); 961 964 intel_pstate_sysfs_expose_params();
+13 -2
drivers/pci/hotplug/acpiphp_glue.c
··· 730 730 return (unsigned int)sta; 731 731 } 732 732 733 + static inline bool device_status_valid(unsigned int sta) 734 + { 735 + /* 736 + * ACPI spec says that _STA may return bit 0 clear with bit 3 set 737 + * if the device is valid but does not require a device driver to be 738 + * loaded (Section 6.3.7 of ACPI 5.0A). 739 + */ 740 + unsigned int mask = ACPI_STA_DEVICE_ENABLED | ACPI_STA_DEVICE_FUNCTIONING; 741 + return (sta & mask) == mask; 742 + } 743 + 733 744 /** 734 745 * trim_stale_devices - remove PCI devices that are not responding. 735 746 * @dev: PCI device to start walking the hierarchy from. ··· 756 745 unsigned long long sta; 757 746 758 747 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 759 - alive = (ACPI_SUCCESS(status) && sta == ACPI_STA_ALL) 748 + alive = (ACPI_SUCCESS(status) && device_status_valid(sta)) 760 749 || acpiphp_no_hotplug(handle); 761 750 } 762 751 if (!alive) { ··· 803 792 mutex_lock(&slot->crit_sect); 804 793 if (slot_no_hotplug(slot)) { 805 794 ; /* do nothing */ 806 - } else if (get_slot_status(slot) == ACPI_STA_ALL) { 795 + } else if (device_status_valid(get_slot_status(slot))) { 807 796 /* remove stale devices if any */ 808 797 list_for_each_entry_safe_reverse(dev, tmp, 809 798 &bus->devices, bus_list)
+1 -6
include/trace/events/power.h
··· 42 42 u32 state, 43 43 u64 mperf, 44 44 u64 aperf, 45 - u32 energy, 46 45 u32 freq 47 46 ), 48 47 ··· 50 51 state, 51 52 mperf, 52 53 aperf, 53 - energy, 54 54 freq 55 55 ), 56 56 ··· 59 61 __field(u32, state) 60 62 __field(u64, mperf) 61 63 __field(u64, aperf) 62 - __field(u32, energy) 63 64 __field(u32, freq) 64 65 65 66 ), ··· 69 72 __entry->state = state; 70 73 __entry->mperf = mperf; 71 74 __entry->aperf = aperf; 72 - __entry->energy = energy; 73 75 __entry->freq = freq; 74 76 ), 75 77 76 - TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu energy=%lu freq=%lu ", 78 + TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu freq=%lu ", 77 79 (unsigned long)__entry->core_busy, 78 80 (unsigned long)__entry->scaled_busy, 79 81 (unsigned long)__entry->state, 80 82 (unsigned long long)__entry->mperf, 81 83 (unsigned long long)__entry->aperf, 82 - (unsigned long)__entry->energy, 83 84 (unsigned long)__entry->freq 84 85 ) 85 86