diff options
author | kn <kn@cvs.openbsd.org> | 2020-05-17 11:12:56 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2020-05-17 11:12:56 +0000 |
commit | e6c0f2cf8d995984649d1ae8471d2b2a35785889 (patch) | |
tree | c1532e760da5fd030b86b663dfbb8b33efe3a7dc /sys/arch/arm | |
parent | 8224b1d6a72ae58b50446d65104649670cb0f4ce (diff) |
Fix WITNESS build
sparc64 (and arm mem.c) are the only architectures/places where
RWLOCK_INITIALIZER() is used with static function variables, all other
(mem.c) usages place it into the global scope.
Fix builds with WITNESS enabled for sparc64 and arm by moving physlock
into global scope:
mem.c:93: error: initializer element is not constant
mem.c:93: error: (near initialization for 'physlock.rwl_lock_obj.lo_type')
OK visa
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/arm/mem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/mem.c b/sys/arch/arm/arm/mem.c index e37b44deaaa..9272ce0daf1 100644 --- a/sys/arch/arm/arm/mem.c +++ b/sys/arch/arm/arm/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */ +/* $OpenBSD: mem.c,v 1.22 2020/05/17 11:12:55 kn Exp $ */ /* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */ /* @@ -141,10 +141,11 @@ mmclose(dev_t dev, int flag, int mode, struct proc *p) return (0); } +static struct rwlock physlock = RWLOCK_INITIALIZER("mmrw"); + int mmrw(dev_t dev, struct uio *uio, int flags) { - static struct rwlock physlock = RWLOCK_INITIALIZER("mmrw"); vaddr_t o, v; size_t c; struct iovec *iov; |