Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\matrix.c Create Date:2022-07-28 10:17:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:q_matrix_alloc_managed - Allocate a managed interrupt in a CPU map*@m: Matrix pointer*@cpu: On which CPU the interrupt should be allocated

Proto:int irq_matrix_alloc_managed(struct irq_matrix *m, const struct cpumask *msk, unsigned int *mapped_cpu)

Type:int

Parameter:

TypeParameterName
struct irq_matrix *m
const struct cpumask *msk
unsigned int *mapped_cpu
288  end = alloc_end
291  If pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. Then Return -EINVAL
294  cpu = Find the best CPU which has the lowest number of managed IRQs allocated
295  If cpu == UINT_MAX Then Return -ENOSPC
298  cm = per_cpu_ptr(maps, cpu)
299  end = alloc_end
301  bitmap_andnot(scratch_map, managed_map, alloc_map, end)
302  bit = find the first set bit in a memory region(scratch_map, end)
303  If bit >= end Then Return -ENOSPC
305  Atomically set a bit in memory
306  allocated++
307  managed_allocated++
308  total_allocated++
309  mapped_cpu = cpu
310  trace_irq_matrix_alloc_managed(bit, cpu, m, cm)
311  Return bit