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 lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #if !defined(_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #define _TRACE_LOCK_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/lockdep.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #ifdef CONFIG_LOCKDEP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) TRACE_EVENT(lock_acquire,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	TP_PROTO(struct lockdep_map *lock, unsigned int subclass,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 		int trylock, int read, int check,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 		struct lockdep_map *next_lock, unsigned long ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 		__field(unsigned int, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 		__string(name, lock->name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 		__field(void *, lockdep_addr)
^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->flags = (trylock ? 1 : 0) | (read ? 2 : 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 		__assign_str(name, lock->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 		__entry->lockdep_addr = lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	TP_printk("%p %s%s%s", __entry->lockdep_addr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 		  (__entry->flags & 1) ? "try " : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 		  (__entry->flags & 2) ? "read " : "",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 		  __get_str(name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) DECLARE_EVENT_CLASS(lock,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 	TP_ARGS(lock, ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 		__string(	name, 	lock->name	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 		__field(	void *, lockdep_addr	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 		__assign_str(name, lock->name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 		__entry->lockdep_addr = lock;
^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_printk("%p %s",  __entry->lockdep_addr, __get_str(name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) DEFINE_EVENT(lock, lock_release,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	TP_ARGS(lock, ip)
^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) #ifdef CONFIG_LOCK_STAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) DEFINE_EVENT(lock, lock_contended,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) 	TP_ARGS(lock, ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) DEFINE_EVENT(lock, lock_acquired,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) 	TP_ARGS(lock, ip)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) #endif /* _TRACE_LOCK_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) #include <trace/define_trace.h>