[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 22:06:37 -0000
From: "tip-bot2 for David Woodhouse" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: David Woodhouse <dwmw@...zon.co.uk>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/apic] iommu/amd: Fix union of bitfields in intcapxt support
The following commit has been merged into the x86/apic branch of tip:
Commit-ID: 2fb6acf3edfeb904505f9ba3fd01166866062591
Gitweb: https://git.kernel.org/tip/2fb6acf3edfeb904505f9ba3fd01166866062591
Author: David Woodhouse <dwmw@...zon.co.uk>
AuthorDate: Wed, 11 Nov 2020 14:43:21
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 11 Nov 2020 23:01:57 +01:00
iommu/amd: Fix union of bitfields in intcapxt support
All the bitfields in here are overlaid on top of each other since
they're a union. Change the second u64 to be in a struct so it does
the intended thing.
Fixes: b5c3786ee370 ("iommu/amd: Use msi_msg shadow structs")
Signed-off-by: David Woodhouse <dwmw@...zon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/r/20201111144322.1659970-2-dwmw2@infradead.org
---
drivers/iommu/amd/init.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 263670d..c2769f2 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -1967,13 +1967,15 @@ static int iommu_setup_msi(struct amd_iommu *iommu)
union intcapxt {
u64 capxt;
- u64 reserved_0 : 2,
- dest_mode_logical : 1,
- reserved_1 : 5,
- destid_0_23 : 24,
- vector : 8,
- reserved_2 : 16,
- destid_24_31 : 8;
+ struct {
+ u64 reserved_0 : 2,
+ dest_mode_logical : 1,
+ reserved_1 : 5,
+ destid_0_23 : 24,
+ vector : 8,
+ reserved_2 : 16,
+ destid_24_31 : 8;
+ };
} __attribute__ ((packed));
/*
Powered by blists - more mailing lists