Patchwork [GIT,PULL] 64bit friendly generic sched_clock() base for 3.12

login
register
mail settings
Submitter John Stultz
Date July 30, 2013, 6:50 p.m.
Message ID <51F80B09.8060509@linaro.org>
Download mbox
Permalink /patch/263509/
State New
Headers show

Pull-request

git://git.linaro.org/people/jstultz/linux.git

Comments

John Stultz - July 30, 2013, 6:50 p.m.
Hey Thomas, Olof,
     Here is the common base changes in Stephen's "64bit friendly 
generic sched_clock()" patch series. This common base will be needed so 
that following patch series can be merged via both the tip/timers/core 
and arm-soc trees independently.

Please let me know if you have any issues or objections with this set.

thanks
-john


The following changes since commit ad81f0545ef01ea651886dddac4bef6cec930092:

   Linux 3.11-rc1 (2013-07-14 15:18:27 -0700)

are available in the git repository at:

   git://git.linaro.org/people/jstultz/linux.git 
fortglx/3.12/sched-clock64-base

for you to fetch changes up to e7e3ff1bfe9c42ee31172e9afdc0383a9e595e29:

   sched_clock: Add support for >32 bit sched_clock (2013-07-30 11:24:21 
-0700)

----------------------------------------------------------------
Stephen Boyd (4):
       clocksource: Extract max nsec calculation into separate function
       sched_clock: Use seqcount instead of rolling our own
       sched_clock: Use an hrtimer instead of timer
       sched_clock: Add support for >32 bit sched_clock

  include/linux/clocksource.h |   2 +
  include/linux/sched_clock.h |   2 +
  kernel/time/clocksource.c   |  45 ++++++++++++------
  kernel/time/sched_clock.c   | 111 
++++++++++++++++++++++++--------------------
  4 files changed, 95 insertions(+), 65 deletions(-)
Stephen Boyd - July 31, 2013, 10:30 p.m.
This patchset converts all the arm users to sched_clock_register(). It
is based on the pull request that this is in reply to. Platform
maintainers, please ack/review.

Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: David Brown <davidb@codeaurora.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Tony Lindgren <tony@atomide.com>

Stephen Boyd (18):
  ARM: timer-sp: Switch to sched_clock_register()
  ARM: clps711x: Switch to sched_clock_register()
  ARM: davinci: Switch to sched_clock_register()
  ARM: imx: Switch to sched_clock_register()
  ARM: integrator: Switch to sched_clock_register()
  ARM: IXP4xx: Switch to sched_clock_register()
  ARM: mmp: Switch to sched_clock_register()
  ARM: msm: Switch to sched_clock_register()
  ARM: OMAP1: Switch to sched_clock_register()
  ARM: OMAP2+: Switch to sched_clock_register()
  ARM: pxa: Switch to sched_clock_register()
  ARM: sa1100: Switch to sched_clock_register()
  ARM: u300: Switch to sched_clock_register()
  ARM: iop: Switch to sched_clock_register()
  ARM: OMAP: Switch to sched_clock_register()
  ARM: orion: Switch to sched_clock_register()
  ARM: SAMSUNG: Switch to sched_clock_register()
  ARM: versatile: Switch to sched_clock_register()

 arch/arm/common/timer-sp.c               | 4 ++--
 arch/arm/mach-clps711x/common.c          | 4 ++--
 arch/arm/mach-davinci/time.c             | 4 ++--
 arch/arm/mach-imx/time.c                 | 4 ++--
 arch/arm/mach-integrator/integrator_ap.c | 4 ++--
 arch/arm/mach-ixp4xx/common.c            | 4 ++--
 arch/arm/mach-mmp/time.c                 | 4 ++--
 arch/arm/mach-msm/timer.c                | 4 ++--
 arch/arm/mach-omap1/time.c               | 4 ++--
 arch/arm/mach-omap2/timer.c              | 4 ++--
 arch/arm/mach-pxa/time.c                 | 4 ++--
 arch/arm/mach-sa1100/time.c              | 4 ++--
 arch/arm/mach-u300/timer.c               | 4 ++--
 arch/arm/plat-iop/time.c                 | 4 ++--
 arch/arm/plat-omap/counter_32k.c         | 4 ++--
 arch/arm/plat-orion/time.c               | 4 ++--
 arch/arm/plat-samsung/samsung-time.c     | 4 ++--
 arch/arm/plat-versatile/sched-clock.c    | 4 ++--
 18 files changed, 36 insertions(+), 36 deletions(-)
Jason - Aug. 1, 2013, 12:31 a.m.
On Wed, Jul 31, 2013 at 03:31:15PM -0700, Stephen Boyd wrote:
> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.
> 
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  arch/arm/plat-orion/time.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.
Santosh Shilimkar - Aug. 1, 2013, 12:43 a.m.
On Wednesday 31 July 2013 06:31 PM, Stephen Boyd wrote:
> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.
> 
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  arch/arm/mach-omap2/timer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
Acked-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
Sekhar Nori - Aug. 1, 2013, 5:46 a.m.
On Thursday 01 August 2013 04:01 AM, Stephen Boyd wrote:
> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.
> 
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  arch/arm/mach-davinci/time.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
> index 7a55b5c..6d5440a 100644
> --- a/arch/arm/mach-davinci/time.c
> +++ b/arch/arm/mach-davinci/time.c
> @@ -285,7 +285,7 @@ static struct clocksource clocksource_davinci = {
>  /*
>   * Overwrite weak default sched_clock with something more precise
>   */
> -static u32 notrace davinci_read_sched_clock(void)
> +static u64 notrace davinci_read_sched_clock(void)
>  {
>  	return timer32_read(&timers[TID_CLOCKSOURCE]);
>  }
> @@ -392,7 +392,7 @@ void __init davinci_timer_init(void)
>  				    davinci_clock_tick_rate))
>  		printk(err, clocksource_davinci.name);
>  
> -	setup_sched_clock(davinci_read_sched_clock, 32,
> +	sched_clock_register(davinci_read_sched_clock, 32,
>  			  davinci_clock_tick_rate);

Please fix the line break to align with open parens. Otherwise looks
good. I tested it on DA850 EVM as well. With above fixed:

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar
David Brown - Aug. 1, 2013, 4:12 p.m.
On Wed, Jul 31, 2013 at 03:31:07PM -0700, Stephen Boyd wrote:
>The 32 bit sched_clock interface now supports 64 bits. Upgrade to
>the 64 bit function to allow us to remove the 32 bit registration
>interface.
>
>Cc: David Brown <davidb@codeaurora.org>
>Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
>---
> arch/arm/mach-msm/timer.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: David Brown <davidb@codeaurora.org>
Kukjin Kim - Aug. 5, 2013, 5:22 p.m.
On 08/01/13 07:31, Stephen Boyd wrote:
> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.
>
> Cc: Ben Dooks<ben-linux@fluff.org>
> Cc: Kukjin Kim<kgene.kim@samsung.com>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks,
Kukjin

> Signed-off-by: Stephen Boyd<sboyd@codeaurora.org>
> ---
>   arch/arm/plat-samsung/samsung-time.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/samsung-time.c b/arch/arm/plat-samsung/samsung-time.c
> index 2957075..1e2119b 100644
> --- a/arch/arm/plat-samsung/samsung-time.c
> +++ b/arch/arm/plat-samsung/samsung-time.c
> @@ -312,7 +312,7 @@ static void __iomem *samsung_timer_reg(void)
>    * this wraps around for now, since it is just a relative time
>    * stamp. (Inspired by U300 implementation.)
>    */
> -static u32 notrace samsung_read_sched_clock(void)
> +static u64 notrace samsung_read_sched_clock(void)
>   {
>   	void __iomem *reg = samsung_timer_reg();
>
> @@ -337,7 +337,7 @@ static void __init samsung_clocksource_init(void)
>   	samsung_time_setup(timer_source.source_id, TCNT_MAX);
>   	samsung_time_start(timer_source.source_id, PERIODIC);
>
> -	setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate);
> +	sched_clock_register(samsung_read_sched_clock, TSIZE, clock_rate);
>
>   	if (clocksource_mmio_init(samsung_timer_reg(), "samsung_clocksource_timer",
>   			clock_rate, 250, TSIZE, clocksource_mmio_readl_down))
Linus Walleij - Aug. 7, 2013, 1:52 p.m.
On Thu, Aug 1, 2013 at 12:31 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:

> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

For this patch (given the idea is accepted)
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Linus Walleij - Aug. 7, 2013, 6:55 p.m.
On Thu, Aug 1, 2013 at 12:31 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:

> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Krzysztof Halasa - Aug. 9, 2013, 7:49 a.m.
Stephen Boyd <sboyd@codeaurora.org> writes:

> The 32 bit sched_clock interface now supports 64 bits. Upgrade to
> the 64 bit function to allow us to remove the 32 bit registration
> interface.

Don't find anything wrong in this.

Acked-by: Krzysztof Halasa <khc@pm.waw.pl>

> +++ b/arch/arm/mach-ixp4xx/common.c
> @@ -448,7 +448,7 @@ void __init ixp4xx_sys_init(void)
>  /*
>   * sched_clock()
>   */
> -static u32 notrace ixp4xx_read_sched_clock(void)
> +static u64 notrace ixp4xx_read_sched_clock(void)
>  {
>  	return *IXP4XX_OSTS;
>  }
> @@ -466,7 +466,7 @@ unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
>  EXPORT_SYMBOL(ixp4xx_timer_freq);
>  static void __init ixp4xx_clocksource_init(void)
>  {
> -	setup_sched_clock(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq);
> +	sched_clock_register(ixp4xx_read_sched_clock, 32, ixp4xx_timer_freq);
>  
>  	clocksource_mmio_init(NULL, "OSTS", ixp4xx_timer_freq, 200, 32,
>  			ixp4xx_clocksource_read);
John Stultz - Aug. 29, 2013, 9:56 p.m.
On 07/30/2013 11:50 AM, John Stultz wrote:
> Hey Thomas, Olof,
>     Here is the common base changes in Stephen's "64bit friendly
> generic sched_clock()" patch series. This common base will be needed
> so that following patch series can be merged via both the
> tip/timers/core and arm-soc trees independently.
>
> Please let me know if you have any issues or objections with this set.
>
> thanks
> -john
>
>
> The following changes since commit
> ad81f0545ef01ea651886dddac4bef6cec930092:
>
>   Linux 3.11-rc1 (2013-07-14 15:18:27 -0700)
>
> are available in the git repository at:
>
>   git://git.linaro.org/people/jstultz/linux.git
> fortglx/3.12/sched-clock64-base
>
> for you to fetch changes up to e7e3ff1bfe9c42ee31172e9afdc0383a9e595e29:
>
>   sched_clock: Add support for >32 bit sched_clock (2013-07-30
> 11:24:21 -0700)
>
> ----------------------------------------------------------------
> Stephen Boyd (4):
>       clocksource: Extract max nsec calculation into separate function
>       sched_clock: Use seqcount instead of rolling our own
>       sched_clock: Use an hrtimer instead of timer
>       sched_clock: Add support for >32 bit sched_clock
>
>  include/linux/clocksource.h |   2 +
>  include/linux/sched_clock.h |   2 +
>  kernel/time/clocksource.c   |  45 ++++++++++++------
>  kernel/time/sched_clock.c   | 111
> ++++++++++++++++++++++++--------------------
>  4 files changed, 95 insertions(+), 65 deletions(-)

Ping? Thomas?

thanks
-john