svn commit: r330018 - head/sys/arm64/arm64

Olivier Houchard cognet at FreeBSD.org
Mon Feb 26 13:12:52 UTC 2018


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 */


More information about the svn-src-head mailing list