From: sylvain.rochet@finsecur.com (Sylvain Rochet)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clockevents: don't suspend/resume if unused
Date: Mon, 25 May 2015 22:53:59 +0200 [thread overview]
Message-ID: <20150525205359.GA9302@gradator.net> (raw)
In-Reply-To: <alpine.DEB.2.11.1505252208140.5457@nanos>
Hello Thomas,
On Mon, May 25, 2015 at 10:11:15PM +0200, Thomas Gleixner wrote:
>
> That's a reasonable explanation.
>
> While timer IPs seem to be designed by janitors in general, this one
> has an extraordinary level of stupidity.
Yes, that's quite a stupid design, however I wasn't totally right from
looking at the datasheet again, the timer does not restart when asked to
stop while it is already stopped, my bad. But it doesn't change
anything, the issue is still that this timer cannot be stopped right
now, you have to ask for it to stop then wait the overflow.
1. suspend PIT[1] -> ask to stop
2. suspended, timer is still counting and will eventually reaches the
overflow condition then stop, that's probably not going to happen if
system switched to slow clock
3. resume PIT[2] -> wait for PIT to stop counting (up to 126ms) because
we need it to be synched back if we want to use it at some point in the
future, that's also the only way to clear pending interrupts.
Sylvain
[1] http://lxr.free-electrons.com/source/drivers/clocksource/timer-atmel-pit.c#L122
[2] http://lxr.free-electrons.com/source/drivers/clocksource/timer-atmel-pit.c#L130
prev parent reply other threads:[~2015-05-25 20:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 9:05 [PATCH] clockevents: don't suspend/resume if unused Alexandre Belloni
2015-01-16 9:20 ` Sylvain Rochet
2015-01-16 11:17 ` Russell King - ARM Linux
2015-01-16 11:20 ` Russell King - ARM Linux
2015-01-16 16:59 ` Alexandre Belloni
2015-03-06 12:54 ` Alexandre Belloni
2015-05-25 16:19 ` Alexandre Belloni
2015-05-25 16:56 ` Thomas Gleixner
2015-05-25 18:48 ` Thomas Gleixner
2015-05-25 19:06 ` Sylvain Rochet
2015-05-25 20:11 ` Thomas Gleixner
2015-05-25 20:53 ` Sylvain Rochet [this message]
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=20150525205359.GA9302@gradator.net \
--to=sylvain.rochet@finsecur.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;
as well as URLs for NNTP newsgroup(s).