From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [RFC] clocksource/drivers/sh_cmt: Always leave device running after probe
Date: Mon, 13 Oct 2025 09:22:17 +0200 [thread overview]
Message-ID: <aOyoqfOQKRh81daL@shikoro> (raw)
In-Reply-To: <20251012091000.1160751-1-niklas.soderlund+renesas@ragnatech.se>
[-- Attachment #1: Type: text/plain, Size: 909 bytes --]
Hi Niklas,
thanks for your work on these timers!
> For non-PREEMPT_RT builds this is not really an issue, but for
> PREEMPT_RT builds where normal spinlocks can sleep this might be an
> issue. Be cautious and always leave the power and clock running after
> probe.
I am not a super-duper PM expert but this sounds pretty reasonable to
me. Only minor comments:
> ret = -ETIMEDOUT;
> - goto err1;
> + return ret;
return -ETIMEDOUT;
> if (!(ch->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE))) {
> - pm_runtime_get_sync(&ch->cmt->pdev->dev);
> ret = sh_cmt_enable(ch);
> }
Curly braces can go.
> if (f && !(ch->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE))) {
> sh_cmt_disable(ch);
> - pm_runtime_put(&ch->cmt->pdev->dev);
> }
ditto.
And I don't if this is a seperate patch or not, but we could simplify
probe a little by using 'clk_prepare_enable()'...
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-10-13 7:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-12 9:10 [RFC] clocksource/drivers/sh_cmt: Always leave device running after probe Niklas Söderlund
2025-10-13 7:22 ` Wolfram Sang [this message]
2025-10-13 7:32 ` Niklas Söderlund
2025-10-15 12:43 ` Geert Uytterhoeven
2025-10-15 12:53 ` Niklas Söderlund
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=aOyoqfOQKRh81daL@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=daniel.lezcano@linaro.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=tglx@linutronix.de \
/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