diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -472,7 +472,7 @@ #define DT_MASK_LO 0x00000000FFFFFFFFULL #define DTRACE_STORE(type, tomax, offset, what) \ - *((type *)((uintptr_t)(tomax) + (uintptr_t)offset)) = (type)(what); + *((type *)((uintptr_t)(tomax) + (size_t)offset)) = (type)(what); #if !defined(__x86) && !defined(__aarch64__) #define DTRACE_ALIGNCHECK(addr, size, flags) \ @@ -601,7 +601,7 @@ static dtrace_helpers_t *dtrace_helpers_create(proc_t *); static void dtrace_buffer_drop(dtrace_buffer_t *); static int dtrace_buffer_consumed(dtrace_buffer_t *, hrtime_t when); -static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, +static ssize_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, dtrace_state_t *, dtrace_mstate_t *); static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t, dtrace_optval_t); @@ -2548,7 +2548,7 @@ caddr_t tomax, data, kdata; dtrace_actkind_t action; dtrace_action_t *act; - uintptr_t offs; + size_t offs; if (buf == NULL) return; @@ -2843,7 +2843,7 @@ dtrace_buffer_t *src, *dest; uintptr_t daddr, saddr, dlimit, slimit; dtrace_speculation_state_t curstate, new = 0; - intptr_t offs; + ssize_t offs; uint64_t timestamp; if (which == 0) @@ -6910,7 +6910,6 @@ char c[DTRACE_FULLNAMELEN + 80], *str; char *msg = "dtrace: breakpoint action at probe "; char *ecbmsg = " (ecb "; - uintptr_t mask = (0xf << (sizeof (uintptr_t) * NBBY / 4)); uintptr_t val = (uintptr_t)ecb; int shift = (sizeof (uintptr_t) * NBBY) - 4, i = 0; @@ -6951,9 +6950,9 @@ c[i++] = *ecbmsg++; while (shift >= 0) { - mask = (uintptr_t)0xf << shift; + size_t mask = (size_t)0xf << shift; - if (val >= ((uintptr_t)1 << shift)) + if (val >= ((size_t)1 << shift)) c[i++] = "0123456789abcdef"[(val & mask) >> shift]; shift -= 4; } @@ -8038,7 +8037,7 @@ } static dtrace_hash_t * -dtrace_hash_create(uintptr_t stroffs, uintptr_t nextoffs, uintptr_t prevoffs) +dtrace_hash_create(size_t stroffs, size_t nextoffs, size_t prevoffs) { dtrace_hash_t *hash = kmem_zalloc(sizeof (dtrace_hash_t), KM_SLEEP); @@ -12316,11 +12315,11 @@ * mstate. Returns the new offset in the buffer, or a negative value if an * error has occurred. */ -static intptr_t +static ssize_t dtrace_buffer_reserve(dtrace_buffer_t *buf, size_t needed, size_t align, dtrace_state_t *state, dtrace_mstate_t *mstate) { - intptr_t offs = buf->dtb_offset, soffs; + ssize_t offs = buf->dtb_offset, soffs; intptr_t woffs; caddr_t tomax; size_t total; diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h @@ -149,9 +149,9 @@ int dth_size; /* size of hash table */ int dth_mask; /* mask to index into table */ int dth_nbuckets; /* total number of buckets */ - uintptr_t dth_nextoffs; /* offset of next in probe */ - uintptr_t dth_prevoffs; /* offset of prev in probe */ - uintptr_t dth_stroffs; /* offset of str in probe */ + size_t dth_nextoffs; /* offset of next in probe */ + size_t dth_prevoffs; /* offset of prev in probe */ + size_t dth_stroffs; /* offset of str in probe */ } dtrace_hash_t; /*