spin_unlock implies memory barrier, no need explicit memory barrier.

Signed-off-by: Peng Fan <peng....@nxp.com>
---
 hypervisor/arch/arm-common/irqchip.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/hypervisor/arch/arm-common/irqchip.c 
b/hypervisor/arch/arm-common/irqchip.c
index fbaa3099..eb6258df 100644
--- a/hypervisor/arch/arm-common/irqchip.c
+++ b/hypervisor/arch/arm-common/irqchip.c
@@ -247,13 +247,12 @@ void irqchip_set_pending(struct public_per_cpu 
*cpu_public, u16 irq_id)
                pending->irqs[pending->tail] = irq_id;
                pending->sender[pending->tail] = sender;
                pending->tail = new_tail;
-               /*
-                * Make the change to pending_irqs.tail visible before the
-                * caller sends SGI_INJECT.
-                */
-               memory_barrier();
        }
 
+       /*
+        * spin_unlock will make the change to pending_irqs.tail
+        * visible before the caller sends SGI_INJECT.
+        */
        spin_unlock(&pending->lock);
 
        /*
-- 
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20191203084553.20669-2-peng.fan%40nxp.com.

Reply via email to