Ensure that the padding calcualtion doesn't return a negative value.

Submitted by:	kib
Approved by:	jb
This commit is contained in:
Scott Long 2008-08-29 15:55:49 +00:00
parent 37b5fe59b5
commit a25cb00747
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182448

View File

@ -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 */