From 0f1796927740ad5462fc1610b3acee7d24f347f0 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 4 Aug 2005 19:26:42 +0200 Subject: [PATCH] --- yaml --- r: 6215 b: refs/heads/master c: b13cfd173f73c3f6f9a307b7b6e64d45fbd756b2 h: refs/heads/master i: 6213: bbd6eddcfbe61963f12ca83d6c079de1e848fdb2 6211: 2d34adf0a34873fd469e7b7114a7d8e69632f3b2 6207: afe06d6fed31112d621c7d682207fe7297f505c0 v: v3 --- [refs] | 2 +- trunk/arch/ppc64/kernel/setup.c | 8 +++++--- trunk/arch/ppc64/xmon/start.c | 2 +- trunk/arch/ppc64/xmon/xmon.c | 28 +++++++++++++++++++--------- trunk/include/asm-ppc64/system.h | 2 +- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 995da53f72d0..6e3df14d70ed 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bef5686229810709091fb6e505071f4aa41e3760 +refs/heads/master: b13cfd173f73c3f6f9a307b7b6e64d45fbd756b2 diff --git a/trunk/arch/ppc64/kernel/setup.c b/trunk/arch/ppc64/kernel/setup.c index e9c24d2dbd91..b3ef8df12982 100644 --- a/trunk/arch/ppc64/kernel/setup.c +++ b/trunk/arch/ppc64/kernel/setup.c @@ -627,7 +627,7 @@ void __init setup_system(void) * Initialize xmon */ #ifdef CONFIG_XMON_DEFAULT - xmon_init(); + xmon_init(1); #endif /* * Register early console @@ -1343,11 +1343,13 @@ static int __init early_xmon(char *p) /* ensure xmon is enabled */ if (p) { if (strncmp(p, "on", 2) == 0) - xmon_init(); + xmon_init(1); + if (strncmp(p, "off", 3) == 0) + xmon_init(0); if (strncmp(p, "early", 5) != 0) return 0; } - xmon_init(); + xmon_init(1); debugger(NULL); return 0; diff --git a/trunk/arch/ppc64/xmon/start.c b/trunk/arch/ppc64/xmon/start.c index a9265bcc79b2..f86b584acd76 100644 --- a/trunk/arch/ppc64/xmon/start.c +++ b/trunk/arch/ppc64/xmon/start.c @@ -27,7 +27,7 @@ static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { /* ensure xmon is enabled */ - xmon_init(); + xmon_init(1); debugger(pt_regs); } diff --git a/trunk/arch/ppc64/xmon/xmon.c b/trunk/arch/ppc64/xmon/xmon.c index 05539439e6bc..45908b10acd3 100644 --- a/trunk/arch/ppc64/xmon/xmon.c +++ b/trunk/arch/ppc64/xmon/xmon.c @@ -2496,15 +2496,25 @@ static void dump_stab(void) } } -void xmon_init(void) -{ - __debugger = xmon; - __debugger_ipi = xmon_ipi; - __debugger_bpt = xmon_bpt; - __debugger_sstep = xmon_sstep; - __debugger_iabr_match = xmon_iabr_match; - __debugger_dabr_match = xmon_dabr_match; - __debugger_fault_handler = xmon_fault_handler; +void xmon_init(int enable) +{ + if (enable) { + __debugger = xmon; + __debugger_ipi = xmon_ipi; + __debugger_bpt = xmon_bpt; + __debugger_sstep = xmon_sstep; + __debugger_iabr_match = xmon_iabr_match; + __debugger_dabr_match = xmon_dabr_match; + __debugger_fault_handler = xmon_fault_handler; + } else { + __debugger = NULL; + __debugger_ipi = NULL; + __debugger_bpt = NULL; + __debugger_sstep = NULL; + __debugger_iabr_match = NULL; + __debugger_dabr_match = NULL; + __debugger_fault_handler = NULL; + } } void dump_segments(void) diff --git a/trunk/include/asm-ppc64/system.h b/trunk/include/asm-ppc64/system.h index 4104a5dedbaa..b9e1835351e9 100644 --- a/trunk/include/asm-ppc64/system.h +++ b/trunk/include/asm-ppc64/system.h @@ -88,7 +88,7 @@ DEBUGGER_BOILERPLATE(debugger_dabr_match) DEBUGGER_BOILERPLATE(debugger_fault_handler) #ifdef CONFIG_XMON -extern void xmon_init(void); +extern void xmon_init(int enable); #endif #else