arm64: KVM: unregister notifiers in hyp mode teardown path
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Apr 2016 13:46:51 +0000 (14:46 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 6 Apr 2016 11:47:52 +0000 (13:47 +0200)
commit06a71a24bae57a07afee9cda6b00495347d8a448
tree46a9cdb33645181f15fe915af1d76eb90c221020
parent6141570c36f0c937d5deff20d9cf08cbd8d8ed48
arm64: KVM: unregister notifiers in hyp mode teardown path

Commit 1e947bad0b63 ("arm64: KVM: Skip HYP setup when already running
in HYP") re-organized the hyp init code and ended up leaving the CPU
hotplug and PM notifier even if hyp mode initialization fails.

Since KVM is not yet supported with ACPI, the above mentioned commit
breaks CPU hotplug in ACPI boot.

This patch fixes teardown_hyp_mode to properly unregister both CPU
hotplug and PM notifiers in the teardown path.

Fixes: 1e947bad0b63 ("arm64: KVM: Skip HYP setup when already running in HYP")
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/arm.c