[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1103011630080.2701@localhost6.localdomain6>
Date: Tue, 1 Mar 2011 17:48:33 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Stuart Menefy <stuart.menefy@...com>
cc: Arnd Bergmann <arnd@...db.de>,
Peppe CAVALLARO <peppe.cavallaro@...com>,
"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
John Stultz <johnstul@...ibm.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH (sh-2.6) 1/4] clksource: Generic timer infrastructure
On Tue, 1 Mar 2011, Stuart Menefy wrote:
> On 24/02/11 17:20, Arnd Bergmann wrote:
> > On Tuesday 22 February 2011, Peppe CAVALLARO wrote:
> >> From: Stuart Menefy <stuart.menefy@...com>
> >>
> >> Many devices targeted at the embedded market provide a number of
> >> generic timers which are capable of generating interrupts at a
> >> requested rate. These can then be used in the implementation of drivers
> >> for other peripherals which require a timer interrupt, without having
> >> to provide an additional timer as part of that peripheral.
Why can't you just use an hrtimer and be done with it? Just because
there is some extra hardware in the chip?
> If anything this duplicates clockevents. The main reason for not using
> clockevents was that nobody else does! Currently clockevents are
> used strictly for time keeping within the kernel, and most architectures
> only register those which are intended to be used for this purpose.
> We felt a bit nervous about adding code to register all the device's timers
> as clockevents, and having the network device driver pick up one of those
> for its own use.
We had this discussion before and there was never an real outcome as
it turned out that hrtimers provide enough abstraction for this kind
of problems.
> True. The intent was that this would be a third interface onto timer
> hardware, alongside clocksources and clockevents.
>
> > I don't know if this could also be merged with the clocksource infrastructure,
> > but your code currently doesn't do that.
>
> It would probably be clockevent rather than clocksource, but it could be if
> people felt that was a better way to go.
If we get some reasonable explanation why an extra timer interrupt is
solving a specific problem better than hrtimers we can do that, but
that needs more thought than picking the first available clockevent
from a list. If we come to the conclusion, that we want/need this kind
of functionality then I really prefer not to create yet another piece
of infrastructure which deals with timer devices.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists