summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraoyama <aoyama@openbsd.org>2021-02-23 11:48:21 +0000
committeraoyama <aoyama@openbsd.org>2021-02-23 11:48:21 +0000
commit3da63063d2342371cd7c6e969124b8066dc1b6c3 (patch)
tree49c6fb01fe175a879f8c579d779dc5c0d630e99c
parentsmall adjustment of the deck chairs, no functional change. (diff)
downloadwireguard-openbsd-3da63063d2342371cd7c6e969124b8066dc1b6c3.tar.xz
wireguard-openbsd-3da63063d2342371cd7c6e969124b8066dc1b6c3.zip
Make more efficient clearing interrupts on all processors at boot time.
Without this modification, because of the volatile qualifier, the compiler does not produce four `` = 0 '' assignments, but code equivalent to: *(volatile uint32_t *)INT_ST_MASK3 = 0; *(volatile uint32_t *)INT_ST_MASK2 = *(volatile uint32_t *)INT_ST_MASK3; *(volatile uint32_t *)INT_ST_MASK1 = *(volatile uint32_t *)INT_ST_MASK2; *(volatile uint32_t *)INT_ST_MASK0 = *(volatile uint32_t *)INT_ST_MASK1; Anders Gavare reported to Miod Vallat, and he gave me a diff.
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index 9501ad85210..a2f0949eef7 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.134 2020/05/31 06:23:57 dlg Exp $ */
+/* $OpenBSD: machdep.c,v 1.135 2021/02/23 11:48:21 aoyama Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -995,9 +995,9 @@ luna88k_bootstrap()
cmmu = &cmmu8820x;
/* clear and disable all interrupts */
- *(volatile uint32_t *)INT_ST_MASK0 =
- *(volatile uint32_t *)INT_ST_MASK1 =
- *(volatile uint32_t *)INT_ST_MASK2 =
+ *(volatile uint32_t *)INT_ST_MASK0 = 0;
+ *(volatile uint32_t *)INT_ST_MASK1 = 0;
+ *(volatile uint32_t *)INT_ST_MASK2 = 0;
*(volatile uint32_t *)INT_ST_MASK3 = 0;
/* clear software interrupts; just read registers */