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)
committerJoerg Roedel <jroedel@suse.de>
Fri, 13 Mar 2020 13:25:46 +0000 (14:25 +0100)
commitba3b01d7a6f4ab9f8a0557044c9a7678f64ae070
tree2a6c89f12c95aa32f561272a439a17056229a820
parent81ee85d0462410de8eeeec1b9761941fd6ed8c7b
iommu/vt-d: Fix debugfs register reads

Commit 6825d3ea6cde ("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>
drivers/iommu/intel-iommu-debugfs.c
include/linux/intel-iommu.h