riscv: fix errors in some atomic type aliases

This appears to be a copy-and-paste error that has simply been
overlooked. The tree contains only two calls to any of the affected
variants, but recent additions to the test suite started exercising the
call to atomic_clear_rel_int() in ng_leave_write(), reliably causing
panics.

Apparently, the issue was inherited from the arm64 atomic header. That
instance was addressed in c90baf6817, but the fix did not make its way
to RISC-V.

Note that the particular test case ng_macfilter_test:main still appears
to fail on this platform, but this change reduces the panic to a
timeout.

PR:		253237
Reported by:	Jenkins, arichardson
Reviewed by:	kp, arichardson
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29064
This commit is contained in:
Mitchell Horne 2021-03-04 13:52:45 -04:00
parent 19587d7422
commit 0d3b3beeb2

View File

@ -288,7 +288,7 @@ atomic_store_rel_32(volatile uint32_t *p, uint32_t val)
#define atomic_subtract_acq_int atomic_subtract_acq_32
#define atomic_add_rel_int atomic_add_rel_32
#define atomic_clear_rel_int atomic_add_rel_32
#define atomic_clear_rel_int atomic_clear_rel_32
#define atomic_cmpset_rel_int atomic_cmpset_rel_32
#define atomic_fcmpset_rel_int atomic_fcmpset_rel_32
#define atomic_set_rel_int atomic_set_rel_32
@ -490,7 +490,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val)
}
#define atomic_add_acq_long atomic_add_acq_64
#define atomic_clear_acq_long atomic_add_acq_64
#define atomic_clear_acq_long atomic_clear_acq_64
#define atomic_cmpset_acq_long atomic_cmpset_acq_64
#define atomic_fcmpset_acq_long atomic_fcmpset_acq_64
#define atomic_load_acq_long atomic_load_acq_64
@ -498,7 +498,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val)
#define atomic_subtract_acq_long atomic_subtract_acq_64
#define atomic_add_acq_ptr atomic_add_acq_64
#define atomic_clear_acq_ptr atomic_add_acq_64
#define atomic_clear_acq_ptr atomic_clear_acq_64
#define atomic_cmpset_acq_ptr atomic_cmpset_acq_64
#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64
#define atomic_load_acq_ptr atomic_load_acq_64