All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Wilder <dwilder@us.ibm.com>
To: fastboot@lists.osdl.org, linuxppc-dev@ozlabs.org, akpm@osdl.org,
	mchintage@in.ibm.com, paulus@samba.org, hbabu@us.ibm.com
Subject: [PATCH] kdump-image-rm-static
Date: Mon, 10 Apr 2006 15:30:58 -0700	[thread overview]
Message-ID: <443ADCA2.20903@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

I am posting three patches (in separate emails) to both these lists.    
The 2nd and 3d patches have dependencies on the first patch that I have 
attached to this email (changing a static to non-static).  This patch 
applies to generic code where the other two are powerpc specific. Please 
pick up these patchs.

On powerpc, the panic CPU sends an IPI to shoot down other CPUs. Since 
the IPI is not an NMI, it may not be able to stop all CPUs before kdump 
boot. However, one solution could be, if some CPUs are not stopped, 
asking the user to activate soft-reset (either from management console 
or pressing soft-reset button) which sends FW NMI to all CPUs. These 
CPUS will execute arch specific kdump func which has to be invoked 
machine_kexec() directly. At present, kexec_crash_image is not passed to 
machine_crash_shutdown() or defined as static in kexec.c.

-- 
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA 
dwilder@us.ibm.com
(503)578-3789


[-- Attachment #2: kdump-image-rm-static.patch --]
[-- Type: text/x-patch, Size: 1658 bytes --]


On powerpc, the panic CPU sends an IPI to shoot down other CPUs. Since not an NMI, may not able to stop all CPUs before kdump boot. However, one solution could be, if some CPUs are not stopped, asking the user to activate soft-reset (either from management console or pressing soft-reset button) which sends FW NMI to all CPUs. These CPUS will execute arch specific kdump func which has to be invoked machine_kexec() directly. At present, kexec_crash_image is not passed to machine_crash_shutdown() or defined as static in kexec.c.

Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Haren Myneni <haren@us.ibm.com>

--- 2617-rc1/kernel/kexec.c.orig	2006-04-05 13:27:53.000000000 -0700
+++ 2617-rc1/kernel/kexec.c	2006-04-05 13:27:43.000000000 -0700
@@ -903,7 +903,7 @@ static int kimage_load_segment(struct ki
  * that to happen you need to do that yourself.
  */
 struct kimage *kexec_image = NULL;
-static struct kimage *kexec_crash_image = NULL;
+struct kimage *kexec_crash_image = NULL;
 /*
  * A home grown binary mutex.
  * Nothing can wait so this mutex is safe to use
@@ -1042,7 +1042,6 @@ asmlinkage long compat_sys_kexec_load(un
 
 void crash_kexec(struct pt_regs *regs)
 {
-	struct kimage *image;
 	int locked;
 
 
@@ -1056,12 +1055,11 @@ void crash_kexec(struct pt_regs *regs)
 	 */
 	locked = xchg(&kexec_lock, 1);
 	if (!locked) {
-		image = xchg(&kexec_crash_image, NULL);
-		if (image) {
+		if (kexec_crash_image) {
 			struct pt_regs fixed_regs;
 			crash_setup_regs(&fixed_regs, regs);
 			machine_crash_shutdown(&fixed_regs);
-			machine_kexec(image);
+			machine_kexec(kexec_crash_image);
 		}
 		xchg(&kexec_lock, 0);
 	}

                 reply	other threads:[~2006-04-10 21:47 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=443ADCA2.20903@us.ibm.com \
    --to=dwilder@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=fastboot@lists.osdl.org \
    --cc=hbabu@us.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mchintage@in.ibm.com \
    --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 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.