diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-07 11:50:05 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-07-13 17:06:24 +1000 |
commit | 24cd81df5b0bf584a0d382b84f45099db46aa727 (patch) | |
tree | f53317c37af8c0f18a205f00e2e4dafd5fac004f /hw/p7ioc.c | |
parent | 1d5643c568f444c52e914013bc090ea55469cf49 (diff) | |
download | talos-skiboot-24cd81df5b0bf584a0d382b84f45099db46aa727.tar.gz talos-skiboot-24cd81df5b0bf584a0d382b84f45099db46aa727.zip |
interrupts: Expose irq_source and change prototypes of all ops
This makes irq_source public, and change all irq_source_ops to take
the source pointer as a first argument (they can still dig the void *
data out of that).
This will allow us to embed/wrap it for XIVE later on.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/p7ioc.c')
-rw-r--r-- | hw/p7ioc.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -190,10 +190,10 @@ static const struct io_hub_ops p7ioc_hub_ops = { .reset = p7ioc_reset, }; -static int64_t p7ioc_rgc_get_xive(void *data, uint32_t isn, +static int64_t p7ioc_rgc_get_xive(struct irq_source *is, uint32_t isn, uint16_t *server, uint8_t *prio) { - struct p7ioc *ioc = data; + struct p7ioc *ioc = is->data; uint32_t irq = (isn & 0xf); uint32_t fbuid = P7_IRQ_FBUID(isn); uint64_t xive; @@ -208,10 +208,10 @@ static int64_t p7ioc_rgc_get_xive(void *data, uint32_t isn, return OPAL_SUCCESS; } -static int64_t p7ioc_rgc_set_xive(void *data, uint32_t isn, +static int64_t p7ioc_rgc_set_xive(struct irq_source *is, uint32_t isn, uint16_t server, uint8_t prio) { - struct p7ioc *ioc = data; + struct p7ioc *ioc = is->data; uint32_t irq = (isn & 0xf); uint32_t fbuid = P7_IRQ_FBUID(isn); uint64_t xive; @@ -566,9 +566,9 @@ static bool p7ioc_check_GEM(struct p7ioc *ioc) return false; } -static void p7ioc_rgc_interrupt(void *data, uint32_t isn) +static void p7ioc_rgc_interrupt(struct irq_source *is, uint32_t isn) { - struct p7ioc *ioc = data; + struct p7ioc *ioc = is->data; printf("Got RGC interrupt 0x%04x\n", isn); @@ -679,3 +679,4 @@ void probe_p7ioc(void) p7ioc_create_hub(np); } + |