summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2017-02-23 00:15:12 +0000
committerdlg <dlg@openbsd.org>2017-02-23 00:15:12 +0000
commit01f82b0b88dede8ffb991401ade3818f2120765e (patch)
tree44543152d7a030ffc2b9de68dabeb4485cbde867
parentEnable ahci(4). (diff)
downloadwireguard-openbsd-01f82b0b88dede8ffb991401ade3818f2120765e.tar.xz
wireguard-openbsd-01f82b0b88dede8ffb991401ade3818f2120765e.zip
be nicer to 32bit strict alignment archs that can do 64bit loads/stores.
ie, align boot memory to the size of uint64_ts. there's an argument to be made that we should align this to 16 bytes to be consistent with malloc and pools.
-rw-r--r--sys/sys/percpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/percpu.h b/sys/sys/percpu.h
index ee4e88455b8..90af5c6f476 100644
--- a/sys/sys/percpu.h
+++ b/sys/sys/percpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: percpu.h,v 1.6 2017/02/05 16:23:38 jca Exp $ */
+/* $OpenBSD: percpu.h,v 1.7 2017/02/23 00:15:12 dlg Exp $ */
/*
* Copyright (c) 2016 David Gwynne <dlg@openbsd.org>
@@ -94,7 +94,7 @@ static struct { \
#define CPUMEM_BOOT_MEMORY(_name, _sz) \
static struct { \
unsigned char mem[_sz]; \
-} __aligned(sizeof(unsigned long)) _name##_boot_cpumem
+} __aligned(sizeof(uint64_t)) _name##_boot_cpumem
#define CPUMEM_BOOT_INITIALIZER(_name) \
{ (struct cpumem *)&_name##_boot_cpumem.mem }