1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 25ba9ac8eSThomas Gleixner #undef TRACE_SYSTEM 35ba9ac8eSThomas Gleixner #define TRACE_SYSTEM cpuhp 45ba9ac8eSThomas Gleixner 55ba9ac8eSThomas Gleixner #if !defined(_TRACE_CPUHP_H) || defined(TRACE_HEADER_MULTI_READ) 65ba9ac8eSThomas Gleixner #define _TRACE_CPUHP_H 75ba9ac8eSThomas Gleixner 85ba9ac8eSThomas Gleixner #include <linux/tracepoint.h> 95ba9ac8eSThomas Gleixner 105ba9ac8eSThomas Gleixner TRACE_EVENT(cpuhp_enter, 115ba9ac8eSThomas Gleixner 125ba9ac8eSThomas Gleixner TP_PROTO(unsigned int cpu, 135ba9ac8eSThomas Gleixner int target, 145ba9ac8eSThomas Gleixner int idx, 155ba9ac8eSThomas Gleixner int (*fun)(unsigned int)), 165ba9ac8eSThomas Gleixner 175ba9ac8eSThomas Gleixner TP_ARGS(cpu, target, idx, fun), 185ba9ac8eSThomas Gleixner 195ba9ac8eSThomas Gleixner TP_STRUCT__entry( 205ba9ac8eSThomas Gleixner __field( unsigned int, cpu ) 215ba9ac8eSThomas Gleixner __field( int, target ) 225ba9ac8eSThomas Gleixner __field( int, idx ) 235ba9ac8eSThomas Gleixner __field( void *, fun ) 245ba9ac8eSThomas Gleixner ), 255ba9ac8eSThomas Gleixner 265ba9ac8eSThomas Gleixner TP_fast_assign( 275ba9ac8eSThomas Gleixner __entry->cpu = cpu; 285ba9ac8eSThomas Gleixner __entry->target = target; 295ba9ac8eSThomas Gleixner __entry->idx = idx; 305ba9ac8eSThomas Gleixner __entry->fun = fun; 315ba9ac8eSThomas Gleixner ), 325ba9ac8eSThomas Gleixner 33*d75f773cSSakari Ailus TP_printk("cpu: %04u target: %3d step: %3d (%ps)", 345ba9ac8eSThomas Gleixner __entry->cpu, __entry->target, __entry->idx, __entry->fun) 355ba9ac8eSThomas Gleixner ); 365ba9ac8eSThomas Gleixner 37cf392d10SThomas Gleixner TRACE_EVENT(cpuhp_multi_enter, 38cf392d10SThomas Gleixner 39cf392d10SThomas Gleixner TP_PROTO(unsigned int cpu, 40cf392d10SThomas Gleixner int target, 41cf392d10SThomas Gleixner int idx, 42cf392d10SThomas Gleixner int (*fun)(unsigned int, struct hlist_node *), 43cf392d10SThomas Gleixner struct hlist_node *node), 44cf392d10SThomas Gleixner 45cf392d10SThomas Gleixner TP_ARGS(cpu, target, idx, fun, node), 46cf392d10SThomas Gleixner 47cf392d10SThomas Gleixner TP_STRUCT__entry( 48cf392d10SThomas Gleixner __field( unsigned int, cpu ) 49cf392d10SThomas Gleixner __field( int, target ) 50cf392d10SThomas Gleixner __field( int, idx ) 51cf392d10SThomas Gleixner __field( void *, fun ) 52cf392d10SThomas Gleixner ), 53cf392d10SThomas Gleixner 54cf392d10SThomas Gleixner TP_fast_assign( 55cf392d10SThomas Gleixner __entry->cpu = cpu; 56cf392d10SThomas Gleixner __entry->target = target; 57cf392d10SThomas Gleixner __entry->idx = idx; 58cf392d10SThomas Gleixner __entry->fun = fun; 59cf392d10SThomas Gleixner ), 60cf392d10SThomas Gleixner 61*d75f773cSSakari Ailus TP_printk("cpu: %04u target: %3d step: %3d (%ps)", 62cf392d10SThomas Gleixner __entry->cpu, __entry->target, __entry->idx, __entry->fun) 63cf392d10SThomas Gleixner ); 64cf392d10SThomas Gleixner 655ba9ac8eSThomas Gleixner TRACE_EVENT(cpuhp_exit, 665ba9ac8eSThomas Gleixner 675ba9ac8eSThomas Gleixner TP_PROTO(unsigned int cpu, 685ba9ac8eSThomas Gleixner int state, 695ba9ac8eSThomas Gleixner int idx, 705ba9ac8eSThomas Gleixner int ret), 715ba9ac8eSThomas Gleixner 725ba9ac8eSThomas Gleixner TP_ARGS(cpu, state, idx, ret), 735ba9ac8eSThomas Gleixner 745ba9ac8eSThomas Gleixner TP_STRUCT__entry( 755ba9ac8eSThomas Gleixner __field( unsigned int, cpu ) 765ba9ac8eSThomas Gleixner __field( int, state ) 775ba9ac8eSThomas Gleixner __field( int, idx ) 785ba9ac8eSThomas Gleixner __field( int, ret ) 795ba9ac8eSThomas Gleixner ), 805ba9ac8eSThomas Gleixner 815ba9ac8eSThomas Gleixner TP_fast_assign( 825ba9ac8eSThomas Gleixner __entry->cpu = cpu; 835ba9ac8eSThomas Gleixner __entry->state = state; 845ba9ac8eSThomas Gleixner __entry->idx = idx; 855ba9ac8eSThomas Gleixner __entry->ret = ret; 865ba9ac8eSThomas Gleixner ), 875ba9ac8eSThomas Gleixner 885ba9ac8eSThomas Gleixner TP_printk(" cpu: %04u state: %3d step: %3d ret: %d", 895ba9ac8eSThomas Gleixner __entry->cpu, __entry->state, __entry->idx, __entry->ret) 905ba9ac8eSThomas Gleixner ); 915ba9ac8eSThomas Gleixner 925ba9ac8eSThomas Gleixner #endif 935ba9ac8eSThomas Gleixner 945ba9ac8eSThomas Gleixner /* This part must be outside protection */ 955ba9ac8eSThomas Gleixner #include <trace/define_trace.h> 96