]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Add sanity check for interrupt remapping table length macros
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Thu, 10 Dec 2020 16:24:36 +0000 (10:24 -0600)
committerWill Deacon <will@kernel.org>
Fri, 11 Dec 2020 12:47:22 +0000 (12:47 +0000)
commit14ff40fb18e6b409db848fa51b3cb5eae08b0434
tree1bf89ebb5b48718f004f943131246e33ae49335d
parentce311189ed4a642876a6d4b368f714193fc8beaf
iommu/amd: Add sanity check for interrupt remapping table length macros

Currently, macros related to the interrupt remapping table length are
defined separately. This has resulted in an oversight in which one of
the macros were missed when changing the length. To prevent this,
redefine the macros to add built-in sanity check.

Also, rename macros to use the name of the DTE[IntTabLen] field as
specified in the AMD IOMMU specification. There is no functional change.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Will Deacon <will@kernel.org>
Cc: Jerry Snitselaar <jsnitsel@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20201210162436.126321-1-suravee.suthikulpanit@amd.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c
drivers/iommu/amd/iommu.c