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

fsi: core: Add trace events for scan and unregister

Add more trace events for the scanning and unregistration
functions for debug purposes.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20230612195657.245125-9-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>

authored by

Eddie James and committed by
Joel Stanley
02c8fec0 52300909

+35
+4
drivers/fsi/fsi-core.c
··· 1199 1199 { 1200 1200 int link, rc; 1201 1201 1202 + trace_fsi_master_scan(master, true); 1202 1203 for (link = 0; link < master->n_links; link++) { 1203 1204 rc = fsi_master_link_enable(master, link); 1204 1205 if (rc) { ··· 1241 1240 1242 1241 static void fsi_master_unscan(struct fsi_master *master) 1243 1242 { 1243 + trace_fsi_master_scan(master, false); 1244 1244 device_for_each_child(&master->dev, NULL, fsi_master_remove_slave); 1245 1245 } 1246 1246 ··· 1330 1328 1331 1329 void fsi_master_unregister(struct fsi_master *master) 1332 1330 { 1331 + trace_fsi_master_unregister(master); 1332 + 1333 1333 if (master->idx >= 0) { 1334 1334 ida_simple_remove(&master_ida, master->idx); 1335 1335 master->idx = -1;
+31
include/trace/events/fsi.h
··· 122 122 ) 123 123 ); 124 124 125 + TRACE_EVENT(fsi_master_scan, 126 + TP_PROTO(const struct fsi_master *master, bool scan), 127 + TP_ARGS(master, scan), 128 + TP_STRUCT__entry( 129 + __field(int, master_idx) 130 + __field(int, n_links) 131 + __field(bool, scan) 132 + ), 133 + TP_fast_assign( 134 + __entry->master_idx = master->idx; 135 + __entry->n_links = master->n_links; 136 + __entry->scan = scan; 137 + ), 138 + TP_printk("fsi%d (%d links) %s", __entry->master_idx, __entry->n_links, 139 + __entry->scan ? "scan" : "unscan") 140 + ); 141 + 142 + TRACE_EVENT(fsi_master_unregister, 143 + TP_PROTO(const struct fsi_master *master), 144 + TP_ARGS(master), 145 + TP_STRUCT__entry( 146 + __field(int, master_idx) 147 + __field(int, n_links) 148 + ), 149 + TP_fast_assign( 150 + __entry->master_idx = master->idx; 151 + __entry->n_links = master->n_links; 152 + ), 153 + TP_printk("fsi%d (%d links)", __entry->master_idx, __entry->n_links) 154 + ); 155 + 125 156 TRACE_EVENT(fsi_slave_init, 126 157 TP_PROTO(const struct fsi_slave *slave), 127 158 TP_ARGS(slave),