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
This commit is contained in:
parent
c8354314f3
commit
147a9bb331
@ -132,7 +132,7 @@ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)
|
||||
* 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
|
||||
@ -354,7 +354,7 @@ atomic_testandclear_long(volatile u_long *p, u_int v)
|
||||
*/
|
||||
#define OFFSETOF_MONITORBUF 0x100
|
||||
|
||||
#if defined(SMP)
|
||||
#if defined(SMP) || defined(KLD_MODULE)
|
||||
static __inline void
|
||||
__storeload_barrier(void)
|
||||
{
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user