Module Name:    src
Committed By:   matt
Date:           Tue Jun  2 14:06:16 UTC 2015

Modified Files:
        src/sys/arch/arm/arm32: irq_dispatch.S

Log Message:
Add a clrex/dmb to irq path as recommended by ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/arm32/irq_dispatch.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/irq_dispatch.S
diff -u src/sys/arch/arm/arm32/irq_dispatch.S:1.15 src/sys/arch/arm/arm32/irq_dispatch.S:1.16
--- src/sys/arch/arm/arm32/irq_dispatch.S:1.15	Sun Aug 18 06:28:18 2013
+++ src/sys/arch/arm/arm32/irq_dispatch.S	Tue Jun  2 14:06:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: irq_dispatch.S,v 1.15 2013/08/18 06:28:18 matt Exp $	*/
+/*	$NetBSD: irq_dispatch.S,v 1.16 2015/06/02 14:06:16 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 Fujitsu Component Limited
@@ -97,6 +97,11 @@ ARM_ASENTRY_NP(irq_entry)
 	PUSHFRAMEINSVC			/* Push an interrupt frame */
 	ENABLE_ALIGNMENT_FAULTS		/* finishes with curcpu() in r4 */
 
+#ifdef _ARM_ARCH_7
+	clrex				/* force all strex to fail */
+	dmb				/* synchronize memory writes */
+#endif
+
 	/*
 	 * Increment the interrupt nesting depth and call the interrupt
 	 * dispatch routine.  We've pushed a frame, so we can safely use
@@ -153,6 +158,11 @@ ARM_ASENTRY_NP(irq_idle_entry)
 	add	r1, r6, #1
 	str	r1, [r4, #CI_INTR_DEPTH]
 
+#ifdef _ARM_ARCH_7
+	clrex				/* force all strex to fail */
+	dmb				/* synchronize memory writes */
+#endif
+
 	mov	r0, sp			/* arg for dispatcher */
 	bl	ARM_IRQ_HANDLER
 

Reply via email to