Skip to content

Commit 001c1ff

Browse files
committed
firewire: ohci: add support for Linux kernel tracepoints
The Linux Kernel Tracepoints framework is enough useful to trace the interaction between 1394 OHCI hardware and its driver. This commit adds firewire_ohci subsystem to use the framework. It is defined as the different subsystem from the existing firewire subsystem. The definition file for the existing subsystem is slightly changed so that both subsystems are available in 1394 OHCI driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent daf763c commit 001c1ff

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

drivers/firewire/ohci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545

4646
#include <trace/events/firewire.h>
4747

48+
#define CREATE_TRACE_POINTS
49+
#include <trace/events/firewire_ohci.h>
50+
4851
#define ohci_info(ohci, f, args...) dev_info(ohci->card.device, f, ##args)
4952
#define ohci_notice(ohci, f, args...) dev_notice(ohci->card.device, f, ##args)
5053
#define ohci_err(ohci, f, args...) dev_err(ohci->card.device, f, ##args)

include/trace/events/firewire.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
// Copyright (c) 2024 Takashi Sakamoto
33

4+
#undef TRACE_SYSTEM
45
#define TRACE_SYSTEM firewire
56

67
#if !defined(_FIREWIRE_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)

include/trace/events/firewire_ohci.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
// Copyright (c) 2024 Takashi Sakamoto
3+
4+
#undef TRACE_SYSTEM
5+
#define TRACE_SYSTEM firewire_ohci
6+
7+
#if !defined(_FIREWIRE_OHCI_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)
8+
#define _FIREWIRE_OHCI_TRACE_EVENT_H
9+
10+
#include <linux/tracepoint.h>
11+
12+
// Placeholder for future use.
13+
14+
#endif // _FIREWIRE_OHCI_TRACE_EVENT_H
15+
16+
#include <trace/define_trace.h>

0 commit comments

Comments
 (0)