Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Baolin Wang
Hi John, On 26 June 2018 at 01:23, John Stultz wrote: > On Sat, Jun 23, 2018 at 5:14 PM, Thomas Gleixner wrote: >> On Wed, 13 Jun 2018, Baolin Wang wrote: >>> Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP >>> to be one persistent clock, then we can simplify the

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Baolin Wang
Hi John, On 26 June 2018 at 01:23, John Stultz wrote: > On Sat, Jun 23, 2018 at 5:14 PM, Thomas Gleixner wrote: >> On Wed, 13 Jun 2018, Baolin Wang wrote: >>> Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP >>> to be one persistent clock, then we can simplify the

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Baolin Wang
Hi Thomas, On 24 June 2018 at 08:14, Thomas Gleixner wrote: > On Wed, 13 Jun 2018, Baolin Wang wrote: >> Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP >> to be one persistent clock, then we can simplify the suspend/resume >> accounting by removing

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Baolin Wang
Hi Thomas, On 24 June 2018 at 08:14, Thomas Gleixner wrote: > On Wed, 13 Jun 2018, Baolin Wang wrote: >> Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP >> to be one persistent clock, then we can simplify the suspend/resume >> accounting by removing

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Thomas Gleixner
On Mon, 25 Jun 2018, John Stultz wrote: > On Sat, Jun 23, 2018 at 5:14 PM, Thomas Gleixner wrote: > > Thomas, what is wrong with *you*? This is completely unnecessary. Nothing is wrong with me. I just hit a point where the amount of half baken crap tripped me over the edge and I let of steam.

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Thomas Gleixner
On Mon, 25 Jun 2018, John Stultz wrote: > On Sat, Jun 23, 2018 at 5:14 PM, Thomas Gleixner wrote: > > Thomas, what is wrong with *you*? This is completely unnecessary. Nothing is wrong with me. I just hit a point where the amount of half baken crap tripped me over the edge and I let of steam.

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread John Stultz
On Sat, Jun 23, 2018 at 5:14 PM, Thomas Gleixner wrote: > On Wed, 13 Jun 2018, Baolin Wang wrote: >> Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP >> to be one persistent clock, then we can simplify the suspend/resume >> accounting by removing

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread John Stultz
On Sat, Jun 23, 2018 at 5:14 PM, Thomas Gleixner wrote: > On Wed, 13 Jun 2018, Baolin Wang wrote: >> Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP >> to be one persistent clock, then we can simplify the suspend/resume >> accounting by removing

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Thomas Gleixner
On Sun, 24 Jun 2018, Thomas Gleixner wrote: > The clocksource core already has all the registration/unregistration > functionality plus an interface to reconfigure the frequency, so > clocksources can come and go and be reconfigured and all of this just > works. Just for completeness sake. If

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-25 Thread Thomas Gleixner
On Sun, 24 Jun 2018, Thomas Gleixner wrote: > The clocksource core already has all the registration/unregistration > functionality plus an interface to reconfigure the frequency, so > clocksources can come and go and be reconfigured and all of this just > works. Just for completeness sake. If

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-23 Thread Thomas Gleixner
On Wed, 13 Jun 2018, Baolin Wang wrote: > Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP > to be one persistent clock, then we can simplify the suspend/resume > accounting by removing CLOCK_SOURCE_SUSPEND_NONSTOP timing. After that > we can only compensate the OS time

Re: [PATCH 1/8] time: Add persistent clock support

2018-06-23 Thread Thomas Gleixner
On Wed, 13 Jun 2018, Baolin Wang wrote: > Moreover we can register the clocksource with CLOCK_SOURCE_SUSPEND_NONSTOP > to be one persistent clock, then we can simplify the suspend/resume > accounting by removing CLOCK_SOURCE_SUSPEND_NONSTOP timing. After that > we can only compensate the OS time

[PATCH 1/8] time: Add persistent clock support

2018-06-13 Thread Baolin Wang
On our Spreadtrum SC9860 platform, we registered the high resolution ARM generic timer as one clocksource to update the OS time, but the ARM generic timer will be stopped in suspend state. So we use one 64bit always-on timer (but low resolution) of Spreadtrum to calculate the suspend time to

[PATCH 1/8] time: Add persistent clock support

2018-06-13 Thread Baolin Wang
On our Spreadtrum SC9860 platform, we registered the high resolution ARM generic timer as one clocksource to update the OS time, but the ARM generic timer will be stopped in suspend state. So we use one 64bit always-on timer (but low resolution) of Spreadtrum to calculate the suspend time to