OSDN Git Service

clocksource/drivers/riscv_timer: Provide the sched_clock
authorAnup Patel <anup@brainfault.org>
Tue, 4 Dec 2018 10:29:52 +0000 (15:59 +0530)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 18 Dec 2018 21:22:23 +0000 (22:22 +0100)
commit92e0d143fdef1faa7560c93fb0d6cd6c61da88ee
treef52b5e219877dbd0b2e646c63a1c8bbb63dde25f
parent4f352d1fc5a8d3220e29766a26172eff34867014
clocksource/drivers/riscv_timer: Provide the sched_clock

Currently, we don't have a sched_clock registered for RISC-V systems.
This means Linux time keeping will use jiffies (running at HZ) as the
default sched_clock.

To avoid this, we explicity provide sched_clock using RISC-V rdtime
instruction (similar to riscv_timer clocksource).

Signed-off-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/Kconfig
drivers/clocksource/riscv_timer.c