diff options
Diffstat (limited to 'patches/linux-2.6.16.32/fix-hz-suspend.patch')
-rw-r--r-- | patches/linux-2.6.16.32/fix-hz-suspend.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/linux-2.6.16.32/fix-hz-suspend.patch b/patches/linux-2.6.16.32/fix-hz-suspend.patch new file mode 100644 index 0000000000..2a964ccb8c --- /dev/null +++ b/patches/linux-2.6.16.32/fix-hz-suspend.patch @@ -0,0 +1,26 @@ +diff -pruN ../orig-linux-2.6.16.29/kernel/timer.c ./kernel/timer.c +--- ../orig-linux-2.6.16.29/kernel/timer.c 2006-09-12 19:02:10.000000000 +0100 ++++ ./kernel/timer.c 2006-09-19 13:58:58.000000000 +0100 +@@ -555,6 +555,22 @@ found: + } + spin_unlock(&base->t_base.lock); + ++ /* ++ * It can happen that other CPUs service timer IRQs and increment ++ * jiffies, but we have not yet got a local timer tick to process ++ * the timer wheels. In that case, the expiry time can be before ++ * jiffies, but since the high-resolution timer here is relative to ++ * jiffies, the default expression when high-resolution timers are ++ * not active, ++ * ++ * time_before(MAX_JIFFY_OFFSET + jiffies, expires) ++ * ++ * would falsely evaluate to true. If that is the case, just ++ * return jiffies so that we can immediately fire the local timer ++ */ ++ if (time_before(expires, jiffies)) ++ return jiffies; ++ + if (time_before(hr_expires, expires)) + return hr_expires; + |