From: Pavel Machek Currently, process start times change after swsusp (because they are derived from jiffies and current time, oops). This should fix it. Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/time.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) diff -puN arch/i386/kernel/time.c~swsusp-fix-process-start-times-after-resume arch/i386/kernel/time.c --- 25/arch/i386/kernel/time.c~swsusp-fix-process-start-times-after-resume Mon Oct 4 15:00:22 2004 +++ 25-akpm/arch/i386/kernel/time.c Mon Oct 4 15:00:22 2004 @@ -319,7 +319,7 @@ unsigned long get_cmos_time(void) return retval; } -static long clock_cmos_diff; +static long clock_cmos_diff, sleep_start; static int time_suspend(struct sys_device *dev, u32 state) { @@ -328,6 +328,7 @@ static int time_suspend(struct sys_devic */ clock_cmos_diff = -get_cmos_time(); clock_cmos_diff += get_seconds(); + sleep_start = get_cmos_time(); return 0; } @@ -335,10 +336,13 @@ static int time_resume(struct sys_device { unsigned long flags; unsigned long sec = get_cmos_time() + clock_cmos_diff; + unsigned long sleep_length = get_cmos_time() - sleep_start; + write_seqlock_irqsave(&xtime_lock, flags); xtime.tv_sec = sec; xtime.tv_nsec = 0; write_sequnlock_irqrestore(&xtime_lock, flags); + jiffies += sleep_length * HZ; return 0; } _