linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Manish Ahuja <ahuja@austin.ibm.com>
To: linuxppc-dev@ozlabs.org, kexec@lists.infradead.org, paulus@samba.org
Cc: mahuja@us.ibm.com, smaneesh@in.ibm.com, linasvepstas@gmail.com,
	ssant@in.ibm.com
Subject: [PATCH 1/2] pseries: phyp dump: Disable phyp-dump through boot-var.
Date: Fri, 21 Mar 2008 19:38:59 -0500	[thread overview]
Message-ID: <47E45523.7080708@austin.ibm.com> (raw)


The goal of these 2 patches is to ensure that there is only one dumping
mechanism enabled at any given time. These patches depend upon phyp-dump
patches posted earlier.

Patch 1:

Addition of boot-variable "phyp_dump", which takes values [0/1] for disabling/
enabling phyp_dump at boot time. Kdump can use this on cmdline (phyp_dump=0) 
to disable phyp-dump during boot when enabling itself. This will ensure only
one dumping mechanism is active at any given time.

Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>

---
 arch/powerpc/kernel/prom.c                 |    5 +++++
 arch/powerpc/platforms/pseries/phyp_dump.c |   18 ++++++++++++++++++
 include/asm-powerpc/phyp_dump.h            |    1 +
 3 files changed, 24 insertions(+)

Index: 2.6.25-rc1/arch/powerpc/platforms/pseries/phyp_dump.c
===================================================================
--- 2.6.25-rc1.orig/arch/powerpc/platforms/pseries/phyp_dump.c	2008-03-22 00:42:02.000000000 -0500
+++ 2.6.25-rc1/arch/powerpc/platforms/pseries/phyp_dump.c	2008-03-22 01:07:43.000000000 -0500
@@ -460,3 +460,21 @@ int __init early_init_dt_scan_phyp_dump(
 						*((unsigned long *)&sizes[4]);
 	return 1;
 }
+
+/* Look for phyp_dump= cmdline option */
+static int __init early_phyp_dump_enabled(char *p)
+{
+	phyp_dump_info->phyp_dump_at_boot = 1;
+
+        if (!p)
+                return 0;
+
+        if (strncmp(p, "1", 1) == 0)
+		phyp_dump_info->phyp_dump_at_boot = 1;
+        else if (strncmp(p, "0", 1) == 0)
+		phyp_dump_info->phyp_dump_at_boot = 0;
+
+        return 0;
+}
+early_param("phyp_dump", early_phyp_dump_enabled);
+
Index: 2.6.25-rc1/include/asm-powerpc/phyp_dump.h
===================================================================
--- 2.6.25-rc1.orig/include/asm-powerpc/phyp_dump.h	2008-03-22 00:42:02.000000000 -0500
+++ 2.6.25-rc1/include/asm-powerpc/phyp_dump.h	2008-03-22 00:42:08.000000000 -0500
@@ -25,6 +25,7 @@ struct phyp_dump {
 	unsigned long init_reserve_start;
 	unsigned long init_reserve_size;
 	/* Check status during boot if dump supported, active & present*/
+	unsigned long phyp_dump_at_boot;
 	unsigned long phyp_dump_configured;
 	unsigned long phyp_dump_is_active;
 	/* store cpu & hpte size */
Index: 2.6.25-rc1/arch/powerpc/kernel/prom.c
===================================================================
--- 2.6.25-rc1.orig/arch/powerpc/kernel/prom.c	2008-03-22 00:42:02.000000000 -0500
+++ 2.6.25-rc1/arch/powerpc/kernel/prom.c	2008-03-22 00:42:54.000000000 -0500
@@ -1059,6 +1059,11 @@ static void __init phyp_dump_reserve_mem
 		return;
 	}
 
+	if (!phyp_dump_info->phyp_dump_at_boot) {
+		printk(KERN_INFO "Phyp-dump disabled at boot time\n");
+		return;
+	}
+
 	if (phyp_dump_info->phyp_dump_is_active) {
 		/* Reserve *everything* above RMR.Area freed by userland tools*/
 		base = PHYP_DUMP_RMR_END;

                 reply	other threads:[~2008-03-22  0:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=47E45523.7080708@austin.ibm.com \
    --to=ahuja@austin.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linasvepstas@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahuja@us.ibm.com \
    --cc=paulus@samba.org \
    --cc=smaneesh@in.ibm.com \
    --cc=ssant@in.ibm.com \
    /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).