aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2023-09-04 15:21:01 +0000
committerAndrew Morton <[email protected]>2023-10-04 17:41:56 +0000
commit9734fe4dc22052d8010cc0b68b092fe5335ccb31 (patch)
treec61881b281bd291f964f6ccbda42af542fdffd72 /fs/proc/array.c
parent__kill_pgrp_info: simplify the calculation of return value (diff)
downloadkernel-9734fe4dc22052d8010cc0b68b092fe5335ccb31.tar.gz
kernel-9734fe4dc22052d8010cc0b68b092fe5335ccb31.zip
panic: use atomic_try_cmpxchg in panic() and nmi_panic()
Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in panic() and nmi_panic(). x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, rename cpu variable to this_cpu in nmi_panic() and try to unify logic flow between panic() and nmi_panic(). No functional change intended. [[email protected]: clean up if/else block] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Uros Bizjak <[email protected]> Cc: Mark Rutland <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions