From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B447A2E5B08 for ; Fri, 7 Nov 2025 11:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762516722; cv=none; b=D6fuBiALYkoHlpX/njAqwVJ35JBbXKlpgEAvxXWVchIyy3/WGOnNqCeXH+guL3/z/7zUg6lKftOYOMSOWktzMiJ1Zabq5/dszyiAsrxG2+8ov/sv1uTQ/cw4XwqlAeaAahAxuFGSQXV43x23O9Nuq4vy+pNSHn4RY5PlfYb63H4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762516722; c=relaxed/simple; bh=UDVuq/lrhkMd3aCRzHjBXDEmTc6zljOBa7UFGRfvTZo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TRAwxi+kX9ADp9fHR1MFA3LW/L+jNcSF324kMXkViKRPLlXAqJOEGnXuqy4xkXEGJjNOq4wHxd8m1n4Pz56Cd3ZDuvfC6EIkt+7mqChOGbNs/TVk0C5VZgLhaw4tQ8YET3vEHzzrcr+WMdweb8WohdnxRMSujWK8SgMT2iwXIzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=EidR1XSF; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="EidR1XSF" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 3185BC0FAA1; Fri, 7 Nov 2025 11:58:12 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2F857606A6; Fri, 7 Nov 2025 11:58:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3701111852441; Fri, 7 Nov 2025 12:58:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1762516712; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=C4R54YJMw/9k/KwHXpEmkLyJAAbzYMXCXrdeUpMH9Zs=; b=EidR1XSF2KvVll3yLkR6CDO2jbmKN25490panR36DO3hpBFIsHjzhK9CQBsyvzoab0Xz0g IfKQ5zIUH8dzqMb+NRFLHsJPBmqopY8jfxAg15CFL26vqalAQKXFiQUVMAFE0givROlE6O JpXGwiSg/wlhccCMNytyI/EKJkAFiFN0/udUC7yDTJx+PeCAoFGmLIRF/lUoliZl8O/5qq kLNT5qXbLdfuY7lK1f9BjCtamZigehvjMcmuwHQNsUXK6iODqmdEiLLptET7zH30+UGFop /DcgQ8EGhmH7cRbIjGfUSZwxnDYFiLng+wz6M0dVXaz0yseJCOHMy/81vhEvYQ== Date: Fri, 7 Nov 2025 12:58:28 +0100 From: Herve Codina To: Andrea della Porta Cc: Bjorn Helgaas , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, mbrugger@suse.com, guillaume.gardet@arm.com, tiwai@suse.com, Lizhi Hou , Rob Herring Subject: Re: [PATCH v2] PCI: of: Downgrade error message on missing of_root node Message-ID: <20251107125828.18a034de@bootlin.com> In-Reply-To: References: <20251106182708.03cfb6c6@bootlin.com> <20251106175016.GA1960490@bhelgaas> Organization: Bootlin X-Mailer: Claws Mail 4.3.1 (GTK 3.24.43; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 Hi Andrea, Bjorn, On Fri, 7 Nov 2025 10:32:35 +0100 Andrea della Porta wrote: > Hi Bjorn, > > On 11:50 Thu 06 Nov , Bjorn Helgaas wrote: > > On Thu, Nov 06, 2025 at 06:27:08PM +0100, Herve Codina wrote: > > > On Thu, 6 Nov 2025 16:21:47 +0100 > > > Andrea della Porta wrote: > > > > On 13:18 Thu 06 Nov , Herve Codina wrote: > > > > > On Thu, 6 Nov 2025 12:04:07 +0100 > > > > > Andrea della Porta wrote: > > > > > > On 18:23 Wed 05 Nov , Bjorn Helgaas wrote: > > > > > > > On Wed, Nov 05, 2025 at 07:33:40PM +0100, Andrea della Porta wrote: > > Patch at https://lore.kernel.org/r/955bc7a9b78678fad4b705c428e8b45aeb0cbf3c.1762367117.git.andrea.porta@suse.com, > > added back for reference: > > > > diff --git a/drivers/pci/of.c b/drivers/pci/of.c > > index 3579265f1198..872c36b195e3 100644 > > --- a/drivers/pci/of.c > > +++ b/drivers/pci/of.c > > @@ -775,7 +775,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge) > > > > /* Check if there is a DT root node to attach the created node */ > > if (!of_root) { > > - pr_err("of_root node is NULL, cannot create PCI host bridge node\n"); > > + pr_info("Missing DeviceTree, cannot create PCI host bridge node\n"); > > return; > > } > > > > > > > > > > When CONFIG_PCI_DYNAMIC_OF_NODES is enabled, an error > > > > > > > > message is generated if no 'of_root' node is defined. > > > > > > > > > > > > > > > > On DT-based systems, this cannot happen as a root DT node > > > > > > > > is always present. On ACPI-based systems, this is not a > > > > > > > > true error because a DT is not used. > > > > > > > > > > > > > > > > Downgrade the pr_err() to pr_info() and reword the message > > > > > > > > text to be less context specific. > > > > > > > > > > > > > > of_pci_make_host_bridge_node() is called in the very generic > > > > > > > pci_register_host_bridge() path. Does that mean every boot > > > > > > > of a kernel with CONFIG_PCI_DYNAMIC_OF_NODES on a non-DT > > > > > > > system will see this message? > > > > > > > > > > > > This is the case, indeed. That's why downgrading to info seems > > > > > > sensible. > > > > > > > > > > > > > This message seems like something that will generate user > > > > > > > questions. Or is this really an error, and we were supposed > > > > > > > to have created of_root somewhere but it failed? If so, I > > > > > > > would expect a message where the of_root creation failed. > > > > I think we should just remove the message completely. I don't want > > users to enable CONFIG_PCI_DYNAMIC_OF_NODES out of curiosity or > > willingness to test, and then ask about this message. > > Agreed. This would be the easy solution, the other being creating the > empty DT so that the message will never be printed. But this require some > careful thought. The latter solution will be needed if we'll ever want to > make drivers like RP1 or lan96xx (which uses the runtime overlay) to work. > > > > > "You can avoid the message by also enabling CONFIG_OF_EARLY_FLATTREE" > > is not a very satisfactory answer. > > Unfortunately this would work on x86, but not on arm. And who knows on > other platforms. > > > > > A message at the point of *needing* this, i.e., when loading an > > overlay fails for lack of this dynamic DT, is fine. > > It seems fine to me. > Ok, even if I would prefer having an empty (or not) of_node available on all platforms, what is proposed makes sense especially in regards to potential users questions. Best regards, Hervé