Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/20240625031806.956650-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+33 -1
+1
drivers/firewire/ohci.c
··· 2185 2185 */ 2186 2186 reg_write(ohci, OHCI1394_IntEventClear, 2187 2187 event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr)); 2188 + trace_irqs(ohci->card.index, event); 2188 2189 log_irqs(ohci, event); 2189 2190 // The flag is masked again at bus_reset_work() scheduled by selfID event. 2190 2191 if (event & OHCI1394_busReset)
+32 -1
include/trace/events/firewire_ohci.h
··· 9 9 10 10 #include <linux/tracepoint.h> 11 11 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 + ); 13 44 14 45 #endif // _FIREWIRE_OHCI_TRACE_EVENT_H 15 46