From bb67cf2c42924d30b4c4526ffd7550d3d6d3fbc0 Mon Sep 17 00:00:00 2001 From: David Fries Date: Mon, 10 Sep 2012 22:13:01 -0500 Subject: [PATCH] disable getnstimeofday WARN_ON when CONFIG_PM_DEBUG is defined 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. --- .../debian/patches/resume_no_time_warn.diff | 34 ++++++++++++++++++++ kernel-power-2.6.28/debian/patches/series | 1 + 2 files changed, 35 insertions(+) create mode 100644 kernel-power-2.6.28/debian/patches/resume_no_time_warn.diff 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 index 0000000..c5b89c5 --- /dev/null +++ b/kernel-power-2.6.28/debian/patches/resume_no_time_warn.diff @@ -0,0 +1,34 @@ +From 10ce380a196d3362689b54ac294666cec3ed36d2 Mon Sep 17 00:00:00 2001 +From: David Fries +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 + diff --git a/kernel-power-2.6.28/debian/patches/series b/kernel-power-2.6.28/debian/patches/series index 5fa66ab..47987cd 100644 --- a/kernel-power-2.6.28/debian/patches/series +++ b/kernel-power-2.6.28/debian/patches/series @@ -90,3 +90,4 @@ dm9601-ethernet.patch asix-ethernet.patch nokia-av_key.patch resume_use_rtc_clock.diff +resume_no_time_warn.diff -- 1.7.9.5