aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-03-09 11:45:43 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-09 13:37:20 +1100
commit52375d7c98ebb4006ff74a3f8ab024c7d725a6ab (patch)
treea57242974bce22ff4045ff95ec6a20ea39f4e914
parenta8e371c2df2b34613879ac071bb5f5d2acc745a5 (diff)
downloadskiboot-52375d7c98ebb4006ff74a3f8ab024c7d725a6ab.zip
skiboot-52375d7c98ebb4006ff74a3f8ab024c7d725a6ab.tar.gz
skiboot-52375d7c98ebb4006ff74a3f8ab024c7d725a6ab.tar.bz2
xive: Cleanup calls to set_xive backends
When interrupt sources provide a set_xive backend on P9 that means they have to do additional work to mask/unmask interrupts (typically due to issues in their ESB HW implementations). However, this never involves server targetting. Additionally there is confusion on what a "server number" means to a set_xive call due to the pre-P9 encoding, so let's not pass it at all, pass 0 instead. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/xive.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/hw/xive.c b/hw/xive.c
index 217ec6a..43eda30 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -2407,12 +2407,16 @@ static int64_t xive_source_set_xive(struct irq_source *is, uint32_t isn,
/* The source has special variants of masking/unmasking */
if (old_prio != prio && (old_prio == 0xff || prio == 0xff)) {
- if (s->orig_ops && s->orig_ops->set_xive)
- rc = s->orig_ops->set_xive(is, isn, server, prio);
- else
+ if (s->orig_ops && s->orig_ops->set_xive) {
+ /* We don't pass as server on source ops ! Targetting
+ * is handled by the XIVE
+ */
+ rc = s->orig_ops->set_xive(is, isn, 0, prio);
+ } else {
/* Ensure it's enabled/disabled in the source controller */
xive_update_irq_mask(s, isn - s->esb_base,
prio == 0xff);
+ }
}
/*
@@ -3418,11 +3422,15 @@ static int64_t opal_xive_set_irq_config(uint32_t girq,
return rc;
/* The source has special variants of masking/unmasking */
- if (s->orig_ops && s->orig_ops->set_xive)
- rc = s->orig_ops->set_xive(is, girq, vp >> 2, prio);
- else
+ if (s->orig_ops && s->orig_ops->set_xive) {
+ /* We don't pass as server on source ops ! Targetting
+ * is handled by the XIVE
+ */
+ rc = s->orig_ops->set_xive(is, girq, 0, prio);
+ } else {
/* Ensure it's enabled/disabled in the source controller */
xive_update_irq_mask(s, girq - s->esb_base, prio == 0xff);
+ }
/*
* Synchronize the source and old target XIVEs to ensure that