Skip to content

Commit 85751a8

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Fix DTE_IRQ_PHYS_ADDR_MASK macro
Interrupt Table Root Pointer is 52 bit and table must be aligned to start on a 128-byte boundary. Hence first 6 bits are ignored. Current code uses address mask as 45 instead of 46bit. Use GENMASK_ULL macro instead of manually generating address mask. Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Jerry Snitselaar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 1ce018d commit 85751a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/amd/amd_iommu_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
#define AMD_IOMMU_PGSIZES_V2 (PAGE_SIZE | (1ULL << 21) | (1ULL << 30))
285285

286286
/* Bit value definition for dte irq remapping fields*/
287-
#define DTE_IRQ_PHYS_ADDR_MASK (((1ULL << 45)-1) << 6)
287+
#define DTE_IRQ_PHYS_ADDR_MASK GENMASK_ULL(51, 6)
288288
#define DTE_IRQ_REMAP_INTCTL_MASK (0x3ULL << 60)
289289
#define DTE_IRQ_REMAP_INTCTL (2ULL << 60)
290290
#define DTE_IRQ_REMAP_ENABLE 1ULL

0 commit comments

Comments
 (0)