summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2017-07-14 05:34:10 +0000
committerdlg <dlg@openbsd.org>2017-07-14 05:34:10 +0000
commit85b2fde5b366c0a0683e41b5c9d1377bb157baae (patch)
treef83d4d3a0ad1c291702dffbc3ccbabea3ae1c815
parentMake ""Killed by signal 1" LogLevel verbose so it's not shown at the default (diff)
downloadwireguard-openbsd-85b2fde5b366c0a0683e41b5c9d1377bb157baae.tar.xz
wireguard-openbsd-85b2fde5b366c0a0683e41b5c9d1377bb157baae.zip
fix GET_CURPCB on !MULTIPROCESSOR builds.
this lets GENERIC work as well as GENERIC.MP. it should also fix bsd.rd. tested by me on an es45. from a grumpy alpha user
-rw-r--r--sys/arch/alpha/alpha/locore0.S28
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/arch/alpha/alpha/locore0.S b/sys/arch/alpha/alpha/locore0.S
index 9c6e5a77617..d3758025933 100644
--- a/sys/arch/alpha/alpha/locore0.S
+++ b/sys/arch/alpha/alpha/locore0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore0.S,v 1.1 2017/06/05 17:49:05 deraadt Exp $ */
+/* $OpenBSD: locore0.S,v 1.2 2017/07/14 05:34:10 dlg Exp $ */
/* $NetBSD: locore.s,v 1.94 2001/04/26 03:10:44 ross Exp $ */
/*-
@@ -64,6 +64,20 @@
#include "assym.h"
+#if defined(MULTIPROCESSOR)
+
+#define GET_CURPCB \
+ call_pal PAL_OSF1_rdval ; \
+ addq v0, CPU_INFO_CURPCB, v0
+
+#else /* if not MULTIPROCESSOR... */
+
+IMPORT(cpu_info_primary, CPU_INFO_SIZEOF)
+
+#define GET_CURPCB lda v0, cpu_info_primary + CPU_INFO_CURPCB
+
+#endif
+
/*
* Perform actions necessary to switch to a new context. The
* hwpcb should be in a0. Clobbers v0, t0, t8..t11, a0.
@@ -81,18 +95,6 @@
.set noreorder
.text
- .macro bfalse reg, dst
- beq \reg, \dst
- .endm
-
- .macro btrue reg, dst
- bne \reg, \dst
- .endm
-
-#define GET_CURPCB \
- call_pal PAL_OSF1_rdval ; \
- addq v0, CPU_INFO_CURPCB, v0
-
/*
* This is for kvm_mkdb, and should be the address of the beginning
* of the kernel text segment (not necessarily the same as kernbase).