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]
Date:	Thu, 31 Mar 2011 18:42:47 +0100
From:	Jamie Iles <jamie@...ieiles.com>
To:	jacob pan <jacob.jun.pan@...ux.intel.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Jamie Iles <jamie@...ieiles.com>,
	LKML <linux-kernel@...r.kernel.org>,
	John Stultz <johnstul@...ibm.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] clocksource: clocksource/clockevent driver for Synopsys
 dw_apb_timer

On Thu, Mar 31, 2011 at 09:50:51AM -0700, jacob pan wrote:
> On Thu, 31 Mar 2011 17:33:12 +0200 (CEST)
> Thomas Gleixner <tglx@...utronix.de> wrote:
> 
> > On Thu, 31 Mar 2011, Jamie Iles wrote:
> > 
> > > This patch adds a driver for the Synopsys DesignWare APB timer block
> > > found in some ARM systems.  This uses the timers with an IRQ as a
> > > clockevents device and a timer without an IRQ as a clocksource
> > > device.
> > 
> > Interesting. That's probably the same thing as:
> > 
> >      arch/x86/kernel/apb_timer.c
> > 
> > So if we merge that thing, then we should make sure, that we can
> > replace the x86 one with it.
> > 
> It seems we have room to consolidate, here is my 2c:
> 1. need to support multiple timer channels
> 2. support percpu clockevent, need to deal with cpu online/offline
> 3. early boot needs. I don't know if abp timer is needed for booting on
> ARM platforms. But for Moorestown, we need timer before platform bus
> running. So I guess we cannot enumerate the timer as platform device.

ARM does need it quite early to calibrate the delay loop but I've been 
registering it early by creating an early_platform_device.  The other 
difference is that x86 doesn't support the clk API.

How about factoring out the clockevent and clocksource operations 
(.set_next_event, .set_mode, .read etc) and the bits that actually drive 
the hardware into an apb_timer.c then have stuff that does platform 
device registration or langwell specific stuff in a higher layer?

It looks like arch/x86/kernel/apb_timer.c would still need some lower 
level access to the timers for doing things like the calibration in 
apbt_quick_calibrate() before registering the clocksource.

Jamie
--
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