From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] clocksource: arm_arch_timer: change clocksource name if CP15 unavailable
Date: Fri, 26 Sep 2014 09:04:30 +0200 [thread overview]
Message-ID: <54250FFE.2050605@linaro.org> (raw)
In-Reply-To: <1411052390-27238-2-git-send-email-nathan_lynch@mentor.com>
On 09/18/2014 04:59 PM, Nathan Lynch wrote:
> The arm and arm64 VDSOs need CP15 access to the architected counter.
> If this is unavailable (which is allowed by ARM v7), indicate this by
> changing the clocksource name to "arch_mem_counter" before registering
> the clocksource.
>
> Suggested by Stephen Boyd.
>
> Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Hi Nathan,
is it possible to have the acked-by of the different maintainers for the
other patches ?
Are these patches targeted to be merged for 3.18 ?
Thanks
-- Daniel
> ---
> drivers/clocksource/arm_arch_timer.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index 5163ec13429d..c99afdf12e98 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -429,11 +429,19 @@ 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;
> - else
> + } else {
> arch_timer_read_counter = arch_counter_get_cntvct_mem;
>
> + /* If the clocksource name is "arch_sys_counter" the
> + * VDSO will attempt to read the CP15-based counter.
> + * Ensure this does not happen when CP15-based
> + * counter is not available.
> + */
> + clocksource_counter.name = "arch_mem_counter";
> + }
> +
> start_count = arch_timer_read_counter();
> clocksource_register_hz(&clocksource_counter, arch_timer_rate);
> cyclecounter.mult = clocksource_counter.mult;
>
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2014-09-26 7:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 14:59 [PATCH v2 0/3] arm_arch_timer: VDSO preparation, code consolidation Nathan Lynch
2014-09-18 14:59 ` [PATCH v2 1/3] clocksource: arm_arch_timer: change clocksource name if CP15 unavailable Nathan Lynch
2014-09-26 7:04 ` Daniel Lezcano [this message]
2014-09-26 9:26 ` Will Deacon
2014-09-26 11:34 ` Daniel Lezcano
2014-09-26 14:55 ` Nathan Lynch
2014-09-18 14:59 ` [PATCH v2 2/3] clocksource: arm_arch_timer: enable counter access for 32-bit ARM Nathan Lynch
2014-09-18 14:59 ` [PATCH v2 3/3] clocksource: arm_arch_timer: consolidate arch_timer_evtstrm_enable Nathan Lynch
2014-09-22 15:39 ` [PATCH v2 0/3] arm_arch_timer: VDSO preparation, code consolidation Will Deacon
2014-09-22 16:15 ` Nathan Lynch
2014-09-22 18:56 ` Daniel Lezcano
2014-09-22 22:30 ` Russell King - ARM Linux
2014-09-23 0:28 ` Nathan Lynch
2014-09-24 14:12 ` Christopher Covington
2014-09-24 14:32 ` Nathan Lynch
2014-09-24 14:50 ` Russell King - ARM Linux
2014-09-24 16:58 ` Nathan Lynch
2014-09-24 18:58 ` Russell King - ARM Linux
2014-09-24 14:45 ` Catalin Marinas
2014-09-24 14:52 ` Russell King - ARM Linux
2014-09-24 15:04 ` Catalin Marinas
2014-09-24 15:08 ` 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=54250FFE.2050605@linaro.org \
--to=daniel.lezcano@linaro.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 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).