Skip to content

Commit 0d89141

Browse files
committed
firewire: ohci: add tracepoints event for hardIRQ event
1394 OHCI hardware triggers PCI interrupts to notify any events to software. Current driver for the hardware is programmed by the typical way to utilize top- and bottom- halves, thus it has a timing gap to handle the notification in softIRQ (tasklet). This commit adds a tracepoint event for the hardIRQ event. The comparison of the tracepoint event to tracepoints events in firewire subsystem is helpful to diagnose the timing gap. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent 001c1ff commit 0d89141

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

drivers/firewire/ohci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,6 +2185,7 @@ static irqreturn_t irq_handler(int irq, void *data)
21852185
*/
21862186
reg_write(ohci, OHCI1394_IntEventClear,
21872187
event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr));
2188+
trace_irqs(ohci->card.index, event);
21882189
log_irqs(ohci, event);
21892190
// The flag is masked again at bus_reset_work() scheduled by selfID event.
21902191
if (event & OHCI1394_busReset)

include/trace/events/firewire_ohci.h

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,38 @@
99

1010
#include <linux/tracepoint.h>
1111

12-
// Placeholder for future use.
12+
TRACE_EVENT(irqs,
13+
TP_PROTO(unsigned int card_index, u32 events),
14+
TP_ARGS(card_index, events),
15+
TP_STRUCT__entry(
16+
__field(u8, card_index)
17+
__field(u32, events)
18+
),
19+
TP_fast_assign(
20+
__entry->card_index = card_index;
21+
__entry->events = events;
22+
),
23+
TP_printk(
24+
"card_index=%u events=%s",
25+
__entry->card_index,
26+
__print_flags(__entry->events, "|",
27+
{ OHCI1394_selfIDComplete, "selfIDComplete" },
28+
{ OHCI1394_RQPkt, "RQPkt" },
29+
{ OHCI1394_RSPkt, "RSPkt" },
30+
{ OHCI1394_reqTxComplete, "reqTxComplete" },
31+
{ OHCI1394_respTxComplete, "respTxComplete" },
32+
{ OHCI1394_isochRx, "isochRx" },
33+
{ OHCI1394_isochTx, "isochTx" },
34+
{ OHCI1394_postedWriteErr, "postedWriteErr" },
35+
{ OHCI1394_cycleTooLong, "cycleTooLong" },
36+
{ OHCI1394_cycle64Seconds, "cycle64Seconds" },
37+
{ OHCI1394_cycleInconsistent, "cycleInconsistent" },
38+
{ OHCI1394_regAccessFail, "regAccessFail" },
39+
{ OHCI1394_unrecoverableError, "unrecoverableError" },
40+
{ OHCI1394_busReset, "busReset" }
41+
)
42+
)
43+
);
1344

1445
#endif // _FIREWIRE_OHCI_TRACE_EVENT_H
1546

0 commit comments

Comments
 (0)