linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, tglx@linutronix.de,
	nico@linaro.org, Will.Deacon@arm.com, Marc.Zyngier@arm.com,
	john.stultz@linaro.org, Mark Rutland <mark.rutland@arm.com>
Subject: [PATCHv3 3/4] arm: Use generic timer broadcast receiver
Date: Mon, 14 Jan 2013 17:05:23 +0000	[thread overview]
Message-ID: <1358183124-28461-4-git-send-email-mark.rutland@arm.com> (raw)
In-Reply-To: <1358183124-28461-1-git-send-email-mark.rutland@arm.com>

Currently, the ARM backend must maintain a redundant list of timers for
the purpose of centralising timer broadcast functionality. This prevents
sharing timer drivers across architectures.

This patch moves the pain of dealing with timer broadcasts to the core
clockevents tick broadcast code, which already maintains its own list
of timers.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
---
 arch/arm/kernel/smp.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 84f4cbf..9308519 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -475,12 +475,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu)
  */
 static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
 
-static void ipi_timer(void)
-{
-	struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
-	evt->event_handler(evt);
-}
-
 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
 static void smp_timer_broadcast(const struct cpumask *mask)
 {
@@ -596,11 +590,13 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
 	case IPI_WAKEUP:
 		break;
 
+#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
 	case IPI_TIMER:
 		irq_enter();
-		ipi_timer();
+		tick_receive_broadcast();
 		irq_exit();
 		break;
+#endif
 
 	case IPI_RESCHEDULE:
 		scheduler_ipi();
-- 
1.7.0.4



  parent reply	other threads:[~2013-01-14 17:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 17:05 [PATCHv3 0/4] clockevents: decouple broadcast mechanism from drivers Mark Rutland
2013-01-14 17:05 ` [PATCHv3 1/4] clockevents: Add generic timer broadcast receiver Mark Rutland
2013-02-04 10:30   ` [tip:timers/core] " tip-bot for Mark Rutland
2013-01-14 17:05 ` [PATCHv3 2/4] clockevents: Add generic timer broadcast function Mark Rutland
2013-02-04 10:31   ` [tip:timers/core] " tip-bot for Mark Rutland
2013-01-14 17:05 ` Mark Rutland [this message]
2013-01-14 17:05 ` [PATCHv3 4/4] arm: Add generic timer broadcast support Mark Rutland
2013-02-06 20:51   ` Stephen Warren
2013-02-07 10:04     ` Mark Rutland
2013-02-07 11:40       ` Santosh Shilimkar
2013-02-07 16:51         ` Stephen Warren
2013-02-08  6:48           ` Santosh Shilimkar
2013-02-07 17:17         ` Mark Rutland
2013-02-08  6:52           ` Santosh Shilimkar
2013-02-07 16:49       ` Stephen Warren
2013-02-07 17:25         ` Mark Rutland

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=1358183124-28461-4-git-send-email-mark.rutland@arm.com \
    --to=mark.rutland@arm.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.org \
    --cc=tglx@linutronix.de \
    /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).