summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2026-09-08 16:17:38 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2026-09-24 14:52:08 +0100
commit5e8ef5fb7720f308d5e693e032448c746407b56f (patch)
tree27c0320cc33ae19b09b0b0af80a724a52f538fb2 /tools/perf/scripts/python/event_analyzing_sample.py
parent6fe3da372d04e6294d8875b9b1da9b1f6887c320 (diff)
arm64: percpu: Implement preemptible XCHG ops
Use the PCPU GPR infrastructure to implement all of the xchg ops Test case: | u64 outline_xchg_name(u64 *p, u64 v) | { | return xchg(p, v); | } Generated code before this patch (v7.2-rc4): | <outline_this_cpu_xchg_u64>: | paciasp | stp x29, x30, [sp, #-32]! | mrs x3, sp_el0 | mov x29, sp | ldr w2, [x3, #8] | add w2, w2, #0x1 | str w2, [x3, #8] | mov x2, x0 | mrs x4, tpidr_el1 | add x2, x2, x4 | prfm pstl1strm, [x2] | 1: ldxr x0, [x2] | stxr w5, x1, [x2] | cbnz w5, 1b | ldr x1, [x3, #8] | sub x1, x1, #0x1 | str w1, [x3, #8] | cbz x1, 2f | ldr x1, [x3, #8] | cbnz x1, 3f | 2: str x0, [sp, #24] | bl preempt_schedule_notrace | ldr x0, [sp, #24] | 3: ldp x29, x30, [sp], #32 | autiasp | ret Generated code after this patch: | <outline_this_cpu_xchg_u64>: | mrs x3, sp_el0 | mov w5, #0x10a0 | strh w5, [x3, #20] | mrs x5, tpidr_el1 | add x4, x0, x5 | prfm pstl1strm, [x4] | 1: ldxr x2, [x4] | stxr w6, x1, [x4] | cbnz w6, 1b | strh wzr, [x3, #20] | mov x0, x2 | ret Signed-off-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com> Cc: Ada Couprie Diaz <ada.coupriediaz@arm.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: James Morse <james.morse@arm.com> Cc: Jinjie Ruan <ruanjinjie@huawei.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Vladimir Murzin <vladimir.murzin@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Yang Shi <yang@os.amperecomputing.com> Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions