]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/i386/kernel/topology.c
[PATCH] x86 topology: don;t create a control file for BSP that cannot be removed
[mirror_ubuntu-zesty-kernel.git] / arch / i386 / kernel / topology.c
index 67a0e1baa28b2467a5a540772e6c0d88927c9ea8..296355292c7c56433df1c849e93851985a7798d3 100644 (file)
@@ -41,6 +41,15 @@ int arch_register_cpu(int num){
                parent = &node_devices[node].node;
 #endif /* CONFIG_NUMA */
 
+       /*
+        * CPU0 cannot be offlined due to several
+        * restrictions and assumptions in kernel. This basically
+        * doesnt add a control file, one cannot attempt to offline
+        * BSP.
+        */
+       if (!num)
+               cpu_devices[num].cpu.no_control = 1;
+
        return register_cpu(&cpu_devices[num].cpu, num, parent);
 }