From: Vivian Wang <wangruikang@iscas.ac.cn>
To: aleksa.paunovic@htecgroup.com,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org,
Djordje Todorovic <djordje.todorovic@htecgroup.com>
Subject: Re: [PATCH RESEND v6 2/2] riscv: Allow for riscv-clock to pick up mmio address.
Date: Wed, 24 Sep 2025 23:35:31 +0800 [thread overview]
Message-ID: <27092a3a-cf9d-4481-99b3-4cc64a544b4f@iscas.ac.cn> (raw)
In-Reply-To: <20250924-riscv-time-mmio-v6-2-9c6158a14b37@htecgroup.com>
Hi Aleksa,
On 9/24/25 19:10, Aleksa Paunovic via B4 Relay wrote:
> From: Aleksa Paunovic <aleksa.paunovic@htecgroup.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@htecgroup.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
prev parent reply other threads:[~2025-09-24 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 11:10 [PATCH RESEND v6 0/2] riscv: Use GCR.U timer device as clocksource Aleksa Paunovic via B4 Relay
2025-09-24 11:10 ` [PATCH RESEND v6 1/2] dt-bindings: timer: mips,p8700-gcru Aleksa Paunovic via B4 Relay
2025-09-24 11:10 ` [PATCH RESEND v6 2/2] riscv: Allow for riscv-clock to pick up mmio address Aleksa Paunovic via B4 Relay
2025-09-24 13:45 ` Daniel Lezcano
2025-09-24 15:35 ` Vivian Wang [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=27092a3a-cf9d-4481-99b3-4cc64a544b4f@iscas.ac.cn \
--to=wangruikang@iscas.ac.cn \
--cc=aleksa.paunovic@htecgroup.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=djordje.todorovic@htecgroup.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--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
all inboxes | Powered by JetHome®