Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-10-19 Thread Kevin Hilman
Barry Song <21cn...@gmail.com> writes: > 2012/7/18 Colin Cross : >> Many clocks that are used to provide sched_clock will reset during >> suspend. If read_sched_clock returns 0 after suspend, sched_clock will >> appear to jump forward. This patch resets cd.epoch_cyc to the current >> value of

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-10-19 Thread Kevin Hilman
Barry Song 21cn...@gmail.com writes: 2012/7/18 Colin Cross ccr...@android.com: Many clocks that are used to provide sched_clock will reset during suspend. If read_sched_clock returns 0 after suspend, sched_clock will appear to jump forward. This patch resets cd.epoch_cyc to the current

RE: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-30 Thread Bedia, Vaibhav
On Sat, Jul 28, 2012 at 03:53:05, Linus Walleij wrote: > On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav wrote: > > >> > A connecting theme is that of being avle to flag clock sources as > >> > sched_clock providers. If all clocksources were tagged with > >> > rating, and only clocksources were

RE: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-30 Thread Bedia, Vaibhav
On Sat, Jul 28, 2012 at 03:53:05, Linus Walleij wrote: On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav vaibhav.be...@ti.com wrote: A connecting theme is that of being avle to flag clock sources as sched_clock providers. If all clocksources were tagged with rating, and only

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-27 Thread Russell King - ARM Linux
On Sat, Jul 28, 2012 at 12:23:05AM +0200, Linus Walleij wrote: > On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav wrote: > > >> > A connecting theme is that of being avle to flag clock sources as > >> > sched_clock providers. If all clocksources were tagged with > >> > rating, and only

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-27 Thread Linus Walleij
On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav wrote: >> > A connecting theme is that of being avle to flag clock sources as >> > sched_clock providers. If all clocksources were tagged with >> > rating, and only clocksources were used for sched_clock(), the >> > kernel could select the

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-27 Thread Linus Walleij
On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav vaibhav.be...@ti.com wrote: A connecting theme is that of being avle to flag clock sources as sched_clock providers. If all clocksources were tagged with rating, and only clocksources were used for sched_clock(), the kernel could select the

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-27 Thread Russell King - ARM Linux
On Sat, Jul 28, 2012 at 12:23:05AM +0200, Linus Walleij wrote: On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav vaibhav.be...@ti.com wrote: A connecting theme is that of being avle to flag clock sources as sched_clock providers. If all clocksources were tagged with rating, and only

RE: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-24 Thread Bedia, Vaibhav
On Tue, Jul 24, 2012 at 05:58:32, Colin Cross wrote: > On Mon, Jul 23, 2012 at 5:14 PM, Linus Walleij > wrote: > > On Mon, Jul 23, 2012 at 9:27 PM, Colin Cross wrote: > >> On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij > > > >> Does the clock you use for sched_clock continue to run in all

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-24 Thread Barry Song
2012/7/18 Colin Cross : > Many clocks that are used to provide sched_clock will reset during > suspend. If read_sched_clock returns 0 after suspend, sched_clock will > appear to jump forward. This patch resets cd.epoch_cyc to the current > value of read_sched_clock during resume, which causes

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-24 Thread Barry Song
2012/7/18 Colin Cross ccr...@android.com: Many clocks that are used to provide sched_clock will reset during suspend. If read_sched_clock returns 0 after suspend, sched_clock will appear to jump forward. This patch resets cd.epoch_cyc to the current value of read_sched_clock during resume,

RE: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-24 Thread Bedia, Vaibhav
On Tue, Jul 24, 2012 at 05:58:32, Colin Cross wrote: On Mon, Jul 23, 2012 at 5:14 PM, Linus Walleij linus.wall...@linaro.org wrote: On Mon, Jul 23, 2012 at 9:27 PM, Colin Cross ccr...@android.com wrote: On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij Does the clock you use for

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Colin Cross
On Mon, Jul 23, 2012 at 5:14 PM, Linus Walleij wrote: > On Mon, Jul 23, 2012 at 9:27 PM, Colin Cross wrote: >> On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij > >> Does the clock you use for sched_clock continue to run in all suspend >> modes? All the SoC's I've used only have a 32kHz clock in

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Linus Walleij
On Mon, Jul 23, 2012 at 9:27 PM, Colin Cross wrote: > On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij > Does the clock you use for sched_clock continue to run in all suspend > modes? All the SoC's I've used only have a 32kHz clock in the deepest > suspend mode, Yes, and yes it is 32kHz. >

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Colin Cross
On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij wrote: > On Wed, Jul 18, 2012 at 1:27 AM, Colin Cross wrote: > >> This will have a side effect of causing SoCs that have clocks that >> continue to count in suspend to appear to stop counting, reporting the >> same sched_clock() value before and

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Linus Walleij
On Wed, Jul 18, 2012 at 1:27 AM, Colin Cross wrote: > This will have a side effect of causing SoCs that have clocks that > continue to count in suspend to appear to stop counting, reporting the > same sched_clock() value before and after suspend. So for our platform (ux500) that has a sched

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Linus Walleij
On Wed, Jul 18, 2012 at 1:27 AM, Colin Cross ccr...@android.com wrote: This will have a side effect of causing SoCs that have clocks that continue to count in suspend to appear to stop counting, reporting the same sched_clock() value before and after suspend. So for our platform (ux500) that

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Colin Cross
On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij linus.wall...@linaro.org wrote: On Wed, Jul 18, 2012 at 1:27 AM, Colin Cross ccr...@android.com wrote: This will have a side effect of causing SoCs that have clocks that continue to count in suspend to appear to stop counting, reporting the same

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Linus Walleij
On Mon, Jul 23, 2012 at 9:27 PM, Colin Cross ccr...@android.com wrote: On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij Does the clock you use for sched_clock continue to run in all suspend modes? All the SoC's I've used only have a 32kHz clock in the deepest suspend mode, Yes, and yes it is

Re: [RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-23 Thread Colin Cross
On Mon, Jul 23, 2012 at 5:14 PM, Linus Walleij linus.wall...@linaro.org wrote: On Mon, Jul 23, 2012 at 9:27 PM, Colin Cross ccr...@android.com wrote: On Mon, Jul 23, 2012 at 11:55 AM, Linus Walleij Does the clock you use for sched_clock continue to run in all suspend modes? All the SoC's I've

[RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-17 Thread Colin Cross
Many clocks that are used to provide sched_clock will reset during suspend. If read_sched_clock returns 0 after suspend, sched_clock will appear to jump forward. This patch resets cd.epoch_cyc to the current value of read_sched_clock during resume, which causes sched_clock() just after suspend

[RFC] ARM: sched_clock: update epoch_cyc on resume

2012-07-17 Thread Colin Cross
Many clocks that are used to provide sched_clock will reset during suspend. If read_sched_clock returns 0 after suspend, sched_clock will appear to jump forward. This patch resets cd.epoch_cyc to the current value of read_sched_clock during resume, which causes sched_clock() just after suspend