diff options
author | Uros Bizjak <[email protected]> | 2023-07-03 16:52:37 +0200 |
---|---|---|
committer | Vinod Koul <[email protected]> | 2023-08-01 23:32:06 +0530 |
commit | cae701b9ccf128edea26982f73178087fc3ad180 (patch) | |
tree | 7056cd55ddf4cfe83b07414e6b4b17a34128e18e /drivers/platform/surface/aggregator/ssh_parser.c | |
parent | f1de55ff7c704b48389987f6c71ca31dc8cffe8d (diff) |
dmaengine:idxd: Use local64_try_cmpxchg in perfmon_pmu_event_update
Use local64_try_cmpxchg instead of local64_cmpxchg (*ptr, old, new) == old
in perfmon_pmu_event_update. 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, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg
fails. There is no need to re-read the value in the loop.
No functional change intended.
Cc: Fenghua Yu <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Vinod Koul <[email protected]>
Signed-off-by: Uros Bizjak <[email protected]>
Reviewed-by: Tom Zanussi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions