Re: [PATCH] powerpc: Avoid giving out RTC dates below EPOCH

2009-11-01 Thread Benjamin Herrenschmidt
On Mon, 2009-11-02 at 16:11 +1100, Benjamin Herrenschmidt wrote: > Doing so causes xtime to be negative which crashes the timekeeping > code in funny ways when doing suspend/resume > > Signed-off-by: Benjamin Herrenschmidt > --- > +void read_persistent_clock(struct timespec *ts) > +{ > + __r

[PATCH] powerpc: Avoid giving out RTC dates below EPOCH

2009-11-01 Thread Benjamin Herrenschmidt
Doing so causes xtime to be negative which crashes the timekeeping code in funny ways when doing suspend/resume Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 92dc844..6a7ce0e 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch