aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 17:35:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 17:35:40 -0400
commitf991fae5c6d42dfc5029150b05a78cf3f6c18cc9 (patch)
treed140deb437bde0631778b4984eeb72c1f4ee0c1d /include/trace
parentd4141531f63a29bb2a980092b6f2828c385e6edd (diff)
parent2c843bd92ec276ecb68504b3b5ffa7066183f032 (diff)
Merge tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI updates from Rafael Wysocki: "This time the total number of ACPI commits is slightly greater than the number of cpufreq commits, but Viresh Kumar (who works on cpufreq) remains the most active patch submitter. To me, the most significant change is the addition of offline/online device operations to the driver core (with the Greg's blessing) and the related modifications of the ACPI core hotplug code. Next are the freezer updates from Colin Cross that should make the freezing of tasks a bit less heavy weight. We also have a couple of regression fixes, a number of fixes for issues that have not been identified as regressions, two new drivers and a bunch of cleanups all over. Highlights: - Hotplug changes to support graceful hot-removal failures. It sometimes is necessary to fail device hot-removal operations gracefully if they cannot be carried out completely. For example, if memory from a memory module being hot-removed has been allocated for the kernel's own use and cannot be moved elsewhere, it's desirable to fail the hot-removal operation in a graceful way rather than to crash the kernel, but currenty a success or a kernel crash are the only possible outcomes of an attempted memory hot-removal. Needless to say, that is not a very attractive alternative and it had to be addressed. However, in order to make it work for memory, I first had to make it work for CPUs and for this purpose I needed to modify the ACPI processor driver. It's been split into two parts, a resident one handling the low-level initialization/cleanup and a modular one playing the actual driver's role (but it binds to the CPU system device objects rather than to the ACPI device objects representing processors). That's been sort of like a live brain surgery on a patient who's riding a bike. So this is a little scary, but since we found and fixed a couple of regressions it caused to happen during the early linux-next testing (a month ago), nobody has complained. As a bonus we remove some duplicated ACPI hotplug code, because the ACPI-based CPU hotplug is now going to use the common ACPI hotplug code. - Lighter weight freezing of tasks. These changes from Colin Cross and Mandeep Singh Baines are targeted at making the freezing of tasks a bit less heavy weight operation. They reduce the number of tasks woken up every time during the freezing, by using the observation that the freezer simply doesn't need to wake up some of them and wait for them all to call refrigerator(). The time needed for the freezer to decide to report a failure is reduced too. Also reintroduced is the check causing a lockdep warining to trigger when try_to_freeze() is called with locks held (which is generally unsafe and shouldn't happen). - cpufreq updates First off, a commit from Srivatsa S Bhat fixes a resume regression introduced during the 3.10 cycle causing some cpufreq sysfs attributes to return wrong values to user space after resume. The fix is kind of fresh, but also it's pretty obvious once Srivatsa has identified the root cause. Second, we have a new freqdomain_cpus sysfs attribute for the acpi-cpufreq driver to provide information previously available via related_cpus. From Lan Tianyu. Finally, we fix a number of issues, mostly related to the CPUFREQ_POSTCHANGE notifier and cpufreq Kconfig options and clean up some code. The majority of changes from Viresh Kumar with bits from Jacob Shin, Heiko Stübner, Xiaoguang Chen, Ezequiel Garcia, Arnd Bergmann, and Tang Yuantian. - ACPICA update A usual bunch of updates from the ACPICA upstream. During the 3.4 cycle we introduced support for ACPI 5 extended sleep registers, but they are only supposed to be used if the HW-reduced mode bit is set in the FADT flags and the code attempted to use them without checking that bit. That caused suspend/resume regressions to happen on some systems. Fix from Lv Zheng causes those registers to be used only if the HW-reduced mode bit is set. Apart from this some other ACPICA bugs are fixed and code cleanups are made by Bob Moore, Tomasz Nowicki, Lv Zheng, Chao Guan, and Zhang Rui. - cpuidle updates New driver for Xilinx Zynq processors is added by Michal Simek. Multidriver support simplification, addition of some missing kerneldoc comments and Kconfig-related fixes come from Daniel Lezcano. - ACPI power management updates Changes to make suspend/resume work correctly in Xen guests from Konrad Rzeszutek Wilk, sparse warning fix from Fengguang Wu and cleanups and fixes of the ACPI device power state selection routine. - ACPI documentation updates Some previously missing pieces of ACPI documentation are added by Lv Zheng and Aaron Lu (hopefully, that will help people to uderstand how the ACPI subsystem works) and one outdated doc is updated by Hanjun Guo. - Assorted ACPI updates We finally nailed down the IA-64 issue that was the reason for reverting commit 9f29ab11ddbf ("ACPI / scan: do not match drivers against objects having scan handlers"), so we can fix it and move the ACPI scan handler check added to the ACPI video driver back to the core. A mechanism for adding CMOS RTC address space handlers is introduced by Lan Tianyu to allow some EC-related breakage to be fixed on some systems. A spec-compliant implementation of acpi_os_get_timer() is added by Mika Westerberg. The evaluation of _STA is added to do_acpi_find_child() to avoid situations in which a pointer to a disabled device object is returned instead of an enabled one with the same _ADR value. From Jeff Wu. Intel BayTrail PCH (Platform Controller Hub) support is added to the ACPI driver for Intel Low-Power Subsystems (LPSS) and that driver is modified to work around a couple of known BIOS issues. Changes from Mika Westerberg and Heikki Krogerus. The EC driver is fixed by Vasiliy Kulikov to use get_user() and put_user() instead of dereferencing user space pointers blindly. Code cleanups are made by Bjorn Helgaas, Nicholas Mazzuca and Toshi Kani. - Assorted power management updates The "runtime idle" helper routine is changed to take the return values of the callbacks executed by it into account and to call rpm_suspend() if they return 0, which allows us to reduce the overall code bloat a bit (by dropping some code that's not necessary any more after that modification). The runtime PM documentation is updated by Alan Stern (to reflect the "runtime idle" behavior change). New trace points for PM QoS are added by Sahara (<keun-o.park@windriver.com>). PM QoS documentation is updated by Lan Tianyu. Code cleanups are made and minor issues are addressed by Bernie Thompson, Bjorn Helgaas, Julius Werner, and Shuah Khan. - devfreq updates New driver for the Exynos5-bus device from Abhilash Kesavan. Minor cleanups, fixes and MAINTAINERS update from MyungJoo Ham, Abhilash Kesavan, Paul Bolle, Rajagopal Venkat, and Wei Yongjun. - OMAP power management updates Adaptive Voltage Scaling (AVS) SmartReflex voltage control driver updates from Andrii Tseglytskyi and Nishanth Menon." * tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits) cpufreq: Fix cpufreq regression after suspend/resume ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state() PM / Sleep: Warn about system time after resume with pm_trace cpufreq: don't leave stale policy pointer in cdbs->cur_policy acpi-cpufreq: Add new sysfs attribute freqdomain_cpus cpufreq: make sure frequency transitions are serialized ACPI: implement acpi_os_get_timer() according the spec ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan ACPI: Add CMOS RTC Operation Region handler support ACPI / processor: Drop unused variable from processor_perflib.c cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/power.h173
1 files changed, 173 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 427acab5d69a..8e42410bd159 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -5,6 +5,7 @@
5#define _TRACE_POWER_H 5#define _TRACE_POWER_H
6 6
7#include <linux/ktime.h> 7#include <linux/ktime.h>
8#include <linux/pm_qos.h>
8#include <linux/tracepoint.h> 9#include <linux/tracepoint.h>
9 10
10DECLARE_EVENT_CLASS(cpu, 11DECLARE_EVENT_CLASS(cpu,
@@ -177,6 +178,178 @@ DEFINE_EVENT(power_domain, power_domain_target,
177 178
178 TP_ARGS(name, state, cpu_id) 179 TP_ARGS(name, state, cpu_id)
179); 180);
181
182/*
183 * The pm qos events are used for pm qos update
184 */
185DECLARE_EVENT_CLASS(pm_qos_request,
186
187 TP_PROTO(int pm_qos_class, s32 value),
188
189 TP_ARGS(pm_qos_class, value),
190
191 TP_STRUCT__entry(
192 __field( int, pm_qos_class )
193 __field( s32, value )
194 ),
195
196 TP_fast_assign(
197 __entry->pm_qos_class = pm_qos_class;
198 __entry->value = value;
199 ),
200
201 TP_printk("pm_qos_class=%s value=%d",
202 __print_symbolic(__entry->pm_qos_class,
203 { PM_QOS_CPU_DMA_LATENCY, "CPU_DMA_LATENCY" },
204 { PM_QOS_NETWORK_LATENCY, "NETWORK_LATENCY" },
205 { PM_QOS_NETWORK_THROUGHPUT, "NETWORK_THROUGHPUT" }),
206 __entry->value)
207);
208
209DEFINE_EVENT(pm_qos_request, pm_qos_add_request,
210
211 TP_PROTO(int pm_qos_class, s32 value),
212
213 TP_ARGS(pm_qos_class, value)
214);
215
216DEFINE_EVENT(pm_qos_request, pm_qos_update_request,
217
218 TP_PROTO(int pm_qos_class, s32 value),
219
220 TP_ARGS(pm_qos_class, value)
221);
222
223DEFINE_EVENT(pm_qos_request, pm_qos_remove_request,
224
225 TP_PROTO(int pm_qos_class, s32 value),
226
227 TP_ARGS(pm_qos_class, value)
228);
229
230TRACE_EVENT(pm_qos_update_request_timeout,
231
232 TP_PROTO(int pm_qos_class, s32 value, unsigned long timeout_us),
233
234 TP_ARGS(pm_qos_class, value, timeout_us),
235
236 TP_STRUCT__entry(
237 __field( int, pm_qos_class )
238 __field( s32, value )
239 __field( unsigned long, timeout_us )
240 ),
241
242 TP_fast_assign(
243 __entry->pm_qos_class = pm_qos_class;
244 __entry->value = value;
245 __entry->timeout_us = timeout_us;
246 ),
247
248 TP_printk("pm_qos_class=%s value=%d, timeout_us=%ld",
249 __print_symbolic(__entry->pm_qos_class,
250 { PM_QOS_CPU_DMA_LATENCY, "CPU_DMA_LATENCY" },
251 { PM_QOS_NETWORK_LATENCY, "NETWORK_LATENCY" },
252 { PM_QOS_NETWORK_THROUGHPUT, "NETWORK_THROUGHPUT" }),
253 __entry->value, __entry->timeout_us)
254);
255
256DECLARE_EVENT_CLASS(pm_qos_update,
257
258 TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
259
260 TP_ARGS(action, prev_value, curr_value),
261
262 TP_STRUCT__entry(
263 __field( enum pm_qos_req_action, action )
264 __field( int, prev_value )
265 __field( int, curr_value )
266 ),
267
268 TP_fast_assign(
269 __entry->action = action;
270 __entry->prev_value = prev_value;
271 __entry->curr_value = curr_value;
272 ),
273
274 TP_printk("action=%s prev_value=%d curr_value=%d",
275 __print_symbolic(__entry->action,
276 { PM_QOS_ADD_REQ, "ADD_REQ" },
277 { PM_QOS_UPDATE_REQ, "UPDATE_REQ" },
278 { PM_QOS_REMOVE_REQ, "REMOVE_REQ" }),
279 __entry->prev_value, __entry->curr_value)
280);
281
282DEFINE_EVENT(pm_qos_update, pm_qos_update_target,
283
284 TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
285
286 TP_ARGS(action, prev_value, curr_value)
287);
288
289DEFINE_EVENT_PRINT(pm_qos_update, pm_qos_update_flags,
290
291 TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
292
293 TP_ARGS(action, prev_value, curr_value),
294
295 TP_printk("action=%s prev_value=0x%x curr_value=0x%x",
296 __print_symbolic(__entry->action,
297 { PM_QOS_ADD_REQ, "ADD_REQ" },
298 { PM_QOS_UPDATE_REQ, "UPDATE_REQ" },
299 { PM_QOS_REMOVE_REQ, "REMOVE_REQ" }),
300 __entry->prev_value, __entry->curr_value)
301);
302
303DECLARE_EVENT_CLASS(dev_pm_qos_request,
304
305 TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
306 s32 new_value),
307
308 TP_ARGS(name, type, new_value),
309
310 TP_STRUCT__entry(
311 __string( name, name )
312 __field( enum dev_pm_qos_req_type, type )
313 __field( s32, new_value )
314 ),
315
316 TP_fast_assign(
317 __assign_str(name, name);
318 __entry->type = type;
319 __entry->new_value = new_value;
320 ),
321
322 TP_printk("device=%s type=%s new_value=%d",
323 __get_str(name),
324 __print_symbolic(__entry->type,
325 { DEV_PM_QOS_LATENCY, "DEV_PM_QOS_LATENCY" },
326 { DEV_PM_QOS_FLAGS, "DEV_PM_QOS_FLAGS" }),
327 __entry->new_value)
328);
329
330DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_add_request,
331
332 TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
333 s32 new_value),
334
335 TP_ARGS(name, type, new_value)
336);
337
338DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_update_request,
339
340 TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
341 s32 new_value),
342
343 TP_ARGS(name, type, new_value)
344);
345
346DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_remove_request,
347
348 TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
349 s32 new_value),
350
351 TP_ARGS(name, type, new_value)
352);
180#endif /* _TRACE_POWER_H */ 353#endif /* _TRACE_POWER_H */
181 354
182/* This part must be outside protection */ 355/* This part must be outside protection */