[3.19.y-ckt stable] Patch "of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Jul 16 00:59:59 UTC 2015
This is a note to let you know that I have just added a patch titled
of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.y-ckt4.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 4c93767522cfa8e0b88c7fb3b9b2aa64557f6165 Mon Sep 17 00:00:00 2001
From: Zhichang Yuan <yuanzhichang at hisilicon.com>
Date: Fri, 24 Apr 2015 17:05:09 +0800
Subject: of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O
port
commit 5dbb4c6167229c8d4f528e8ec26699a7305000a3 upstream.
41f8bba7f555 ("of/pci: Add pci_register_io_range() and
pci_pio_to_address()") added support for systems with several I/O ranges
described by OF bindings. It modified pci_address_to_pio() look up the
io_range for a given CPU physical address, but the conversion was wrong.
Fix the conversion of address to I/O port.
[bhelgaas: changelog]
Fixes: 41f8bba7f555 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()")
Signed-off-by: Zhichang Yuan <yuanzhichang at hisilicon.com>
Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
Acked-by: Liviu Dudau <Liviu.Dudau at arm.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/of/address.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 78a7dcb..6906a3f 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -765,7 +765,7 @@ unsigned long __weak pci_address_to_pio(phys_addr_t address)
spin_lock(&io_range_lock);
list_for_each_entry(res, &io_range_list, list) {
if (address >= res->start && address < res->start + res->size) {
- addr = res->start - address + offset;
+ addr = address - res->start + offset;
break;
}
offset += res->size;
--
1.9.1
More information about the kernel-team
mailing list