linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: stable@vger.kernel.org
Subject: [patch 4/4] clocksource: exynos_mct: Register clock event after request_irq()
Date: Wed, 16 Apr 2014 14:36:45 -0000	[thread overview]
Message-ID: <20140416143316.299247848@linutronix.de> (raw)
In-Reply-To: 20140416142106.537575971@linutronix.de

[-- Attachment #1: clocksource-exynos_mct-fix-too-early-isr-fire-up-on-wrong-cpu.patch --]
[-- Type: text/plain, Size: 1463 bytes --]

From: Krzysztof Kozlowski <k.kozlowski@samsung.com>

After hotplugging CPU1 the first call of interrupt handler for CPU1
oneshot timer was called on CPU0 because it fired before setting IRQ
affinity. Affected are SoCs where Multi Core Timer interrupts are
shared (SPI), e.g. Exynos 4210.

During setup of the MCT timers the clock event device should be
registered after setting the affinity for interrupt. This will prevent
starting the timer too early.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/clocksource/exynos_mct.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: tip/drivers/clocksource/exynos_mct.c
===================================================================
--- tip.orig/drivers/clocksource/exynos_mct.c
+++ tip/drivers/clocksource/exynos_mct.c
@@ -416,8 +416,6 @@ static int exynos4_local_timer_setup(str
 	evt->set_mode = exynos4_tick_set_mode;
 	evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
 	evt->rating = 450;
-	clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),
-					0xf, 0x7fffffff);
 
 	exynos4_mct_write(TICK_BASE_CNT, mevt->base + MCT_L_TCNTB_OFFSET);
 
@@ -434,6 +432,8 @@ static int exynos4_local_timer_setup(str
 	} else {
 		enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0);
 	}
+	clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),
+					0xf, 0x7fffffff);
 
 	return 0;
 }



  parent reply	other threads:[~2014-04-16 14:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 14:36 [patch 0/4] genirq/exynos timers: Fix the CPU hotplug wreckage sanely Thomas Gleixner
2014-04-16 14:36 ` [patch 2/4] irqchip: gic: Support forced affinity setting Thomas Gleixner
2014-04-17 21:39   ` [tip:irq/urgent] irqchip: Gic: " tip-bot for Thomas Gleixner
2014-04-16 14:36 ` [patch 1/4] genirq: Allow forcing cpu affinity of interrupts Thomas Gleixner
2014-04-17 21:39   ` [tip:irq/urgent] " tip-bot for Thomas Gleixner
2014-04-16 14:36 ` Thomas Gleixner [this message]
2014-04-17 21:40   ` [tip:irq/urgent] clocksource: Exynos_mct: Register clock event after request_irq() tip-bot for Krzysztof Kozlowski
2014-04-16 14:36 ` [patch 3/4] clocksource: exynos_mct: Use irq_force_affinity() in cpu bringup Thomas Gleixner
2014-04-17 21:40   ` [tip:irq/urgent] clocksource: Exynos_mct: Use irq_force_affinity( ) " tip-bot for Thomas Gleixner
2014-04-16 15:59 ` [patch 0/4] genirq/exynos timers: Fix the CPU hotplug wreckage sanely Krzysztof Kozlowski
2014-04-16 21:16   ` Thomas Gleixner

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=20140416143316.299247848@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.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).