aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup64.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:37:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-18 11:37:01 -0400
commit9732b6112343df2872518ec6701c8ef729310a05 (patch)
tree9e3dcc461845038da4730c2062eee546348ca445 /arch/x86/kernel/setup64.c
parent9e9abecfc0ff3a9ad2ead954b37bbfcb863c775e (diff)
parent1a9a3e76dde191f82f7a8a66059dcbb4a9f63ff3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-kgdb
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-kgdb: kgdb: always use icache flush for sw breakpoints kgdb: fix SMP NMI kgdb_handle_exception exit race kgdb: documentation fixes kgdb: allow static kgdbts boot configuration kgdb: add documentation kgdb: Kconfig fix kgdb: add kgdb internal test suite kgdb: fix several kgdb regressions kgdb: kgdboc pl011 I/O module kgdb: fix optional arch functions and probe_kernel_* kgdb: add x86 HW breakpoints kgdb: print breakpoint removed on exception kgdb: clocksource watchdog kgdb: fix NMI hangs kgdb: fix kgdboc dynamic module configuration kgdb: document parameters x86: kgdb support consoles: polling support, kgdboc kgdb: core uaccess: add probe_kernel_write()
Diffstat (limited to 'arch/x86/kernel/setup64.c')
-rw-r--r--arch/x86/kernel/setup64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c
index 4be499cd6a0d..9042fb0e36f5 100644
--- a/arch/x86/kernel/setup64.c
+++ b/arch/x86/kernel/setup64.c
@@ -11,6 +11,7 @@
11#include <linux/bootmem.h> 11#include <linux/bootmem.h>
12#include <linux/bitops.h> 12#include <linux/bitops.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/kgdb.h>
14#include <asm/pda.h> 15#include <asm/pda.h>
15#include <asm/pgtable.h> 16#include <asm/pgtable.h>
16#include <asm/processor.h> 17#include <asm/processor.h>
@@ -251,6 +252,17 @@ void __cpuinit cpu_init (void)
251 load_TR_desc(); 252 load_TR_desc();
252 load_LDT(&init_mm.context); 253 load_LDT(&init_mm.context);
253 254
255#ifdef CONFIG_KGDB
256 /*
257 * If the kgdb is connected no debug regs should be altered. This
258 * is only applicable when KGDB and a KGDB I/O module are built
259 * into the kernel and you are using early debugging with
260 * kgdbwait. KGDB will control the kernel HW breakpoint registers.
261 */
262 if (kgdb_connected && arch_kgdb_ops.correct_hw_break)
263 arch_kgdb_ops.correct_hw_break();
264 else {
265#endif
254 /* 266 /*
255 * Clear all 6 debug registers: 267 * Clear all 6 debug registers:
256 */ 268 */
@@ -261,6 +273,10 @@ void __cpuinit cpu_init (void)
261 set_debugreg(0UL, 3); 273 set_debugreg(0UL, 3);
262 set_debugreg(0UL, 6); 274 set_debugreg(0UL, 6);
263 set_debugreg(0UL, 7); 275 set_debugreg(0UL, 7);
276#ifdef CONFIG_KGDB
277 /* If the kgdb is connected no debug regs should be altered. */
278 }
279#endif
264 280
265 fpu_init(); 281 fpu_init();
266 282