diff options
author | Atish Patra <atish.patra@wdc.com> | 2019-02-13 12:18:10 -0800 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-02-23 12:13:45 +0100 |
commit | 26478b2f6a06ca36816e8f473aebe6f686b0df90 (patch) | |
tree | 834cf937888db0d419c8428c2caa1c2cf0af5a33 /drivers/clocksource/timer-orion.c | |
parent | 29f970cf670f12d72580662b2f291cf2dc86aaf5 (diff) | |
download | linux-26478b2f6a06ca36816e8f473aebe6f686b0df90.tar.bz2 |
clocksource/drivers/riscv: Add required checks during clock source init
Currently, clocksource registration happens for an invalid cpu for
non-smp kernels. This lead to kernel panic as cpu hotplug registration
will fail for those cpus. Moreover, riscv_hartid_to_cpuid can return
errors now.
Do not proceed if hartid or cpuid is invalid. Take this opportunity to
print appropriate error strings for different failure cases.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/timer-orion.c')
0 files changed, 0 insertions, 0 deletions