diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2024-04-24 15:16:28 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-04-26 11:57:36 +0200 |
commit | 9e7ee0f045395dc8aa55fbdc164c062484f4c88d (patch) | |
tree | 3b06b0fe95ec1e9d3fd6d66e9e236809ea5b543a /tools/perf/scripts/python | |
parent | a770ccd91d99f997e023b554d9e2033ce79e019e (diff) |
iommu/vt-d: Use try_cmpxchg64{,_local}() in iommu.c
Replace this pattern in iommu.c:
cmpxchg64{,_local}(*ptr, 0, new) != 0
... with the simpler and faster:
!try_cmpxchg64{,_local}(*ptr, &tmp, new)
The x86 CMPXCHG instruction returns success in the ZF flag, so this change
saves a compare after the CMPXCHG.
No functional change intended.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Will Deacon <will@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240414162454.49584-1-ubizjak@gmail.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions