From: Chanwoo Choi Date: Tue, 19 Sep 2017 09:12:52 +0000 (+0900) Subject: LOCAL / clocksource: arm_arch_timer: Don't register clockevent for Per-CPU X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a8d135704ed100a6326913f53ec16e5df82fb00;p=platform%2Fkernel%2Flinux-exynos.git LOCAL / clocksource: arm_arch_timer: Don't register clockevent for Per-CPU The arm64 architecture enabled the arm_arch_timer always even if arm_arch_timer is not stable. When Exynos5433 uses the arm_arch_timer, it fails to enable/disble the secondary cpu. To fix the hotplug issue of secondary cpu, if Exynos's MCT timer is enabled, arm_arch_timer doesn't register the clockevent for Per-CPU. Change-Id: Ia41f9c13889c4637391168dbc828a0bdbc7cdfff Reported-by: Wook Song Signed-off-by: Chanwoo Choi --- diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index d142109157d5..e5b0ae20add6 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -79,6 +79,7 @@ static bool vdso_default = true; static cpumask_t evtstrm_available = CPU_MASK_NONE; static bool evtstrm_enable = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EVTSTREAM); +static bool mct_enable = IS_ENABLED(CONFIG_CLKSRC_EXYNOS_MCT); static int __init early_evtstrm_cfg(char *buf) { @@ -1063,12 +1064,25 @@ static int __init arch_timer_register(void) if (err) goto out_unreg_notify; - /* Register and immediately configure the timer on the boot CPU */ - err = cpuhp_setup_state(CPUHP_AP_ARM_ARCH_TIMER_STARTING, - "clockevents/arm/arch_timer:starting", - arch_timer_starting_cpu, arch_timer_dying_cpu); - if (err) - goto out_unreg_cpupm; + if (mct_enable) { + /* + * FIXME: The arm64 architecture enables the arm_arch_timer always + * even if arm_arch_timer is not stable. When Exynos5433 uses the + * arm_arch_timer, it fails to enable/disble the secondary cpu. + * To fix the hotplug issue of secondary cpu, if Exynos's MCT timer + * is enabled, arm_arch_timer doesn't register the clockevent + * for Per-CPU. + */ + return 0; + } else { + /* Register and immediately configure the timer on the boot CPU */ + err = cpuhp_setup_state(CPUHP_AP_ARM_ARCH_TIMER_STARTING, + "clockevents/arm/arch_timer:starting", + arch_timer_starting_cpu, arch_timer_dying_cpu); + if (err) + goto out_unreg_cpupm; + } + return 0; out_unreg_cpupm: