Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2018 13:12:51 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330018 - head/sys/arm64/arm64
Message-ID:  <201802261312.w1QDCpvo037778@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <machine/asm.h>
+#include <machine/armreg.h>
 __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 */



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