* [PATCH] ARM: exynos: register sched_clock callback
@ 2014-04-24 9:21 Vincent Guittot
2014-04-25 23:22 ` Tomasz Figa
2014-05-02 8:30 ` Daniel Lezcano
0 siblings, 2 replies; 4+ messages in thread
From: Vincent Guittot @ 2014-04-24 9:21 UTC (permalink / raw)
To: linux-arm-kernel
Use the clocksource mct-frc for sched_clock
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
drivers/clocksource/exynos_mct.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index a6ee6d7..61b0577 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -24,6 +24,7 @@
#include <linux/of_irq.h>
#include <linux/of_address.h>
#include <linux/clocksource.h>
+#include <linux/sched_clock.h>
#define EXYNOS4_MCTREG(x) (x)
#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
@@ -192,12 +193,19 @@ struct clocksource mct_frc = {
.resume = exynos4_frc_resume,
};
+static u64 notrace exynos4_read_sched_clock(void)
+{
+ return exynos4_frc_read(&mct_frc);
+}
+
static void __init exynos4_clocksource_init(void)
{
exynos4_mct_frc_start(0, 0);
if (clocksource_register_hz(&mct_frc, clk_rate))
panic("%s: can't register clocksource\n", mct_frc.name);
+
+ sched_clock_register(exynos4_read_sched_clock, 64, clk_rate);
}
static void exynos4_mct_comp0_stop(void)
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] ARM: exynos: register sched_clock callback
2014-04-24 9:21 [PATCH] ARM: exynos: register sched_clock callback Vincent Guittot
@ 2014-04-25 23:22 ` Tomasz Figa
2014-05-02 8:30 ` Daniel Lezcano
1 sibling, 0 replies; 4+ messages in thread
From: Tomasz Figa @ 2014-04-25 23:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Vincent,
On 24.04.2014 11:21, Vincent Guittot wrote:
> Use the clocksource mct-frc for sched_clock
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> drivers/clocksource/exynos_mct.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
> index a6ee6d7..61b0577 100644
> --- a/drivers/clocksource/exynos_mct.c
> +++ b/drivers/clocksource/exynos_mct.c
> @@ -24,6 +24,7 @@
> #include <linux/of_irq.h>
> #include <linux/of_address.h>
> #include <linux/clocksource.h>
> +#include <linux/sched_clock.h>
>
> #define EXYNOS4_MCTREG(x) (x)
> #define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
> @@ -192,12 +193,19 @@ struct clocksource mct_frc = {
> .resume = exynos4_frc_resume,
> };
>
> +static u64 notrace exynos4_read_sched_clock(void)
> +{
> + return exynos4_frc_read(&mct_frc);
> +}
> +
> static void __init exynos4_clocksource_init(void)
> {
> exynos4_mct_frc_start(0, 0);
>
> if (clocksource_register_hz(&mct_frc, clk_rate))
> panic("%s: can't register clocksource\n", mct_frc.name);
> +
> + sched_clock_register(exynos4_read_sched_clock, 64, clk_rate);
> }
>
> static void exynos4_mct_comp0_stop(void)
>
Thanks for this patch.
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] ARM: exynos: register sched_clock callback
2014-04-24 9:21 [PATCH] ARM: exynos: register sched_clock callback Vincent Guittot
2014-04-25 23:22 ` Tomasz Figa
@ 2014-05-02 8:30 ` Daniel Lezcano
2014-05-02 13:24 ` Kukjin Kim
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2014-05-02 8:30 UTC (permalink / raw)
To: linux-arm-kernel
On 04/24/2014 11:21 AM, Vincent Guittot wrote:
> Use the clocksource mct-frc for sched_clock
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
[ ... ]
--
<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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-02 13:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 9:21 [PATCH] ARM: exynos: register sched_clock callback Vincent Guittot
2014-04-25 23:22 ` Tomasz Figa
2014-05-02 8:30 ` Daniel Lezcano
2014-05-02 13:24 ` Kukjin Kim
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).