From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/5] clocksource: sun5i: Add clock notifiers
Date: Tue, 3 Mar 2015 09:52:04 +0100 [thread overview]
Message-ID: <20150303085204.GA4911@lukather> (raw)
In-Reply-To: <20150126143541.GG31568@lukather>
On Mon, Jan 26, 2015 at 03:35:41PM +0100, Maxime Ripard wrote:
> > >+static int sun5i_rate_cb_clksrc(struct notifier_block *nb,
> > >+ unsigned long event, void *data)
> > >+{
> > >+ struct clk_notifier_data *ndata = data;
> > >+ struct sun5i_timer *timer = to_sun5i_timer(nb);
> > >+ struct sun5i_timer_clksrc *cs = container_of(timer,
> > >+ struct sun5i_timer_clksrc, timer);
> > >+
> > >+ switch (event) {
> > >+ case PRE_RATE_CHANGE:
> > >+ clocksource_unregister(&cs->clksrc);
> > >+ break;
> > >+
> > >+ case POST_RATE_CHANGE:
> > >+ clocksource_register_hz(&cs->clksrc, ndata->new_rate);
> > >+ break;
> >
> > Why clocksource_unregister couldn't be in the POST_RATE_CHANGE ?
>
> Wouldn't that leave a (small, I agree) window where the timer would
> run at a rate different to the one it has been registered with?
Ping?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150303/8f71e32a/attachment-0001.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 5/5] clocksource: sun5i: Add clock notifiers
Date: Tue, 3 Mar 2015 09:52:04 +0100 [thread overview]
Message-ID: <20150303085204.GA4911@lukather> (raw)
In-Reply-To: <20150126143541.GG31568@lukather>
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
On Mon, Jan 26, 2015 at 03:35:41PM +0100, Maxime Ripard wrote:
> > >+static int sun5i_rate_cb_clksrc(struct notifier_block *nb,
> > >+ unsigned long event, void *data)
> > >+{
> > >+ struct clk_notifier_data *ndata = data;
> > >+ struct sun5i_timer *timer = to_sun5i_timer(nb);
> > >+ struct sun5i_timer_clksrc *cs = container_of(timer,
> > >+ struct sun5i_timer_clksrc, timer);
> > >+
> > >+ switch (event) {
> > >+ case PRE_RATE_CHANGE:
> > >+ clocksource_unregister(&cs->clksrc);
> > >+ break;
> > >+
> > >+ case POST_RATE_CHANGE:
> > >+ clocksource_register_hz(&cs->clksrc, ndata->new_rate);
> > >+ break;
> >
> > Why clocksource_unregister couldn't be in the POST_RATE_CHANGE ?
>
> Wouldn't that leave a (small, I agree) window where the timer would
> run at a rate different to the one it has been registered with?
Ping?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-03 8:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 9:50 [PATCH v2 0/5] clocksource: sun5i: Support parent clock rate changes Maxime Ripard
2015-01-26 9:50 ` Maxime Ripard
2015-01-26 9:50 ` [PATCH v2 1/5] clocksource: sun5i: Switch to request_irq Maxime Ripard
2015-01-26 9:50 ` Maxime Ripard
2015-01-26 9:50 ` [PATCH v2 2/5] clocksource: sun5i: Use of_io_request_and_map Maxime Ripard
2015-01-26 9:50 ` Maxime Ripard
2015-01-26 9:50 ` [PATCH v2 3/5] clocksource: sun5i: Remove sched_clock Maxime Ripard
2015-01-26 9:50 ` Maxime Ripard
2015-01-26 9:50 ` [PATCH v2 4/5] clocksource: sun5i: Refactor the current code Maxime Ripard
2015-01-26 9:50 ` Maxime Ripard
2015-01-26 9:50 ` [PATCH v2 5/5] clocksource: sun5i: Add clock notifiers Maxime Ripard
2015-01-26 9:50 ` Maxime Ripard
2015-01-26 11:22 ` Daniel Lezcano
2015-01-26 11:22 ` Daniel Lezcano
2015-01-26 14:35 ` Maxime Ripard
2015-01-26 14:35 ` Maxime Ripard
2015-03-03 8:52 ` Maxime Ripard [this message]
2015-03-03 8:52 ` Maxime Ripard
2015-03-03 11:16 ` Daniel Lezcano
2015-03-03 11:16 ` Daniel Lezcano
2015-03-04 9:32 ` Maxime Ripard
2015-03-04 9:32 ` Maxime Ripard
2015-03-04 11:43 ` Daniel Lezcano
2015-03-04 11:43 ` Daniel Lezcano
2015-03-04 20:36 ` Daniel Lezcano
2015-03-04 20:36 ` Daniel Lezcano
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=20150303085204.GA4911@lukather \
--to=maxime.ripard@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.