Re: [RFC] clocksource: dummy: don't show message on first cs read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 1 Dec 2014 07:31:40 +0100
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:

> On Fri, Nov 28, 2014 at 04:07:32PM +0300, Antony Pavlov wrote:
> > In the commit
> > 
> >     commit 96cae61eba199b9c3f5451f293cf60db2b535164
> >     Author: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> >     Date:   Tue Sep 30 08:25:55 2014 +0200
> > 
> >         clock: Add a variable with the first timestamp after startup
> > 
> >         For measuring the startup time it's useful to save the first
> >         timestamp after the clocksource has been registered.
> > 
> > the behaviour of clocksource subsystem is changed: every registered
> > clocksource is called at least once. So the dummy clocksource (if enabled)
> > _ALWAYS_ prints a confusing 'Using dummy clocksource' warning.
> > 
> > This patch fixes the situation: now the 'Using dummy clocksource'
> > warning is printed only if the dummy clocksource is called second time.
> 
> I don't like this very much. The dummy clocksource expects some certain
> behaviour of the common clocksource code and works around this when it
> changes. How about integrating the dummy clocksource into the core
> instead, like
> 
> uint64_t get_time_ns(void)
> {
> 	if (!current_clock)
> 		return dummy_counter++;
> 
> 	...
> }
> 
> Then add a initcall which warns later if we still don't have a valid
> clocksource?

Good plan! I'll try to realize it in several days.
 
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux