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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <27092a3a-cf9d-4481-99b3-4cc64a544b4f@iscas.ac.cn>
Date: Wed, 24 Sep 2025 23:35:31 +0800
From: Vivian Wang <wangruikang@...as.ac.cn>
To: aleksa.paunovic@...cgroup.com, Daniel Lezcano
 <daniel.lezcano@...aro.org>, Thomas Gleixner <tglx@...utronix.de>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Paul Walmsley
 <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
 Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 linux-riscv@...ts.infradead.org,
 Djordje Todorovic <djordje.todorovic@...cgroup.com>
Subject: Re: [PATCH RESEND v6 2/2] riscv: Allow for riscv-clock to pick up
 mmio address.

Hi Aleksa,

On 9/24/25 19:10, Aleksa Paunovic via B4 Relay wrote:

> From: Aleksa Paunovic <aleksa.paunovic@...cgroup.com>
>
> Allow faster rdtime access via GCR.U mtime shadow register on RISC-V
> devices. This feature can be enabled by setting GCRU_TIME_MMIO
> during configuration.
> Reformat the clint timer to use the same mechanism if RISCV_M_MODE is set.
>
> Signed-off-by: Aleksa Paunovic <aleksa.paunovic@...cgroup.com>
> ---
>  arch/riscv/include/asm/clint.h    | 26 ----------------
>  arch/riscv/include/asm/timex.h    | 63 ++++++++++++++++++++++-----------------
>  drivers/clocksource/Kconfig       | 12 ++++++++
>  drivers/clocksource/timer-clint.c | 20 ++++++-------
>  drivers/clocksource/timer-riscv.c | 34 +++++++++++++++++++++
>  5 files changed, 90 insertions(+), 65 deletions(-)

I have a question about the design of this patch. Do we *really* have to
combine the GCR.U timer driver into the existing riscv,timer driver?

It seems at least to me that all we really need is a *new* clocksource
driver with a higher "rating" than riscv_clocksource and
clint_clocksource, and the kernel will prefer it anyway.

In your patch, you're effectively making timer-riscv a driver for both
riscv,timer and mips,p8700-gcru, while including a whole bunch of
indirections and renamings. I think the structure of this patch would be
much simpler if it was just adding a new clocksource driver.

Please consider.

Thanks,
Vivian "dramforever" Wang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ