arm: sched_clock: Enable HAVE_SCHED_CLOCK support without init_sched_clock
PATCH 1/1 arm: sched_clock: Enable HAVE_SCHED_CLOCK support without init_sched_clock
From: Kyungmin Park <[email protected]>
On Samsung Exynos4 series, EVT0 chip uses the s5p_timer with HAVE_SCHED_CLOCK and remains use the MCT timer without init_sched_clock.
The similar combination will be happend with other SOCs. some board use HAVE_SCHED_CLOCK or others are not.
To co-exist the these boards. check the sched_clock_update_fn when sched_clock_postinit is called and return if not defined.
---
arch/arm/kernel/sched_clock.c +3 -0
@@ -70,5 +70,8 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),void __init sched_clock_postinit (void ) { +/* If init_sched_clock is not called, just return */ +if (!sched_clock_update_fn) +return ;sched_clock_poll (sched_clock_timer.data); }
PATCH 1/1 arm: sched_clock: Enable HAVE_SCHED_CLOCK support without init_sched_clock
Quoted 3 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
On Samsung Exynos4 series, EVT0 chip uses the
s5p_timerwithHAVE_SCHED_CLOCKand remains use the MCT timer withoutinit_sched_clock.
So in other words, sched_clock on exynos4 is broken because the update function won't be called, and it'll wrap well below the 64-bit ns range required of it.
NAK.
PATCH 1/1 arm: sched_clock: Enable HAVE_SCHED_CLOCK support without init_sched_clock
Quoted 8 lines · Russell King - ARM Linux
Quoted 3 lines · Kyungmin Park
From: Kyungmin Park <[email protected]>
On Samsung Exynos4 series, EVT0 chip uses the
s5p_timerwithHAVE_SCHED_CLOCKand remains use the MCT timer withoutinit_sched_clock.So in other words,
sched_clockon exynos4 is broken because the update function won't be called, and it'll wrap well below the 64-bit ns range required of it.
Right, even though MCT doesn't use the HAVE_SCHED_CLOCK, sched_clock is override with others.
It mean it should be implement the sched_clock for all boards if there are some boards use the HAVE_SCHED_CLOCK.
As I remember, there's attempt to solve the sched_clock registration issue. I'll check it.
Thank you,
Kyungmin Park
Quoted 3 lines
NAK.