linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] ARM: sched_clock: allow sched_clock to be selected at runtime
Date: Thu, 15 Dec 2011 11:04:20 +0000	[thread overview]
Message-ID: <4EE9D434.2010900@arm.com> (raw)
In-Reply-To: <029b01ccbacc$b5fdb6e0$21f924a0$%kim@samsung.com>

On 15/12/11 01:56, Kukjin Kim wrote:
> Marc Zyngier wrote:
>>
>> sched_clock() is yet another blocker on the road to the single
>> image. This patch implements an idea by Russell King:
>>
>> http://www.spinics.net/lists/linux-omap/msg49561.html
>>
>> Instead of asking the platform to implement both sched_clock()
>> itself and the rollover callback, simply register a read()
>> function, and let the ARM code care about sched_clock() itself,
>> the conversion to ns and the rollover. sched_clock() uses
>> this read() function as an indirection to the platform code.
>> If the platform doesn't provide a read(), the code falls back
>> to the jiffy counter (just like the default sched_clock).
>>
>> This allow some simplifications and possibly some footprint gain
>> when multiple platforms are compiled in. Among the drawbacks,
>> the removal of the *_fixed_sched_clock optimization which could
>> negatively impact some platforms (sa1100, tegra, versatile
>> and omap).
>>
>> Tested on 11MPCore, OMAP4 and Tegra.
>>
>> Cc: Imre Kaloz <kaloz@openwrt.org>
>> Cc: Krzysztof Halasa <khc@pm.waw.pl>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Eric Miao <eric.y.miao@gmail.com>
>> Cc: Colin Cross <ccross@android.com>
>> Cc: Erik Gilling <konkers@android.com>
>> Cc: Olof Johansson <olof@lixom.net>
>> Cc: Linus Walleij <linus.walleij@stericsson.com>
>> Cc: Sascha Hauer <kernel@pengutronix.de>
>> Cc: Alessandro Rubini <rubini@unipv.it>
>> Cc: STEricsson <STEricsson_nomadik_linux@list.st.com>
>> Cc: Lennert Buytenhek <kernel@wantstofly.org>
>> Cc: Nicolas Pitre <nico@fluxnic.net>
>> Cc: Ben Dooks <ben-linux@fluff.org>
>> Cc: Kukjin Kim <kgene.kim@samsung.com>
> 
> Hi Marc,
> 
> There is a complaining with checkpatch.
> 
> ERROR: trailing whitespace
> #376: FILE: arch/arm/kernel/sched_clock.c:163:
> +^I^Isetup_sched_clock(jiffy_sched_clock_read, 32, HZ);^I$
> 
> And build warning:
> 
> arch/arm/plat-s5p/s5p-time.c: In function 's5p_read_sched_clock':
> arch/arm/plat-s5p/s5p-time.c:328: warning: 'return' with no value, in
> function returning non-void
> 
> I'm not sure what is proper return value in this case...

Good catch. The return value should be 0, and I'll update the patch now.

> Anyway, others, looks ok to me and tested on Samsung S5P boards.
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

      reply	other threads:[~2011-12-15 11:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09 15:33 [PATCH v4] ARM: sched_clock: allow sched_clock to be selected at runtime Marc Zyngier
2011-12-09 22:43 ` Nicolas Pitre
2011-12-12  3:57 ` Rob Herring
2011-12-12 17:05   ` Marc Zyngier
2011-12-13  0:46     ` Tony Lindgren
2011-12-13  0:50       ` Tony Lindgren
2011-12-13  1:33         ` Kyungmin Park
2011-12-13 18:58           ` Marc Zyngier
2011-12-13 21:16             ` Russell King - ARM Linux
2011-12-14 22:07               ` Tony Lindgren
2011-12-15 10:47                 ` Marc Zyngier
2011-12-13 13:22 ` Krzysztof Halasa
2011-12-15  1:22 ` Shawn Guo
2011-12-15  1:56 ` Kukjin Kim
2011-12-15 11:04   ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE9D434.2010900@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).