diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-08-09 16:38:05 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-08-11 19:54:22 +1000 |
commit | 8b6d05d9b2cd187e05ff0aa27942f07d04c8d4d6 (patch) | |
tree | 5a3dad0ac8c8fcdb0f72d9a2b82ff51af0e0fdb5 /hw/p7ioc.c | |
parent | c6a6391892539450a84d3dd69f4d83ea1a1b04d6 (diff) | |
download | blackbird-skiboot-8b6d05d9b2cd187e05ff0aa27942f07d04c8d4d6.tar.gz blackbird-skiboot-8b6d05d9b2cd187e05ff0aa27942f07d04c8d4d6.zip |
interrupts: Add new source ->attributes callback
This allows a given source to provide per-interrupt attributes
such as whether it targets OPAL or Linux and it's estimated
frequency.
The former allows to get rid of the double set of ops used to
decide which interrupts go where on some modules like the PHBs
and the latter will be eventually used to implement smart
caching of the source lookups.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/p7ioc.c')
-rw-r--r-- | hw/p7ioc.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -581,9 +581,16 @@ static void p7ioc_rgc_interrupt(struct irq_source *is, uint32_t isn) opal_pci_eeh_set_evt(ioc->phbs[0].phb.opal_id); } +static uint64_t p7ioc_rgc_irq_attributes(struct irq_source *is __unused, + uint32_t isn __unused) +{ + return IRQ_ATTR_TARGET_OPAL | IRQ_ATTR_TARGET_RARE; +} + static const struct irq_source_ops p7ioc_rgc_irq_ops = { .get_xive = p7ioc_rgc_get_xive, .set_xive = p7ioc_rgc_set_xive, + .attributes = p7ioc_rgc_irq_attributes, .interrupt = p7ioc_rgc_interrupt, }; @@ -680,3 +687,4 @@ void probe_p7ioc(void) } + |