aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/processor.h
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2022-07-12 16:49:17 +0200
committerAndrew Morton <[email protected]>2022-09-11 21:55:06 -0700
commit4f1d2a030db09af4d21695983674a18633cd0ffb (patch)
treeb149575bb927d0552a63441ab885a5a9128212f3 /arch/mips/include/asm/processor.h
parent05c6257433b7212f07a7e53479a8ab038fc1666a (diff)
llist: use try_cmpxchg in llist_add_batch and llist_del_first
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in llist_add_batch and llist_del_first. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg. Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. No functional change intended. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Uros Bizjak <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'arch/mips/include/asm/processor.h')
0 files changed, 0 insertions, 0 deletions