public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Zou Nan hai <nanhai.zou@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Patch] Fix OS_INIT handle in IA64 Kexec/Kdump
Date: Fri, 29 Sep 2006 04:38:54 +0000	[thread overview]
Message-ID: <1159504734.5251.40.camel@linux-znh> (raw)

Hi,
	Indoh found the bug of OS_INIT handler in my previous IA64 Kexec/Kdump
patch. 
	When Kdump found it can't stop other CPUs by IPI, it will send INIT to
them. One of the CPUs may be picked as monarch then execute
machine_kexec, thus 2 CPU will execute 
machine_kexec at the same time. Below patch will fix that.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>

--- linux-2.6.18/arch/ia64/kernel/crash.c	2006-09-29 07:13:18.000000000 +0800
+++ linux-2.6.18-fix/arch/ia64/kernel/crash.c	2006-09-29 07:01:13.000000000 +0800
@@ -110,6 +110,8 @@ kdump_wait_cpu_freeze(void)
 	return 1;
 }
 
+static int kdump_sending_init;
+
 void
 machine_crash_shutdown(struct pt_regs *pt)
 {
@@ -125,8 +127,9 @@ machine_crash_shutdown(struct pt_regs *p
 #ifdef CONFIG_SMP
 	kdump_smp_send_stop();
 	if (kdump_wait_cpu_freeze() && kdump_on_init) 	{
-		kdump_sending_init = 1;
 		//not all cpu response to IPI, send INIT to freeze them
+		kdump_sending_init = 1;
+		mb();
 		kdump_smp_send_init();
 	}
 #endif
@@ -170,6 +173,9 @@ kdump_init_notifier(struct notifier_bloc
 	if (nd->sos->rv_rc = 1)
 		return NOTIFY_DONE;
 
+	if (kdump_sending_init)
+		unw_init_running(kdump_cpu_freeze, NULL);
+
 	switch (val) {
 		case DIE_INIT_MONARCH_ENTER:
 			machine_kdump_on_init();






	

                 reply	other threads:[~2006-09-29  4:38 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=1159504734.5251.40.camel@linux-znh \
    --to=nanhai.zou@intel.com \
    --cc=linux-ia64@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox