函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\ipi.c Create Date:2022-07-27 11:15:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:q_reserve_ipi() - Setup an IPI to destination cpumask*@domain: IPI domain*@dest: cpumask of cpus which can receive the IPI* Allocate a virq that can be used to send IPI to any CPU in dest mask

函数原型:int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest)

返回类型:int

参数:

类型参数名称
struct irq_domain *domain
const struct cpumask *dest
30  如果非domain或非irq_domain_is_ipi(domain)则
31  打印警告信息("Reservation on a non IPI domain\n")
32  返回:负EINVAL
35  如果非pumask_subset - (*src1p & ~*src2p) == 0*@src1p: the first input*@src2p: the second input* Returns 1 if *@src1p is a subset of *@src2p, else returns 0
36  打印警告信息("Reservation is not in possible_cpu_mask\n")
37  返回:负EINVAL
40  nr_irqs等于pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
41  如果非nr_irqs
42  打印警告信息("Reservation for empty destination mask\n")
43  返回:负EINVAL
46  如果irq_domain_is_ipi_single(domain)则
53  nr_irqs等于1
54  offset等于0
55  否则
64  offset等于Uniprocessor. Assume all masks are "1".
69  next等于cpumask_next_zero(offset, dest)
70  如果next小于nr_cpu_idsnext等于pumask_next - get the next cpu in a cpumask*@n: the cpu prior to the place to search (ie. return will be > @n)*@srcp: the cpumask pointer* Returns >= nr_cpu_ids if no further cpus set.
72  如果next小于nr_cpu_ids
73  打印警告信息("Destination mask has holes\n")
74  返回:负EINVAL
78  virq等于irq_domain_alloc_descs( - 1, nr_irqs, 0, NUMA_NO_NODE, NULL)
79  如果virq小于等于0则
80  打印警告信息("Can't reserve IPI, failed to alloc descs\n")
81  返回:负ENOMEM
84  virq等于__irq_domain_alloc_irqs(domain, virq, nr_irqs, NUMA_NO_NODE, (void * )dest, true, NULL)
87  如果virq小于等于0则
88  打印警告信息("Can't reserve IPI, failed to alloc hw irqs\n")
89  转到:free_descs
92 i小于nr_irqs循环
93  data等于irq_get_irq_data(virq + i)
94  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
95  ipi_offset等于offset
96  irq_set_status_flags(virq + i, IRQ_NO_BALANCING)
98  返回:virq
100  free_descs :
101  q_free_descs - free irq descriptors*@from: Start of descriptor range*@cnt: Number of consecutive irqs to free
102  返回:负EBUSY