| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
|
| 3 |
#if !defined(_POWERNV_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) |
| 4 |
#define _POWERNV_TRACE_H |
| 5 |
|
| 6 |
#include <linux/cpufreq.h> |
| 7 |
#include <linux/tracepoint.h> |
| 8 |
#include <linux/trace_events.h> |
| 9 |
|
| 10 |
#undef TRACE_SYSTEM |
| 11 |
#define TRACE_SYSTEM power |
| 12 |
|
| 13 |
TRACE_EVENT(powernv_throttle, |
| 14 |
|
| 15 |
TP_PROTO(int chip_id, const char *reason, int pmax), |
| 16 |
|
| 17 |
TP_ARGS(chip_id, reason, pmax), |
| 18 |
|
| 19 |
TP_STRUCT__entry( |
| 20 |
__field(int, chip_id) |
| 21 |
__string(reason, reason) |
| 22 |
__field(int, pmax) |
| 23 |
), |
| 24 |
|
| 25 |
TP_fast_assign( |
| 26 |
__entry->chip_id = chip_id; |
| 27 |
__assign_str(reason); |
| 28 |
__entry->pmax = pmax; |
| 29 |
), |
| 30 |
|
| 31 |
TP_printk("Chip %d Pmax %d %s", __entry->chip_id, |
| 32 |
__entry->pmax, __get_str(reason)) |
| 33 |
); |
| 34 |
|
| 35 |
#endif /* _POWERNV_TRACE_H */ |
| 36 |
|
| 37 |
/* This part must be outside protection */ |
| 38 |
#undef TRACE_INCLUDE_PATH |
| 39 |
#define TRACE_INCLUDE_PATH . |
| 40 |
|
| 41 |
#undef TRACE_INCLUDE_FILE |
| 42 |
#define TRACE_INCLUDE_FILE powernv-trace |
| 43 |
|
| 44 |
#include <trace/define_trace.h> |