Lines Matching +full:smp +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0
15 * irq_reserve_ipi() - Setup an IPI to destination cpumask
26 unsigned int nr_irqs, offset; in irq_reserve_ipi() local
32 return -EINVAL; in irq_reserve_ipi()
37 return -EINVAL; in irq_reserve_ipi()
43 return -EINVAL; in irq_reserve_ipi()
54 offset = 0; in irq_reserve_ipi()
64 offset = cpumask_first(dest); in irq_reserve_ipi()
69 next = cpumask_next_zero(offset, dest); in irq_reserve_ipi()
74 return -EINVAL; in irq_reserve_ipi()
78 virq = irq_domain_alloc_descs(-1, nr_irqs, 0, NUMA_NO_NODE, NULL); in irq_reserve_ipi()
81 return -ENOMEM; in irq_reserve_ipi()
94 cpumask_copy(data->common->affinity, dest); in irq_reserve_ipi()
95 data->common->ipi_offset = offset; in irq_reserve_ipi()
102 return -EBUSY; in irq_reserve_ipi()
106 * irq_destroy_ipi() - unreserve an IPI that was previously allocated
123 return -EINVAL; in irq_destroy_ipi()
125 domain = data->domain; in irq_destroy_ipi()
127 return -EINVAL; in irq_destroy_ipi()
131 return -EINVAL; in irq_destroy_ipi()
140 return -EINVAL; in irq_destroy_ipi()
143 irq = irq + cpumask_first(dest) - data->common->ipi_offset; in irq_destroy_ipi()
154 * ipi_get_hwirq - Get the hwirq associated with an IPI to a CPU
181 if (irq_domain_is_ipi_per_cpu(data->domain)) in ipi_get_hwirq()
182 data = irq_get_irq_data(irq + cpu - data->common->ipi_offset); in ipi_get_hwirq()
194 return -EINVAL; in ipi_send_verify()
196 if (!chip->ipi_send_single && !chip->ipi_send_mask) in ipi_send_verify()
197 return -EINVAL; in ipi_send_verify()
200 return -EINVAL; in ipi_send_verify()
204 return -EINVAL; in ipi_send_verify()
208 return -EINVAL; in ipi_send_verify()
211 return -EINVAL; in ipi_send_verify()
217 * __ipi_send_single - send an IPI to a target Linux SMP CPU
234 * Minimise the overhead by omitting the checks for Linux SMP IPIs. in __ipi_send_single()
239 return -EINVAL; in __ipi_send_single()
241 if (!chip->ipi_send_single) { in __ipi_send_single()
242 chip->ipi_send_mask(data, cpumask_of(cpu)); in __ipi_send_single()
247 if (irq_domain_is_ipi_per_cpu(data->domain) && in __ipi_send_single()
248 cpu != data->common->ipi_offset) { in __ipi_send_single()
250 unsigned irq = data->irq + cpu - data->common->ipi_offset; in __ipi_send_single()
254 chip->ipi_send_single(data, cpu); in __ipi_send_single()
259 * __ipi_send_mask - send an IPI to target Linux SMP CPU(s)
277 * Minimise the overhead by omitting the checks for Linux SMP IPIs. in __ipi_send_mask()
282 return -EINVAL; in __ipi_send_mask()
284 if (chip->ipi_send_mask) { in __ipi_send_mask()
285 chip->ipi_send_mask(data, dest); in __ipi_send_mask()
289 if (irq_domain_is_ipi_per_cpu(data->domain)) { in __ipi_send_mask()
290 unsigned int base = data->irq; in __ipi_send_mask()
293 unsigned irq = base + cpu - data->common->ipi_offset; in __ipi_send_mask()
296 chip->ipi_send_single(data, cpu); in __ipi_send_mask()
300 chip->ipi_send_single(data, cpu); in __ipi_send_mask()
306 * ipi_send_single - Send an IPI to a single CPU
320 return -EINVAL; in ipi_send_single()
327 * ipi_send_mask - Send an IPI to target CPU(s)
341 return -EINVAL; in ipi_send_mask()