Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-21 Thread John Stultz
On 08/21/2012 12:14 AM, Andreas Schwab wrote: John Stultz writes: @@ -115,6 +115,7 @@ static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts) { tk->xtime_sec += ts->tv_sec; tk->xtime_nsec += (u64)ts->tv_nsec << tk->shift; + tk_normalize_xtime(tk);

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-21 Thread Andreas Schwab
John Stultz writes: > @@ -115,6 +115,7 @@ static void tk_xtime_add(struct timekeeper *tk, const > struct timespec *ts) > { > tk->xtime_sec += ts->tv_sec; > tk->xtime_nsec += (u64)ts->tv_nsec << tk->shift; > + tk_normalize_xtime(tk); > } Yes, that does it. Failure to normalize

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread John Stultz
On 08/20/2012 01:04 PM, Andreas Schwab wrote: John Stultz writes: Huh. Yea, that looks fine. And without the __timekeeping_inject_sleeptime() call, the system resumed ok? Yes, it does. So I'm mostly still stumped on this. But I did find one possible related bugfix that maybe you can try?

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread Andreas Schwab
John Stultz writes: > Huh. Yea, that looks fine. And without the > __timekeeping_inject_sleeptime() call, the system resumed ok? Yes, it does. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something co

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread John Stultz
On 08/20/2012 12:45 PM, Andreas Schwab wrote: John Stultz writes: I'm not very familiar w/ the iBook hardware, but does it use a clocksource, or does it use arch_gettimeoffset()? clocksource: timebase mult[3640e38e] shift[24] registered I suspect that the casting has avoided clipping some s

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread Andreas Schwab
John Stultz writes: > I'm not very familiar w/ the iBook hardware, but does it use a > clocksource, or does it use arch_gettimeoffset()? clocksource: timebase mult[3640e38e] shift[24] registered > I suspect that the casting has avoided clipping some strange values from > the persistent clock.

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread John Stultz
On 08/19/2012 02:02 PM, Andreas Schwab wrote: John Stultz writes: The timekeeper struct has a xtime_nsec, which keeps the sub-nanosecond remainder. This ends up being somewhat duplicative of the timekeeper.xtime.tv_nsec value, and we have to do extra work to keep them apart, copying the full

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-19 Thread Andreas Schwab
John Stultz writes: > The timekeeper struct has a xtime_nsec, which keeps the > sub-nanosecond remainder. This ends up being somewhat > duplicative of the timekeeper.xtime.tv_nsec value, and we > have to do extra work to keep them apart, copying the full > nsec portion out and back in over and o

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-07-12 Thread Ingo Molnar
* John Stultz wrote: > +static void tk_set_xtime(struct timekeeper *tk, const struct timespec *ts) > +{ > + tk->xtime_sec = ts->tv_sec; > + tk->xtime_nsec = ts->tv_nsec << tk->shift; > +} > + > + > +static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts) Small nit: th

[PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-07-12 Thread John Stultz
The timekeeper struct has a xtime_nsec, which keeps the sub-nanosecond remainder. This ends up being somewhat duplicative of the timekeeper.xtime.tv_nsec value, and we have to do extra work to keep them apart, copying the full nsec portion out and back in over and over. This patch simplifies some