stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: yuanzhichang@hisilicon.com, Liviu.Dudau@arm.com,
	bhelgaas@google.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port" has been added to the 4.1-stable tree
Date: Thu, 16 Jul 2015 19:42:08 -0700	[thread overview]
Message-ID: <143710092833223@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     of-pci-fix-pci_address_to_pio-conversion-of-cpu-address-to-i-o-port.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 5dbb4c6167229c8d4f528e8ec26699a7305000a3 Mon Sep 17 00:00:00 2001
From: Zhichang Yuan <yuanzhichang@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

From: Zhichang Yuan <yuanzhichang@hisilicon.com>

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@hisilicon.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/of/address.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -765,7 +765,7 @@ unsigned long __weak pci_address_to_pio(
 	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;


Patches currently in stable-queue which might be from yuanzhichang@hisilicon.com are

queue-4.1/of-pci-fix-pci_address_to_pio-conversion-of-cpu-address-to-i-o-port.patch

                 reply	other threads:[~2015-07-17  2:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=143710092833223@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=bhelgaas@google.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yuanzhichang@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).