From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=188.40.3.216 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381896; b=rwiZwdPe9NhRGXNuvjLjtFnhDNb/7ZhcuuvVZk6bzPOcgrQ7f4j1fd4yWP33iBPpdD83 VvnZfluLcn5scrUH67yP/WUdsxIWjHnb1t9YrmnII0/Kv6J8ZhGqcajfupLru1lwzSyPq byZtC21U0EU8HMhHNSGePRixClnhAP6FBobuzVFcsRwovFU9e6lJicix7xcImi6nJ5idZ CtzIuooOkJsnMzqISSKdWHt8Lh/j40sO0MvlRzu2owd2QvlZV7FsGVF/h2dWYG3Hlo4g4 d4ty5EjNFpQJKFQgQBfsMGBY0fzv46xqr2jAz/eeaDLhFWzugp7XbF6g9fblMRXjVuQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381896; h=DMARC-Filter:DKIM-Signature:Received:Received:From:To:Cc:Subject: Date:Message-ID:Organization:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Virus-Scanned; bh=sh20fU4VbNIpUHqRmqT2i688FjY/U/u6FVMdkIrDeRY=; b=q132FvoMzSsRWad4a5SFPfEyBZiUeF1tJJhgKPXsukN6UXVMIQzzVypYiHCpUgi8qb94 jqVozS4F9Fmm7UfhdGAu5QK4akbYPBoZKEXOMBvW0pJ3Tv7kCVU4H3UnYIGtIbpNaJdC8 gQcT0BgrD2IKkoWHLhBMOa2MffEgMffNIwdaBaOe/ZHB96S685rvYMQW1v0X2rXpercxL dZJ02IwxPsET/kOJkBTsDEBhqhLgfv91i4L3cST/17hgG4UAN2+iOgL9OpO6spuXoEbgO BjrI5MHz6krXw8uKTwT8BA6/QU613/kGc22pTha24wFA2FF3prCBr53M1N/kN2arX5w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass header.d=ew.tq-group.com header.i=@ew.tq-group.com header.a=rsa-sha256 header.s=default2602 header.b=nIBHTyiV; arc=none smtp.remote-ip=188.40.3.216 Received: from www537.your-server.de (www537.your-server.de [188.40.3.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6BB8606A330; Fri, 4 Dec 2026 10:58:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C6BB8606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.a=rsa-sha256 header.s=default2602 header.b=nIBHTyiV DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ew.tq-group.com; s=default2602; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=sh20fU4VbNIpUHqRmqT2i688FjY/U/u6FVMdkIrDeRY=; b=nIBHTyiVV/KrkKLAD9MacC6VQ3 ncUnfrgynwbOwwEWwns2yVK7G3UyAmNREl3gaedSYcW71+Yl4q2UcKDWaIGylw6LMR7MoDGhbJWWu Uj8h5B3UCCIcmujJt9T8EGygwk4Uu9YBtixim39Zesw4j3CQnefrqQKqNKtC7AHdbzHdaeVE4lMRB AlQGDIkDP1+lbMUNTtrZ5Ibo7+RMjTmdi8KlmaomJnHx8eYLf53B3ZZ1lugZjJ01JdU8/FrilnfuS DoTY2jBu5Is7JYdHkmMNa+Hq+l74mBGGcs4FOjqYggEMr8pCrTWCIM+xmvdsbTUJF6bRYf6bnuo5R CmtE2sVw==; Received: from sslproxy06.your-server.de ([78.46.172.3]) by www537.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1xZQzO-000Iaq-3D; Fri, 04 Dec 2026 11:58:07 +0100 Received: from localhost ([127.0.0.1]) by sslproxy06.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xZQzO-0003BA-1p; Fri, 04 Dec 2026 11:58:06 +0100 From: Alexander Stein To: bhelgaas@google.com, robh@google.com, krzk+dt@kernel.org, conor+dt@kernel.org, linux-pci@vger.kernel.org Cc: daniel@riscstar.com, mohd.anwar@oss.qualcomm.com, lorenzo.bianconi@oss.qualcomm.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Elder Subject: Re: [PATCH v4 0/2] PCI: of: update endpoint ranges dynamically Date: Fri, 04 Dec 2026 11:58:05 +0100 Message-ID: <5372347.31r3eYUQgx@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20261105212412.591931-1-elder@riscstar.com> References: <20261105212412.591931-1-elder@riscstar.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Virus-Scanned: Clear (ClamAV 1.4.7/28201/Fri Dec 4 07:28:40 2026) Hi Alex, Am Donnerstag, 5. November 2026, 22:24:10 Mitteleurop=C3=A4ische Normalzeit= schrieb Alex Elder: > This series fixes a bug in PCI devicetree handling code. >=20 > If a PCI endpoint function is represented in devicetree, and it > implements a PCI endpoint bus, its ranges property must be created > dynamically. This is because the PCI function's BAR addresses are > assigned during PCI enumeration, and a static ranges property cannot > assume a particular static BAR address matches what was assigned. >=20 > The solution is to dynamically generate a ranges property for PCI > functions defined in devicetree that implement a PCI endpoint bus. Thanks for the series. I've picked your dynamic_ranges-v4 branch and managed to create DT devices for BARs on a FPGA attached to an imx8mp, including the dynamic ranges. But I noticed I had to add my own PCIe fixup regarding of_pci_make_dev_node for it to take effect. Is this really necessary or can it be done automatically? =46WIW: Tested-by: Alexander Stein Best regards, Alexander >=20 > -Alex >=20 > Note: this series depends on the patch "PCI: of: drop the reg_num > argument to of_pci_set_address()" found in this series: > https://lore.kernel.org/lkml/20261105153801.435566-5-elder@riscstar.com/ >=20 > The entire series (based on v7.4-rc1 and including that series as > prerequisite) is available here: > https://github.com/riscstar/linux/tree/outgoing/dynamic_ranges-v4 >=20 > Version 3 is available here: > https://lore.kernel.org/lkml/20260924222444.1351466-1-elder@riscstar.co= m/ >=20 > Between version 3 and version 4: > - Dramatically simplified the description in this cover letter. See > earlier versions for a more lengthy explanation. > - Dropped the first patch, which allowed a null pointer for the flags > argument to of_pci_get_addr_flags(). This wasn't really necessary > and didn't really add value. > - Indicated clearly that Andrea della Porta has tested this series on > the Raspberry Pi 5, which uses PCI endpoint bus for its RP1 chip. > The current statically-defined ranges property works for this system, > and when the necessary PCI quirk is enabled, the dynamically generated > ranges property works correctly as well. >=20 > Between version 2 and version 3: > - The ranges property for a PCI endpoint with an existing devicetree node > is only updated if its ranges property has an empty value (i.e., it is > "ranges;", or is not defined) >=20 > Version 2 is available here: > https://lore.kernel.org/lkml/20260910021919.3421449-1-elder@riscstar.co= m/ >=20 > Between version 1 and version 2: > - Included the first patch (which was previously posted in a different > series) > - Modified the last patch so the ranges property is updated only for > PCI endpoints having at least one "pci-ep-bus" node > - Rebased on v7.3-rc2 (and the prerequisite series) >=20 > Version 1 is available here: > https://lore.kernel.org/lkml/20260813220717.1394644-1-elder@riscstar.co= m/ >=20 >=20 >=20 > Alex Elder (2): > PCI: of: introduce of_pci_build_prop_ranges() > PCI: of: introduce of_pci_update_endpoint_node_ranges() >=20 > drivers/pci/of.c | 97 ++++++++++++++++++++++++++--- > drivers/pci/of_property.c | 126 +++++++++++++++++++++++++------------- > drivers/pci/pci.h | 1 + > 3 files changed, 173 insertions(+), 51 deletions(-) >=20 >=20 > base-commit: 8c786803613eb0d3352417509611d1db877c65af >=20 =2D-=20 TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld, Germ= any Amtsgericht M=C3=BCnchen, HRB 105018 Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stefan Sch= neider http://www.tq-group.com/