riscv timer: provide a function for cpu_ticks

This is cheaper than the default of tc_cpu_ticks().

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35462
This commit is contained in:
Mitchell Horne 2022-06-21 13:23:31 -03:00
parent b82f4170fc
commit 33734a1f76

View File

@ -219,6 +219,8 @@ riscv_timer_attach(device_t dev)
sc->et.et_priv = sc;
et_register(&sc->et);
set_cputicker(get_timecount, sc->clkfreq, false);
return (0);
}