linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: linas@austin.ibm.com (Linas Vepstas)
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org, Srinivasa Ds <srinivasa@in.ibm.com>,
	Nathan Lynch <ntl@pobox.com>
Subject: [PATCH]: wrap cpu_die() with CONFIG_HOTPLUG_CPU
Date: Wed, 15 Nov 2006 12:57:44 -0600	[thread overview]
Message-ID: <20061115185743.GH8395@austin.ibm.com> (raw)



Paul,

Please apply the janitorial patch below. Its not urgent.
It replaces/obsoletes the previous Subject: [PATCH]: 
PowerPC: make sure the rtas stop-self token is defined.
patch.

--linas

Per email discussion, it appears that rtas_stop_self()
and pSeries_mach_cpu_die() should not be compiled if 
CONFIG_HOTPLUG_CPU is not defined. This patch adds
#ifdefs around these bits of code.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>

----
 arch/powerpc/kernel/rtas.c             |    5 +++--
 arch/powerpc/platforms/pseries/setup.c |    4 ++++
 include/asm-powerpc/rtas.h             |    4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)

Index: linux-2.6.19-rc4-git3/arch/powerpc/kernel/rtas.c
===================================================================
--- linux-2.6.19-rc4-git3.orig/arch/powerpc/kernel/rtas.c	2006-11-15 11:40:14.000000000 -0600
+++ linux-2.6.19-rc4-git3/arch/powerpc/kernel/rtas.c	2006-11-15 12:46:51.000000000 -0600
@@ -810,9 +810,9 @@ asmlinkage int ppc_rtas(struct rtas_args
 	return 0;
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 /* This version can't take the spinlock, because it never returns */
-
-struct rtas_args rtas_stop_self_args = {
+static struct rtas_args rtas_stop_self_args = {
 	/* The token is initialized for real in setup_system() */
 	.token = RTAS_UNKNOWN_SERVICE,
 	.nargs = 0,
@@ -834,6 +834,7 @@ void rtas_stop_self(void)
 
 	panic("Alas, I survived.\n");
 }
+#endif
 
 /*
  * Call early during boot, before mem init or bootmem, to retrieve the RTAS
Index: linux-2.6.19-rc4-git3/include/asm-powerpc/rtas.h
===================================================================
--- linux-2.6.19-rc4-git3.orig/include/asm-powerpc/rtas.h	2006-11-01 16:15:46.000000000 -0600
+++ linux-2.6.19-rc4-git3/include/asm-powerpc/rtas.h	2006-11-15 11:44:24.000000000 -0600
@@ -54,8 +54,6 @@ struct rtas_args {
 	rtas_arg_t *rets;     /* Pointer to return values in args[]. */
 };  
 
-extern struct rtas_args rtas_stop_self_args;
-
 struct rtas_t {
 	unsigned long entry;		/* physical address pointer */
 	unsigned long base;		/* physical address pointer */
@@ -223,7 +221,9 @@ extern int rtas_get_error_log_max(void);
 extern spinlock_t rtas_data_buf_lock;
 extern char rtas_data_buf[RTAS_DATA_BUF_SIZE];
 
+#ifdef CONFIG_HOTPLUG_CPU
 extern void rtas_stop_self(void);
+#endif
 
 /* RMO buffer reserved for user-space RTAS use */
 extern unsigned long rtas_rmo_buf;
Index: linux-2.6.19-rc4-git3/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- linux-2.6.19-rc4-git3.orig/arch/powerpc/platforms/pseries/setup.c	2006-11-01 16:15:09.000000000 -0600
+++ linux-2.6.19-rc4-git3/arch/powerpc/platforms/pseries/setup.c	2006-11-15 11:46:10.000000000 -0600
@@ -347,6 +347,7 @@ static int __init pSeries_init_panel(voi
 }
 arch_initcall(pSeries_init_panel);
 
+#ifdef CONFIG_HOTPLUG_CPU
 static void pSeries_mach_cpu_die(void)
 {
 	local_irq_disable();
@@ -357,6 +358,7 @@ static void pSeries_mach_cpu_die(void)
 	BUG();
 	for(;;);
 }
+#endif
 
 static int pseries_set_dabr(unsigned long dabr)
 {
@@ -558,7 +560,9 @@ define_machine(pseries) {
 	.power_off		= rtas_power_off,
 	.halt			= rtas_halt,
 	.panic			= rtas_os_term,
+#ifdef CONFIG_HOTPLUG_CPU
 	.cpu_die		= pSeries_mach_cpu_die,
+#endif
 	.get_boot_time		= rtas_get_boot_time,
 	.get_rtc_time		= rtas_get_rtc_time,
 	.set_rtc_time		= rtas_set_rtc_time,

             reply	other threads:[~2006-11-15 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15 18:57 Linas Vepstas [this message]
2006-11-15 23:58 ` [PATCH]: wrap cpu_die() with CONFIG_HOTPLUG_CPU Michael Ellerman
2006-11-16 21:41   ` Linas Vepstas
2006-11-16 22:34     ` Michael Ellerman

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=20061115185743.GH8395@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ntl@pobox.com \
    --cc=paulus@samba.org \
    --cc=srinivasa@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).