summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra2009-01-27 21:41:34 +0100
committerH. Peter Anvin2009-01-27 23:54:44 +0100
commit8f6d86dc4178957d9814b1784848012a927a3898 (patch)
tree66ffa5b780f988f05b82a0dbd73cbec7dd44ea9b /arch/x86/kernel
parentx86: uaccess: rename __put_user_u64() to __put_user_asm_u64() (diff)
downloadkernel-qcow2-linux-8f6d86dc4178957d9814b1784848012a927a3898.tar.gz
kernel-qcow2-linux-8f6d86dc4178957d9814b1784848012a927a3898.tar.xz
kernel-qcow2-linux-8f6d86dc4178957d9814b1784848012a927a3898.zip
x86: cpu_init(): remove ugly #ifdef construct around debug register clear
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>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/common.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index f00258462444..3f272d42d09a 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -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();