diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-11-14 13:06:15 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-15 15:06:03 +1100 |
commit | aecfaf0146ccfb2a4d31fa812d224f8317225e8b (patch) | |
tree | 69e5fce2a62b4f6307b5a3559c8fb10b13e6f93b /include/xive.h | |
parent | bd4eaedc2dda6e7b365eb5e104c07c5d114528e6 (diff) | |
download | skiboot-aecfaf0146ccfb2a4d31fa812d224f8317225e8b.zip skiboot-aecfaf0146ccfb2a4d31fa812d224f8317225e8b.tar.gz skiboot-aecfaf0146ccfb2a4d31fa812d224f8317225e8b.tar.bz2 |
xive: Provide a way to override some IPI sources
Some devices such as NX or the NPU will use some of the XIVE
provided IPIs for their own interrupts. Thus we need a way for
those to provide a custom irq_source_ops for portions of the IPI
space in order for them to provide their own attributes() and
if needed, interrutps() callbacks.
We achieve that by creating a second list of sources which can
overlap the primary.
The global stock of IPIs is registered by XIVE in the secondary
list which is searched when no match is found in the primary.
A new API xive_register_ipi_source() is provided for those devices
to create an overlapping source structure in the primary list for
a subset of the IPIs. Those IPIs must have been previously allocated
using xive_alloc_ipi_irqs()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/xive.h')
-rw-r--r-- | include/xive.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/xive.h b/include/xive.h index 367daec..065aa69 100644 --- a/include/xive.h +++ b/include/xive.h @@ -376,9 +376,11 @@ uint32_t xive_get_notify_base(uint32_t girq); #define XIVE_SRC_LSI 0x00000004 /* No Q bit, no retrigger */ struct irq_source_ops; -void xive_register_source(uint32_t base, uint32_t count, uint32_t shift, - void *mmio, uint32_t flags, void *data, - const struct irq_source_ops *ops); +void xive_register_hw_source(uint32_t base, uint32_t count, uint32_t shift, + void *mmio, uint32_t flags, void *data, + const struct irq_source_ops *ops); +void xive_register_ipi_source(uint32_t base, uint32_t count, void *data, + const struct irq_source_ops *ops); void xive_cpu_callin(struct cpu_thread *cpu); |