The usage of in_interrupt) in driver code is phased out. The iwlwifi_dbg tracepoint records in_interrupt() seperately, but that's superfluous because the trace header already records all kind of state and context information like hardirq status, softirq status, preemption count etc. Aside of that the recording of in_interrupt() as boolean does not allow to distinguish between the possible contexts (hard interrupt, soft interrupt, bottom half disabled) while the trace header gives precise information. Remove the duplicate information from the tracepoint and fixup the caller. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Luca Coelho <luca@coelho.fi> Acked-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
81 lines
2.0 KiB
C
81 lines
2.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/******************************************************************************
|
|
*
|
|
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
|
*
|
|
* Contact Information:
|
|
* Intel Linux Wireless <linuxwifi@intel.com>
|
|
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#if !defined(__IWLWIFI_DEVICE_TRACE_MSG) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define __IWLWIFI_DEVICE_TRACE_MSG
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM iwlwifi_msg
|
|
|
|
#define MAX_MSG_LEN 110
|
|
|
|
DECLARE_EVENT_CLASS(iwlwifi_msg_event,
|
|
TP_PROTO(struct va_format *vaf),
|
|
TP_ARGS(vaf),
|
|
TP_STRUCT__entry(
|
|
__dynamic_array(char, msg, MAX_MSG_LEN)
|
|
),
|
|
TP_fast_assign(
|
|
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
|
|
MAX_MSG_LEN, vaf->fmt,
|
|
*vaf->va) >= MAX_MSG_LEN);
|
|
),
|
|
TP_printk("%s", __get_str(msg))
|
|
);
|
|
|
|
DEFINE_EVENT(iwlwifi_msg_event, iwlwifi_err,
|
|
TP_PROTO(struct va_format *vaf),
|
|
TP_ARGS(vaf)
|
|
);
|
|
|
|
DEFINE_EVENT(iwlwifi_msg_event, iwlwifi_warn,
|
|
TP_PROTO(struct va_format *vaf),
|
|
TP_ARGS(vaf)
|
|
);
|
|
|
|
DEFINE_EVENT(iwlwifi_msg_event, iwlwifi_info,
|
|
TP_PROTO(struct va_format *vaf),
|
|
TP_ARGS(vaf)
|
|
);
|
|
|
|
DEFINE_EVENT(iwlwifi_msg_event, iwlwifi_crit,
|
|
TP_PROTO(struct va_format *vaf),
|
|
TP_ARGS(vaf)
|
|
);
|
|
|
|
TRACE_EVENT(iwlwifi_dbg,
|
|
TP_PROTO(u32 level, const char *function,
|
|
struct va_format *vaf),
|
|
TP_ARGS(level, function, vaf),
|
|
TP_STRUCT__entry(
|
|
__field(u32, level)
|
|
__string(function, function)
|
|
__dynamic_array(char, msg, MAX_MSG_LEN)
|
|
),
|
|
TP_fast_assign(
|
|
__entry->level = level;
|
|
__assign_str(function, function);
|
|
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
|
|
MAX_MSG_LEN, vaf->fmt,
|
|
*vaf->va) >= MAX_MSG_LEN);
|
|
),
|
|
TP_printk("%s", __get_str(msg))
|
|
);
|
|
#endif /* __IWLWIFI_DEVICE_TRACE_MSG */
|
|
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH .
|
|
#undef TRACE_INCLUDE_FILE
|
|
#define TRACE_INCLUDE_FILE iwl-devtrace-msg
|
|
#include <trace/define_trace.h>
|