X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fclocksource%2Farm_arch_timer.c;h=a328d2c30f33cba2e6001e105d2180b8d96aeefb;hb=8db0e8e150db6f3be4e4c9ac9c449b0c47ee9190;hp=8e308d7a109d126551f87b286467e73ac4aa57a2;hpb=d1b26f763d55f9a519c520a062c309c6dc5d3b29;p=platform%2Fkernel%2Flinux-exynos.git diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 8e308d7..a328d2c 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -78,6 +78,7 @@ static bool arch_counter_suspend_stop; static bool vdso_default = true; 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) { @@ -299,8 +300,7 @@ static u64 notrace arm64_858921_read_cntvct_el0(void) #endif #ifdef CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND -DEFINE_PER_CPU(const struct arch_timer_erratum_workaround *, - timer_unstable_counter_workaround); +DEFINE_PER_CPU(const struct arch_timer_erratum_workaround *, timer_unstable_counter_workaround); EXPORT_SYMBOL_GPL(timer_unstable_counter_workaround); DEFINE_STATIC_KEY_FALSE(arch_timer_read_ool_enabled); @@ -1018,12 +1018,25 @@ static int __init arch_timer_register(void) 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: