LoongArch: Implement constant timer shutdown interface
authorBibo Mao <maobibo@loongson.cn>
Tue, 21 Nov 2023 07:03:25 +0000 (15:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:58 +0000 (17:01 +0100)
commitf61771aec67660c24b50202b58861cc8ecc11382
tree4ac0caadaedc8be20725e43abdb5d0921bbd218e
parentc28fec461df3869355c95b6baed3c36aa870f1fe
LoongArch: Implement constant timer shutdown interface

[ Upstream commit d43f37b73468c172bc89ac4824a1511b411f0778 ]

When a cpu is hot-unplugged, it is put in idle state and the function
arch_cpu_idle_dead() is called. The timer interrupt for this processor
should be disabled, otherwise there will be pending timer interrupt for
the unplugged cpu, so that vcpu is prevented from giving up scheduling
when system is running in vm mode.

This patch implements the timer shutdown interface so that the constant
timer will be properly disabled when a CPU is hot-unplugged.

Reviewed-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/kernel/time.c