timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE
[firefly-linux-kernel-4.4.55.git] / kernel / timer.c
index 09bca8ce97718c4f21b6b90cbf6785467416c055..7376589adc2857a2e3101c021cdf06ce5a8af378 100644 (file)
@@ -1539,12 +1539,12 @@ static int __cpuinit init_timers_cpu(int cpu)
                        boot_done = 1;
                        base = &boot_tvec_bases;
                }
+               spin_lock_init(&base->lock);
                tvec_base_done[cpu] = 1;
        } else {
                base = per_cpu(tvec_bases, cpu);
        }
 
-       spin_lock_init(&base->lock);
 
        for (j = 0; j < TVN_SIZE; j++) {
                INIT_LIST_HEAD(base->tv5.vec + j);