Lines Matching +full:message +full:- +full:handling +full:- +full:unit

1 // SPDX-License-Identifier: GPL-2.0-or-later
13 * - Fix various assumptions related to HW CPU numbers vs. linux CPU numbers
15 * - Implement proper handling of maxcpus=1/2 (that is, routing of irqs from
16 * a non-active node to the active node)
33 #include <asm/cell-regs.h>
52 unsigned char unit = bits.source & 0xf; in iic_pending_to_hwnum() local
60 return (node << IIC_IRQ_NODE_SHIFT) | (class << 4) | unit; in iic_pending_to_hwnum()
74 out_be64(&iic->regs->prio, iic->eoi_stack[--iic->eoi_ptr]); in iic_eoi()
75 BUG_ON(iic->eoi_ptr < 0); in iic_eoi()
79 .name = "CELL-IIC",
101 bits = in_be64(&node_iic->iic_is); in iic_ioexc_cascade()
104 /* pre-ack edge interrupts */ in iic_ioexc_cascade()
107 out_be64(&node_iic->iic_is, ack); in iic_ioexc_cascade()
109 for (cascade = 63; cascade >= 0; cascade--) in iic_ioexc_cascade()
113 /* post-ack level interrupts */ in iic_ioexc_cascade()
116 out_be64(&node_iic->iic_is, ack); in iic_ioexc_cascade()
118 chip->irq_eoi(&desc->irq_data); in iic_ioexc_cascade()
123 .name = "CELL-IOEX",
138 in_be64((u64 __iomem *) &iic->regs->pending_destr); in iic_get_irq()
144 iic->eoi_stack[++iic->eoi_ptr] = pending.prio; in iic_get_irq()
145 BUG_ON(iic->eoi_ptr > 15); in iic_get_irq()
151 out_be64(&this_cpu_ptr(&cpu_iic)->regs->prio, 0xff); in iic_setup_cpu()
166 return IIC_IRQ_TYPE_IPI + 0xf - msg; in iic_msg_to_irq()
171 out_be64(&per_cpu(cpu_iic, cpu).regs->generate, (0xf - msg) << 4); in iic_message_pass()
187 * the error. If a message is not needed it will return non-zero. in iic_request_ipi()
208 "IBM,CBEA-Internal-Interrupt-Controller"); in iic_host_match()
233 unsigned int node, ext, unit, class; in iic_host_xlate() local
237 "IBM,CBEA-Internal-Interrupt-Controller")) in iic_host_xlate()
238 return -ENODEV; in iic_host_xlate()
240 return -ENODEV; in iic_host_xlate()
241 val = of_get_property(ct, "#interrupt-cells", NULL); in iic_host_xlate()
243 return -ENODEV; in iic_host_xlate()
248 unit = intspec[0] & 0xff; in iic_host_xlate()
252 return -EINVAL; in iic_host_xlate()
256 if (unit == IIC_UNIT_IIC && class == 1) in iic_host_xlate()
260 (class << IIC_IRQ_CLASS_SHIFT) | unit; in iic_host_xlate()
282 iic->regs = ioremap(addr, sizeof(struct cbe_iic_thread_regs)); in init_one_iic()
283 BUG_ON(iic->regs == NULL); in init_one_iic()
285 iic->target_id = ((hw_cpu & 2) << 3) | ((hw_cpu & 1) ? 0xf : 0xe); in init_one_iic()
286 iic->eoi_stack[0] = 0xff; in init_one_iic()
287 iic->node = of_node_get(node); in init_one_iic()
288 out_be64(&iic->regs->prio, 0); in init_one_iic()
291 hw_cpu, iic->target_id, node); in init_one_iic()
302 for_each_node_by_name(dn, "interrupt-controller") { in setup_iic()
304 "IBM,CBEA-Internal-Interrupt-Controller")) in setup_iic()
306 np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL); in setup_iic()
310 return -ENODEV; in setup_iic()
316 return -ENODEV; in setup_iic()
341 out_be64(&node_iic->iic_ir, in setup_iic()
348 out_be64(&node_iic->iic_is, 0xfffffffffffffffful); in setup_iic()
354 return -ENODEV; in setup_iic()
369 /* Set master interrupt handling function */ in iic_init_IRQ()
389 out_be64(&iic_regs->iic_ir, iic_ir); in iic_set_interrupt_routing()