Skip to contentSkip to conversation

spapr/xive: Use xive_esb_rw() to trigger interrupts

PATCH Applied Cédric Le Goater 2 participants 2 messages Oct 6, 2021 – Oct 7, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spapr/xive: Use xive_esb_rw() to trigger interrupts

xive_esb_rw() is the common routine used for memory accesses on ESB page. Use it for triggers also.

---
 hw/intc/spapr_xive_kvm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
hw/intc/spapr_xive_kvm.c +1 -3
index 630a719d578e..2f79950a644e 100644
@@ -318,9 +318,7 @@ static uint8_t xive_esb_read(XiveSource *xsrc, int srcno, uint32_t offset)
 
 static void kvmppc_xive_esb_trigger(XiveSource *xsrc, int srcno)
 {
-    uint64_t *addr = xsrc->esb_mmap + xive_source_esb_page(xsrc, srcno);
-
-    *addr = 0x0;
+    xive_esb_rw(xsrc, srcno, 0, 0, true);
 }
 
 uint64_t kvmppc_xive_esb_rw(XiveSource *xsrc, int srcno, uint32_t offset,
Signature · 1 line
2.31.1
Applied
#1 lore raw
Quoted 4 lines · Cédric Le Goater

xive_esb_rw() is the common routine used for memory accesses on ESB page. Use it for triggers also.

Applied to ppc-fot-6.2, thanks.

Quoted 19 lines
---
 hw/intc/spapr_xive_kvm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
hw/intc/spapr_xive_kvm.c +1 -3
index 630a719d578e..2f79950a644e 100644
@@ -318,9 +318,7 @@ static uint8_t xive_esb_read(XiveSource *xsrc, int srcno, uint32_t offset)
 
 static void kvmppc_xive_esb_trigger(XiveSource *xsrc, int srcno)
 {
-    uint64_t *addr = xsrc->esb_mmap + xive_source_esb_page(xsrc, srcno);
-
-    *addr = 0x0;
+    xive_esb_rw(xsrc, srcno, 0, 0, true);
 }
 
 uint64_t kvmppc_xive_esb_rw(XiveSource *xsrc, int srcno, uint32_t offset,
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson