diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-08-09 16:38:06 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-08-11 19:54:22 +1000 |
commit | 5ed551115a3ad1925c900b2e0dd7977ad1987f85 (patch) | |
tree | b0a7f521f7ad2824eed8eb4b5ee0e0e858085821 /include/xive.h | |
parent | 8b6d05d9b2cd187e05ff0aa27942f07d04c8d4d6 (diff) | |
download | blackbird-skiboot-5ed551115a3ad1925c900b2e0dd7977ad1987f85.tar.gz blackbird-skiboot-5ed551115a3ad1925c900b2e0dd7977ad1987f85.zip |
xive: Wrap irq_sources to provide standard set_xive/get_xive
All the source controllers use the standard XIVE mechanism for
masking/unmasking and EOI, so there is no point having that
logic duplicated. There are a few variations on how they are
implemented but that can be handled using a few flags.
So let's create a wrapper around irq_sources for a xive source
and provide a new API for things like PHB4 to instanciate them
This patch while at it also fixes the calculation of the source
offset when setting up targetting information in the PHB4.
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 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/xive.h b/include/xive.h index c3bd33a9..775ddd7d 100644 --- a/include/xive.h +++ b/include/xive.h @@ -369,9 +369,16 @@ uint32_t xive_alloc_ipi_irqs(uint32_t chip_id, uint32_t count, uint32_t align); #define XIVE_HW_SRC_PSI 8 uint64_t xive_get_notify_port(uint32_t chip_id, uint32_t ent); +uint32_t xive_get_notify_base(uint32_t girq); -bool xive_get_eq_info(uint32_t isn, uint32_t *out_target, uint8_t *out_prio); -bool xive_set_eq_info(uint32_t isn, uint32_t target, uint8_t prio); +#define XIVE_SRC_EOI_PAGE1 0x00000001 /* EOI and trig. separate */ +#define XIVE_SRC_STORE_EOI 0x00000002 /* Store EOI (auto trigger) */ +#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_cpu_callin(struct cpu_thread *cpu); |