Lines Matching refs:bit
164 int bit; in tprof_amd_start() local
166 while ((bit = ffs(runmask)) != 0) { in tprof_amd_start()
167 bit--; in tprof_amd_start()
168 CLR(runmask, __BIT(bit)); in tprof_amd_start()
169 wrmsr(PERFEVTSEL(bit), rdmsr(PERFEVTSEL(bit)) | PESR_EN); in tprof_amd_start()
176 int bit; in tprof_amd_stop() local
178 while ((bit = ffs(stopmask)) != 0) { in tprof_amd_stop()
179 bit--; in tprof_amd_stop()
180 CLR(stopmask, __BIT(bit)); in tprof_amd_stop()
181 wrmsr(PERFEVTSEL(bit), rdmsr(PERFEVTSEL(bit)) & ~PESR_EN); in tprof_amd_stop()
190 int bit; in tprof_amd_nmi() local
195 while ((bit = ffs(mask)) != 0) { in tprof_amd_nmi()
196 bit--; in tprof_amd_nmi()
197 CLR(mask, __BIT(bit)); in tprof_amd_nmi()
200 uint64_t ctr = tprof_amd_counter_read(bit); in tprof_amd_nmi()
204 if (ISSET(sc->sc_ctr_prof_mask, __BIT(bit))) { in tprof_amd_nmi()
206 tprof_amd_counter_write(bit, in tprof_amd_nmi()
207 sc->sc_count[bit].ctr_counter_reset_val); in tprof_amd_nmi()
208 counters_offset[bit] += in tprof_amd_nmi()
209 sc->sc_count[bit].ctr_counter_val + ctr; in tprof_amd_nmi()
217 tfi.tfi_counter = bit; in tprof_amd_nmi()
222 counters_offset[bit] += __BIT(COUNTER_BITWIDTH); in tprof_amd_nmi()