Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2015 16:29:56 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288115 - head/sys/arm64/arm64
Message-ID:  <201509221629.t8MGTuwH023193@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Sep 22 16:29:55 2015
New Revision: 288115
URL: https://svnweb.freebsd.org/changeset/base/288115

Log:
  Re-check for new ast after ast was handled.  We should not return to
  usermode with pending asts.
  
  Reviewed by:	andrew
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D3667

Modified:
  head/sys/arm64/arm64/exception.S

Modified: head/sys/arm64/arm64/exception.S
==============================================================================
--- head/sys/arm64/arm64/exception.S	Tue Sep 22 15:57:26 2015	(r288114)
+++ head/sys/arm64/arm64/exception.S	Tue Sep 22 16:29:55 2015	(r288115)
@@ -100,10 +100,11 @@ __FBSDID("$FreeBSD$");
 .macro	do_ast
 	/* Disable interrupts */
 	mrs	x19, daif
+1:
 	msr	daifset, #2
 
 	/* Read the current thread flags */
-1:	ldr	x1, [x18, #PC_CURTHREAD]	/* Load curthread */
+	ldr	x1, [x18, #PC_CURTHREAD]	/* Load curthread */
 	ldr	x2, [x1, #TD_FLAGS]
 
 	/* Check if we have either bits set */
@@ -120,9 +121,8 @@ __FBSDID("$FreeBSD$");
 	mov	x0, sp
 	bl	_C_LABEL(ast)
 
-	/* Disable interrupts */
-	mrs	x19, daif
-	msr	daifset, #2
+	/* Re-check for new ast scheduled */
+	b	1b
 
 2:
 	/* Restore interrupts */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509221629.t8MGTuwH023193>