On Wed, Aug 28, 2024 at 06:22:02PM GMT, Andrew Jones wrote: > When Sstc is available make sure that even if we enable timer > interrupts nothing will happen. This is necessary for cases where > the unit tests actually intend to use the SBI TIME extension and > aren't thinking about Sstc at all, like the SBI TIME test in > riscv/sbi where we can now remove the initialization. > > Signed-off-by: Andrew Jones <andrew.jones@xxxxxxxxx> > --- > lib/riscv/asm/timer.h | 1 + > lib/riscv/setup.c | 2 ++ > lib/riscv/smp.c | 2 ++ > lib/riscv/timer.c | 13 +++++++++++++ > riscv/sbi.c | 5 ----- > 5 files changed, 18 insertions(+), 5 deletions(-) > > diff --git a/lib/riscv/asm/timer.h b/lib/riscv/asm/timer.h > index b3514d3f6a78..fd12251a3a6b 100644 > --- a/lib/riscv/asm/timer.h > +++ b/lib/riscv/asm/timer.h > @@ -5,6 +5,7 @@ > #include <asm/csr.h> > > extern void timer_get_frequency(void); > +extern void local_timer_init(void); > I've renamed the new function to local_hart_init and put it in processor.c instead of timer.c. This is because going forward there will be other non-timer-related CSRs that need to be set at init time and we can just lump them all together. Thanks, drew