clocksource with changing frequency?

Thomas Gleixner tglx at linutronix.de
Fri Jun 21 04:12:37 EDT 2013


On Thu, 20 Jun 2013, John Stultz wrote:

> On 06/20/2013 05:01 PM, Sören Brinkmann wrote:
> > Hi all,
> > 
> > I have a question/problem with a clocksource whose input frequency can
> > change.
> 
> That behavior isn't supported by the clocksource core. We expect frequency
> changing clocksources to be detected and disqualified (as we do w/ freq
> changing TSCs on older laptops).
> 
> 
> > On Zynq we use the cadece_ttc timer as clocksource. Its input clock is
> > tightly coupled to the CPU clock. I.e. it changes when cpufreq scales
> > the CPU clocks.
> > To compensate this, I added a clock notifier doing this on a frequency
> > change:
> > 	clocksource_unregister(&ttccs->cs);
> > 	clocksource_register_hz(&ttccs->cs, ndata->new_rate / PRESCALE);
> 
> This will definitely have problems if this is the only high-res capable
> clocksource.

And starting with 3.11 it will be not longer possible to unregister
the only high-res capable clocksource exactly to prevent the wreckage
you are talking about :)

Thanks,

	tglx


More information about the linux-arm-kernel mailing list