lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.60.0701201655020.4223@poirot.grange>
Date:	Sat, 20 Jan 2007 17:08:27 +0100 (CET)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Thomas Gleixner <tglx@...utronix.de>
cc:	Sascha Hauer <s.hauer@...gutronix.de>,
	linux-kernel@...r.kernel.org, mingo@...e.hu,
	Luotao Fu <lfu@...gutronix.de>
Subject: Re: [patch 3/3] clockevent driver for arm/pxa2xx

On Fri, 19 Jan 2007, Thomas Gleixner wrote:

> On Fri, 2007-01-19 at 20:13 +0100, Guennadi Liakhovetski wrote:
> > > +static u32 clockevent_mode = 0;
> > > +
> > > +static void pxa_set_next_event(unsigned long evt,
> > > +				  struct clock_event_device *unused)
> > > +{
> > > +	OSMR0 = OSCR + evt;
> > > +}
> > 
> > This doesn't work for me in various nasty ways. Please, check for a 
> > minimum delay or loop to get ahead of time. See code in the "old" timer 
> > ISR. See how it unconditionally adds at least 10 ticks...
> 
> I added support for match register based devices and you want to do
> something like this:
> 
> static int hpet_next_event(unsigned long delta,
>                            struct clock_event_device *evt)
> {
>         unsigned long cnt;
> 
>         cnt = hpet_readl(HPET_COUNTER);
>         cnt += delta;
>         hpet_writel(cnt, HPET_T0_CMP);
> 
>         return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
> }
> 
> The generic code takes care of the already expired event.

The thing is - 2.6.20-rc5-rt3 didn't provide clockevent on PXA, so, I took 
Sascha's patch instead of my own, which I've been using with 2.6.18, as 
his patches were already submitted to various lists and had chances to 
become mainline. And strait away it didn't work. The code above seems to 
be doing something close to Sascha's patch, so, I expect it would behave 
in the same way. And until I introduced a minimum increment for the match 
register, it didn't work. I either got hangs, or WARN_ON dumps about "time 
warp detected". I think, any timer related code for PXA has to be tested 
on real hardware under significant (real-time) load before going upstream. 
Haven't tested -rt7 though, so, maybe it is already handled there?

Thanks
Guennadi
---
Guennadi Liakhovetski
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ