From: Guo Ren Date: Thu, 20 Dec 2018 07:21:41 +0000 (+0800) Subject: clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes. X-Git-Tag: v5.0-rc1~37^2~9 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=1d95fe4d3de42e915bc22d5fd6cd4de103c5e517;p=linux.git clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes. Timer startup must after timer_irq_enable. For qemu, timer tick irq hanppens but irq not enable, so it will cause qemu boot failed. Signed-off-by: Guo Ren Tested-by: Liu Zhiwei --- diff --git a/drivers/clocksource/timer-mp-csky.c b/drivers/clocksource/timer-mp-csky.c index a8acc431a774..3cb6dbc88b6d 100644 --- a/drivers/clocksource/timer-mp-csky.c +++ b/drivers/clocksource/timer-mp-csky.c @@ -79,11 +79,11 @@ static int csky_mptimer_starting_cpu(unsigned int cpu) to->clkevt.cpumask = cpumask_of(cpu); + enable_percpu_irq(csky_mptimer_irq, 0); + clockevents_config_and_register(&to->clkevt, timer_of_rate(to), 2, ULONG_MAX); - enable_percpu_irq(csky_mptimer_irq, 0); - return 0; }