ARM: exynos: register sched_clock callback
Subsystems (2)
PATCH 1/1 ARM: exynos: register sched_clock callback
Use the clocksource mct-frc for sched_clock
Signed-off-by Vincent Guittot <[email protected]>
--- drivers/clocksource/exynos_mct.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/clocksource/exynos_mct.c +8 -0
@@ -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 )
Signature · 1 line
1.9.1
PATCH 1/1 ARM: exynos: register sched_clock callback
Hi Vincent,
Quoted 30 lines · Vincent Guittot
Use the clocksource mct-frc for
sched_clockSigned-off-by Vincent Guittot <[email protected]>--- drivers/clocksource/exynos_mct.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/clocksource/exynos_mct.c +6
-0@@ -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 )
drivers/clocksource/exynos_mct.c struct clocksource mct_frc = { · line 211
Quoted 10 lines
drivers/clocksource/exynos_mct.c +2
-0{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 <[email protected]>
Best regards,
Tomasz
PATCH 1/1 ARM: exynos: register sched_clock callback
In reply to Vincent GuittotQuoted 3 lines · Vincent Guittot
Use the clocksource mct-frc for
sched_clockSigned-off-by Vincent Guittot <[email protected]>
Acked-by Daniel Lezcano <[email protected]>
[ ... ]
Signature · 5 lines
<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
Kukjin Kim
AppliedPATCH 1/1 ARM: exynos: register sched_clock callback
Quoted 9 lines · Daniel Lezcano
Quoted 3 lines · Vincent Guittot
Use the clocksource mct-frc for
sched_clockSigned-off-by Vincent Guittot <[email protected]>Acked-by Daniel Lezcano <[email protected]>[ ... ]
Applied, thanks.
- Kukjin