summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2023-09-04 18:21:01 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-10-04 20:41:56 +0300
commit9734fe4dc22052d8010cc0b68b092fe5335ccb31 (patch)
treec61881b281bd291f964f6ccbda42af542fdffd72 /tools/perf/scripts/python/export-to-sqlite.py
parent398352049146e34ec6113a00c63457149a81345c (diff)
downloadlinux-9734fe4dc22052d8010cc0b68b092fe5335ccb31.tar.xz
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. [ubizjak@gmail.com: clean up if/else block] Link: https://lkml.kernel.org/r/20230906191200.68707-1-ubizjak@gmail.com Link: https://lkml.kernel.org/r/20230904152230.9227-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions