From owner-svn-src-head@freebsd.org Tue Sep 22 16:29:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2256A06A90; Tue, 22 Sep 2015 16:29:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9379D1B10; Tue, 22 Sep 2015 16:29:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8MGTuxS023195; Tue, 22 Sep 2015 16:29:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MGTuwH023193; Tue, 22 Sep 2015 16:29:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509221629.t8MGTuwH023193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Sep 2015 16:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288115 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 16:29:56 -0000 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 */