Commit f7ce370b authored by Jork Loeser's avatar Jork Loeser Committed by Wei Liu
Browse files

x86/hyperv: move stimer cleanup to hv_machine_shutdown()



Move hv_stimer_global_cleanup() from vmbus's hv_kexec_handler() to
hv_machine_shutdown() in the platform code. This ensures stimer cleanup
happens before the vmbus unload, which is required for root partition
kexec to work correctly.

Co-developed-by: default avatarAnirudh Rayabharam <anrayabh@linux.microsoft.com>
Signed-off-by: default avatarAnirudh Rayabharam <anrayabh@linux.microsoft.com>
Signed-off-by: default avatarJork Loeser <jloeser@linux.microsoft.com>
Reviewed-by: default avatarStanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent 3c42b334
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -235,8 +235,12 @@ void hv_remove_crash_handler(void)
#ifdef CONFIG_KEXEC_CORE
static void hv_machine_shutdown(void)
{
	if (kexec_in_progress && hv_kexec_handler)
	if (kexec_in_progress) {
		hv_stimer_global_cleanup();

		if (hv_kexec_handler)
			hv_kexec_handler();
	}

	/*
	 * Call hv_cpu_die() on all the CPUs, otherwise later the hypervisor
+0 −1
Original line number Diff line number Diff line
@@ -2883,7 +2883,6 @@ static struct platform_driver vmbus_platform_driver = {

static void hv_kexec_handler(void)
{
	hv_stimer_global_cleanup();
	vmbus_initiate_unload(false);
	/* Make sure conn_state is set as hv_synic_cleanup checks for it */
	mb();