]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Fix debugfs register reads
authorMegha Dey <megha.dey@linux.intel.com>
Mon, 9 Mar 2020 20:09:46 +0000 (13:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:55 +0000 (11:01 +0200)
commit25c5ae20a0cb2a89bf8b77e409fe167fe18f2b1b
treea4b97af5b30e6fbc3d4d0f4e2d21fedca68452d2
parente7216bee1661a848f583d5845cb0b577fa754e57
iommu/vt-d: Fix debugfs register reads

[ Upstream commit cf1c398628aa81ea39a1d13274cacb241994749c ]

Commit e5793a35a253 ("iommu/vt-d: Add debugfs support to show register
contents") dumps the register contents for all IOMMU devices.

Currently, a 64 bit read(dmar_readq) is done for all the IOMMU registers,
even though some of the registers are 32 bits, which is incorrect.

Use the correct read function variant (dmar_readl/dmar_readq) while
reading the contents of 32/64 bit registers respectively.

Signed-off-by: Megha Dey <megha.dey@linux.intel.com>
Link: https://lore.kernel.org/r/1583784587-26126-2-git-send-email-megha.dey@linux.intel.com
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel-iommu-debugfs.c
include/linux/intel-iommu.h