• Home
  • Raw
  • Download

Lines Matching refs:trc

32 	struct snic_trc *trc = &snic_glob->trc;  in snic_get_trc_buf()  local
36 spin_lock_irqsave(&trc->lock, flags); in snic_get_trc_buf()
37 td = &trc->buf[trc->wr_idx]; in snic_get_trc_buf()
38 trc->wr_idx++; in snic_get_trc_buf()
40 if (trc->wr_idx == trc->max_idx) in snic_get_trc_buf()
41 trc->wr_idx = 0; in snic_get_trc_buf()
43 if (trc->wr_idx != trc->rd_idx) { in snic_get_trc_buf()
44 spin_unlock_irqrestore(&trc->lock, flags); in snic_get_trc_buf()
49 trc->rd_idx++; in snic_get_trc_buf()
50 if (trc->rd_idx == trc->max_idx) in snic_get_trc_buf()
51 trc->rd_idx = 0; in snic_get_trc_buf()
54 spin_unlock_irqrestore(&trc->lock, flags); in snic_get_trc_buf()
92 struct snic_trc *trc = &snic_glob->trc; in snic_get_trc_data() local
95 spin_lock_irqsave(&trc->lock, flags); in snic_get_trc_data()
96 if (trc->rd_idx == trc->wr_idx) { in snic_get_trc_data()
97 spin_unlock_irqrestore(&trc->lock, flags); in snic_get_trc_data()
101 td = &trc->buf[trc->rd_idx]; in snic_get_trc_data()
105 spin_unlock_irqrestore(&trc->lock, flags); in snic_get_trc_data()
110 trc->rd_idx++; in snic_get_trc_data()
111 if (trc->rd_idx == trc->max_idx) in snic_get_trc_data()
112 trc->rd_idx = 0; in snic_get_trc_data()
113 spin_unlock_irqrestore(&trc->lock, flags); in snic_get_trc_data()
124 struct snic_trc *trc = &snic_glob->trc; in snic_trc_init() local
138 trc->buf = (struct snic_trc_data *) tbuf; in snic_trc_init()
139 spin_lock_init(&trc->lock); in snic_trc_init()
143 trc->max_idx = (tbuf_sz / SNIC_TRC_ENTRY_SZ); in snic_trc_init()
144 trc->rd_idx = trc->wr_idx = 0; in snic_trc_init()
145 trc->enable = true; in snic_trc_init()
159 struct snic_trc *trc = &snic_glob->trc; in snic_trc_free() local
161 trc->enable = false; in snic_trc_free()
164 if (trc->buf) { in snic_trc_free()
165 vfree(trc->buf); in snic_trc_free()
166 trc->buf = NULL; in snic_trc_free()