]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: Prefer sstc extension if available
authorAtish Patra <atishp@rivosinc.com>
Fri, 22 Jul 2022 16:50:46 +0000 (09:50 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 11 Aug 2022 21:36:55 +0000 (14:36 -0700)
commit262c5b36f68da964af49eb27ec636f33ea2f4b82
tree6ea3c4b80dbecb0de1071c630daafe6babc34090
parent355073727c985c95f5ae843b6c547dc200df6604
RISC-V: Prefer sstc extension if available

RISC-V ISA has sstc extension which allows updating the next clock event
via a CSR (stimecmp) instead of an SBI call. This should happen dynamically
if sstc extension is available. Otherwise, it will fallback to SBI call
to maintain backward compatibility.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20220722165047.519994-4-atishp@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
drivers/clocksource/timer-riscv.c