disable getnstimeofday WARN_ON when CONFIG_PM_DEBUG is defined
authorDavid Fries <David@Fries.net>
Tue, 11 Sep 2012 03:13:01 +0000 (22:13 -0500)
committerPali Rohár <pali.rohar@gmail.com>
Fri, 25 Oct 2013 19:59:09 +0000 (21:59 +0200)
pm_dbg_update_time is calling getnstimeofday, for the N900
omap_sram_idle transitions to and from suspend and calls routines
which call pm_dbg_update_time.  Calling
timekeeping_suspend/timekeeping_resume doesn't seem very doable.
Disabling it when CONFIG_PM_DEBUG is set seems like the easier option.

kernel-power-2.6.28/debian/patches/resume_no_time_warn.diff [new file with mode: 0644]
kernel-power-2.6.28/debian/patches/series

diff --git a/kernel-power-2.6.28/debian/patches/resume_no_time_warn.diff b/kernel-power-2.6.28/debian/patches/resume_no_time_warn.diff
new file mode 100644 (file)
index 0000000..c5b89c5
--- /dev/null
@@ -0,0 +1,34 @@
+From 10ce380a196d3362689b54ac294666cec3ed36d2 Mon Sep 17 00:00:00 2001
+From: David Fries <David@Fries.net>
+Date: Sun, 26 Aug 2012 16:42:18 -0500
+Subject: [PATCH] disable getnstimeofday WARN_ON
+
+pm_dbg_update_time is calling getnstimeofday, for the N900
+omap_sram_idle transitions to and from suspend and calls routines
+which call pm_dbg_update_time.  Calling
+timekeeping_suspend/timekeeping_resume doesn't seem very doable.
+Disabling it seems like the easier option.
+---
+ kernel/time/timekeeping.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
+index 900f1b6..6d81608 100644
+--- a/kernel/time/timekeeping.c
++++ b/kernel/time/timekeeping.c
+@@ -95,7 +95,12 @@ void getnstimeofday(struct timespec *ts)
+       unsigned long seq;
+       s64 nsecs;
++      /* pm_dbg_update_time calls getnstimeofday when timekeeping is
++       * suspended, disable it
++       */
++      /*
+       WARN_ON(timekeeping_suspended);
++      */
+       do {
+               seq = read_seqbegin(&xtime_lock);
+-- 
+1.7.10.4
+
index 5fa66ab..47987cd 100644 (file)
@@ -90,3 +90,4 @@ dm9601-ethernet.patch
 asix-ethernet.patch
 nokia-av_key.patch
 resume_use_rtc_clock.diff
+resume_no_time_warn.diff