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: <20130508145124.GA29391@pengutronix.de>
Date:	Wed, 8 May 2013 16:51:24 +0200
From:	Steffen Trumtrar <s.trumtrar@...gutronix.de>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Srinivas KANDAGATLA <srinivas.kandagatla@...com>,
	linux-doc@...r.kernel.org, Viresh Kumar <viresh.kumar@...aro.org>,
	will.deacon@....com, Jiri Slaby <jslaby@...e.cz>,
	linux@....linux.org.uk, Samuel Ortiz <sameo@...ux.intel.com>,
	Nicolas Pitre <nico@...aro.org>, linux-serial@...r.kernel.org,
	Jason Cooper <jason@...edaemon.net>,
	devicetree-discuss@...ts.ozlabs.org,
	Rob Herring <rob.herring@...xeda.com>,
	Stuart Menefy <stuart.menefy@...com>,
	Stephen Warren <swarren@...dia.com>,
	Dong Aisheng <dong.aisheng@...aro.org>,
	linux-arm-kernel@...ts.infradead.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/8] ARM:global_timer: Add ARM global timer support.

On Wed, May 08, 2013 at 04:38:22PM +0200, Arnd Bergmann wrote:
> On Wednesday 08 May 2013, Srinivas KANDAGATLA wrote:
> > From: Stuart Menefy <stuart.menefy@...com>
> > 
> > This is a simple driver for the global timer module found in the Cortex
> > A9-MP cores from revision r1p0 onwards. This should be able to perform
> > the functions of the system timer and the local timer in an SMP system.
> > 
> > The global timer has the following features:
> >     The global timer is a 64-bit incrementing counter with an
> > auto-incrementing feature. It continues incrementing after sending
> > interrupts. The global timer is memory mapped in the private memory
> > region.
> >     The global timer is accessible to all Cortex-A9 processors in the
> > cluster. Each Cortex-A9 processor has a private 64-bit comparator that
> > is used to assert a private interrupt when the global timer has reached
> > the comparator value. All the Cortex-A9 processors in a design use the
> > banked ID, ID27, for this interrupt. ID27 is sent to the Interrupt
> > Controller as a Private Peripheral Interrupt. The global timer is
> > clocked by PERIPHCLK.
> > 
> > Signed-off-by: Stuart Menefy <stuart.menefy@...com>
> > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...com>
> >
> 
> Are you sure we don't already have a driver for this? It sounds unlikely
> that you are the first one to do this when the hardware is so common.
> 

Isn't this the same as arch/arm/kernel/smp_twd.c ?
That is atleast the timer I used with Cortex-A9. I don't think the core
has another one. But maybe I'm wrong.

> >  Documentation/devicetree/bindings/arm/gt.txt |   21 ++
> >  arch/arm/Kconfig                             |    6 +
> >  arch/arm/include/asm/global_timer.h          |   12 +
> >  arch/arm/kernel/Makefile                     |    1 +
> >  arch/arm/kernel/global_timer.c               |  325 ++++++++++++++++++++++++++
> >  5 files changed, 365 insertions(+), 0 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/arm/gt.txt
> >  create mode 100644 arch/arm/include/asm/global_timer.h
> >  create mode 100644 arch/arm/kernel/global_timer.c
> 
> Move it into drivers/clocksource?
>  
> > diff --git a/arch/arm/include/asm/global_timer.h b/arch/arm/include/asm/global_timer.h
> > new file mode 100644
> > index 0000000..46f9188
> > --- /dev/null
> > +++ b/arch/arm/include/asm/global_timer.h
> > @@ -0,0 +1,12 @@
> > +int __init global_timer_init(void __iomem *base, unsigned int timer_irq);
> 
> I don't see a need to call this from platform code for non-DT platforms, it
> can easily be used with CLOCKSOURCE_OF_DECLARE() all the time I think.
> 

Regards,
Steffen

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
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