]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86: cpu_init(): remove ugly #ifdef construct around debug register clear
authorPeter Zijlstra <peterz@infradead.org>
Tue, 27 Jan 2009 20:41:34 +0000 (21:41 +0100)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 27 Jan 2009 22:54:44 +0000 (14:54 -0800)
Impact: Cleanup

While I was looking through the new and improved bootstrap code - great
work that, thanks! I found the below a slight improvement.

Remove unnecessary ugly #ifdef construct around debug register clear.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/cpu/common.c

index f00258462444ed5e27907799ec32f8bedbef488d..3f272d42d09a3ce2fd9e28e8d4667dc82268e05d 100644 (file)
@@ -1071,22 +1071,19 @@ void __cpuinit cpu_init(void)
         */
        if (kgdb_connected && arch_kgdb_ops.correct_hw_break)
                arch_kgdb_ops.correct_hw_break();
-       else {
+       else
 #endif
-       /*
-        * Clear all 6 debug registers:
-        */
-
-       set_debugreg(0UL, 0);
-       set_debugreg(0UL, 1);
-       set_debugreg(0UL, 2);
-       set_debugreg(0UL, 3);
-       set_debugreg(0UL, 6);
-       set_debugreg(0UL, 7);
-#ifdef CONFIG_KGDB
-       /* If the kgdb is connected no debug regs should be altered. */
+       {
+               /*
+                * Clear all 6 debug registers:
+                */
+               set_debugreg(0UL, 0);
+               set_debugreg(0UL, 1);
+               set_debugreg(0UL, 2);
+               set_debugreg(0UL, 3);
+               set_debugreg(0UL, 6);
+               set_debugreg(0UL, 7);
        }
-#endif
 
        fpu_init();