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/phb3.c | |
parent | 1d5643c568f444c52e914013bc090ea55469cf49 (diff) | |
download | skiboot-24cd81df5b0bf584a0d382b84f45099db46aa727.zip skiboot-24cd81df5b0bf584a0d382b84f45099db46aa727.tar.gz skiboot-24cd81df5b0bf584a0d382b84f45099db46aa727.tar.bz2 |
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/phb3.c')
-rw-r--r-- | hw/phb3.c | 37 |
1 files changed, 15 insertions, 22 deletions
@@ -1602,12 +1602,10 @@ static void phb3_read_phb_status(struct phb3 *p, } } -static int64_t phb3_msi_get_xive(void *data, - uint32_t isn, - uint16_t *server, - uint8_t *prio) +static int64_t phb3_msi_get_xive(struct irq_source *is, uint32_t isn, + uint16_t *server, uint8_t *prio) { - struct phb3 *p = data; + struct phb3 *p = is->data; uint32_t chip, index, irq; uint64_t ive; @@ -1631,12 +1629,10 @@ static int64_t phb3_msi_get_xive(void *data, return OPAL_SUCCESS; } -static int64_t phb3_msi_set_xive(void *data, - uint32_t isn, - uint16_t server, - uint8_t prio) +static int64_t phb3_msi_set_xive(struct irq_source *is, uint32_t isn, + uint16_t server, uint8_t prio) { - struct phb3 *p = data; + struct phb3 *p = is->data; uint32_t chip, index; uint64_t *cache, ive_num, data64, m_server, m_prio, ivc; uint32_t *ive; @@ -1716,12 +1712,10 @@ static int64_t phb3_msi_set_xive(void *data, return OPAL_SUCCESS; } -static int64_t phb3_lsi_get_xive(void *data, - uint32_t isn, - uint16_t *server, - uint8_t *prio) +static int64_t phb3_lsi_get_xive(struct irq_source *is, uint32_t isn, + uint16_t *server, uint8_t *prio) { - struct phb3 *p = data; + struct phb3 *p = is->data; uint32_t chip, index, irq; uint64_t lxive; @@ -1742,12 +1736,10 @@ static int64_t phb3_lsi_get_xive(void *data, return OPAL_SUCCESS; } -static int64_t phb3_lsi_set_xive(void *data, - uint32_t isn, - uint16_t server, - uint8_t prio) +static int64_t phb3_lsi_set_xive(struct irq_source *is, uint32_t isn, + uint16_t server, uint8_t prio) { - struct phb3 *p = data; + struct phb3 *p = is->data; uint32_t chip, index, irq, entry; uint64_t lxive; @@ -1785,9 +1777,9 @@ static int64_t phb3_lsi_set_xive(void *data, return OPAL_SUCCESS; } -static void phb3_err_interrupt(void *data, uint32_t isn) +static void phb3_err_interrupt(struct irq_source *is, uint32_t isn) { - struct phb3 *p = data; + struct phb3 *p = is->data; PHBDBG(p, "Got interrupt 0x%08x\n", isn); @@ -4733,3 +4725,4 @@ void probe_phb3(void) dt_for_each_compatible(dt_root, np, "ibm,power8-pciex") phb3_create(np); } + |