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

Pull power management fixes from Rafael Wysocki:
"These fix a recently introduced build issue related to cpuidle and two
bugs in the PM core, update cpuidle documentation and clean up memory
allocations in the operating performance points (OPP) framework.

Specifics:

- Fix a recently introduced build issue related to cpuidle by
covering all of the relevant combinations of Kconfig options
in its header (Rafael Wysocki).

- Add missing invocation of pm_runtime_drop_link() to the
!CONFIG_SRCU variant of __device_link_del() (Lukas Wunner).

- Fix unbalanced IRQ enable in the wakeup interrupts framework
(Tony Lindgren).

- Update cpuidle sysfs ABI documentation (Aishwarya Pant).

- Use GFP_KERNEL instead of GFP_ATOMIC for allocating memory
in dev_pm_opp_init_cpufreq_table() (Jia-Ju Bai)"

* tag 'pm-4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM: cpuidle: Fix cpuidle_poll_state_init() prototype
PM / runtime: Update links_count also if !CONFIG_SRCU
PM / wakeirq: Fix unbalanced IRQ enable for wakeirq
Documentation/ABI: update cpuidle sysfs documentation
opp: cpu: Replace GFP_ATOMIC with GFP_KERNEL in dev_pm_opp_init_cpufreq_table

+84 -6
+75 -2
Documentation/ABI/testing/sysfs-devices-system-cpu
··· 108 108 109 109 What: /sys/devices/system/cpu/cpuidle/current_driver 110 110 /sys/devices/system/cpu/cpuidle/current_governer_ro 111 + /sys/devices/system/cpu/cpuidle/available_governors 112 + /sys/devices/system/cpu/cpuidle/current_governor 111 113 Date: September 2007 112 114 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> 113 115 Description: Discover cpuidle policy and mechanism ··· 121 119 Idle policy (governor) is differentiated from idle mechanism 122 120 (driver) 123 121 124 - current_driver: displays current idle mechanism 122 + current_driver: (RO) displays current idle mechanism 125 123 126 - current_governor_ro: displays current idle policy 124 + current_governor_ro: (RO) displays current idle policy 125 + 126 + With the cpuidle_sysfs_switch boot option enabled (meant for 127 + developer testing), the following three attributes are visible 128 + instead: 129 + 130 + current_driver: same as described above 131 + 132 + available_governors: (RO) displays a space separated list of 133 + available governors 134 + 135 + current_governor: (RW) displays current idle policy. Users can 136 + switch the governor at runtime by writing to this file. 127 137 128 138 See files in Documentation/cpuidle/ for more information. 139 + 140 + 141 + What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name 142 + /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency 143 + /sys/devices/system/cpu/cpuX/cpuidle/stateN/power 144 + /sys/devices/system/cpu/cpuX/cpuidle/stateN/time 145 + /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage 146 + Date: September 2007 147 + KernelVersion: v2.6.24 148 + Contact: Linux power management list <linux-pm@vger.kernel.org> 149 + Description: 150 + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per 151 + logical CPU specific cpuidle information for each online cpu X. 152 + The processor idle states which are available for use have the 153 + following attributes: 154 + 155 + name: (RO) Name of the idle state (string). 156 + 157 + latency: (RO) The latency to exit out of this idle state (in 158 + microseconds). 159 + 160 + power: (RO) The power consumed while in this idle state (in 161 + milliwatts). 162 + 163 + time: (RO) The total time spent in this idle state (in microseconds). 164 + 165 + usage: (RO) Number of times this state was entered (a count). 166 + 167 + 168 + What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc 169 + Date: February 2008 170 + KernelVersion: v2.6.25 171 + Contact: Linux power management list <linux-pm@vger.kernel.org> 172 + Description: 173 + (RO) A small description about the idle state (string). 174 + 175 + 176 + What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable 177 + Date: March 2012 178 + KernelVersion: v3.10 179 + Contact: Linux power management list <linux-pm@vger.kernel.org> 180 + Description: 181 + (RW) Option to disable this idle state (bool). The behavior and 182 + the effect of the disable variable depends on the implementation 183 + of a particular governor. In the ladder governor, for example, 184 + it is not coherent, i.e. if one is disabling a light state, then 185 + all deeper states are disabled as well, but the disable variable 186 + does not reflect it. Likewise, if one enables a deep state but a 187 + lighter state still is disabled, then this has no effect. 188 + 189 + 190 + What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency 191 + Date: March 2014 192 + KernelVersion: v3.15 193 + Contact: Linux power management list <linux-pm@vger.kernel.org> 194 + Description: 195 + (RO) Display the target residency i.e. the minimum amount of 196 + time (in microseconds) this cpu should spend in this idle state 197 + to make the transition worth the effort. 129 198 130 199 131 200 What: /sys/devices/system/cpu/cpu#/cpufreq/*
+3
drivers/base/core.c
··· 310 310 dev_info(link->consumer, "Dropping the link to %s\n", 311 311 dev_name(link->supplier)); 312 312 313 + if (link->flags & DL_FLAG_PM_RUNTIME) 314 + pm_runtime_drop_link(link->consumer); 315 + 313 316 list_del(&link->s_node); 314 317 list_del(&link->c_node); 315 318 device_link_free(link);
+4 -2
drivers/base/power/wakeirq.c
··· 321 321 return; 322 322 323 323 if (device_may_wakeup(wirq->dev)) { 324 - if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED) 324 + if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED && 325 + !pm_runtime_status_suspended(wirq->dev)) 325 326 enable_irq(wirq->irq); 326 327 327 328 enable_irq_wake(wirq->irq); ··· 344 343 if (device_may_wakeup(wirq->dev)) { 345 344 disable_irq_wake(wirq->irq); 346 345 347 - if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED) 346 + if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED && 347 + !pm_runtime_status_suspended(wirq->dev)) 348 348 disable_irq_nosync(wirq->irq); 349 349 } 350 350 }
+1 -1
drivers/opp/cpu.c
··· 55 55 if (max_opps <= 0) 56 56 return max_opps ? max_opps : -ENODATA; 57 57 58 - freq_table = kcalloc((max_opps + 1), sizeof(*freq_table), GFP_ATOMIC); 58 + freq_table = kcalloc((max_opps + 1), sizeof(*freq_table), GFP_KERNEL); 59 59 if (!freq_table) 60 60 return -ENOMEM; 61 61
+1 -1
include/linux/cpuidle.h
··· 225 225 } 226 226 #endif 227 227 228 - #ifdef CONFIG_ARCH_HAS_CPU_RELAX 228 + #if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX) 229 229 void cpuidle_poll_state_init(struct cpuidle_driver *drv); 230 230 #else 231 231 static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}