diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2018-07-06 10:13:42 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2018-07-06 10:13:42 +0000 |
commit | a7a7f5b472a8934cbafd5c2989d74ee2514c19f7 (patch) | |
tree | 401054afcaea4c5e8399351be18d9e645db4ad6d /sys/i386/include/atomic.h | |
parent | 428194fed271bc910aeda7f263f4dcd661b12399 (diff) |
Make sure kernel modules built by default are portable between UP and
SMP systems by extending defined(SMP) to include defined(KLD_MODULE).
This is a regression issue after r335873 .
Discussed with: mmacy@
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=336025
Diffstat (limited to 'sys/i386/include/atomic.h')
-rw-r--r-- | sys/i386/include/atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 34ed3a6af8b1..bda2a620af00 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -143,7 +143,7 @@ void atomic_subtract_64(volatile uint64_t *, uint64_t); * For userland, always use lock prefixes so that the binaries will run * on both SMP and !SMP systems. */ -#if defined(SMP) || !defined(_KERNEL) +#if defined(SMP) || !defined(_KERNEL) || defined(KLD_MODULE) #define MPLOCKED "lock ; " #else #define MPLOCKED @@ -302,7 +302,7 @@ atomic_testandclear_int(volatile u_int *p, u_int v) */ #if defined(_KERNEL) -#if defined(SMP) +#if defined(SMP) || defined(KLD_MODULE) #define __storeload_barrier() __mbk() #else /* _KERNEL && UP */ #define __storeload_barrier() __compiler_membar() |