From owner-svn-src-head@freebsd.org Mon Feb 26 13:12:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D9FFF237A5; Mon, 26 Feb 2018 13:12:52 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFCDC74B51; Mon, 26 Feb 2018 13:12:51 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E91DF1BDEA; Mon, 26 Feb 2018 13:12:51 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1QDCpIk037779; Mon, 26 Feb 2018 13:12:51 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1QDCpvo037778; Mon, 26 Feb 2018 13:12:51 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201802261312.w1QDCpvo037778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Mon, 26 Feb 2018 13:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330018 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 330018 X-SVN-Commit-Repository: base 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.25 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: Mon, 26 Feb 2018 13:12:52 -0000 Author: cognet Date: Mon Feb 26 13:12:51 2018 New Revision: 330018 URL: https://svnweb.freebsd.org/changeset/base/330018 Log: In do_ast, make sure the interrupts are enabled before calling ast(). We can reach that point with IRQs disabled, and calling ast() with IRQs  disabled can lead to a deadlock. This should fix the freezes on arm64 under load. Reviewed by: andrew Modified: head/sys/arm64/arm64/exception.S Modified: head/sys/arm64/arm64/exception.S ============================================================================== --- head/sys/arm64/arm64/exception.S Mon Feb 26 12:01:42 2018 (r330017) +++ head/sys/arm64/arm64/exception.S Mon Feb 26 13:12:51 2018 (r330018) @@ -26,6 +26,7 @@ */ #include +#include __FBSDID("$FreeBSD$"); #include "assym.s" @@ -114,9 +115,11 @@ __FBSDID("$FreeBSD$"); .endm .macro do_ast - /* Disable interrupts */ mrs x19, daif + /* Make sure the IRQs are enabled before calling ast() */ + bic x19, x19, #PSR_I 1: + /* Disable interrupts */ msr daifset, #2 /* Read the current thread flags */