From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 120FCC433F5 for ; Tue, 22 Mar 2022 15:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9K/D/lCuNHvdQPd3ei8dUeamEJS9ojIbkXLsWQLmKd8=; b=z0wmpBDleV/YXZ /KksOkbaMdemRUFbdCCCQdanm64CWuLAexcTkuZkzGd0yDE6wyG/XtQux0BWIWFlVdQTRVWIuyfAm KIm5xk+bdCWYfPmhX/WKaQfcQOIAgILbx3VOWofRw1JN9XJawrF1M7d3eeAnc+PS/7QWWpYujnRqk SzV7UEURMgm0IblS1icJ1yAZkSbiQ2sT8y39r/7J48iKoKLaVTIXjRRXWnj75y+HhPy79ejhKD3P2 TcmpHhxxY8/RhKfOeuYssUuahk2AXhwz+zyLZc4wI9ZHIZp9/pdl5RiwNHjh47mngwAmq0pfgUXcj RhhQRPN5EKI7otS+PEHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWfyA-00BQHN-1w; Tue, 22 Mar 2022 14:58:47 +0000 Received: from mail-oa1-f42.google.com ([209.85.160.42]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWflk-00BK4Z-RU for linux-arm-kernel@lists.infradead.org; Tue, 22 Mar 2022 14:45:58 +0000 Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-d6ca46da48so1897846fac.12 for ; Tue, 22 Mar 2022 07:45:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=WxMgpeiQYhggSsVLRZ+q7Wz7Ufhtg8Nvw1FX59uyKIM=; b=HqKeQnwh5vax/6lYGoIhQqqYZa56lMah+leFo0aJy0t5q2b2FSq69GbaPcrD4b5tGF o9mORTicJErXPOhO8MzcQT7R3GuNtWdT9wnEk/NpfN+tQ/s1v4zpUzHCNqnEqx+h9e/o oarv2uKODDu8S1HyBwTK2+YBr+BTC56NvHCdUt1Ashh5qZzize7KEopFLOtxRdCiMSDO KGCHzWy83KiozSdg7dNGBTyk4as9/GhLyxBAzUZNc+shrfEMJq3CgYHa9ivd1CT6nvvL sItvaJT9Zh7pfVrxz2abpJladFg3g4M+uuj+eGGHVeDCNm8NCnS24woqwlvlOYlwXuTH odPA== X-Gm-Message-State: AOAM530FhNLWrbJQC2e/cIyDUYyG1YtNHs1TYD0MEfAUWLRAxN3kJt0o dO0ilWs9cumX6wNAe4aGLocj2W9fxQ== X-Google-Smtp-Source: ABdhPJxPcgHGhDH2C+e7WOOnw416Mg/sQWc1cDtvNNEnB3Z8MzHF5ZBtTXUWtbYsyVbA1huXzoN4QQ== X-Received: by 2002:a05:6870:6108:b0:dd:ca26:f135 with SMTP id s8-20020a056870610800b000ddca26f135mr1818123oae.22.1647959986324; Tue, 22 Mar 2022 07:39:46 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f8-20020a4a8908000000b0032472938f95sm4241174ooi.17.2022.03.22.07.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Mar 2022 07:39:45 -0700 (PDT) Received: (nullmailer pid 1981681 invoked by uid 1000); Tue, 22 Mar 2022 14:39:43 -0000 Date: Tue, 22 Mar 2022 09:39:43 -0500 From: Rob Herring To: Robin Murphy , Marc Zyngier Cc: dann frazier , "linux-kernel@vger.kernel.org" , linux-arm-kernel , PCI , Toan Le , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , =?iso-8859-1?Q?St=E9phane?= Graber , Android Kernel Team Subject: Re: [PATCH v2 0/2] PCI: xgene: Restore working PCIe functionnality Message-ID: References: <20220321104843.949645-1-maz@kernel.org> <87h77rxnyl.wl-maz@kernel.org> <87fsnbxgau.wl-maz@kernel.org> <61809b8f-acaa-bae2-ac5e-aa47c55eea23@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <61809b8f-acaa-bae2-ac5e-aa47c55eea23@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220322_074556_926977_50CA1E3E X-CRM114-Status: GOOD ( 29.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 22, 2022 at 01:16:35PM +0000, Robin Murphy wrote: > On 2022-03-21 20:06, Robin Murphy wrote: > > On 2022-03-21 19:21, Marc Zyngier wrote: > > > On Mon, 21 Mar 2022 18:03:27 +0000, > > > Rob Herring wrote: > > > > = > > > > On Mon, Mar 21, 2022 at 11:36 AM Marc Zyngier wrot= e: > > > > > = > > > > > On Mon, 21 Mar 2022 15:17:34 +0000, > > > > > Rob Herring wrote: > > > > > > = > > > > > > On Mon, Mar 21, 2022 at 5:49 AM Marc Zyngier w= rote: > > > > > > > = > > > > > > For XGene-1, I'd still like to understand what the issue is. Re= verting > > > > > > the first fix and fixing 'dma-ranges' should have fixed it. I n= eed a > > > > > > dump of how the IB registers are initialized in both cases. I'm= not > > > > > > saying changing 'dma-ranges' in the firmware is going to be req= uired > > > > > > here. There's a couple of other ways we could fix that without a > > > > > > firmware change, but first I need to understand why it broke. > > > > > = > > > > > Reverting 6dce5aa59e0b was enough for me, without changing anythi= ng > > > > > else. > > > > = > > > > Meaning c7a75d07827a didn't matter for you. I'm not sure that it wo= uld. > > > > = > > > > Can you tell me what 'dma-ranges' contains on your system? > > > = > > > Each pcie node (all 5 of them) has: > > > = > > > dma-ranges =3D <0x42000000 0x80 0x00 0x80 0x00 0x00 0x80000000 > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0x42000000 0x00 0x00 0x00 = 0x00 0x80 0x00>; This is the same as what St=E9phane has for Merlin. So c7a75d07827a ("PCI: = xgene: Fix IB window setup") should have fixed Mustang. > > = > > Hmm, is there anyone other than iommu-dma who actually depends on the > > resource list being sorted in ascending order of bus address? I recall > > at the time I pushed for creating the list in sorted order as it was the > > simplest and most efficient option, but there's no technical reason we > > couldn't create it in as-found order and defer the sorting until > > iova_reserve_pci_windows() (at worst that could even operate on a > > temporary copy if need be). It's just more code, which didn't need to > > exist without a good reason, but if this is one then exist it certainly > > may. > = > Taking a closer look, the Cadence driver is already re-sorting the list > for its own setup, so iommu-dma can't assume the initial sort is > preserved and needs to do its own anyway. Does the (untested) diff below > end up helping X-Gene also? There's no IOMMU on X-Gene 1 or 2 based on the upstream dts files, so = how would this matter? Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel