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 tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

- smp_mb__before_spinlock() changed to smp_mb() on arm64 since the
generic definition to smp_wmb() is not sufficient

- avoid a recursive loop with the graph tracer by using using
preempt_(enable|disable)_notrace in _percpu_(read|write)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: use preempt_disable_notrace in _percpu_read/write
arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()

+14 -4
+4 -4
arch/arm64/include/asm/percpu.h
··· 199 199 #define _percpu_read(pcp) \ 200 200 ({ \ 201 201 typeof(pcp) __retval; \ 202 - preempt_disable(); \ 202 + preempt_disable_notrace(); \ 203 203 __retval = (typeof(pcp))__percpu_read(raw_cpu_ptr(&(pcp)), \ 204 204 sizeof(pcp)); \ 205 - preempt_enable(); \ 205 + preempt_enable_notrace(); \ 206 206 __retval; \ 207 207 }) 208 208 209 209 #define _percpu_write(pcp, val) \ 210 210 do { \ 211 - preempt_disable(); \ 211 + preempt_disable_notrace(); \ 212 212 __percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), \ 213 213 sizeof(pcp)); \ 214 - preempt_enable(); \ 214 + preempt_enable_notrace(); \ 215 215 } while(0) \ 216 216 217 217 #define _pcp_protect(operation, pcp, val) \
+10
arch/arm64/include/asm/spinlock.h
··· 363 363 #define arch_read_relax(lock) cpu_relax() 364 364 #define arch_write_relax(lock) cpu_relax() 365 365 366 + /* 367 + * Accesses appearing in program order before a spin_lock() operation 368 + * can be reordered with accesses inside the critical section, by virtue 369 + * of arch_spin_lock being constructed using acquire semantics. 370 + * 371 + * In cases where this is problematic (e.g. try_to_wake_up), an 372 + * smp_mb__before_spinlock() can restore the required ordering. 373 + */ 374 + #define smp_mb__before_spinlock() smp_mb() 375 + 366 376 #endif /* __ASM_SPINLOCK_H */