History

Merge tag 'pm+acpi-3.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI and power management updates from Rafael Wysocki: "These are fixups on top of the previous PM+ACPI pull request, regression fixes (ACPI hotplug, cpufreq ppc-corenet), other bug fixes (ACPI reset, cpufreq), new PM trace points for system suspend profiling and a copyright notice update. Specifics: - I didn't remember correctly that the Hans de Goede's ACPI video patches actually didn't flip the video.use_native_backlight default, although we had discussed that and decided to do that. Since I said we would do that in the previous PM+ACPI pull request, make that change for real now. - ACPI bus check notifications for PCI host bridges don't cause the bus below the host bridge to be checked for changes as they should because of a mistake in the ACPI-based PCI hotplug (ACPIPHP) subsystem that forgets to add hotplug contexts to PCI host bridge ACPI device objects. Create hotplug contexts for PCI host bridges too as appropriate. - Revert recent cpufreq commit related to the big.LITTLE cpufreq driver that breaks arm64 builds. - Fix for a regression in the ppc-corenet cpufreq driver introduced during the 3.15 cycle and causing the driver to use the remainder from do_div instead of the quotient. From Ed Swarthout. - Resets triggered by panic activate a BUG_ON() in vmalloc.c on systems where the ACPI reset register is located in memory address space. Fix from Randy Wright. - Fix for a problem with cpufreq governors that decisions made by them may be suboptimal due to the fact that deferrable timers are used by them for CPU load sampling. From Srivatsa S Bhat. - Fix for a problem with the Tegra cpufreq driver where the CPU frequency is temporarily switched to a "stable" level that is different from both the initial and target frequencies during transitions which causes udelay() to expire earlier than it should sometimes. From Viresh Kumar. - New trace points and rework of some existing trace points for system suspend/resume profiling from Todd Brandt. - Assorted cpufreq fixes and cleanups from Stratos Karafotis and Viresh Kumar. - Copyright notice update for suspend-and-cpuhotplug.txt from Srivatsa S Bhat" * tag 'pm+acpi-3.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges PM / sleep: trace events for device PM callbacks cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR cpufreq: tegra: update comment for clarity cpufreq: intel_pstate: Remove duplicate CPU ID check cpufreq: Mark CPU0 driver with CPUFREQ_NEED_INITIAL_FREQ_CHECK flag PM / Documentation: Update copyright in suspend-and-cpuhotplug.txt cpufreq: governor: remove copy_prev_load from 'struct cpu_dbs_common_info' cpufreq: governor: Be friendly towards latency-sensitive bursty workloads PM / sleep: trace events for suspend/resume cpufreq: ppc-corenet-cpu-freq: do_div use quotient Revert "cpufreq: Enable big.LITTLE cpufreq driver on arm64" cpufreq: Tegra: implement intermediate frequency callbacks cpufreq: add support for intermediate (stable) frequencies ACPI / video: Change the default for video.use_native_backlight to 1 ACPI: Fix bug when ACPI reset register is implemented in system memory

Linus Torvalds committed 12 years ago

Commit 19c19402 parents 7c574cf d715a2224 files · +437 −113Browse files

Showing the changes to include/trace (1 of 24 files). Show all

Unified · Split

include/trace/events/power.h+58−26
@@ -7,6 +7,9 @@ · 6 unmodified lines
77 #include <linux/ktime.h>
88 #include <linux/pm_qos.h>
99 #include <linux/tracepoint.h>
10+#include <linux/ftrace_event.h>
11+
12+#define TPS(x) tracepoint_string(x)
1013
1114 DECLARE_EVENT_CLASS(cpu,
1215
@@ -90,6 +93,17 @@ TRACE_EVENT(pstate_sample, · 77 unmodified lines
9093 #define PWR_EVENT_EXIT -1
9194 #endif
9295
96+#define pm_verb_symbolic(event) \
97+ __print_symbolic(event, \
98+ { PM_EVENT_SUSPEND, "suspend" }, \
99+ { PM_EVENT_RESUME, "resume" }, \
100+ { PM_EVENT_FREEZE, "freeze" }, \
101+ { PM_EVENT_QUIESCE, "quiesce" }, \
102+ { PM_EVENT_HIBERNATE, "hibernate" }, \
103+ { PM_EVENT_THAW, "thaw" }, \
104+ { PM_EVENT_RESTORE, "restore" }, \
105+ { PM_EVENT_RECOVER, "recover" })
106+
93107 DEFINE_EVENT(cpu, cpu_frequency,
94108
95109 TP_PROTO(unsigned int frequency, unsigned int cpu_id),
@@ -97,58 +111,76 @@ DEFINE_EVENT(cpu, cpu_frequency, · 1 unmodified line
97111 TP_ARGS(frequency, cpu_id)
98112 );
99113
100−TRACE_EVENT(machine_suspend,
114+TRACE_EVENT(device_pm_callback_start,
101115
102− TP_PROTO(unsigned int state),
116+ TP_PROTO(struct device *dev, const char *pm_ops, int event),
103117
104− TP_ARGS(state),
118+ TP_ARGS(dev, pm_ops, event),
105119
106120 TP_STRUCT__entry(
107− __field( u32, state )
121+ __string(device, dev_name(dev))
122+ __string(driver, dev_driver_string(dev))
123+ __string(parent, dev->parent ? dev_name(dev->parent) : "none")
124+ __string(pm_ops, pm_ops ? pm_ops : "none ")
125+ __field(int, event)
108126 ),
109127
110128 TP_fast_assign(
111− __entry->state = state;
129+ __assign_str(device, dev_name(dev));
130+ __assign_str(driver, dev_driver_string(dev));
131+ __assign_str(parent,
132+ dev->parent ? dev_name(dev->parent) : "none");
133+ __assign_str(pm_ops, pm_ops ? pm_ops : "none ");
134+ __entry->event = event;
112135 ),
113136
114− TP_printk("state=%lu", (unsigned long)__entry->state)
137+ TP_printk("%s %s, parent: %s, %s[%s]", __get_str(driver),
138+ __get_str(device), __get_str(parent), __get_str(pm_ops),
139+ pm_verb_symbolic(__entry->event))
115140 );
116141
117−TRACE_EVENT(device_pm_report_time,
142+TRACE_EVENT(device_pm_callback_end,
118143
119− TP_PROTO(struct device *dev, const char *pm_ops, s64 ops_time,
120− char *pm_event_str, int error),
144+ TP_PROTO(struct device *dev, int error),
121145
122− TP_ARGS(dev, pm_ops, ops_time, pm_event_str, error),
146+ TP_ARGS(dev, error),
123147
124148 TP_STRUCT__entry(
125149 __string(device, dev_name(dev))
126150 __string(driver, dev_driver_string(dev))
127− __string(parent, dev->parent ? dev_name(dev->parent) : "none")
128− __string(pm_ops, pm_ops ? pm_ops : "none ")
129− __string(pm_event_str, pm_event_str)
130− __field(s64, ops_time)
131151 __field(int, error)
132152 ),
133153
134154 TP_fast_assign(
135− const char *tmp = dev->parent ? dev_name(dev->parent) : "none";
136− const char *tmp_i = pm_ops ? pm_ops : "none ";
137−
138155 __assign_str(device, dev_name(dev));
139156 __assign_str(driver, dev_driver_string(dev));
140− __assign_str(parent, tmp);
141− __assign_str(pm_ops, tmp_i);
142− __assign_str(pm_event_str, pm_event_str);
143− __entry->ops_time = ops_time;
144157 __entry->error = error;
145158 ),
146159
147− /* ops_str has an extra space at the end */
148− TP_printk("%s %s parent=%s state=%s ops=%snsecs=%lld err=%d",
149− __get_str(driver), __get_str(device), __get_str(parent),
150− __get_str(pm_event_str), __get_str(pm_ops),
151− __entry->ops_time, __entry->error)
160+ TP_printk("%s %s, err=%d",
161+ __get_str(driver), __get_str(device), __entry->error)
162+);
163+
164+TRACE_EVENT(suspend_resume,
165+
166+ TP_PROTO(const char *action, int val, bool start),
167+
168+ TP_ARGS(action, val, start),
169+
170+ TP_STRUCT__entry(
171+ __field(const char *, action)
172+ __field(int, val)
173+ __field(bool, start)
174+ ),
175+
176+ TP_fast_assign(
177+ __entry->action = action;
178+ __entry->val = val;
179+ __entry->start = start;
180+ ),
181+
182+ TP_printk("%s[%u] %s", __entry->action, (unsigned int)__entry->val,
183+ (__entry->start)?"begin":"end")
152184 );
153185
154186 DECLARE_EVENT_CLASS(wakeup_source,