xive: Make no_sync parameter affermative in __xive_set_irq_config()

Submitted by Michael Neuling on April 19, 2017, 5:23 a.m.

Details

Message ID 20170419052354.12538-1-mikey@neuling.org
State New
Headers show

Commit Message

Michael Neuling April 19, 2017, 5:23 a.m.
In __xive_set_irq_config() change the no_sync parameter to sync and
fix all the call sites.

Just a cleanup. No functional change.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 hw/xive.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/hw/xive.c b/hw/xive.c
index 530e0df151..db117beba8 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -2375,7 +2375,7 @@  static int64_t xive_sync(struct xive *x)
 
 static int64_t __xive_set_irq_config(struct irq_source *is, uint32_t girq,
 				     uint64_t vp, uint8_t prio, uint32_t lirq,
-				     bool update_esb, bool no_sync)
+				     bool update_esb, bool sync)
 {
 	struct xive_src *s = container_of(is, struct xive_src, is);
 	uint32_t old_target, vp_blk;
@@ -2419,7 +2419,7 @@  static int64_t __xive_set_irq_config(struct irq_source *is, uint32_t girq,
 	 * WARNING: This assumes the VP and it's queues are on the same
 	 *          XIVE instance !
 	 */
-	if (no_sync)
+	if (!sync)
 		return OPAL_SUCCESS;
 	xive_sync(s->xive);
 	if (xive_decode_vp(old_target, &vp_blk, NULL, NULL, NULL)) {
@@ -2437,7 +2437,7 @@  static int64_t xive_set_irq_config(uint32_t girq, uint64_t vp, uint8_t prio,
 	struct irq_source *is = irq_find_source(girq);
 
 	return __xive_set_irq_config(is, girq, vp, prio, lirq, update_esb,
-				     false);
+				     true);
 }
 
 static int64_t xive_source_set_xive(struct irq_source *is,
@@ -2462,7 +2462,7 @@  static int64_t xive_source_set_xive(struct irq_source *is,
 	server >>= 2;
 
 	/* Set logical irq to match isn */
-	return __xive_set_irq_config(is, isn, server, prio, isn, true, false);
+	return __xive_set_irq_config(is, isn, server, prio, isn, true, true);
 }
 
 void __xive_source_eoi(struct irq_source *is, uint32_t isn)
@@ -2746,7 +2746,7 @@  static void xive_ipi_init(struct xive *x, struct cpu_thread *cpu)
 
 	__xive_set_irq_config(&x->ipis.is, xs->ipi_irq, cpu->pir,
 			      XIVE_EMULATION_PRIO, xs->ipi_irq,
-			      true, false);
+			      true, true);
 }
 
 static void xive_ipi_eoi(struct xive *x, uint32_t idx)
@@ -3915,7 +3915,7 @@  static void xive_reset_mask_source_cb(struct irq_source *is,
 			continue;
 		/* Mask it and clear the enabled map bit */
 		xive_dbg(x, "[reset] disabling source 0x%x\n", isn);
-		__xive_set_irq_config(is, isn, 0, 0xff, isn, true, true);
+		__xive_set_irq_config(is, isn, 0, 0xff, isn, true, false);
 		bitmap_clr_bit(*x->int_enabled_map, GIRQ_TO_IDX(isn));
 	}
 }