Skip to content

Commit df057c9

Browse files
niklas88Vasily Gorbik
authored andcommitted
s390/pci: Fix unexpected write combine on resource
In the initial MIO support introduced in commit 71ba41c ("s390/pci: provide support for MIO instructions") zpci_map_resource() and zpci_setup_resources() default to using the mio_wb address as the resource's start address. This means users of the mapping, which includes most drivers, will get write combining on PCI Stores. This may lead to problems when drivers expect write through behavior when not using an explicit ioremap_wc(). Cc: [email protected] Fixes: 71ba41c ("s390/pci: provide support for MIO instructions") Signed-off-by: Niklas Schnelle <[email protected]> Reviewed-by: Pierre Morel <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 582b4e5 commit df057c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/pci/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static void zpci_map_resources(struct pci_dev *pdev)
424424

425425
if (zpci_use_mio(zdev))
426426
pdev->resource[i].start =
427-
(resource_size_t __force) zdev->bars[i].mio_wb;
427+
(resource_size_t __force) zdev->bars[i].mio_wt;
428428
else
429429
pdev->resource[i].start = (resource_size_t __force)
430430
pci_iomap_range_fh(pdev, i, 0, 0);
@@ -531,7 +531,7 @@ static int zpci_setup_bus_resources(struct zpci_dev *zdev,
531531
flags |= IORESOURCE_MEM_64;
532532

533533
if (zpci_use_mio(zdev))
534-
addr = (unsigned long) zdev->bars[i].mio_wb;
534+
addr = (unsigned long) zdev->bars[i].mio_wt;
535535
else
536536
addr = ZPCI_ADDR(entry);
537537
size = 1UL << zdev->bars[i].size;

0 commit comments

Comments
 (0)