From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0B64136A for ; Tue, 16 Jul 2024 05:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721107326; cv=none; b=X2r/aU51UMv9ZCZO7/FOTgOmDMjS2VyOx+ri1k8PGorkSX5EfS4KJ88KulF+CUqJRTNb41aOoJzeh6snDtB2EruZcltsIIA6LzUhW5shPmvXtYvGxCenwz+aQcCdtRYf8gULEM2L+Vn+LDR74g1N9hegzvFdcbPgSOzyvE7HdrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721107326; c=relaxed/simple; bh=q7htRbTViAynUe1KUvBKJdXCuUBYVcPiUmif37E0la0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kierzBXT/0vZ+B5XGn8weEE+zSOwyCskbdLwPEuLXZl5kx2nE19IdtXXUzimN45HTjgbmm6fpNC1kZQxPKZsCfy4kg04APKoaz1CvqPYf0VhB7RMtH8Ks50OKCm+Scem6R53nXOW/JdqvMfB4KtfmWYHIFBLkmAkfE/soGwMhew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=h50l1E50; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="h50l1E50" Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-78135be2d46so3765387a12.0 for ; Mon, 15 Jul 2024 22:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721107323; x=1721712123; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=nCJcSlsxzmcGU/ol+ZphLepYn+zSneU2YnwQbi1SKTk=; b=h50l1E50aH2wPsA498Dn3f+S9K8XVSyRRjwESJmjOh1ln4jWfVali9dkzwA2Osw8VT 870G142gaLS3875inWTT6ndzzuTjGP9Iees/7+mJdIhc6C/88VAInksPHXbP/mmi0EPK ocQH84VU65P1GASktLJxnKGU17/ohS/EDrSd+xdVAaCNy11fHXBYfi83WQ+F5+7PQyRL lWddqynGJMbsKVX1bJggf2g78ICH84Gm6/7I+xPSw23XA6o4UZtPn5aL9dEWmq+xKi/s VCkpJwpv51pCFxV98uv5AqIhVxHUXnVK+ebBLkye3n5HMTA9VMT8U5rd2BLLFcSYDZ3z e0sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721107323; x=1721712123; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nCJcSlsxzmcGU/ol+ZphLepYn+zSneU2YnwQbi1SKTk=; b=oeebt+acX1H0EymwMjkS8h58wxdTqw6+5bE0opeQOKg5Kisk/GobwnspHBFNoDOVBf YrnT0yY00pau7nQ6LdTu3H3Lx/WEzyGsHaWgJGvXpCaEDxVF1Ki8TaD8rx0qVirrDuZF Q9FLhDO49rGwQd7VlpuIrhIlgrwRPZCiN2iAS/htg1T/tID8QTpiSTpbi/Da2fdjRoLp KAU54L19RhCKHpzlM1o5BvE5corUF0nmkCx/JkJ886Re8ehXdE/GJq1s5SPVUdEHnlvB 46lHFmRmOd5kcbVktI/9w2+baqk6xCzy7IN6Ci3Z+TOoAcDUpfWd8sLfSO835Huz9FeA 2VqQ== X-Forwarded-Encrypted: i=1; AJvYcCU+Ljy1XKTb94qTU2sE33dlN+OIdkwCzo4QxoyjWPvRKIe6YmAc5TiPXlD/3yP2lbdWgX8jC7fkWgotmv4TdjNcbM+jfFxCTlYt+5SR X-Gm-Message-State: AOJu0YwMw+xEGotIqb0AlcMEAS1oTgCYGjm1pILgB+iqtJcaD1NMYjvb 7KrvkUgxZEbBUbqErchvsbMHQ0iw9w8Fr6xfdFNgvF2/05k7g5sLl1nB5UC+JIoluvuqC/W9fQU = X-Google-Smtp-Source: AGHT+IHYY+XYEW0QviFVSL2Wxv+cytzps03AGaTXPes1VQeCqPvZwa/jm9JROaB1vSRLz5c8LKdaTw== X-Received: by 2002:a05:6a21:458a:b0:1be:c1c0:b8de with SMTP id adf61e73a8af0-1c3f12978ecmr1126946637.42.1721107322938; Mon, 15 Jul 2024 22:22:02 -0700 (PDT) Received: from thinkpad ([220.158.156.207]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cacd41aa2bsm7358175a91.31.2024.07.15.22.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 22:22:02 -0700 (PDT) Date: Tue, 16 Jul 2024 10:51:55 +0530 From: Manivannan Sadhasivam To: Linus Torvalds Cc: Bartosz Golaszewski , Greg Kroah-Hartman , Krzysztof Kozlowski , Bjorn Andersson , Bjorn Helgaas , Arnd Bergmann , Mark Brown , Rob Herring , Luiz Augusto von Dentz , Srini Kandagatla , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bartosz Golaszewski Subject: Re: [GIT PULL] power sequencing updates for v6.11-rc1 Message-ID: <20240716052155.GE3446@thinkpad> References: <20240712091008.14815-1-brgl@bgdev.pl> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jul 15, 2024 at 09:29:34PM -0700, Linus Torvalds wrote: > On Mon, 15 Jul 2024 at 19:17, Linus Torvalds > wrote: > > > > Hmm. Let's see how this all works out, but I already found an annoyance. > > .. and another one. > > On my Altra box, commit 8fb18619d910 ("PCI/pwrctl: Create platform > devices for child OF nodes of the port node") causes annoying messages > at bootup: > > pci 000c:00:01.0: failed to populate child OF nodes (-22) > pci 000c:00:02.0: failed to populate child OF nodes (-22) > .. repeat for every PCI bridge .. > > for no obvious reason. > > FWIW, -22 is -EINVAL. > So we did see these error messages on non-CONFIG_OF platforms, and a fix was merged as well with commit, 50b040ef3732 ("PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled") But apparently, the fix assumed that all CONFIG_OF platforms (selected in defconfig) have 'dev.of_node' populated. And your platforms being an ARM64 one, has CONFIG_OF selected ARM64 defconfig, but uses ACPI instead of devicetree. So you don't have 'dev.of_node', which is a valid configuration btw (we failed to spot it). And in other places of these of_ APIs, we do have checks for 'dev.of_node'. So for this issue, below diff should be sufficient: diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 3bab78cc68f7..abe826bb5840 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -350,7 +350,7 @@ void pci_bus_add_device(struct pci_dev *dev) pci_dev_assign_added(dev, true); - if (IS_ENABLED(CONFIG_OF) && pci_is_bridge(dev)) { + if (IS_ENABLED(CONFIG_OF) && dev->dev.of_node && pci_is_bridge(dev)) { retval = of_platform_populate(dev->dev.of_node, NULL, NULL, &dev->dev); if (retval) Let me know if it works, I can spin a patch. - Mani -- மணிவண்ணன் சதாசிவம்