From: anton@samba.org
To: linuxppc-dev@ozlabs.org
Cc: paulus@samba.org
Subject: [patch 10/10] Make sure we only enable xmon once
Date: Tue, 20 Mar 2007 20:38:20 -0500 [thread overview]
Message-ID: <20070321013825.735752000@samba.org> (raw)
In-Reply-To: 20070321013810.404636000@samba.org
Now we use notifier hooks we have to be careful not to enable xmon multiple
times.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6/arch/powerpc/xmon/xmon.c
===================================================================
--- linux-2.6.orig/arch/powerpc/xmon/xmon.c 2007-03-11 14:52:45.000000000 -0500
+++ linux-2.6/arch/powerpc/xmon/xmon.c 2007-03-11 14:56:37.000000000 -0500
@@ -2658,11 +2658,20 @@
unregister_page_fault_notifier(&xmon_page_fault_nb);
}
+#ifdef CONFIG_XMON_DEFAULT
+int __initdata xmon_on = 1;
+#else
+int __initdata xmon_on = 0;
+#endif
+
#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_xmon(int key, struct tty_struct *tty)
{
/* ensure xmon is enabled */
- xmon_enable();
+ if (!xmon_on) {
+ xmon_on = 1;
+ xmon_enable();
+ }
xmon(get_irq_regs());
}
@@ -2683,18 +2692,18 @@
__initcall(setup_xmon_sysrq);
#endif /* CONFIG_MAGIC_SYSRQ */
-int __initdata xmon_early, xmon_off;
+int __initdata xmon_early;
static int __init early_parse_xmon(char *p)
{
if (!p || strncmp(p, "early", 5) == 0) {
/* just "xmon" is equivalent to "xmon=early" */
- xmon_enable();
+ xmon_on = 1;
xmon_early = 1;
} else if (strncmp(p, "on", 2) == 0)
- xmon_enable();
+ xmon_on = 1;
else if (strncmp(p, "off", 3) == 0)
- xmon_off = 1;
+ xmon_on = 0;
else if (strncmp(p, "nobt", 4) == 0)
xmon_no_auto_backtrace = 1;
else
@@ -2706,10 +2715,9 @@
void __init xmon_setup(void)
{
-#ifdef CONFIG_XMON_DEFAULT
- if (!xmon_off)
+ if (xmon_on)
xmon_enable();
-#endif
+
if (xmon_early)
xmon(NULL);
}
--
next prev parent reply other threads:[~2007-03-21 1:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 1:38 [patch 00/10] Oops path and debugger hooks rework anton
2007-03-21 1:38 ` [patch 01/10] Add missing oops_enter/oops_exit anton
2007-03-21 1:38 ` [patch 02/10] Clean up pmac_backlight_unblank in oops path anton
2007-03-21 1:38 ` [patch 03/10] Handle recursive oopses anton
2007-03-21 1:38 ` [patch 04/10] Fix backwards ? : when printing machine type anton
2007-03-21 1:38 ` [patch 05/10] Use KERN_EMERG everywhere in oops printout anton
2007-03-21 2:23 ` Stephen Rothwell
2007-03-23 11:00 ` Paul Mackerras
2007-03-21 1:38 ` [patch 06/10] Add notify die hooks and remove some redundant debugger hooks anton
2007-03-21 16:14 ` Christoph Hellwig
2007-03-23 11:14 ` Paul Mackerras
2007-03-23 11:29 ` Christoph Hellwig
2007-03-23 12:04 ` Ananth N Mavinakayanahalli
2007-03-23 14:09 ` Anton Blanchard
2007-03-24 3:17 ` Paul Mackerras
2007-04-09 10:21 ` Paul Mackerras
2007-04-10 4:49 ` Ananth N Mavinakayanahalli
2007-03-21 1:38 ` [patch 07/10] Page fault handler should not depend on CONFIG_KPROBES anton
2007-03-21 16:13 ` Christoph Hellwig
2007-03-23 14:19 ` Anton Blanchard
2007-03-21 1:38 ` [patch 08/10] Use notifier hooks for xmon anton
2007-03-21 1:38 ` [patch 09/10] Use lowercase for hex printouts in oops messages anton
2007-03-21 2:14 ` Olof Johansson
2007-03-21 7:17 ` Geert Uytterhoeven
2007-03-21 16:44 ` Segher Boessenkool
2007-03-21 1:38 ` anton [this message]
2007-03-21 2:04 ` [patch 10/10] Make sure we only enable xmon once Anton Blanchard
2007-03-21 2:11 ` Olof Johansson
2007-03-21 2:05 ` Anton Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070321013825.735752000@samba.org \
--to=anton@samba.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).