Merge tag 'trace-v4.14-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rosted...
[platform/kernel/linux-exynos.git] / drivers / clocksource / arm_arch_timer.c
index aae87c4..fd4b7f6 100644 (file)
@@ -455,7 +455,11 @@ void arch_timer_enable_workaround(const struct arch_timer_erratum_workaround *wa
                        per_cpu(timer_unstable_counter_workaround, i) = wa;
        }
 
-       static_branch_enable(&arch_timer_read_ool_enabled);
+       /*
+        * Use the locked version, as we're called from the CPU
+        * hotplug framework. Otherwise, we end-up in deadlock-land.
+        */
+       static_branch_enable_cpuslocked(&arch_timer_read_ool_enabled);
 
        /*
         * Don't use the vdso fastpath if errata require using the
@@ -1440,7 +1444,7 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
         * While unlikely, it's theoretically possible that none of the frames
         * in a timer expose the combination of feature we want.
         */
-       for (i = i; i < timer_count; i++) {
+       for (i = 0; i < timer_count; i++) {
                timer = &timers[i];
 
                frame = arch_timer_mem_find_best_frame(timer);