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: <20130325230730.GA5518@MacBook-Pro.local>
Date:	Mon, 25 Mar 2013 23:07:30 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Rob Herring <robherring2@...il.com>
Cc:	Russell King - ARM Linux <linux@....linux.org.uk>,
	Mark Rutland <Mark.Rutland@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Arnd Bergmann <arnd@...db.de>,
	"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
	Tony Lindgren <tony@...mide.com>,
	Magnus Damm <magnus.damm@...il.com>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>,
	Simon Horman <horms@...ge.net.au>,
	John Stultz <john.stultz@...aro.org>,
	Will Deacon <Will.Deacon@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init

On Mon, Mar 25, 2013 at 09:28:10PM +0000, Rob Herring wrote:
> On 03/25/2013 12:26 PM, Russell King - ARM Linux wrote:
> > On Thu, Mar 21, 2013 at 11:06:47AM +0000, Mark Rutland wrote:
> >> On TC2 this series leads to using the vexpress 24MHz clock as the sched clock
> >> in preference to the architected timer:
> >>
> >>   Architected local timer running at 24.00MHz (virt).
> >>   Switching to timer-based delay loop
> >>   Registered arch_counter_get_cntvct+0x0/0x14 as sched_clock source
> >>   sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
> >>   Registered versatile_read_sched_clock+0x0/0x28 as sched_clock source
> >>
> >> As they both have the same frequency, neither overrides the other, and
> >> whichever gets registered last is used as the sched_clock. As accesses
> >> to the architected timer are going to have a much lower overhead, this
> >> isn't very nice (and it could be better to use it even if it had a lower
> >> frequency).
> > 
> > I'll remind people that sched_clock() is supposed to be functional at
> > the point in the boot sequence where the call to sched_init() is called.
> > That is after setup_arch() and *before* time_init() is called.
> 
> I count integrator-cp, realview, versatile and non-DT VExpress that do
> this (not surprisingly) and 25 platforms or timer implementations plus
> arm64 that do sched_clock setup in time_init.

Before time_init(), sched_clock() currently returns 0 with the
architected timers (though I don't particularly like this for arm64).
Marc Rutland has patches to make arch_timer_read_counter() a function
which always returns the virtual counter. It requires the CNTVOFF
register to be set to 0 on AArch32 during boot. But this way
sched_clock() on arm64 would always return meaningful values as we have
the architected timers.

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