Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2014 17:49:42 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r269679 - stable/10/sys/arm/arm
Message-ID:  <53e3bc36.2ad6.63b3a50d@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Thu Aug  7 17:49:42 2014
New Revision: 269679
URL: http://svnweb.freebsd.org/changeset/base/269679

Log:
  MFC r256691, r256748: casuword fixes
  
    Use unsigned compare against KERNBASE addr.
    Use atomic ops on armv6.

Modified:
  stable/10/sys/arm/arm/fusu.S
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/fusu.S
==============================================================================
--- stable/10/sys/arm/arm/fusu.S	Thu Aug  7 17:40:46 2014	(r269678)
+++ stable/10/sys/arm/arm/fusu.S	Thu Aug  7 17:49:42 2014	(r269679)
@@ -66,11 +66,27 @@ ENTRY(casuword)
 	stmfd	sp!, {r4, r5}
 	adr	r4, .Lcasuwordfault
 	str	r4, [r3, #PCB_ONFAULT]
+#ifdef _ARM_ARCH_6
+1:    
+	cmp     r0, #KERNBASE
+	mvnhs   r0, #0
+	bhs     2f
+	
+	ldrex   r5, [r0]
+	cmp     r5, r1
+	movne   r0, r5
+	bne     2f
+	strex   r5, r2, [r0]
+	cmp     r5, #0
+	bne     1b
+#else
 	ldrt	r5, [r0]
 	cmp	r5, r1
 	movne	r0, r5
 	streqt	r2, [r0]
+#endif
 	moveq	r0, r1
+2:
 	ldmfd	sp!, {r4, r5}
 	mov	r1, #0x00000000
 	str	r1, [r3, #PCB_ONFAULT]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e3bc36.2ad6.63b3a50d>