]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/hv/vmbus_drv.c
Merge tag 'microblaze-v5.5-rc1' of git://git.monstr.eu/linux-2.6-microblaze
[linux.git] / drivers / hv / vmbus_drv.c
index 53a60c81e220d805fbcf28ce49e95019b6320f0b..8c06b3361c27546e12d17f4a0b202f4ec8d0a888 100644 (file)
@@ -1340,10 +1340,6 @@ static int vmbus_bus_init(void)
        if (ret)
                goto err_alloc;
 
-       ret = hv_stimer_alloc(VMBUS_MESSAGE_SINT);
-       if (ret < 0)
-               goto err_alloc;
-
        /*
         * Initialize the per-cpu interrupt state and stimer state.
         * Then connect to the host.
@@ -1400,9 +1396,8 @@ static int vmbus_bus_init(void)
 err_connect:
        cpuhp_remove_state(hyperv_cpuhp_online);
 err_cpuhp:
-       hv_stimer_free();
-err_alloc:
        hv_synic_free();
+err_alloc:
        hv_remove_vmbus_irq();
 
        bus_unregister(&hv_bus);
@@ -2315,20 +2310,23 @@ static void hv_crash_handler(struct pt_regs *regs)
 static int hv_synic_suspend(void)
 {
        /*
-        * When we reach here, all the non-boot CPUs have been offlined, and
-        * the stimers on them have been unbound in hv_synic_cleanup() ->
+        * When we reach here, all the non-boot CPUs have been offlined.
+        * If we're in a legacy configuration where stimer Direct Mode is
+        * not enabled, the stimers on the non-boot CPUs have been unbound
+        * in hv_synic_cleanup() -> hv_stimer_legacy_cleanup() ->
         * hv_stimer_cleanup() -> clockevents_unbind_device().
         *
-        * hv_synic_suspend() only runs on CPU0 with interrupts disabled. Here
-        * we do not unbind the stimer on CPU0 because: 1) it's unnecessary
-        * because the interrupts remain disabled between syscore_suspend()
-        * and syscore_resume(): see create_image() and resume_target_kernel();
+        * hv_synic_suspend() only runs on CPU0 with interrupts disabled.
+        * Here we do not call hv_stimer_legacy_cleanup() on CPU0 because:
+        * 1) it's unnecessary as interrupts remain disabled between
+        * syscore_suspend() and syscore_resume(): see create_image() and
+        * resume_target_kernel()
         * 2) the stimer on CPU0 is automatically disabled later by
         * syscore_suspend() -> timekeeping_suspend() -> tick_suspend() -> ...
-        * -> clockevents_shutdown() -> ... -> hv_ce_shutdown(); 3) a warning
-        * would be triggered if we call clockevents_unbind_device(), which
-        * may sleep, in an interrupts-disabled context. So, we intentionally
-        * don't call hv_stimer_cleanup(0) here.
+        * -> clockevents_shutdown() -> ... -> hv_ce_shutdown()
+        * 3) a warning would be triggered if we call
+        * clockevents_unbind_device(), which may sleep, in an
+        * interrupts-disabled context.
         */
 
        hv_synic_disable_regs(0);