Re: [PATCH v7 2/9] s390/pci: Add architecture specific resource/bus address translation
From: Niklas Schnelle
Date: Tue Jan 20 2026 - 17:16:43 EST
On Wed, 2026-01-07 at 10:32 -0800, Farhan Ali wrote:
> On s390 today we overwrite the PCI BAR resource address to either an
> artificial cookie address or MIO address. However this address is different
> from the bus address of the BARs programmed by firmware. The artificial
> cookie address was created to index into an array of function handles
> (zpci_iomap_start). The MIO (mapped I/O) addresses are provided by firmware
> but maybe different from the bus addresses. This creates an issue when trying
> to convert the BAR resource address to bus address using the generic
> pcibios_resource_to_bus().
>
> Implement an architecture specific pcibios_resource_to_bus() function to
> correctly translate PCI BAR resource addresses to bus addresses for s390.
> Similarly add architecture specific pcibios_bus_to_resource function to do
> the reverse translation.
>
> Reviewed-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
> Signed-off-by: Farhan Ali <alifm@xxxxxxxxxxxxx>
> ---
My R-b stands but I'd like to add that checkpatch.pl with "--strict"
notes that your commit description is not properly wrapped at 75
characters. Furthermore it reports the following code alignment issues:
CHECK: Alignment should match open parenthesis
#125: FILE: drivers/pci/host-bridge.c:53:
+void __weak pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region,
struct resource *res)
CHECK: Alignment should match open parenthesis
#134: FILE: drivers/pci/host-bridge.c:78:
+void __weak pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res,
struct pci_bus_region *region)
Thanks,
Niklas