um: virt-pci: fix platform map offset
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Fri, 1 Sep 2023 13:35:43 +0000 (15:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:50 +0000 (15:35 -0800)
[ Upstream commit 32253f00ac8a8073bf6db4bfe9d6511cc93c4aef ]

The offset is currently always zero so the backend can't distinguish
between accesses to different ioremapped areas.

Fixes: 522c532c4fe7 ("virt-pci: add platform bus support")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/um/drivers/virt-pci.c

index ffe2ee8..97a37c0 100644 (file)
@@ -971,7 +971,7 @@ static long um_pci_map_platform(unsigned long offset, size_t size,
        *ops = &um_pci_device_bar_ops;
        *priv = &um_pci_platform_device->resptr[0];
 
-       return 0;
+       return offset;
 }
 
 static const struct logic_iomem_region_ops um_pci_platform_ops = {