aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2017-08-30 15:46:12 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2017-09-02 07:02:36 -0400
commit59fc2724e45dfea849336108c602e93ea880a18f (patch)
tree9a48b56627cced9e5dae5c2325212aafd8e76bb2
parenteac1e731b59ee3b5f5e641a7765c7ed41ed26226 (diff)
powerpc/xive: rename xive_poke_esb() in xive_esb_read()
xive_poke_esb() is performing a load/read so it is better named as xive_esb_read() as we will need to introduce a xive_esb_write() routine. Also use the XIVE_ESB_LOAD_EOI offset when EOI'ing LSI interrupts. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/sysdev/xive/common.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index f1e0a3326d01..975bdbd5fa51 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -190,7 +190,7 @@ static u32 xive_scan_interrupts(struct xive_cpu *xc, bool just_peek)
190 * This is used to perform the magic loads from an ESB 190 * This is used to perform the magic loads from an ESB
191 * described in xive.h 191 * described in xive.h
192 */ 192 */
193static notrace u8 xive_poke_esb(struct xive_irq_data *xd, u32 offset) 193static notrace u8 xive_esb_read(struct xive_irq_data *xd, u32 offset)
194{ 194{
195 u64 val; 195 u64 val;
196 196
@@ -227,7 +227,7 @@ notrace void xmon_xive_do_dump(int cpu)
227 xive_dump_eq("IRQ", &xc->queue[xive_irq_priority]); 227 xive_dump_eq("IRQ", &xc->queue[xive_irq_priority]);
228#ifdef CONFIG_SMP 228#ifdef CONFIG_SMP
229 { 229 {
230 u64 val = xive_poke_esb(&xc->ipi_data, XIVE_ESB_GET); 230 u64 val = xive_esb_read(&xc->ipi_data, XIVE_ESB_GET);
231 xmon_printf(" IPI state: %x:%c%c\n", xc->hw_ipi, 231 xmon_printf(" IPI state: %x:%c%c\n", xc->hw_ipi,
232 val & XIVE_ESB_VAL_P ? 'P' : 'p', 232 val & XIVE_ESB_VAL_P ? 'P' : 'p',
233 val & XIVE_ESB_VAL_P ? 'Q' : 'q'); 233 val & XIVE_ESB_VAL_P ? 'Q' : 'q');
@@ -326,9 +326,9 @@ void xive_do_source_eoi(u32 hw_irq, struct xive_irq_data *xd)
326 * properly. 326 * properly.
327 */ 327 */
328 if (xd->flags & XIVE_IRQ_FLAG_LSI) 328 if (xd->flags & XIVE_IRQ_FLAG_LSI)
329 in_be64(xd->eoi_mmio); 329 xive_esb_read(xd, XIVE_ESB_LOAD_EOI);
330 else { 330 else {
331 eoi_val = xive_poke_esb(xd, XIVE_ESB_SET_PQ_00); 331 eoi_val = xive_esb_read(xd, XIVE_ESB_SET_PQ_00);
332 DBG_VERBOSE("eoi_val=%x\n", offset, eoi_val); 332 DBG_VERBOSE("eoi_val=%x\n", offset, eoi_val);
333 333
334 /* Re-trigger if needed */ 334 /* Re-trigger if needed */
@@ -383,12 +383,12 @@ static void xive_do_source_set_mask(struct xive_irq_data *xd,
383 * ESB accordingly on unmask. 383 * ESB accordingly on unmask.
384 */ 384 */
385 if (mask) { 385 if (mask) {
386 val = xive_poke_esb(xd, XIVE_ESB_SET_PQ_01); 386 val = xive_esb_read(xd, XIVE_ESB_SET_PQ_01);
387 xd->saved_p = !!(val & XIVE_ESB_VAL_P); 387 xd->saved_p = !!(val & XIVE_ESB_VAL_P);
388 } else if (xd->saved_p) 388 } else if (xd->saved_p)
389 xive_poke_esb(xd, XIVE_ESB_SET_PQ_10); 389 xive_esb_read(xd, XIVE_ESB_SET_PQ_10);
390 else 390 else
391 xive_poke_esb(xd, XIVE_ESB_SET_PQ_00); 391 xive_esb_read(xd, XIVE_ESB_SET_PQ_00);
392} 392}
393 393
394/* 394/*
@@ -772,7 +772,7 @@ static int xive_irq_retrigger(struct irq_data *d)
772 * To perform a retrigger, we first set the PQ bits to 772 * To perform a retrigger, we first set the PQ bits to
773 * 11, then perform an EOI. 773 * 11, then perform an EOI.
774 */ 774 */
775 xive_poke_esb(xd, XIVE_ESB_SET_PQ_11); 775 xive_esb_read(xd, XIVE_ESB_SET_PQ_11);
776 776
777 /* 777 /*
778 * Note: We pass "0" to the hw_irq argument in order to 778 * Note: We pass "0" to the hw_irq argument in order to
@@ -807,7 +807,7 @@ static int xive_irq_set_vcpu_affinity(struct irq_data *d, void *state)
807 irqd_set_forwarded_to_vcpu(d); 807 irqd_set_forwarded_to_vcpu(d);
808 808
809 /* Set it to PQ=10 state to prevent further sends */ 809 /* Set it to PQ=10 state to prevent further sends */
810 pq = xive_poke_esb(xd, XIVE_ESB_SET_PQ_10); 810 pq = xive_esb_read(xd, XIVE_ESB_SET_PQ_10);
811 811
812 /* No target ? nothing to do */ 812 /* No target ? nothing to do */
813 if (xd->target == XIVE_INVALID_TARGET) { 813 if (xd->target == XIVE_INVALID_TARGET) {
@@ -836,7 +836,7 @@ static int xive_irq_set_vcpu_affinity(struct irq_data *d, void *state)
836 * for sure the queue slot is no longer in use. 836 * for sure the queue slot is no longer in use.
837 */ 837 */
838 if (pq & 2) { 838 if (pq & 2) {
839 pq = xive_poke_esb(xd, XIVE_ESB_SET_PQ_11); 839 pq = xive_esb_read(xd, XIVE_ESB_SET_PQ_11);
840 xd->saved_p = true; 840 xd->saved_p = true;
841 841
842 /* 842 /*