From: tip-bot for Soren Brinkmann <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, soren.brinkmann@xilinx.com,
hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de,
michal.simek@xilinx.com, daniel.lezcano@linaro.org
Subject: [tip:timers/core] clockevents: Adjust timer interval when frequency changes
Date: Fri, 7 Feb 2014 06:40:39 -0800 [thread overview]
Message-ID: <tip-fe79a9ba11962a603fb6af68fcb476e64031e46c@git.kernel.org> (raw)
In-Reply-To: <1391466877-28908-3-git-send-email-soren.brinkmann@xilinx.com>
Commit-ID: fe79a9ba11962a603fb6af68fcb476e64031e46c
Gitweb: http://git.kernel.org/tip/fe79a9ba11962a603fb6af68fcb476e64031e46c
Author: Soren Brinkmann <soren.brinkmann@xilinx.com>
AuthorDate: Mon, 3 Feb 2014 14:34:32 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 7 Feb 2014 15:34:29 +0100
clockevents: Adjust timer interval when frequency changes
clockevent devices in periodic mode are not updated when the frequency
of the device changes. Issue a dev->set_mode() callback which forces
the device to reevaluate the timer settings.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Link: http://lkml.kernel.org/r/1391466877-28908-3-git-send-email-soren.brinkmann@xilinx.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/clockevents.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 641d910..f85e5fd 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -443,10 +443,13 @@ int __clockevents_update_freq(struct clock_event_device *dev, u32 freq)
{
clockevents_config(dev, freq);
- if (dev->mode != CLOCK_EVT_MODE_ONESHOT)
- return 0;
+ if (dev->mode == CLOCK_EVT_MODE_ONESHOT)
+ return clockevents_program_event(dev, dev->next_event, false);
+
+ if (dev->mode == CLOCK_EVT_MODE_PERIODIC)
+ dev->set_mode(CLOCK_EVT_MODE_PERIODIC, dev);
- return clockevents_program_event(dev, dev->next_event, false);
+ return 0;
}
/**
next prev parent reply other threads:[~2014-02-07 14:40 UTC|newest]
Thread overview: 12+ 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-07 14:40 ` [tip:timers/core] clockevents: Serialize calls to clockevents_update_freq() in the core tip-bot for Thomas Gleixner
2014-02-03 22:34 ` [PATCH v3 2/7] time: clockevents: Adjust timer interval when frequency changes Soren Brinkmann
2014-02-07 14:40 ` tip-bot for Soren Brinkmann [this message]
2014-02-03 22:34 ` [PATCH v3 3/7] clocksource/cadence_ttc: Call clockevents_update_freq() with IRQs enabled Soren Brinkmann
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=tip-fe79a9ba11962a603fb6af68fcb476e64031e46c@git.kernel.org \
--to=tipbot@zytor.com \
--cc=daniel.lezcano@linaro.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=mingo@kernel.org \
--cc=soren.brinkmann@xilinx.com \
--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
Powered by JetHome