From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 0/6] ARM: vdso gettimeofday using generic timer architecture
Date: Wed, 23 Apr 2014 12:45:41 -0700 [thread overview]
Message-ID: <53581865.2020601@codeaurora.org> (raw)
In-Reply-To: <cover.1398213562.git.nathan_lynch@mentor.com>
On 04/22/14 17:48, Nathan Lynch wrote:
> Provide fast userspace implementations of gettimeofday and
> clock_gettime on systems that implement the generic timers extension
> defined in ARMv7. This follows the example of arm64 in conception but
> significantly differs in some aspects of the implementation (C vs
> assembly, mainly).
>
> Clocks supported:
> - CLOCK_REALTIME
> - CLOCK_MONOTONIC
> - CLOCK_REALTIME_COARSE
> - CLOCK_MONOTONIC_COARSE
>
> This also provides clock_getres (as arm64 does).
>
> Note that while the high-precision realtime and monotonic clock
> support depends on the generic timers extension, support for
> clock_getres and coarse clocks is independent of the timer
> implementation and is provided unconditionally.
I think we'll need to rename the clocksource in arch_timer.c if we only
have an mmio architected timer to something like arch_mem_counter. Or we
would need to map the register space for the view into userspace? I'm
guessing that is hard, but if that was done then I assume it would lay
the foundation for any mmio clocksource being used for the vdso.
----8<-----
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index b009012429b5..3f3d8ed465f4 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -449,10 +449,12 @@ static void __init arch_counter_register(unsigned type)
u64 start_count;
/* Register the CP15 based counter if we have one */
- if (type & ARCH_CP15_TIMER)
+ if (type & ARCH_CP15_TIMER) {
arch_timer_read_counter = arch_counter_get_cntvct_cp15;
- else
+ } else {
arch_timer_read_counter = arch_counter_get_cntvct_mem;
+ clocksource_counter.name = "arch_mem_counter";
+ }
start_count = arch_timer_read_counter();
clocksource_register_hz(&clocksource_counter, arch_timer_rate);
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-04-23 19:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 0:48 [PATCH v6 0/6] ARM: vdso gettimeofday using generic timer architecture Nathan Lynch
2014-04-23 0:48 ` [PATCH v6 1/6] ARM: place sigpage at a random offset above stack Nathan Lynch
2014-04-23 0:48 ` [PATCH v6 2/6] ARM: allow user access to arch timer virtual counter Nathan Lynch
2014-04-23 17:32 ` Will Deacon
2014-04-23 17:41 ` Nathan Lynch
2014-04-24 10:18 ` Will Deacon
2014-04-23 0:48 ` [PATCH v6 3/6] ARM: miscellaneous vdso infrastructure, preparation Nathan Lynch
2014-04-23 0:48 ` [PATCH v6 4/6] ARM: add vdso user-space code Nathan Lynch
2014-04-23 0:48 ` [PATCH v6 5/6] ARM: vdso initialization, mapping, and synchronization Nathan Lynch
2014-04-23 0:48 ` [PATCH v6 6/6] ARM: add CONFIG_VDSO Kconfig and Makefile bits Nathan Lynch
2014-04-23 19:45 ` Stephen Boyd [this message]
2014-04-24 2:28 ` [PATCH v6 0/6] ARM: vdso gettimeofday using generic timer architecture Nathan Lynch
2014-04-24 17:00 ` Stephen Boyd
2014-04-23 21:50 ` Russell King - ARM Linux
2014-04-24 7:37 ` Ard Biesheuvel
2014-04-24 15:15 ` Nathan Lynch
2014-04-24 15:25 ` Ard Biesheuvel
2014-04-24 14:59 ` Nathan Lynch
2014-04-24 16:22 ` Russell King - ARM Linux
2014-04-24 18:41 ` Nathan Lynch
2014-04-24 18:45 ` Russell King - ARM Linux
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=53581865.2020601@codeaurora.org \
--to=sboyd@codeaurora.org \
--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.