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 6E6E9C02188 for ; Mon, 27 Jan 2025 15:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eBGMix/rympgbB2/zFS1m6yB9D8xjNnB0f9e8XgQtPk=; b=WLZ3oqEsOSKUWMNDdzU7cNWX+g A/8FPvHjTCUySFR5X+y0S/EirajzwLB1GDFpMJpYKW/Dm/c7Ru6a5K21fdt4RpJehUZO/QHNIBdzF kCsKSRI260r8oon5l6GvxuXEPGVRsqFtRQ9sPDg6xsx9E/XQTTxs3Ji5ReNk5pj3rW4cV/t+7dgup 9pHGzbuvLI/TULSrOoYusfTgvAedaUP5NaTFjA9A4ueOFsZa6kKi/3z9SHGBqYKqOboCbu/NEFqoc 9qxAxXm05MbhJwf/uRTK3J2UBzYCqV62yR8j0r7ogXrNl1yQX/2/6JD0p+KK9guVm1PUeAB0qoDpl mSQYNBMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcQzf-00000002afD-3DiG; Mon, 27 Jan 2025 15:25:43 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcQyN-00000002aP3-0lQv for linux-arm-kernel@lists.infradead.org; Mon, 27 Jan 2025 15:24:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 66ECE5C57F6; Mon, 27 Jan 2025 15:23:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31535C4CED2; Mon, 27 Jan 2025 15:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737991460; bh=YoAm4JPhD8dFPYpVnGR9aiVF0AEg16NOp4W2vcliKEk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Jvj4pS/42GidXlLA+MtCgSSGCul+6CS1caorwNM+fHkJhqouzEMNucNugidGv2Vdl 8TZMsdAf67KdW/xXqAWXYoA4AaP8+6I73TN64GZTSdDzo58qkuZ0Vb6rnX4oT4g8+C o9Qw8nquBEm27Pvm/JKyWKBU8qRdpDZWAjg3fT7cVte9wMYmo2v/eSzAEbrxAOt0Ey 1G3uVtmATWhiW/KUOYvhF0pTWxeXd3I36OY6AllofgLsffSpV/Vm3EB8/a14Ck9/aq 99/EQuefyP3i65YI7/8cIZUG333/sQWBpYcDsoNTpnPghVr2Vea5UIsWsVdVZhwS5g VmJNya8lsyrVg== Date: Mon, 27 Jan 2025 16:24:13 +0100 From: Niklas Cassel To: Frank Li Cc: Bjorn Helgaas , Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev Subject: Re: [PATCH v8 2/7] PCI: dwc: Use devicetree 'ranges' property to get rid of cpu_addr_fixup() callback Message-ID: References: <20250123190422.GA1215672@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250127_072423_307702_BE73C694 X-CRM114-Status: GOOD ( 34.94 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 23, 2025 at 02:15:10PM -0500, Frank Li wrote: > On Thu, Jan 23, 2025 at 01:04:22PM -0600, Bjorn Helgaas wrote: > > On Thu, Jan 23, 2025 at 10:21:36AM -0500, Frank Li wrote: > > > On Fri, Jan 17, 2025 at 10:42:37AM -0500, Frank Li wrote: > > > > On Thu, Jan 16, 2025 at 05:29:16PM -0600, Bjorn Helgaas wrote: > > > > > On Thu, Jan 16, 2025 at 05:14:00PM -0600, Bjorn Helgaas wrote: > > > > > > On Tue, Nov 19, 2024 at 02:44:20PM -0500, Frank Li wrote: > > > > > > > parent_bus_addr in struct of_range can indicate address information just > > > > > > > ahead of PCIe controller. Most system's bus fabric use 1:1 map between > > > > > > > input and output address. but some hardware like i.MX8QXP doesn't use 1:1 > > > > > > > map. > > > ... > > > > > I saw you have not picked all of these patches during you rework > > > pci git branches. > > > > > > I know you are busy, do you have chance to pick left patch for 6.14. > > > > This series had a mix of things: several patches related to > > .cpu_addr_fixup(), plus several unrelated ones for PHY mode and i.MX8Q > > support. I think I picked up all the unrelated ones. > > > > .cpu_addr_fixup() is a generic problem that affects dwc (dra7xx, imx6, > > artpec6, intel-gw, visconti), cadence (cadence-plat), and now > > apparently microchip. > > > > I deferred these because I'm hoping we can come up with a more generic > > solution that's easier to apply across all these cases. I don't > > really want to merge something that immediately needs to be reworked > > for other drivers. > > > > A few of the things I wonder about: > > > > - dw_pcie_get_parent_addr() has no DWC dependencies, so it doesn't > > make sense to me to have it be DWC-specific and copy and pasted > > to other places that need something similar. > > > > - It doesn't seem elegant to iterate through for_each_pci_range() in > > devm_of_pci_get_host_bridge_resources(), then again in > > dw_pcie_host_init() for io_bus_addr, then again in > > dw_pcie_iatu_setup() for each window. Maybe that's the best we > > can do, but maybe there's a way to capture what we need on the > > first time through. > > > > - The connection between .cpu_addr_fixup() and use_parent_dt_ranges > > is clear in the patches remove a .cpu_addr_fixup(), but not in the > > DWC patches on the other end. > > > > - Ideally, "use_parent_dt_ranges" would be the default and we > > wouldn't have a flag to indicate that, and drivers would have to > > opt out instead of opt in. They basically already do that by > > implementing .cpu_addr_fixup(), so maybe we can take advantage of > > that fact. > > Okay, thanks. let me think how to improve it after 6.14. Small nit that I saw when looking at this series. Some patches use "Internal Address (IA)", but other patches use "Intermediate Address (IA)". For the re-spin, use one term consistently. Kind regards, Niklas