diff options
author | Sebastian Ott <sebott@linux.ibm.com> | 2019-05-16 15:19:51 +0300 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2019-05-28 15:49:32 +0300 |
commit | dcd33b23c9f322274efb94d6e86370bac2b3c68f (patch) | |
tree | a21317b82c09d26a734abea78fb24f7b006db070 | |
parent | 1354b38b3ddf47e0612d21f401d2bfeb8acd9b80 (diff) | |
download | linux-dcd33b23c9f322274efb94d6e86370bac2b3c68f.tar.xz |
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.c | 5 |
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); |