Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9083524pxu; Mon, 28 Dec 2020 06:14:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSxdoSw5zh7GGYltXrxss5AX1sx36ys1MStR83NNXZ7O6PF0ap2zNcYPM+4Y2mx2eN9FVA X-Received: by 2002:a50:bc15:: with SMTP id j21mr41819964edh.187.1609164857872; Mon, 28 Dec 2020 06:14:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164857; cv=none; d=google.com; s=arc-20160816; b=aD6ib2e0EW7YoNI0K6yQFXUPMoSKewu4Z8cpgeyIdcY5S5F41exDMSSPblcKVgWtHT Tr9ErdnvLhSEYzvMvbIRo+BmIph39Y3/8N/FpoZgciPkaSvxzJVDvQVntJXPTR/eoFWT kn34WS993lLR/kxC2dlJKnpPQPYchFBOE157GRuHn/9McSFHKOfkl1/qGZ70esha2Qxl mienMU0O+el2VeSeB/wf0SboibycG3V54r4gl7IvJ6Y1iZ8R3ScShXJH/J6SSUsomM1z gAn9jacuHo1xRAAz0H0dehwUeUvfbUluFzbA7gteFimpGEZ3j6dcJ3ssbd6zp3CIqcQy SxAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3MjITd/B/ZHXnLu6ZcoEdGY3jj89EEpjo/ia9dZC2e4=; b=QHp/BEp7cPIHnA7Ht58KqWJYPsyhiYa7QbwjVr7Q3T4JoPDiiZCx6j/c9C/3kHdDLt jKhm5zceTc3Xa0RPNCMQbkMC/YHDrX4iC0Vz8y763DqKF5CD9ITvuLX9nod+Wjy1sZSL MDVTmr9hQr2a+C2JW0h3xR19N9cci2IZqVID88t+TSjJVY08xYvN1jc5vTHN2q32VyFb imPs1j/LKRhuTi3lwgrXNEm3THP2S+QHzpdmdgzdip1RPf0j2dzEKC5rXBE3QPTbE0Kd DnZ8oQN0qFDtzkwoSGVCn7+A6MvxfKyzR/dAQnw4XUFNFPJp+5y+mxw2BvBJkDwMKXgF rTxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a1A0t8IW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by27si18871784edb.276.2020.12.28.06.13.54; Mon, 28 Dec 2020 06:14:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a1A0t8IW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439778AbgL1OME (ORCPT + 99 others); Mon, 28 Dec 2020 09:12:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:46668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439773AbgL1OMD (ORCPT ); Mon, 28 Dec 2020 09:12:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ACC1B206D4; Mon, 28 Dec 2020 14:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164682; bh=2cxPfFdtevGz+SzS58rMmf9JDv7xCB4o33hk7gN+MBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a1A0t8IWM8XO+olPt+FpvtlOk723MKXI+z7TG8XMwmcmALLvD7nV2zJOrj54i/gXF jGCs0M3QCDbnEiEUoVf1BzTvEkl8pYlKm3dSXKtw0RONa5FtJlc2aMJUhXf4KMPnAN q6vUumWbOSh5CbUNdkzpbFGTr3rEoTZcWqyYkc5s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roman Bacik , Srinath Mannam , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH 5.10 243/717] PCI: iproc: Invalidate correct PAXB inbound windows Date: Mon, 28 Dec 2020 13:44:01 +0100 Message-Id: <20201228125032.632176227@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roman Bacik [ Upstream commit 89bbcaac3dff21f3567956b3416f5ec8b45f5555 ] Second stage bootloaders prior to Linux boot may use all inbound windows including IARR1/IMAP1. We need to ensure that all previous configuration of inbound windows are invalidated during the initialization stage of the Linux iProc PCIe driver so let's add a fix to define and invalidate IARR1/IMAP1 because it is currently missing, fixing the issue. Link: https://lore.kernel.org/r/20201001060054.6616-3-srinath.mannam@broadcom.com Fixes: 9415743e4c8a ("PCI: iproc: Invalidate PAXB address mapping") Signed-off-by: Roman Bacik Signed-off-by: Srinath Mannam [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-iproc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c index d901b9d392b8c..cc5b7823edeb7 100644 --- a/drivers/pci/controller/pcie-iproc.c +++ b/drivers/pci/controller/pcie-iproc.c @@ -192,8 +192,15 @@ static const struct iproc_pcie_ib_map paxb_v2_ib_map[] = { .imap_window_offset = 0x4, }, { - /* IARR1/IMAP1 (currently unused) */ - .type = IPROC_PCIE_IB_MAP_INVALID, + /* IARR1/IMAP1 */ + .type = IPROC_PCIE_IB_MAP_MEM, + .size_unit = SZ_1M, + .region_sizes = { 8 }, + .nr_sizes = 1, + .nr_windows = 8, + .imap_addr_offset = 0x4, + .imap_window_offset = 0x8, + }, { /* IARR2/IMAP2 */ @@ -351,6 +358,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, [IPROC_PCIE_IARR2] = 0xd10, [IPROC_PCIE_IMAP2] = 0xcc0, [IPROC_PCIE_IARR3] = 0xe00, -- 2.27.0