git: 33734a1f765f - main - riscv timer: provide a function for cpu_ticks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Jun 2022 18:16:10 UTC
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=33734a1f765f8d0ca6214918c3051d88b7b98764 commit 33734a1f765f8d0ca6214918c3051d88b7b98764 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2022-06-21 16:23:31 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2022-06-23 18:15:11 +0000 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 --- sys/riscv/riscv/timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c index 358b89e2be18..e7df76fca70b 100644 --- a/sys/riscv/riscv/timer.c +++ b/sys/riscv/riscv/timer.c @@ -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); }