Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'parisc-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux into master

Pull parisc fixes from Helge Deller:
"Two fixes:

- Add the cmpxchg() function for pointers to u8 values. This fixes a
kernel linking error when building the tusb1210 driver (from Liam
Beguin).

- Add a define for atomic64_set_release() to fix CPU soft lockups
which happen because of missing unlocks while processing bit
operations (from John David Anglin)"

* 'parisc-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Add atomic64_set_release() define to avoid CPU soft lockups
parisc: add support for cmpxchg on u8 pointers

+16
+2
arch/parisc/include/asm/atomic.h
··· 212 212 _atomic_spin_unlock_irqrestore(v, flags); 213 213 } 214 214 215 + #define atomic64_set_release(v, i) atomic64_set((v), (i)) 216 + 215 217 static __inline__ s64 216 218 atomic64_read(const atomic64_t *v) 217 219 {
+2
arch/parisc/include/asm/cmpxchg.h
··· 60 60 extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old, 61 61 unsigned int new_); 62 62 extern u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new_); 63 + extern u8 __cmpxchg_u8(volatile u8 *ptr, u8 old, u8 new_); 63 64 64 65 /* don't worry...optimizer will get rid of most of this */ 65 66 static inline unsigned long ··· 72 71 #endif 73 72 case 4: return __cmpxchg_u32((unsigned int *)ptr, 74 73 (unsigned int)old, (unsigned int)new_); 74 + case 1: return __cmpxchg_u8((u8 *)ptr, (u8)old, (u8)new_); 75 75 } 76 76 __cmpxchg_called_with_bad_pointer(); 77 77 return old;
+12
arch/parisc/lib/bitops.c
··· 79 79 _atomic_spin_unlock_irqrestore(ptr, flags); 80 80 return (unsigned long)prev; 81 81 } 82 + 83 + u8 __cmpxchg_u8(volatile u8 *ptr, u8 old, u8 new) 84 + { 85 + unsigned long flags; 86 + u8 prev; 87 + 88 + _atomic_spin_lock_irqsave(ptr, flags); 89 + if ((prev = *ptr) == old) 90 + *ptr = new; 91 + _atomic_spin_unlock_irqrestore(ptr, flags); 92 + return prev; 93 + }