lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aOyoqfOQKRh81daL@shikoro>
Date: Mon, 13 Oct 2025 09:22:17 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [RFC] clocksource/drivers/sh_cmt: Always leave device running
 after probe

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


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ