All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] move x86 specific oops=panic to generic code
Date: Thu, 27 Jan 2011 23:15:11 +0100	[thread overview]
Message-ID: <20110127221511.GA32313@aepfle.de> (raw)


The oops=panic cmdline option is not x86 specific, move it to generic code.
Update documentation.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

---
 Documentation/kernel-parameters.txt       |    5 +++++
 Documentation/x86/x86_64/boot-options.txt |    5 -----
 arch/x86/kernel/dumpstack.c               |   10 ----------
 kernel/panic.c                            |   10 ++++++++++
 4 files changed, 15 insertions(+), 15 deletions(-)

--- linux-2.6.38.rc.orig/Documentation/kernel-parameters.txt
+++ linux-2.6.38.rc/Documentation/kernel-parameters.txt
@@ -1805,6 +1805,11 @@ and is between 256 and 4096 characters.
 				perfmon on Intel CPUs instead of the
 				CPU specific event set.
 
+	oops=panic	Always panic on oopses. Default is to just kill the process,
+			but there is a small probability of deadlocking the machine.
+			This will also cause panics on machine check exceptions.
+			Useful together with panic=30 to trigger a reboot.
+
 	OSS		[HW,OSS]
 			See Documentation/sound/oss/oss-parameters.txt
 
--- linux-2.6.38.rc.orig/Documentation/x86/x86_64/boot-options.txt
+++ linux-2.6.38.rc/Documentation/x86/x86_64/boot-options.txt
@@ -293,11 +293,6 @@ IOMMU (input/output memory management un
 
 Debugging
 
-  oops=panic	Always panic on oopses. Default is to just kill the process,
-		but there is a small probability of deadlocking the machine.
-		This will also cause panics on machine check exceptions.
-		Useful together with panic=30 to trigger a reboot.
-
   kstack=N	Print N words from the kernel stack in oops dumps.
 
   pagefaulttrace  Dump all page faults. Only useful for extreme debugging
--- linux-2.6.38.rc.orig/arch/x86/kernel/dumpstack.c
+++ linux-2.6.38.rc/arch/x86/kernel/dumpstack.c
@@ -345,16 +345,6 @@ die_nmi(char *str, struct pt_regs *regs,
 	do_exit(SIGBUS);
 }
 
-static int __init oops_setup(char *s)
-{
-	if (!s)
-		return -EINVAL;
-	if (!strcmp(s, "panic"))
-		panic_on_oops = 1;
-	return 0;
-}
-early_param("oops", oops_setup);
-
 static int __init kstack_setup(char *s)
 {
 	if (!s)
--- linux-2.6.38.rc.orig/kernel/panic.c
+++ linux-2.6.38.rc/kernel/panic.c
@@ -433,3 +433,13 @@ EXPORT_SYMBOL(__stack_chk_fail);
 
 core_param(panic, panic_timeout, int, 0644);
 core_param(pause_on_oops, pause_on_oops, int, 0644);
+
+static int __init oops_setup(char *s)
+{
+	if (!s)
+		return -EINVAL;
+	if (!strcmp(s, "panic"))
+		panic_on_oops = 1;
+	return 0;
+}
+early_param("oops", oops_setup);

             reply	other threads:[~2011-01-27 22:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 22:15 Olaf Hering [this message]
2011-01-28  7:31 ` [PATCH] move x86 specific oops=panic to generic code WANG Cong

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=20110127221511.GA32313@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.