[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0903201100040.29264@localhost.localdomain>
Date: Fri, 20 Mar 2009 11:07:53 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Michal Simek <monstr@...str.eu>
cc: LKML <linux-kernel@...r.kernel.org>, john.williams@...alogix.com,
John Stultz <johnstul@...ibm.com>
Subject: Re: [PATCH 08/57] microblaze_v7: Interrupt handling, timer support,
selfmod code
On Fri, 20 Mar 2009, Michal Simek wrote:
> > Well. Either you have one shot mode, then better make it work and
> > useable or just remove the one shot support until you figure out how
> > to do it.
>
> I don't have it - this feature is not there. There is only printk message in
> set_mode function.
>
> What is the best timer implementation in kernel? (For inspiration)
There is no best :) All timers have usualy some weird hardware
constraints so that code is always ugly. But just as an example:
static int lapic_next_event(unsigned long delta, struct clock_event_device *evt)
{
apic_write(APIC_TMICT, delta);
return 0;
}
I think that's pretty close to your hardware. delta is the number of
timer cycles until the next event. There is no other magic with the
one shot mode :)
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists