Lines Matching refs:bit
181 void irq_matrix_assign_system(struct irq_matrix *m, unsigned int bit, in irq_matrix_assign_system() argument
186 BUG_ON(bit > m->matrix_bits); in irq_matrix_assign_system()
189 set_bit(bit, m->system_map); in irq_matrix_assign_system()
191 BUG_ON(!test_and_clear_bit(bit, cm->alloc_map)); in irq_matrix_assign_system()
195 if (bit >= m->alloc_start && bit < m->alloc_end) in irq_matrix_assign_system()
198 trace_irq_matrix_assign_system(bit, m); in irq_matrix_assign_system()
216 unsigned int bit; in irq_matrix_reserve_managed() local
218 bit = matrix_alloc_area(m, cm, 1, true); in irq_matrix_reserve_managed()
219 if (bit >= m->alloc_end) in irq_matrix_reserve_managed()
226 trace_irq_matrix_reserve_managed(bit, cpu, m, cm); in irq_matrix_reserve_managed()
257 unsigned int bit, end = m->alloc_end; in irq_matrix_remove_managed() local
265 bit = find_first_bit(m->scratch_map, end); in irq_matrix_remove_managed()
266 if (WARN_ON_ONCE(bit >= end)) in irq_matrix_remove_managed()
269 clear_bit(bit, cm->managed_map); in irq_matrix_remove_managed()
276 trace_irq_matrix_remove_managed(bit, cpu, m, cm); in irq_matrix_remove_managed()
289 unsigned int bit, cpu, end; in irq_matrix_alloc_managed() local
303 bit = find_first_bit(m->scratch_map, end); in irq_matrix_alloc_managed()
304 if (bit >= end) in irq_matrix_alloc_managed()
306 set_bit(bit, cm->alloc_map); in irq_matrix_alloc_managed()
311 trace_irq_matrix_alloc_managed(bit, cpu, m, cm); in irq_matrix_alloc_managed()
312 return bit; in irq_matrix_alloc_managed()
322 void irq_matrix_assign(struct irq_matrix *m, unsigned int bit) in irq_matrix_assign() argument
326 if (WARN_ON_ONCE(bit < m->alloc_start || bit >= m->alloc_end)) in irq_matrix_assign()
328 if (WARN_ON_ONCE(test_and_set_bit(bit, cm->alloc_map))) in irq_matrix_assign()
334 trace_irq_matrix_assign(bit, smp_processor_id(), m, cm); in irq_matrix_assign()
380 unsigned int cpu, bit; in irq_matrix_alloc() local
395 bit = matrix_alloc_area(m, cm, 1, false); in irq_matrix_alloc()
396 if (bit >= m->alloc_end) in irq_matrix_alloc()
405 trace_irq_matrix_alloc(bit, cpu, m, cm); in irq_matrix_alloc()
406 return bit; in irq_matrix_alloc()
419 unsigned int bit, bool managed) in irq_matrix_free() argument
423 if (WARN_ON_ONCE(bit < m->alloc_start || bit >= m->alloc_end)) in irq_matrix_free()
426 if (WARN_ON_ONCE(!test_and_clear_bit(bit, cm->alloc_map))) in irq_matrix_free()
441 trace_irq_matrix_free(bit, cpu, m, cm); in irq_matrix_free()