Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix make tinderbox #2288

Merged
merged 2 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,8 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
!!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY);

if (key64)
(void) printf("\t\t0x%010lx = ",
*(uint64_t *)attr.za_name);
(void) printf("\t\t0x%010llx = ",
(u_longlong_t)*(uint64_t *)attr.za_name);
else
(void) printf("\t\t%s = ", attr.za_name);

Expand Down
20 changes: 10 additions & 10 deletions sys/riscv/include/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,46 +63,46 @@
atomic_##NAME##_##WIDTH(p, v); \
}

#define ATOMIC_CMPSET_ORDER(WIDTH, SUFFIX, ORDER) \
#define ATOMIC_CMPSET_ORDER(WIDTH, SUFFIX, SUCCESS, FAIL) \
static __inline int \
atomic_cmpset##SUFFIX##WIDTH(__volatile uint##WIDTH##_t *p, \
uint##WIDTH##_t cmpval, uint##WIDTH##_t newval) \
{ \
\
/* Return 1 on success, 0 on failure */ \
return (__atomic_compare_exchange_n( \
p, &cmpval, newval, 0, ORDER, ORDER)); \
p, &cmpval, newval, 0, SUCCESS, FAIL)); \
}

#define ATOMIC_FCMPSET_ORDER(WIDTH, SUFFIX, ORDER) \
#define ATOMIC_FCMPSET_ORDER(WIDTH, SUFFIX, SUCCESS, FAIL) \
static __inline int \
atomic_fcmpset##SUFFIX##WIDTH(__volatile uint##WIDTH##_t *p, \
uint##WIDTH##_t* cmpval, uint##WIDTH##_t newval) \
{ \
\
/* fcmpset updates cmpval on failure and uses weak cmpxchg */ \
return (__atomic_compare_exchange_n( \
p, cmpval, newval, 1, ORDER, ORDER)); \
p, cmpval, newval, 1, SUCCESS, FAIL)); \
}


#define ATOMIC_CMPSET_ACQ_REL(WIDTH) \
ATOMIC_CMPSET_ORDER(WIDTH, _acq_, __ATOMIC_ACQUIRE) \
ATOMIC_CMPSET_ORDER(WIDTH, _rel_, __ATOMIC_RELEASE)
ATOMIC_CMPSET_ORDER(WIDTH, _acq_, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE) \
ATOMIC_CMPSET_ORDER(WIDTH, _rel_, __ATOMIC_RELEASE, __ATOMIC_RELAXED)

#define ATOMIC_CMPSET(WIDTH) \
ATOMIC_CMPSET_ORDER(WIDTH, _, __ATOMIC_RELAXED) \
ATOMIC_CMPSET_ORDER(WIDTH, _, __ATOMIC_RELAXED, __ATOMIC_RELAXED) \
ATOMIC_CMPSET_ACQ_REL(WIDTH)

#define ATOMIC_FCMPSET_ACQ_REL(WIDTH) \
ATOMIC_FCMPSET_ORDER(WIDTH, _acq_, __ATOMIC_ACQUIRE) \
ATOMIC_FCMPSET_ORDER(WIDTH, _rel_, __ATOMIC_RELEASE)
ATOMIC_FCMPSET_ORDER(WIDTH, _acq_, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE) \
ATOMIC_FCMPSET_ORDER(WIDTH, _rel_, __ATOMIC_RELEASE, __ATOMIC_RELAXED)

#define ATOMIC_FCMPSET(WIDTH) \
ATOMIC_FCMPSET_ORDER(WIDTH, _, __ATOMIC_RELAXED) \
ATOMIC_FCMPSET_ORDER(WIDTH, _, __ATOMIC_RELAXED, __ATOMIC_RELAXED) \
ATOMIC_FCMPSET_ACQ_REL(WIDTH) \

#ifdef __CHERI_PURE_CAPABILITY__

Check warning on line 105 in sys/riscv/include/atomic.h

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line

Check warning on line 105 in sys/riscv/include/atomic.h

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
/*
* In a purecap kernel we cannot use the generic sub-word implementation.
*/
Expand Down
Loading