]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/amd: Use atomic64_inc_return() in iommu.c
authorUros Bizjak <ubizjak@gmail.com>
Mon, 7 Oct 2024 08:43:31 +0000 (10:43 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 15 Oct 2024 08:22:37 +0000 (10:22 +0200)
commit5ce73c524f5fb5abd7b1bfed0115474b4fb437b4
tree7926e0f22c742cf4bc6e6d913a9757c092b68f76
parent8e929cb546ee42c9a61d24fae60605e9e3192354
iommu/amd: Use atomic64_inc_return() in iommu.c

Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref)
to use optimized implementation and ease register pressure around
the primitive for targets that implement optimized variant.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
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/20241007084356.47799-1-ubizjak@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c