Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2024345pja; Thu, 26 Mar 2020 08:29:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuSU+EbqhubpQHfCY0PgaNVotYEwHjMenVXB1pWOzR5K6wbs/9J3N7ijv8RnfrbWM2cXuH1 X-Received: by 2002:a05:6830:22d1:: with SMTP id q17mr6905345otc.194.1585236575735; Thu, 26 Mar 2020 08:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585236575; cv=none; d=google.com; s=arc-20160816; b=Gu61OGrDnfcwgMWmJtwjIE83RXPxZ05avPGmjSeZExOHEP8jO15QzzlTOv86RuHyP2 y5FQbhsh+6It7q+5jPkx8n18wxhw/e3vnbDIPBbJIxrPGzmKElQqvE+wIhUIwiKwacH9 d8GVAmqtohqaDrx9tbBjSNf33qZApq96rX26yJmOYTLpiGi4Mm+0TeV7cKd2cwMowZ2a 984YVLOJ7YhEUnsyZHSfQmTQrvtAYR6NyvfXOieq8FSqCOTbpIDDxelbMwmQMmazOAOV GRPPtTLpcF/V9ttjOjbhn6Ir5jqju++5sonsgf6/iRWy96yTdyVptzkSfMz8yvKJ4Moz SNgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=3fdiPLvlWaZQeA5PFxhw8S9R1LsfAuN+xil/g1wYd8s=; b=JO/cTigh73Z/oZUZfDaiLuschkA+1vcUrur2bZC1sV/tAH7OXJialNIEdM/cN1IWiE /99A3kXhmXrsRPHFiHU6yqB7MHx+rLPajcTQI4y2VJ8hRtaXr1O+eOkIbOasfDAMfRX2 rGFkHcj00BSBFfBaE9iMWSXuLgWIP8s0VkUGsUwYwGc30voydISs9tgmkDIvsmMGhGoK JDRCvfVxBqJ20VCQGGqKRfdq0C3pMQgrDpAv8AgVF8ey9gW5kWF8dkBkVgJED+OWPW3C apanuPDYBswNC9KRMcsXKAAhr8D5lIJveZSEy+VVkLSsV6Fq7+wyT6nErEIRmSuzfNht eczw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mGsm3Gr2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y139si1133393ooa.14.2020.03.26.08.29.20; Thu, 26 Mar 2020 08:29:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mGsm3Gr2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728142AbgCZP2V (ORCPT + 99 others); Thu, 26 Mar 2020 11:28:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:42544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727670AbgCZP2V (ORCPT ); Thu, 26 Mar 2020 11:28:21 -0400 Received: from localhost (mobile-166-175-186-165.mycingular.net [166.175.186.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 597882073E; Thu, 26 Mar 2020 15:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585236500; bh=hLWw99VkerwY2yvNvNHjCZISiqZQOoDJZcOBRfe2TY8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=mGsm3Gr2ex9ZW0K8sLYNNzmaZCh32ETgvfitHZ9j3QdIBeXXTuBf6KAVtCW84RTgt cPktU98SYyevdT2cD/uwZwMwwfb231/43dRA8cjKbQSLNmd8XIZjn169HlB39rKUIQ hnVZe2WnZCv9Ac1Y1WQJGnKGeTIH+a4h73qFtOB8= Date: Thu, 26 Mar 2020 10:28:18 -0500 From: Bjorn Helgaas To: Srinath Mannam Cc: Lorenzo Pieralisi , Florian Fainelli , Ray Jui , Andrew Murray , bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Roman Bacik Subject: Re: [PATCH 2/3] PCI: iproc: fix invalidating PAXB address mapping Message-ID: <20200326152818.GA7634@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1585206447-1363-3-git-send-email-srinath.mannam@broadcom.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [fixed Andrew's email addr] Change subject to match convention, e.g., PCI: iproc: Invalidate correct PAXB inbound windows On Thu, Mar 26, 2020 at 12:37:26PM +0530, Srinath Mannam wrote: > From: Roman Bacik > > Second stage bootloader prior to Linux boot may use all inbound windows > including IARR1/IMAP1. We need to ensure all previous configuration of > inbound windows are invalidated during the initialization stage of the > Linux iProc PCIe driver. Add fix to invalidate IARR1/IMAP1 because it was > missed in previous patch. > > Fixes: 9415743e4c8a ("PCI: iproc: Invalidate PAXB address mapping") > Signed-off-by: Roman Bacik > --- > drivers/pci/controller/pcie-iproc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c > index 6972ca4..e7f0d58 100644 > --- a/drivers/pci/controller/pcie-iproc.c > +++ b/drivers/pci/controller/pcie-iproc.c > @@ -351,6 +351,8 @@ static const u16 iproc_pcie_reg_paxb_v2[IPROC_PCIE_MAX_NUM_REG] = { > [IPROC_PCIE_OMAP3] = 0xdf8, > [IPROC_PCIE_IARR0] = 0xd00, > [IPROC_PCIE_IMAP0] = 0xc00, > + [IPROC_PCIE_IARR1] = 0xd08, > + [IPROC_PCIE_IMAP1] = 0xd70, Wow, this is a little too subtle for my taste. 9415743e4c8a added this loop: + for (idx = 0; idx < ib->nr_regions; idx++) { + iproc_pcie_write_reg(pcie, + MAP_REG(IPROC_PCIE_IARR0, idx), 0); This patch doesn't change the loop or the limit, so I *guess* previously we invalidated IPROC_PCIE_IARR0, IPROC_PCIE_IARR2, ..., (skipping IPROC_PCIE_IARR1), and now we will invalidate IPROC_PCIE_IARR0, IPROC_PCIE_IARR1, ... instead? > [IPROC_PCIE_IARR2] = 0xd10, > [IPROC_PCIE_IMAP2] = 0xcc0, > [IPROC_PCIE_IARR3] = 0xe00,