]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/kernel/setup.c
ARM: 7669/1: keep __my_cpu_offset consistent with generic one
[karo-tx-linux.git] / arch / arm / kernel / setup.c
index 1522c7ae31b0c239901237569bad5cbb4ec7b02e..dd1c6aacbaf9d8e5fc7ad220a3a8238f00a14188 100644 (file)
@@ -456,6 +456,13 @@ void __init smp_setup_processor_id(void)
        for (i = 1; i < nr_cpu_ids; ++i)
                cpu_logical_map(i) = i == cpu ? 0 : i;
 
+       /*
+        * clear __my_cpu_offset on boot CPU to avoid hang caused by
+        * using percpu variable early, for example, lockdep will
+        * access percpu variable inside lock_release
+        */
+       set_my_cpu_offset(0);
+
        printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr);
 }