diff options
author | scottl <scottl@FreeBSD.org> | 2008-08-29 15:55:49 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2008-08-29 15:55:49 +0000 |
commit | 0c41221b445310240b96c571e9545951883292cf (patch) | |
tree | 9a7450861cc17ffe1e60ad9e10baa834dbb677ff /sys/cddl/compat | |
parent | 8fb51c23ad0bf57e576afcc0dd0433bbf8ad8815 (diff) | |
download | FreeBSD-src-0c41221b445310240b96c571e9545951883292cf.zip FreeBSD-src-0c41221b445310240b96c571e9545951883292cf.tar.gz |
Ensure that the padding calcualtion doesn't return a negative value.
Submitted by: kib
Approved by: jb
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/cpuvar.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/cpuvar.h b/sys/cddl/compat/opensolaris/sys/cpuvar.h index df0af5c..b42fda6 100644 --- a/sys/cddl/compat/opensolaris/sys/cpuvar.h +++ b/sys/cddl/compat/opensolaris/sys/cpuvar.h @@ -65,7 +65,8 @@ extern solaris_cpu_t solaris_cpu[]; */ #define CPUC_SIZE (sizeof (uint16_t) + sizeof (uintptr_t) + \ sizeof (kmutex_t)) -#define CPUC_PADSIZE CPU_CACHE_COHERENCE_SIZE - CPUC_SIZE +#define CPUC_SIZE1 roundup(CPUC_SIZE, CPU_CACHE_COHERENCE_SIZE) +#define CPUC_PADSIZE CPUC_SIZE1 - CPUC_SIZE typedef struct cpu_core { uint16_t cpuc_dtrace_flags; /* DTrace flags */ |