]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Xilinx: ARM: Skip delay calibration in hotplug path
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Thu, 23 Aug 2012 07:53:29 +0000 (00:53 -0700)
committerJohn Linn <john.linn@xilinx.com>
Thu, 23 Aug 2012 15:28:08 +0000 (08:28 -0700)
Changing the CPU frequency while one core is offline
taints the offline CPU's loops per jiffy value.
With this patch delay calibration is skipped when returning
from hotplug and the correct lpj value from the master CPU
is used.

This change is the same as commit
a279561879a795966336fb78186ee7435b6bb050 in
https://github.com/jcrigby/linaro-ci-kernels.git.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
arch/arm/kernel/smp.c

index 2c7217d971db0b42b9e1f5859459e18f9294f662..5121f8ab322e52bc321c9498c11fd00e8ce56f30 100644 (file)
@@ -223,6 +223,9 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
 {
        struct mm_struct *mm = &init_mm;
        unsigned int cpu = smp_processor_id();
+#ifdef CONFIG_ARCH_ZYNQ
+       static bool booted;
+#endif
 
        /*
         * All kernel threads share the same mm context; grab a
@@ -248,7 +251,13 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
 
        notify_cpu_starting(cpu);
 
+#ifdef CONFIG_ARCH_ZYNQ
+       if (!booted)
+               calibrate_delay();
+       booted = true;
+#else
        calibrate_delay();
+#endif
 
        smp_store_cpu_info(cpu);