git: 8952296684ab - stable/14 - iommu_qi_seq_processed: use atomic to read hw-written seq number
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Oct 2024 09:11:33 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=8952296684ab0b0ec7800338c3dd3f42333547b2
commit 8952296684ab0b0ec7800338c3dd3f42333547b2
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-10-03 03:51:20 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-10-10 09:10:33 +0000
iommu_qi_seq_processed: use atomic to read hw-written seq number
(cherry picked from commit eb8326421e6b35b0dee1a8db669914a97bce5cdf)
---
sys/x86/iommu/iommu_utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c
index 8ff15cc86cb8..db8f94eb584f 100644
--- a/sys/x86/iommu/iommu_utils.c
+++ b/sys/x86/iommu/iommu_utils.c
@@ -350,8 +350,8 @@ iommu_qi_seq_processed(struct iommu_unit *unit,
x86c = IOMMU2X86C(unit);
gen = x86c->inv_waitd_gen;
- return (pseq->gen < gen ||
- (pseq->gen == gen && pseq->seq <= x86c->inv_waitd_seq_hw));
+ return (pseq->gen < gen || (pseq->gen == gen && pseq->seq <=
+ atomic_load_64(&x86c->inv_waitd_seq_hw)));
}
void