summaryrefslogtreecommitdiff
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2020-06-04 12:59:20 -0500
committerBjorn Helgaas <bhelgaas@google.com>2020-06-04 12:59:20 -0500
commit2bd81cd04a3f5eb873cc81fa16c469377be3b092 (patch)
tree34d43c8c473e1304bffa0d290a9743febb9e5d9d /drivers/pci/controller
parent5a881eb3d138bd1408ea22d2c2917a935b2a1ea9 (diff)
parent3e5095eebe015d5a4d566aa5e03c8621add5f0a7 (diff)
Merge branch 'remotes/lorenzo/pci/vmd'
- Fix vmd resource address calculation using Host Physical Address shadow register (Jon Derrick) * remotes/lorenzo/pci/vmd: PCI: vmd: Filter resource type bits from shadow register
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/vmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index dac91d60701d..e386d4eac407 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -445,9 +445,11 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
if (!membar2)
return -ENOMEM;
offset[0] = vmd->dev->resource[VMD_MEMBAR1].start -
- readq(membar2 + MB2_SHADOW_OFFSET);
+ (readq(membar2 + MB2_SHADOW_OFFSET) &
+ PCI_BASE_ADDRESS_MEM_MASK);
offset[1] = vmd->dev->resource[VMD_MEMBAR2].start -
- readq(membar2 + MB2_SHADOW_OFFSET + 8);
+ (readq(membar2 + MB2_SHADOW_OFFSET + 8) &
+ PCI_BASE_ADDRESS_MEM_MASK);
pci_iounmap(vmd->dev, membar2);
}
}