summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-11-14 13:06:15 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-11-15 15:06:03 +1100
commitaecfaf0146ccfb2a4d31fa812d224f8317225e8b (patch)
tree69e5fce2a62b4f6307b5a3559c8fb10b13e6f93b /include
parentbd4eaedc2dda6e7b365eb5e104c07c5d114528e6 (diff)
downloadblackbird-skiboot-aecfaf0146ccfb2a4d31fa812d224f8317225e8b.tar.gz
blackbird-skiboot-aecfaf0146ccfb2a4d31fa812d224f8317225e8b.zip
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')
-rw-r--r--include/interrupts.h3
-rw-r--r--include/xive.h8
2 files changed, 6 insertions, 5 deletions
diff --git a/include/interrupts.h b/include/interrupts.h
index 465073b8..6b55099f 100644
--- a/include/interrupts.h
+++ b/include/interrupts.h
@@ -291,11 +291,10 @@ struct irq_source {
struct list_node link;
};
-extern void __register_irq_source(struct irq_source *is);
+extern void __register_irq_source(struct irq_source *is, bool secondary);
extern void register_irq_source(const struct irq_source_ops *ops, void *data,
uint32_t start, uint32_t count);
extern void unregister_irq_source(uint32_t start, uint32_t count);
-extern void adjust_irq_source(struct irq_source *is, uint32_t new_count);
extern uint32_t get_psi_interrupt(uint32_t chip_id);
diff --git a/include/xive.h b/include/xive.h
index 367daec2..065aa698 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);
OpenPOWER on IntegriCloud