Module Name: src
Committed By: jmcneill
Date: Sun Feb 7 21:15:09 UTC 2021
Modified Files:
src/sys/arch/aarch64/include: locore.h
Log Message:
Use reg_daif{set,clr}_write directly instead of daif_{en,dis}able for
ENABLE_INTERRUPT() and DISABLE_INTERRUPT() macros, to avoid an unnecessary
reg_daif_read().
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/include/locore.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/aarch64/include/locore.h
diff -u src/sys/arch/aarch64/include/locore.h:1.6 src/sys/arch/aarch64/include/locore.h:1.7
--- src/sys/arch/aarch64/include/locore.h:1.6 Fri Oct 30 18:54:35 2020
+++ src/sys/arch/aarch64/include/locore.h Sun Feb 7 21:15:09 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.6 2020/10/30 18:54:35 skrll Exp $ */
+/* $NetBSD: locore.h,v 1.7 2021/02/07 21:15:09 jmcneill Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -59,8 +59,10 @@
#define cpsid(psw) daif_disable((psw))
-#define ENABLE_INTERRUPT() daif_enable(DAIF_I|DAIF_F)
-#define DISABLE_INTERRUPT() daif_disable(DAIF_I|DAIF_F)
+#define ENABLE_INTERRUPT() \
+ reg_daifclr_write((DAIF_I|DAIF_F) >> DAIF_SETCLR_SHIFT)
+#define DISABLE_INTERRUPT() \
+ reg_daifset_write((DAIF_I|DAIF_F) >> DAIF_SETCLR_SHIFT)
#define DAIF_MASK (DAIF_D|DAIF_A|DAIF_I|DAIF_F)