Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef __ASM_SH_CMPXCHG_CAS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define __ASM_SH_CMPXCHG_CAS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) static inline unsigned long
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) __cmpxchg_u32(volatile u32 *m, unsigned long old, unsigned long new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 	__asm__ __volatile__("cas.l %1,%0,@r0"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 		: "+r"(new)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 		: "r"(old), "z"(m)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 		: "t", "memory" );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 	return new;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	unsigned long old;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	do old = *m;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	while (__cmpxchg_u32(m, old, val) != old);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	return old;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include <asm/cmpxchg-xchg.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #endif /* __ASM_SH_CMPXCHG_CAS_H */