From: pgaikwad@nvidia.com (Prashant Gaikwad)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arch_timer: Move delay timer to drivers clocksource
Date: Thu, 16 Jan 2014 10:49:04 +0530 [thread overview]
Message-ID: <52D76BC8.6080405@nvidia.com> (raw)
In-Reply-To: <20140115154526.GC3571@mudshark.cambridge.arm.com>
On Wednesday 15 January 2014 09:15 PM, Will Deacon wrote:
> Hello,
>
> On Wed, Jan 15, 2014 at 01:07:07PM +0000, Prashant Gaikwad wrote:
>> Now arch timer is registerd using generic sched timer, delay
>> timer registration is the only part remaining in arch ports.
>> Move this part to drivers clocksource and remove arch timer
>> from arch ports.
> What's the advantage in doing this? I'd have thought consolidation, but...
Primary objective of doing this to use other timers on SoC instead of
arch timers. It is observed that on ARM implementations of ARMv8
architecture context of per CPU logic of arch timer is not preserved
when CPU is powered down and reset is held during powerdown.
This makes arch timers unusable as wake events for some CPU idle states
where CPU core is powered down.
So we have two options:
1. Use system timers as broadcast timers and save/restore arch timers
context actross these CPU idle states.
2. Disable arch timer and use system timers.
This patch will help to implement 2nd option.
>> Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
>> ---
>> arch/arm/include/asm/arch_timer.h | 1 -
>> arch/arm/kernel/Makefile | 1 -
>> arch/arm/kernel/arch_timer.c | 44 ----------------------------------
>> arch/arm64/include/asm/arch_timer.h | 5 ----
>> arch/arm64/include/asm/delay.h | 32 ++++++++++++++++++++++++
>> arch/arm64/include/asm/timex.h | 5 +--
>> arch/arm64/kernel/time.c | 9 -------
>> arch/arm64/lib/delay.c | 26 ++++++++++++++++++++
>> drivers/clocksource/arm_arch_timer.c | 12 ++++++++-
>> 9 files changed, 71 insertions(+), 64 deletions(-)
> ... that's a positive diffstat! I also think that delaying the delay loop
> initialisation for arm64 could be problematic, since we don't have anything
> to fall back on (like the busy-loop on ARM) in case of early *delay calls.
>
> What happens if I call udelay on arm64 before the counter has registered?
I will fix this in next patch. Do you have plan to add busy-loop for
arm64? Or I will have to initialize read counter function early.
> Will
next prev parent reply other threads:[~2014-01-16 5:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 13:07 [PATCH] arch_timer: Move delay timer to drivers clocksource Prashant Gaikwad
2014-01-15 15:41 ` Rob Herring
2014-01-16 4:45 ` Prashant Gaikwad
2014-01-15 15:45 ` Will Deacon
2014-01-16 5:19 ` Prashant Gaikwad [this message]
2014-01-16 12:16 ` Will Deacon
2014-01-17 9:07 ` Antti Miettinen
2014-01-17 9:12 ` Daniel Lezcano
2014-01-17 10:11 ` Prashant Gaikwad
2014-01-17 10:15 ` Daniel Lezcano
2014-01-17 11:37 ` Prashant Gaikwad
2014-01-17 12:08 ` Daniel Lezcano
2014-01-17 13:40 ` Prashant Gaikwad
2014-01-17 18:36 ` Stephen Boyd
2014-01-20 14:42 ` Daniel Lezcano
2014-01-20 14:56 ` Lorenzo Pieralisi
2014-01-20 15:28 ` Daniel Lezcano
2014-01-21 8:20 ` Prashant Gaikwad
2014-01-21 8:40 ` Daniel Lezcano
2014-01-21 8:53 ` Prashant Gaikwad
2014-01-19 5:20 ` Antti Miettinen
2014-01-20 14:41 ` Daniel Lezcano
2014-01-21 8:10 ` Prashant Gaikwad
2014-01-21 8:25 ` Daniel Lezcano
2014-01-17 10:30 ` Antti Miettinen
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=52D76BC8.6080405@nvidia.com \
--to=pgaikwad@nvidia.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.