Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: soren.brinkmann@xilinx.com (Soren Brinkmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/7] clocksource/cadence_ttc: Call clockevents_update_freq() with IRQs enabled
Date: Mon,  3 Feb 2014 14:34:33 -0800	[thread overview]
Message-ID: <1391466877-28908-4-git-send-email-soren.brinkmann@xilinx.com> (raw)
In-Reply-To: <1391466877-28908-1-git-send-email-soren.brinkmann@xilinx.com>

The timer core takes care of serialization and IRQs. Hence the driver is
no longer required to disable interrupts when calling
clockevents_update_freq().

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
 drivers/clocksource/cadence_ttc_timer.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c
index 63f176de0d02..f05b9fdc7425 100644
--- a/drivers/clocksource/cadence_ttc_timer.c
+++ b/drivers/clocksource/cadence_ttc_timer.c
@@ -321,25 +321,12 @@ static int ttc_rate_change_clockevent_cb(struct notifier_block *nb,
 
 	switch (event) {
 	case POST_RATE_CHANGE:
-	{
-		unsigned long flags;
-
-		/*
-		 * clockevents_update_freq should be called with IRQ disabled on
-		 * the CPU the timer provides events for. The timer we use is
-		 * common to both CPUs, not sure if we need to run on both
-		 * cores.
-		 */
-		local_irq_save(flags);
-		clockevents_update_freq(&ttcce->ce,
-				ndata->new_rate / PRESCALE);
-		local_irq_restore(flags);
-
 		/* update cached frequency */
 		ttc->freq = ndata->new_rate;
 
+		clockevents_update_freq(&ttcce->ce, ndata->new_rate / PRESCALE);
+
 		/* fall through */
-	}
 	case PRE_RATE_CHANGE:
 	case ABORT_RATE_CHANGE:
 	default:
-- 
1.8.5.3

  parent reply	other threads:[~2014-02-03 22:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 22:34 [PATCH v3 0/7] ARM: zynq: cpufreq support Soren Brinkmann
2014-02-03 22:34 ` [PATCH v3 1/7] time: Serialize calls to 'clockevents_update_freq' in the timing core Soren Brinkmann
2014-02-03 22:34 ` [PATCH v3 2/7] time: clockevents: Adjust timer interval when frequency changes Soren Brinkmann
2014-02-03 22:34 ` Soren Brinkmann [this message]
2014-02-03 22:34 ` [PATCH v3 4/7] clocksource/cadence_ttc: Overhaul clocksource frequency adjustment Soren Brinkmann
2014-02-03 22:34 ` [PATCH v3 5/7] clocksource/cadence_ttc: Use only one counter Soren Brinkmann
2014-02-04 20:41   ` Thomas Gleixner
2014-02-10 17:46     ` Sören Brinkmann
2014-02-03 22:34 ` [PATCH v3 6/7] arm: zynq: Don't use arm_global_timer with cpufreq Soren Brinkmann
2014-02-03 22:34 ` [PATCH v3 7/7] arm: zynq: Add support for cpufreq Soren Brinkmann

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=1391466877-28908-4-git-send-email-soren.brinkmann@xilinx.com \
    --to=soren.brinkmann@xilinx.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