Commit 5d5f197b authored by Dongjiu Geng's avatar Dongjiu Geng Committed by Dmitriy Cherkasov

ipipe: arm_arch_timer: 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: 's avatarDongjiu Geng <gengdongjiu@huawei.com>
parent e401d452
......@@ -753,7 +753,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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment