git: c47229ae6676 - main - Intel DMAR: improve X2X macros to fix failures in certain syntax contexts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Sep 2024 21:50:37 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=c47229ae66764fec85477e89d4f3861ac29abf48
commit c47229ae66764fec85477e89d4f3861ac29abf48
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-06-06 00:52:39 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-09-04 21:50:18 +0000
Intel DMAR: improve X2X macros to fix failures in certain syntax contexts
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
---
sys/x86/iommu/intel_dmar.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h
index b7f0300e16f0..9eb87bcfdc35 100644
--- a/sys/x86/iommu/intel_dmar.h
+++ b/sys/x86/iommu/intel_dmar.h
@@ -87,15 +87,15 @@ struct dmar_ctx {
#define DMAR_DOMAIN_UNLOCK(dom) mtx_unlock(&(dom)->iodom.lock)
#define DMAR_DOMAIN_ASSERT_LOCKED(dom) mtx_assert(&(dom)->iodom.lock, MA_OWNED)
-#define DMAR2IOMMU(dmar) &((dmar)->iommu)
+#define DMAR2IOMMU(dmar) (&((dmar)->iommu))
#define IOMMU2DMAR(dmar) \
__containerof((dmar), struct dmar_unit, iommu)
-#define DOM2IODOM(domain) &((domain)->iodom)
+#define DOM2IODOM(domain) (&((domain)->iodom))
#define IODOM2DOM(domain) \
__containerof((domain), struct dmar_domain, iodom)
-#define CTX2IOCTX(ctx) &((ctx)->context)
+#define CTX2IOCTX(ctx) (&((ctx)->context))
#define IOCTX2CTX(ctx) \
__containerof((ctx), struct dmar_ctx, context)