1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 #define TRACE_SYSTEM mv88e6xxx
8 #if !defined(_MV88E6XXX_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define _MV88E6XXX_TRACE_H
11 #include <linux/device.h>
12 #include <linux/if_ether.h>
13 #include <linux/tracepoint.h>
15 DECLARE_EVENT_CLASS(mv88e6xxx_atu_violation
,
17 TP_PROTO(const struct device
*dev
, int spid
, u16 portvec
,
18 const unsigned char *addr
, u16 fid
),
20 TP_ARGS(dev
, spid
, portvec
, addr
, fid
),
23 __string(name
, dev_name(dev
))
26 __array(unsigned char, addr
, ETH_ALEN
)
33 __entry
->portvec
= portvec
;
34 memcpy(__entry
->addr
, addr
, ETH_ALEN
);
38 TP_printk("dev %s spid %d portvec 0x%x addr %pM fid %u",
39 __get_str(name
), __entry
->spid
, __entry
->portvec
,
40 __entry
->addr
, __entry
->fid
)
43 DEFINE_EVENT(mv88e6xxx_atu_violation
, mv88e6xxx_atu_member_violation
,
44 TP_PROTO(const struct device
*dev
, int spid
, u16 portvec
,
45 const unsigned char *addr
, u16 fid
),
46 TP_ARGS(dev
, spid
, portvec
, addr
, fid
));
48 DEFINE_EVENT(mv88e6xxx_atu_violation
, mv88e6xxx_atu_miss_violation
,
49 TP_PROTO(const struct device
*dev
, int spid
, u16 portvec
,
50 const unsigned char *addr
, u16 fid
),
51 TP_ARGS(dev
, spid
, portvec
, addr
, fid
));
53 DEFINE_EVENT(mv88e6xxx_atu_violation
, mv88e6xxx_atu_full_violation
,
54 TP_PROTO(const struct device
*dev
, int spid
, u16 portvec
,
55 const unsigned char *addr
, u16 fid
),
56 TP_ARGS(dev
, spid
, portvec
, addr
, fid
));
58 DECLARE_EVENT_CLASS(mv88e6xxx_vtu_violation
,
60 TP_PROTO(const struct device
*dev
, int spid
, u16 vid
),
62 TP_ARGS(dev
, spid
, vid
),
65 __string(name
, dev_name(dev
))
76 TP_printk("dev %s spid %d vid %u",
77 __get_str(name
), __entry
->spid
, __entry
->vid
)
80 DEFINE_EVENT(mv88e6xxx_vtu_violation
, mv88e6xxx_vtu_member_violation
,
81 TP_PROTO(const struct device
*dev
, int spid
, u16 vid
),
82 TP_ARGS(dev
, spid
, vid
));
84 DEFINE_EVENT(mv88e6xxx_vtu_violation
, mv88e6xxx_vtu_miss_violation
,
85 TP_PROTO(const struct device
*dev
, int spid
, u16 vid
),
86 TP_ARGS(dev
, spid
, vid
));
88 #endif /* _MV88E6XXX_TRACE_H */
90 /* We don't want to use include/trace/events */
91 #undef TRACE_INCLUDE_PATH
92 #define TRACE_INCLUDE_PATH .
93 #undef TRACE_INCLUDE_FILE
94 #define TRACE_INCLUDE_FILE trace
95 /* This part must be outside protection */
96 #include <trace/define_trace.h>