mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: aiyengar1990@gmail.com
Cc: Ulf Hansson <ulfh@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
	 Shawn Lin <shawn.lin@rock-chips.com>,
	Kevin Hilman <khilman@linaro.org>,
	 Caesar Wang <wxt@rock-chips.com>,
	Elaine Zhang <zhangqing@rock-chips.com>,
	 linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] pmdomain: rockchip: do not report probe deferral of a domain as an error
Date: Wed, 11 Nov 2026 23:57:52 +0100	[thread overview]
Message-ID: <avTxNzSvbWM673H5@venus> (raw)
In-Reply-To: <20261110-pmdomain-rockchip-v1-3-6b9fa6ebaa86@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]

Hi,

On Tue, Nov 10, 2026 at 07:11:30AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
> 
> When a power domain clock is not available yet,
> rockchip_pm_add_one_domain() records the reason with dev_err_probe() and
> returns -EPROBE_DEFER, but its callers rockchip_pm_domain_probe() and
> rockchip_pm_add_subdomain() still print it with dev_err():
> 
>   rockchip-pm-domain ...: failed to handle node power-domain: -517
> 
> once per probe attempt, and twice for a nested domain. On an RK3588
> board whose NPU domain clock appears late this is more than 20 error
> lines before the domain finally probes.
> 
> Only rockchip_pm_add_one_domain() can return -EPROBE_DEFER here, and it
> already records the deferral reason, so skip the message in the callers
> for -EPROBE_DEFER and keep it for real errors. dev_err_probe() is not
> used in the callers because it would replace the reason recorded for
> /sys/kernel/debug/devices_deferred ("failed to get clk at index 1") with
> the less specific "failed to handle node power-domain".
> 
> Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver")
> Fixes: 6be05b5ec161 ("soc: rockchip: power-domain: add support for sub-power domains")
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
>  drivers/pmdomain/rockchip/pm-domains.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
> index d7df19e10000..70ebe5696b39 100644
> --- a/drivers/pmdomain/rockchip/pm-domains.c
> +++ b/drivers/pmdomain/rockchip/pm-domains.c
> @@ -1050,8 +1050,9 @@ static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
>  
>  		error = rockchip_pm_add_one_domain(pmu, np);
>  		if (error) {
> -			dev_err(pmu->dev, "failed to handle node %pOFn: %d\n",
> -				np, error);
> +			if (error != -EPROBE_DEFER)
> +				dev_err(pmu->dev, "failed to handle node %pOFn: %d\n",
> +					np, error);
>  			return error;
>  		}
>  
> @@ -1144,15 +1145,17 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
>  	for_each_available_child_of_node_scoped(np, node) {
>  		error = rockchip_pm_add_one_domain(pmu, node);
>  		if (error) {
> -			dev_err(dev, "failed to handle node %pOFn: %d\n",
> -				node, error);
> +			if (error != -EPROBE_DEFER)
> +				dev_err(dev, "failed to handle node %pOFn: %d\n",
> +					node, error);
>  			goto err_out;
>  		}
>  
>  		error = rockchip_pm_add_subdomain(pmu, node);
>  		if (error < 0) {
> -			dev_err(dev, "failed to handle subdomain node %pOFn: %d\n",
> -				node, error);
> +			if (error != -EPROBE_DEFER)
> +				dev_err(dev, "failed to handle subdomain node %pOFn: %d\n",
> +					node, error);
>  			goto err_out;
>  		}
>  	}

I suggest to fully drop those dev_err() and instead ensure that
rockchip_pm_add_subdomain() has dev_err_probe() in all relevant
error paths. Note that -ENOMEM should also be quiet, so its almost
done already.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-11-11 22:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  7:11 [PATCH 0/3] pmdomain: rockchip: fix the probe error and deferral paths Arun Iyengar via B4 Relay
2026-11-10  7:11 ` [PATCH 1/3] pmdomain: rockchip: put only the clocks that were got on error Arun Iyengar via B4 Relay
2026-11-10  7:11 ` [PATCH 2/3] pmdomain: rockchip: remove subdomain links before the domains " Arun Iyengar via B4 Relay
2026-11-10  7:11 ` [PATCH 3/3] pmdomain: rockchip: do not report probe deferral of a domain as an error Arun Iyengar via B4 Relay
2026-11-11 22:57   ` Sebastian Reichel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avTxNzSvbWM673H5@venus \
    --to=sebastian.reichel@collabora.com \
    --cc=aiyengar1990@gmail.com \
    --cc=heiko@sntech.de \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulfh@kernel.org \
    --cc=wxt@rock-chips.com \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®