linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ARM: smp: Select local timers vs dummy timer support runtime
Date: Wed, 16 Feb 2011 18:15:28 +0530	[thread overview]
Message-ID: <ee756102dc8b46a37cf46d0fbe64b133@mail.gmail.com> (raw)
In-Reply-To: <1297510187-31547-2-git-send-email-santosh.shilimkar@ti.com>

Russell,
> -----Original Message-----
> From: Santosh Shilimkar [mailto:santosh.shilimkar at ti.com]
> Sent: Saturday, February 12, 2011 5:00 PM
> To: linux-omap at vger.kernel.org
> Cc: khilman at ti.com; linux-arm-kernel at lists.infradead.org;
> tony at atomide.com; Santosh Shilimkar; Russell King; David Brown;
> Daniel Walker; Bryan Huntsman; Kukjin Kim; Paul Mundt; Magnus Damm;
> Colin Cross; Erik Gilling; Srinidhi Kasagar; Linus Walleij
> Subject: [PATCH 1/5] ARM: smp: Select local timers vs dummy timer
> support runtime
>
> The current code support of dummy timers in absence of local
> timer is compile time. This is an attempt to convert it to runtime
> so that on few SOC version if the local timers aren't supported
> kernel can switch to dummy timers. OMAP4430 ES1.0 does suffer from
> this limitation.
>
> This patch should not have any functional impact on affected
> files.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@codeaurora.org>
> Cc: Bryan Huntsman <bryanh@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: Colin Cross <ccross@android.com>
> Cc: Erik Gilling <konkers@android.com>
> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> Cc: Linus Walleij <linus.walleij@stericsson.com>
> ---
Any comments on this one?
So far David has acked this for mach-msm.

>  arch/arm/include/asm/localtimer.h   |    8 +++++++-
>  arch/arm/kernel/smp.c               |    7 +++----
>  arch/arm/mach-msm/timer.c           |    3 ++-
>  arch/arm/mach-omap2/timer-mpu.c     |    3 ++-
>  arch/arm/mach-realview/localtimer.c |    3 ++-
>  arch/arm/mach-s5pv310/localtimer.c  |    3 ++-
>  arch/arm/mach-shmobile/localtimer.c |    3 ++-
>  arch/arm/mach-tegra/localtimer.c    |    3 ++-
>  arch/arm/mach-ux500/localtimer.c    |    3 ++-
>  arch/arm/mach-vexpress/localtimer.c |    3 ++-
>  10 files changed, 26 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/include/asm/localtimer.h
> b/arch/arm/include/asm/localtimer.h
> index 6bc63ab..080d74f 100644
> --- a/arch/arm/include/asm/localtimer.h
> +++ b/arch/arm/include/asm/localtimer.h
> @@ -44,8 +44,14 @@ int local_timer_ack(void);
>  /*
>   * Setup a local timer interrupt for a CPU.
>   */
> -void local_timer_setup(struct clock_event_device *);
> +int local_timer_setup(struct clock_event_device *);
>
> +#else
> +
> +static inline int local_timer_setup(struct clock_event_device *evt)
> +{
> +	return -ENXIO;
> +}
>  #endif
>
>  #endif
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index 4539ebc..7b9cc53 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -474,13 +474,12 @@ static void smp_timer_broadcast(const struct
> cpumask *mask)
>  #define smp_timer_broadcast	NULL
>  #endif
>
> -#ifndef CONFIG_LOCAL_TIMERS
>  static void broadcast_timer_set_mode(enum clock_event_mode mode,
>  	struct clock_event_device *evt)
>  {
>  }
>
> -static void local_timer_setup(struct clock_event_device *evt)
> +static void dummy_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->name	= "dummy_timer";
>  	evt->features	= CLOCK_EVT_FEAT_ONESHOT |
> @@ -492,7 +491,6 @@ static void local_timer_setup(struct
> clock_event_device *evt)
>
>  	clockevents_register_device(evt);
>  }
> -#endif
>
>  void __cpuinit percpu_timer_setup(void)
>  {
> @@ -502,7 +500,8 @@ void __cpuinit percpu_timer_setup(void)
>  	evt->cpumask = cpumask_of(cpu);
>  	evt->broadcast = smp_timer_broadcast;
>
> -	local_timer_setup(evt);
> +	if (local_timer_setup(evt))
> +		dummy_timer_setup(evt);
>  }
>
>  #ifdef CONFIG_HOTPLUG_CPU
> diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
> index c105d28..ae85aa9 100644
> --- a/arch/arm/mach-msm/timer.c
> +++ b/arch/arm/mach-msm/timer.c
> @@ -255,7 +255,7 @@ static void __init msm_timer_init(void)
>  }
>
>  #ifdef CONFIG_SMP
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	struct msm_clock *clock = &msm_clocks[MSM_GLOBAL_TIMER];
>
> @@ -287,6 +287,7 @@ void __cpuinit local_timer_setup(struct
> clock_event_device *evt)
>  	gic_enable_ppi(clock->irq.irq);
>
>  	clockevents_register_device(evt);
> +	return 0;
>  }
>
>  inline int local_timer_ack(void)
> diff --git a/arch/arm/mach-omap2/timer-mpu.c b/arch/arm/mach-
> omap2/timer-mpu.c
> index 954682e..09c73dc 100644
> --- a/arch/arm/mach-omap2/timer-mpu.c
> +++ b/arch/arm/mach-omap2/timer-mpu.c
> @@ -26,9 +26,10 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = OMAP44XX_IRQ_LOCALTIMER;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
>
> diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-
> realview/localtimer.c
> index 60b4e11..aca29ce 100644
> --- a/arch/arm/mach-realview/localtimer.c
> +++ b/arch/arm/mach-realview/localtimer.c
> @@ -19,8 +19,9 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = IRQ_LOCALTIMER;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
> diff --git a/arch/arm/mach-s5pv310/localtimer.c b/arch/arm/mach-
> s5pv310/localtimer.c
> index 2784036..8239c6a 100644
> --- a/arch/arm/mach-s5pv310/localtimer.c
> +++ b/arch/arm/mach-s5pv310/localtimer.c
> @@ -18,8 +18,9 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = IRQ_LOCALTIMER;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
> diff --git a/arch/arm/mach-shmobile/localtimer.c b/arch/arm/mach-
> shmobile/localtimer.c
> index 2111c28..ad9ccc9 100644
> --- a/arch/arm/mach-shmobile/localtimer.c
> +++ b/arch/arm/mach-shmobile/localtimer.c
> @@ -18,8 +18,9 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = 29;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
> diff --git a/arch/arm/mach-tegra/localtimer.c b/arch/arm/mach-
> tegra/localtimer.c
> index f81ca7c..e91d681 100644
> --- a/arch/arm/mach-tegra/localtimer.c
> +++ b/arch/arm/mach-tegra/localtimer.c
> @@ -18,8 +18,9 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = IRQ_LOCALTIMER;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
> diff --git a/arch/arm/mach-ux500/localtimer.c b/arch/arm/mach-
> ux500/localtimer.c
> index 2288f6a..5ba1133 100644
> --- a/arch/arm/mach-ux500/localtimer.c
> +++ b/arch/arm/mach-ux500/localtimer.c
> @@ -21,8 +21,9 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = IRQ_LOCALTIMER;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
> diff --git a/arch/arm/mach-vexpress/localtimer.c b/arch/arm/mach-
> vexpress/localtimer.c
> index c0e3a59..e5adbfa 100644
> --- a/arch/arm/mach-vexpress/localtimer.c
> +++ b/arch/arm/mach-vexpress/localtimer.c
> @@ -19,8 +19,9 @@
>  /*
>   * Setup the local clock events for a CPU.
>   */
> -void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +int __cpuinit local_timer_setup(struct clock_event_device *evt)
>  {
>  	evt->irq = IRQ_LOCALTIMER;
>  	twd_timer_setup(evt);
> +	return 0;
>  }
> --
> 1.6.0.4

  parent reply	other threads:[~2011-02-16 12:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-12 11:29 [PATCH 0/5] ARM: omap4 related fixes for 2.6.39 Santosh Shilimkar
2011-02-12 11:29 ` [PATCH 1/5] ARM: smp: Select local timers vs dummy timer support runtime Santosh Shilimkar
2011-02-15  4:13   ` David Brown
2011-02-15  4:15   ` David Brown
2011-02-16 12:45   ` Santosh Shilimkar [this message]
2011-02-20 11:03   ` Russell King - ARM Linux
2011-02-20 11:07     ` [PATCH 1/5] ARM: smp: Select local timers vs dummy timersupport runtime Santosh Shilimkar
2011-02-23 16:36       ` Russell King - ARM Linux
2011-02-23 16:38         ` [PATCH 1/5] ARM: smp: Select local timers vs dummytimersupport runtime Santosh Shilimkar
2011-02-23 17:58           ` Santosh Shilimkar
2011-02-23 19:03             ` Russell King - ARM Linux
2011-02-23 19:11               ` [PATCH 1/5] ARM: smp: Select local timers vs dummytimersupportruntime Santosh Shilimkar
2011-02-23 19:55                 ` Russell King - ARM Linux
2011-02-23 20:04                   ` [PATCH 1/5] ARM: smp: Select local timers vsdummytimersupportruntime Santosh Shilimkar
2011-02-12 11:29 ` [PATCH 2/5] omap4: Enable ARM local timers with OMAP4430 es1.0 exception Santosh Shilimkar
2011-02-14 21:08   ` Tony Lindgren
2011-02-18 18:11   ` Santosh Shilimkar
2011-02-12 11:29 ` [PATCH 3/5] ARM: l2x0: Errata fix for flush by Way operation can cause data corruption Santosh Shilimkar
2011-02-12 17:50   ` Andrei Warkentin
2011-02-12 17:59     ` Santosh Shilimkar
2011-02-12 23:17       ` Andrei Warkentin
2011-02-14  5:08         ` Santosh Shilimkar
2011-02-14 19:33           ` Andrei Warkentin
2011-02-14 21:06             ` Andrei Warkentin
2011-02-15  7:14           ` Santosh Shilimkar
2011-02-15  9:10             ` Andrei Warkentin
2011-02-15  9:30               ` Santosh Shilimkar
2011-02-16 12:32             ` Santosh Shilimkar
2011-02-16 15:53             ` Catalin Marinas
2011-02-16 15:58               ` Santosh Shilimkar
2011-02-18 12:02               ` Santosh Shilimkar
2011-02-12 11:29 ` [PATCH 4/5] omap2plus: omap4: Set NR_CPU to 2 instead of default 4 Santosh Shilimkar
2011-02-14 21:09   ` Tony Lindgren
2011-02-12 11:29 ` [PATCH 5/5] omap4: Remove 'FIXME: omap44xx_sram_init not implemented' Santosh Shilimkar
2011-02-14 21:09   ` Tony Lindgren

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=ee756102dc8b46a37cf46d0fbe64b133@mail.gmail.com \
    --to=santosh.shilimkar@ti.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).