Lines Matching +full:interrupt +full:- +full:affinity

1 // SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/interrupt.h>
60 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); in xics_update_irq_servers()
68 /* Global interrupt distribution server is specified in the last in xics_update_irq_servers()
69 * entry of "ibm,ppc-interrupt-gserver#s" property. Get the last in xics_update_irq_servers()
96 index = (1UL << xics_interrupt_server_size) - 1 - gserver; in xics_set_cpu_giq()
100 WARN(status < 0, "set-indicator(%d, %d, %u) returned %d\n", in xics_set_cpu_giq()
107 icp_ops->set_priority(LOWEST_PRIORITY); in xics_setup_cpu()
114 pr_err("Interrupt 0x%x (real) is invalid, disabling it.\n", vec); in xics_mask_unknown_vec()
118 xics_ics->mask_unknown(xics_ics, vec); in xics_mask_unknown_vec()
134 BUG_ON(request_irq(ipi, icp_ops->ipi_action, in xics_request_ipi()
144 smp_ops->cause_ipi = icp_ops->cause_ipi; in xics_smp_probe()
157 os_cppr->index = 0; in xics_teardown_cpu()
158 icp_ops->set_priority(0); in xics_teardown_cpu()
159 icp_ops->teardown_cpu(); in xics_teardown_cpu()
166 icp_ops->flush_ipi(); in xics_kexec_teardown_cpu()
192 /* Reject any interrupt that was queued to us... */ in xics_migrate_irqs_away()
193 icp_ops->set_priority(0); in xics_migrate_irqs_away()
195 /* Remove ourselves from the global interrupt queue */ in xics_migrate_irqs_away()
204 /* We can't set affinity on ISA interrupts */ in xics_migrate_irqs_away()
208 if (!desc->action) in xics_migrate_irqs_away()
219 if (!chip || !chip->irq_set_affinity) in xics_migrate_irqs_away()
222 raw_spin_lock_irqsave(&desc->lock, flags); in xics_migrate_irqs_away()
224 /* Locate interrupt server */ in xics_migrate_irqs_away()
225 server = xics_ics->get_server(xics_ics, irq); in xics_migrate_irqs_away()
241 pr_warn("IRQ %u affinity broken off cpu %u\n", in xics_migrate_irqs_away()
244 /* Reset affinity to all cpus */ in xics_migrate_irqs_away()
245 raw_spin_unlock_irqrestore(&desc->lock, flags); in xics_migrate_irqs_away()
249 raw_spin_unlock_irqrestore(&desc->lock, flags); in xics_migrate_irqs_away()
258 * interrupt beyond this point, but leave externals masked just to be in xics_migrate_irqs_away()
259 * safe. If we're using icp-opal this may actually allow all in xics_migrate_irqs_away()
262 icp_ops->set_priority(DEFAULT_PRIORITY); in xics_migrate_irqs_away()
271 * If the requested affinity is cpu_all_mask, we set global affinity.
292 return -1; in xics_get_irq_server()
312 return xics_ics->host_match(xics_ics, node) ? 1 : 0; in xics_host_match()
333 * actually works. The device-tree parsing will turn the LSIs in xics_host_map()
346 return -EINVAL; in xics_host_map()
348 if (xics_ics->check(xics_ics, hwirq)) in xics_host_map()
349 return -EINVAL; in xics_host_map()
352 irq_domain_set_info(domain, virq, hwirq, xics_ics->chip, in xics_host_map()
367 * we assume the LSB indicates a level interrupt. in xics_host_xlate()
385 * affect the resend function when re-enabling an edge interrupt. in xics_set_irq_type()
394 return -EINVAL; in xics_set_irq_type()
418 return xics_host_xlate(d, to_of_node(fwspec->fwnode), fwspec->param, in xics_host_domain_translate()
419 fwspec->param_count, hwirq, type); in xics_host_domain_translate()
437 irq_domain_set_info(domain, virq + i, hwirq + i, xics_ics->chip, in xics_host_domain_alloc()
467 return -ENOMEM; in xics_allocate_domain()
472 return -ENOMEM; in xics_allocate_domain()
491 /* We fetch the interrupt server size from the first ICS node in xics_get_server_size()
494 np = of_find_compatible_node(NULL, NULL, "ibm,ppc-xics"); in xics_get_server_size()
498 isize = of_get_property(np, "ibm,interrupt-server#-size", NULL); in xics_get_server_size()
507 int rc = -1; in xics_init()
514 if (rc == -ENODEV) in xics_init()
523 ppc_md.get_irq = icp_ops->get_irq; in xics_init()
526 xics_ipi_chip.irq_eoi = icp_ops->eoi; in xics_init()