summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.ibm.com>2019-05-16 14:19:51 +0200
committerHeiko Carstens <heiko.carstens@de.ibm.com>2019-05-28 14:49:32 +0200
commitdcd33b23c9f322274efb94d6e86370bac2b3c68f (patch)
treea21317b82c09d26a734abea78fb24f7b006db070
parent1354b38b3ddf47e0612d21f401d2bfeb8acd9b80 (diff)
s390/pci: fix assignment of bus resources
Adjust bus resources depending on the usage of MIO instructions. Fixes: 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions") Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--arch/s390/pci/pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 0ebb7c405a25..86ca7f88fb22 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -528,7 +528,10 @@ static int zpci_setup_bus_resources(struct zpci_dev *zdev,
if (zdev->bars[i].val & 4)
flags |= IORESOURCE_MEM_64;
- addr = ZPCI_ADDR(entry);
+ if (static_branch_likely(&have_mio))
+ addr = (unsigned long) zdev->bars[i].mio_wb;
+ else
+ addr = ZPCI_ADDR(entry);
size = 1UL << zdev->bars[i].size;
res = __alloc_res(zdev, addr, size, flags);