From 420b167ba9a9fc2d3ab813771e412ed8aaaa70ec Mon Sep 17 00:00:00 2001 From: Dongjiu Geng Date: Mon, 25 Jun 2018 16:21:00 +0200 Subject: [PATCH] clocksource: arm_arch_timer: ipipe: correct the wrong ipipe_timer setup The arch_timer_mem_use_virtual variable is used to judge the type of memory-mapped timer, it can not be used to judge the type of CP15 timer, so fix this issue, otherwise it will lead to kernel panic when running as a VM. Signed-off-by: Dongjiu Geng --- drivers/clocksource/arm_arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index ad2637d37f2a..a37c61a0c0e1 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -835,7 +835,7 @@ static void __arch_timer_setup(unsigned type, arch_timer_check_ool_workaround(ate_match_local_cap_id, NULL); #ifdef CONFIG_IPIPE clk->ipipe_timer = raw_cpu_ptr(&arch_itimer); - if (arch_timer_mem_use_virtual) { + if (arch_timer_uses_ppi == ARCH_TIMER_VIRT_PPI) { clk->ipipe_timer->irq = arch_timer_ppi[ARCH_TIMER_VIRT_PPI]; clk->ipipe_timer->ack = arch_itimer_ack_virt; } else { -- GitLab