Merge tag 'devicetree-fixes-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / kernel / watchdog.c
index 8cf0678..7c39790 100644 (file)
@@ -376,7 +376,14 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
        /* .. and repeat */
        hrtimer_forward_now(hrtimer, ns_to_ktime(sample_period));
 
-       /* Reset the interval when touched externally by a known slow code. */
+       /*
+        * If a virtual machine is stopped by the host it can look to
+        * the watchdog like a soft lockup. Check to see if the host
+        * stopped the vm before we process the timestamps.
+        */
+       kvm_check_and_clear_guest_paused();
+
+       /* Reset the interval when touched by known problematic code. */
        if (period_ts == SOFTLOCKUP_DELAY_REPORT) {
                if (unlikely(__this_cpu_read(softlockup_touch_sync))) {
                        /*
@@ -387,10 +394,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
                        sched_clock_tick();
                }
 
-               /* Clear the guest paused flag on watchdog reset */
-               kvm_check_and_clear_guest_paused();
                update_report_ts();
-
                return HRTIMER_RESTART;
        }
 
@@ -402,14 +406,6 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
         */
        duration = is_softlockup(touch_ts, period_ts);
        if (unlikely(duration)) {
-               /*
-                * If a virtual machine is stopped by the host it can look to
-                * the watchdog like a soft lockup, check to see if the host
-                * stopped the vm before we issue the warning
-                */
-               if (kvm_check_and_clear_guest_paused())
-                       return HRTIMER_RESTART;
-
                /*
                 * Prevent multiple soft-lockup reports if one cpu is already
                 * engaged in dumping all cpu back traces.