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: <a292bf98-74e2-405c-bb7c-3686959cdb10@linux.dev>
Date: Mon, 17 Nov 2025 10:13:24 +0800
From: "enlin.mu" <enlin.mu@...ux.dev>
To: mani@...nel.org, daniel.lezcano@...aro.org, tglx@...utronix.de,
 linux-arm-kernel@...ts.infradead.org, linux-unisoc@...ts.infradead.org,
 linux-kernel@...r.kernel.org, enlin.mu@...soc.com
Subject: Re: [PATCH V2] clocksource/drivers/rda: Add sched_clock_register for
 RDA8810PL SoC

Hi Everyone

Who can help review this patch?

thanks

On 2025/11/7 14:33, Enlin Mu wrote:
> From: Enlin Mu <enlin.mu@...soc.com>
> 
> The current system log timestamp accuracy is tick, which can not
> meet the usage requirements and needs to reach nanoseconds.
> Therefore, the sched_clock_register funciton needs to be add.
> 
> Signed-off-by: Enlin Mu <enlin.mu@...soc.com>
> ---
>   drivers/clocksource/timer-rda.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-rda.c b/drivers/clocksource/timer-rda.c
> index fd1199c189bf..0be8e05970e2 100644
> --- a/drivers/clocksource/timer-rda.c
> +++ b/drivers/clocksource/timer-rda.c
> @@ -13,6 +13,7 @@
>   
>   #include <linux/init.h>
>   #include <linux/interrupt.h>
> +#include <linux/sched_clock.h>
>   
>   #include "timer-of.h"
>   
> @@ -153,7 +154,7 @@ static struct timer_of rda_ostimer_of = {
>   	},
>   };
>   
> -static u64 rda_hwtimer_read(struct clocksource *cs)
> +static u64 rda_hwtimer_clocksource_read(void)
>   {
>   	void __iomem *base = timer_of_base(&rda_ostimer_of);
>   	u32 lo, hi;
> @@ -167,6 +168,11 @@ static u64 rda_hwtimer_read(struct clocksource *cs)
>   	return ((u64)hi << 32) | lo;
>   }
>   
> +static u64 rda_hwtimer_read(struct clocksource *cs)
> +{
> +	return rda_hwtimer_clocksource_read();
> +}
> +
>   static struct clocksource rda_hwtimer_clocksource = {
>   	.name           = "rda-timer",
>   	.rating         = 400,
> @@ -185,6 +191,7 @@ static int __init rda_timer_init(struct device_node *np)
>   		return ret;
>   
>   	clocksource_register_hz(&rda_hwtimer_clocksource, rate);
> +	sched_clock_register(rda_hwtimer_clocksource_read, 64, rate);
>   
>   	clockevents_config_and_register(&rda_ostimer_of.clkevt, rate,
>   					0x2, UINT_MAX);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ