mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Fernando Luis Vázquez Cao" <fernando@oss.ntt.co.jp>
To: vgoyal@in.ibm.com
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	akpm@osdl.org, ak@suse.de, James.Bottomley@steeleye.com,
	linux-kernel@vger.kernel.org, fastboot@lists.osdl.org
Subject: [PATCH 3/3] stack overflow safe kdump (2.6.18-rc1-i386) - ipi_use_safe_smp_processor_id
Date: Mon, 10 Jul 2006 16:54:01 +0900	[thread overview]
Message-ID: <1152518041.2120.112.camel@localhost.localdomain> (raw)

Substitute "smp_processor_id" with the stack overflow-safe
"safe_smp_processor_id" in the send IPI functions, since
they are used after a crash to shutdown CPUs.

Signed-off-by: Fernando Vazquez <fernando@intellilink.co.jp>
---

diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-bigsmp/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-bigsmp/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-bigsmp/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-bigsmp/mach_ipi.h	2006-07-10 16:13:33.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-default/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-default/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-default/mach_ipi.h	2006-07-10 11:00:05.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-default/mach_ipi.h	2006-07-10 16:14:15.000000000 +0900
@@ -19,7 +19,7 @@ static inline void __local_send_IPI_allb
 	if (no_broadcast || vector == NMI_VECTOR) {
 		cpumask_t mask = cpu_online_map;
 
-		cpu_clear(smp_processor_id(), mask);
+		cpu_clear(safe_smp_processor_id(), mask);
 		send_IPI_mask(mask, vector);
 	} else
 		__send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-es7000/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-es7000/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-es7000/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-es7000/mach_ipi.h	2006-07-10 16:14:51.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
 }
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-numaq/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-numaq/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-numaq/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-numaq/mach_ipi.h	2006-07-10 16:15:26.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-summit/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-summit/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-summit/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-summit/mach_ipi.h	2006-07-10 16:16:06.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);



                 reply	other threads:[~2006-07-10  7:54 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=1152518041.2120.112.camel@localhost.localdomain \
    --to=fernando@oss.ntt.co.jp \
    --cc=James.Bottomley@steeleye.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=fastboot@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@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

all inboxes | Powered by JetHome®