Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define TRACE_SYSTEM power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #define _TRACE_POWER_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/cpufreq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/ktime.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/pm_qos.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/trace_events.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #define TPS(x)  tracepoint_string(x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) DECLARE_EVENT_CLASS(cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	TP_PROTO(unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	TP_ARGS(state, cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 		__field(	u32,		state		)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 		__field(	u32,		cpu_id		)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		__entry->state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 		__entry->cpu_id = cpu_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	TP_printk("state=%lu cpu_id=%lu", (unsigned long)__entry->state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		  (unsigned long)__entry->cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) DEFINE_EVENT(cpu, cpu_idle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	TP_PROTO(unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	TP_ARGS(state, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) TRACE_EVENT(powernv_throttle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	TP_PROTO(int chip_id, const char *reason, int pmax),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	TP_ARGS(chip_id, reason, pmax),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		__field(int, chip_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		__string(reason, reason)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		__field(int, pmax)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		__entry->chip_id = chip_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		__assign_str(reason, reason);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		__entry->pmax = pmax;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	TP_printk("Chip %d Pmax %d %s", __entry->chip_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		  __entry->pmax, __get_str(reason))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) TRACE_EVENT(pstate_sample,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	TP_PROTO(u32 core_busy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		u32 scaled_busy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		u32 from,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		u32 to,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		u64 mperf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		u64 aperf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		u64 tsc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		u32 freq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 		u32 io_boost
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	TP_ARGS(core_busy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		scaled_busy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		from,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		to,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		mperf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 		aperf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		tsc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		freq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		io_boost
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		__field(u32, core_busy)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		__field(u32, scaled_busy)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		__field(u32, from)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		__field(u32, to)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		__field(u64, mperf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		__field(u64, aperf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		__field(u64, tsc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		__field(u32, freq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 		__field(u32, io_boost)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		__entry->core_busy = core_busy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		__entry->scaled_busy = scaled_busy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		__entry->from = from;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		__entry->to = to;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		__entry->mperf = mperf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		__entry->aperf = aperf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		__entry->tsc = tsc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		__entry->freq = freq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 		__entry->io_boost = io_boost;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	TP_printk("core_busy=%lu scaled=%lu from=%lu to=%lu mperf=%llu aperf=%llu tsc=%llu freq=%lu io_boost=%lu",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		(unsigned long)__entry->core_busy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		(unsigned long)__entry->scaled_busy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		(unsigned long)__entry->from,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 		(unsigned long)__entry->to,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		(unsigned long long)__entry->mperf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		(unsigned long long)__entry->aperf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		(unsigned long long)__entry->tsc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		(unsigned long)__entry->freq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		(unsigned long)__entry->io_boost
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #define _PWR_EVENT_AVOID_DOUBLE_DEFINING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) #define PWR_EVENT_EXIT -1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) #define pm_verb_symbolic(event) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	__print_symbolic(event, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 		{ PM_EVENT_SUSPEND, "suspend" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		{ PM_EVENT_RESUME, "resume" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		{ PM_EVENT_FREEZE, "freeze" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		{ PM_EVENT_QUIESCE, "quiesce" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		{ PM_EVENT_HIBERNATE, "hibernate" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		{ PM_EVENT_THAW, "thaw" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		{ PM_EVENT_RESTORE, "restore" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		{ PM_EVENT_RECOVER, "recover" })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) DEFINE_EVENT(cpu, cpu_frequency,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	TP_PROTO(unsigned int frequency, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	TP_ARGS(frequency, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) TRACE_EVENT(cpu_frequency_limits,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	TP_PROTO(struct cpufreq_policy *policy),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	TP_ARGS(policy),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		__field(u32, min_freq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		__field(u32, max_freq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		__field(u32, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		__entry->min_freq = policy->min;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		__entry->max_freq = policy->max;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		__entry->cpu_id = policy->cpu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	TP_printk("min=%lu max=%lu cpu_id=%lu",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		  (unsigned long)__entry->min_freq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		  (unsigned long)__entry->max_freq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 		  (unsigned long)__entry->cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) TRACE_EVENT(device_pm_callback_start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	TP_PROTO(struct device *dev, const char *pm_ops, int event),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	TP_ARGS(dev, pm_ops, event),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		__string(device, dev_name(dev))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		__string(driver, dev_driver_string(dev))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		__string(parent, dev->parent ? dev_name(dev->parent) : "none")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		__string(pm_ops, pm_ops ? pm_ops : "none ")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		__field(int, event)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		__assign_str(device, dev_name(dev));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 		__assign_str(driver, dev_driver_string(dev));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		__assign_str(parent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 			dev->parent ? dev_name(dev->parent) : "none");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 		__assign_str(pm_ops, pm_ops ? pm_ops : "none ");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		__entry->event = event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	TP_printk("%s %s, parent: %s, %s[%s]", __get_str(driver),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		__get_str(device), __get_str(parent), __get_str(pm_ops),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 		pm_verb_symbolic(__entry->event))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) TRACE_EVENT(device_pm_callback_end,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	TP_PROTO(struct device *dev, int error),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	TP_ARGS(dev, error),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 		__string(device, dev_name(dev))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 		__string(driver, dev_driver_string(dev))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		__field(int, error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		__assign_str(device, dev_name(dev));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		__assign_str(driver, dev_driver_string(dev));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 		__entry->error = error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	TP_printk("%s %s, err=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 		__get_str(driver), __get_str(device), __entry->error)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) TRACE_EVENT(suspend_resume,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	TP_PROTO(const char *action, int val, bool start),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	TP_ARGS(action, val, start),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 		__field(const char *, action)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		__field(int, val)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 		__field(bool, start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 		__entry->action = action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 		__entry->val = val;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 		__entry->start = start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	TP_printk("%s[%u] %s", __entry->action, (unsigned int)__entry->val,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 		(__entry->start)?"begin":"end")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) DECLARE_EVENT_CLASS(wakeup_source,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	TP_PROTO(const char *name, unsigned int state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	TP_ARGS(name, state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 		__string(       name,           name            )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 		__field(        u64,            state           )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 		__assign_str(name, name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 		__entry->state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	TP_printk("%s state=0x%lx", __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 		(unsigned long)__entry->state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) DEFINE_EVENT(wakeup_source, wakeup_source_activate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	TP_PROTO(const char *name, unsigned int state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	TP_ARGS(name, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) DEFINE_EVENT(wakeup_source, wakeup_source_deactivate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	TP_PROTO(const char *name, unsigned int state),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	TP_ARGS(name, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)  * The clock events are used for clock enable/disable and for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)  *  clock rate change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) DECLARE_EVENT_CLASS(clock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 	TP_ARGS(name, state, cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 		__string(       name,           name            )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 		__field(        u64,            state           )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 		__field(        u64,            cpu_id          )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 		__assign_str(name, name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 		__entry->state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 		__entry->cpu_id = cpu_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 		(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) DEFINE_EVENT(clock, clock_enable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 	TP_ARGS(name, state, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) DEFINE_EVENT(clock, clock_disable,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 	TP_ARGS(name, state, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) DEFINE_EVENT(clock, clock_set_rate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	TP_ARGS(name, state, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330)  * The power domain events are used for power domains transitions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) DECLARE_EVENT_CLASS(power_domain,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	TP_ARGS(name, state, cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 		__string(       name,           name            )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 		__field(        u64,            state           )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 		__field(        u64,            cpu_id          )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 		__assign_str(name, name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 		__entry->state = state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 		__entry->cpu_id = cpu_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 		(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) DEFINE_EVENT(power_domain, power_domain_target,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 	TP_ARGS(name, state, cpu_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)  * CPU latency QoS events used for global CPU latency QoS list updates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) DECLARE_EVENT_CLASS(cpu_latency_qos_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 	TP_PROTO(s32 value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 	TP_ARGS(value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 		__field( s32,                    value          )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 		__entry->value = value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 	TP_printk("CPU_DMA_LATENCY value=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 		  __entry->value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) DEFINE_EVENT(cpu_latency_qos_request, pm_qos_add_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 	TP_PROTO(s32 value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 	TP_ARGS(value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) DEFINE_EVENT(cpu_latency_qos_request, pm_qos_update_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 	TP_PROTO(s32 value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 	TP_ARGS(value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) DEFINE_EVENT(cpu_latency_qos_request, pm_qos_remove_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) 	TP_PROTO(s32 value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 	TP_ARGS(value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404)  * General PM QoS events used for updates of PM QoS request lists
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) DECLARE_EVENT_CLASS(pm_qos_update,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 	TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) 	TP_ARGS(action, prev_value, curr_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 		__field( enum pm_qos_req_action, action         )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) 		__field( int,                    prev_value     )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 		__field( int,                    curr_value     )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) 		__entry->action = action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 		__entry->prev_value = prev_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) 		__entry->curr_value = curr_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) 	TP_printk("action=%s prev_value=%d curr_value=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 		  __print_symbolic(__entry->action,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 			{ PM_QOS_ADD_REQ,	"ADD_REQ" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 			{ PM_QOS_UPDATE_REQ,	"UPDATE_REQ" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 			{ PM_QOS_REMOVE_REQ,	"REMOVE_REQ" }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 		  __entry->prev_value, __entry->curr_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) DEFINE_EVENT(pm_qos_update, pm_qos_update_target,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 	TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 	TP_ARGS(action, prev_value, curr_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) DEFINE_EVENT_PRINT(pm_qos_update, pm_qos_update_flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 	TP_PROTO(enum pm_qos_req_action action, int prev_value, int curr_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) 	TP_ARGS(action, prev_value, curr_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) 	TP_printk("action=%s prev_value=0x%x curr_value=0x%x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 		  __print_symbolic(__entry->action,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) 			{ PM_QOS_ADD_REQ,	"ADD_REQ" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) 			{ PM_QOS_UPDATE_REQ,	"UPDATE_REQ" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 			{ PM_QOS_REMOVE_REQ,	"REMOVE_REQ" }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 		  __entry->prev_value, __entry->curr_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) DECLARE_EVENT_CLASS(dev_pm_qos_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) 	TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 		 s32 new_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 	TP_ARGS(name, type, new_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) 		__string( name,                    name         )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 		__field( enum dev_pm_qos_req_type, type         )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 		__field( s32,                      new_value    )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) 		__assign_str(name, name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) 		__entry->type = type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) 		__entry->new_value = new_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) 	TP_printk("device=%s type=%s new_value=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) 		  __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 		  __print_symbolic(__entry->type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) 			{ DEV_PM_QOS_RESUME_LATENCY, "DEV_PM_QOS_RESUME_LATENCY" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) 			{ DEV_PM_QOS_FLAGS, "DEV_PM_QOS_FLAGS" }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 		  __entry->new_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_add_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 	TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) 		 s32 new_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) 	TP_ARGS(name, type, new_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_update_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) 	TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) 		 s32 new_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) 	TP_ARGS(name, type, new_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_remove_request,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) 	TP_PROTO(const char *name, enum dev_pm_qos_req_type type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) 		 s32 new_value),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) 	TP_ARGS(name, type, new_value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) #endif /* _TRACE_POWER_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) #include <trace/define_trace.h>