From 96bc9e68d7c5a767e8867bbca690e3ef5b0ad69f Mon Sep 17 00:00:00 2001 From: Evan Wilson Date: Wed, 20 Apr 2016 11:54:30 -0700 Subject: Changes to debug suspend_again crashes Change-Id: I2df8d17791bba5205ca1e50d37dd44a8a3b92bd9 --- kernel/time/timekeeping.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kernel/time/timekeeping.c') diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index baeeb5c87cf..3644ba5c7d9 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -904,6 +904,7 @@ static void timekeeping_resume(void) raw_spin_lock_irqsave(&timekeeper_lock, flags); write_seqcount_begin(&timekeeper_seq); + printk(KERN_DEBUG "TIME: calc suspend time."); /* * After system resumes, we need to calculate the suspended time and @@ -920,6 +921,7 @@ static void timekeeping_resume(void) cycle_now = clock->read(clock); if ((clock->flags & CLOCK_SOURCE_SUSPEND_NONSTOP) && cycle_now > clock->cycle_last) { + printk(KERN_DEBUG "TIME: Use nonstop clk source."); u64 num, max = ULLONG_MAX; u32 mult = clock->mult; u32 shift = clock->shift; @@ -943,6 +945,7 @@ static void timekeeping_resume(void) ts_delta = ns_to_timespec(nsec); suspendtime_found = true; } else if (timespec_compare(&ts_new, &timekeeping_suspend_time) > 0) { + printk(KERN_DEBUG "TIME: Using other time source."); ts_delta = timespec_sub(ts_new, timekeeping_suspend_time); suspendtime_found = true; } @@ -950,6 +953,7 @@ static void timekeeping_resume(void) if (suspendtime_found) __timekeeping_inject_sleeptime(tk, &ts_delta); + printk(KERN_DEBUG "TIME: Rebase the last cycle value"); /* Re-base the last cycle value */ tk->cycle_last = clock->cycle_last = cycle_now; tk->ntp_error = 0; @@ -958,6 +962,7 @@ static void timekeeping_resume(void) write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags); + printk(KERN_DEBUG "TIME: Touch softlockup watchdog"); touch_softlockup_watchdog(); clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); -- cgit v1.2.3-70-g09d2