Re: [RFC PATCH v3 17/37] kvx: Add boot and setup routines

Arnd Bergmann
2024-07-23T08:44:23Z

On Mon, Jul 22, 2024, at 09:41, ysionneau@kalrayinc.com wrote:
> From: Yann Sionneau <ysionneau@kalrayinc.com>
>
> Add basic boot, setup and reset routines for kvx.
> ---
> arch/kvx/include/asm/setup.h | 34 ++
> arch/kvx/kernel/common.c | 11 +
> arch/kvx/kernel/head.S | 580 +++++++++++++++++++++++++++++++++++
> arch/kvx/kernel/prom.c | 26 ++
> arch/kvx/kernel/reset.c | 37 +++
> arch/kvx/kernel/setup.c | 181 +++++++++++
> arch/kvx/kernel/time.c | 242 +++++++++++++++
> 7 files changed, 1111 insertions(+)
> create mode 100644 arch/kvx/include/asm/setup.h
> create mode 100644 arch/kvx/kernel/common.c
> create mode 100644 arch/kvx/kernel/head.S
> create mode 100644 arch/kvx/kernel/prom.c
> create mode 100644 arch/kvx/kernel/reset.c
> create mode 100644 arch/kvx/kernel/setup.c
> create mode 100644 arch/kvx/kernel/time.c

The time.c file feels misplaced here, as it contains a
clocksource/clockevent driver that would normally be placed
in drivers/clocksource.

It's possible that we discussed this before and there was
a reason for keeping it in arch/kvm, but I don't see anything
that prevents it from being built outside of arch/kvx (like
custom instructions that are not defined in a header anywhere).

Can you split that out and submit it as a driver to the
clocksource maintainers, keeping only the time_init()
function in setup.c?

Arnd