From patchwork Tue Nov 24 20:50:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 7693081 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 019799F2EC for ; Tue, 24 Nov 2015 20:50:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B67F207A1 for ; Tue, 24 Nov 2015 20:50:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47A6520790 for ; Tue, 24 Nov 2015 20:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754660AbbKXUuc (ORCPT ); Tue, 24 Nov 2015 15:50:32 -0500 Received: from mail.kernel.org ([198.145.29.136]:36565 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754054AbbKXUuc (ORCPT ); Tue, 24 Nov 2015 15:50:32 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CBEAD207B9; Tue, 24 Nov 2015 20:50:30 +0000 (UTC) Received: from localhost (unknown [69.71.1.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9771120784; Tue, 24 Nov 2015 20:50:29 +0000 (UTC) Date: Tue, 24 Nov 2015 14:50:26 -0600 From: Bjorn Helgaas To: Stanimir Varbanov Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas , Jingoo Han , Pratyush Anand , Arnd Bergmann Subject: Re: [PATCH] PCI: designware: remove wrong io_base assignment Message-ID: <20151124205026.GB17377@localhost> References: <1448357812-23906-1-git-send-email-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1448357812-23906-1-git-send-email-stanimir.varbanov@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Nov 24, 2015 at 11:36:52AM +0200, Stanimir Varbanov wrote: > The io_base is used to keep the cpu physical address parsed > from ranges dt property. After issue pci_remap_iospace the > io_base has been assigned with io->start, which is not correct > cause io->start is a PCI bus address. > > Fixes: 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT") > Reviewed-by: Arnd Bergmann > Signed-off-by: Stanimir Varbanov > --- > drivers/pci/host/pcie-designware.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c > index 540f077c37ea..02a7452bdf23 100644 > --- a/drivers/pci/host/pcie-designware.c > +++ b/drivers/pci/host/pcie-designware.c > @@ -440,7 +440,6 @@ int dw_pcie_host_init(struct pcie_port *pp) > ret, pp->io); > continue; > } > - pp->io_base = pp->io->start; > break; > case IORESOURCE_MEM: > pp->mem = win->res; Applied to for-linus for v4.4 with changelog as follows, thanks! commit 5228e39e3f709c82e6c4643402fc25de54391e32 Author: Stanimir Varbanov Date: Tue Nov 24 11:36:52 2015 +0200 PCI: designware: Remove incorrect io_base assignment "pp->io" is an I/O resource, e.g., "[io 0x0000-0xffff]"; "pp->io_base" is the CPU physical address of a region where the host bridge converts CPU memory accesses into PCI I/O transactions. Corrupting pp->io_base by assigning pp->io->start to it breaks access to the PCI I/O space, as reported by Kishon. Remove the invalid assignment. [bhelgaas: changelog] Fixes: 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT") Reported-and-tested-by: Kishon Vijay Abraham I Signed-off-by: Stanimir Varbanov Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann --- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 540f077..02a7452 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -440,7 +440,6 @@ int dw_pcie_host_init(struct pcie_port *pp) ret, pp->io); continue; } - pp->io_base = pp->io->start; break; case IORESOURCE_MEM: pp->mem = win->res;