From: Srinivasa Ds <srinivasa@in.ibm.com>
To: anton@au1.ibm.com, paulus@samba.org
Cc: linux-kernel@vger.kernel.org
Subject: [RFC] [PATCH] cpu_hotplug on IBM JS20 system
Date: Mon, 13 Nov 2006 18:40:13 +0530 [thread overview]
Message-ID: <45586EB5.40409@in.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
Hi
when I tried to hot plug a cpu on IBM bladecentre JS20 system,it dropped
in to xmon. On analyzing the problem,I found out that "self-stop" token
is not exported
to the OS through rtas(Could be verified by looking in to
/proc/device-tree/rtas file).
1:mon> e
cpu 0x1: Vector: 700 (Program Check) at [c00000000ff1bab0]
pc: c00000000001b144: .rtas_stop_self+0x34/0x70
lr: c0000000000439c0: .pSeries_mach_cpu_die+0x34/0x40
sp: c00000000ff1bd30
msr: 8000000000021032
current = 0xc00000000ff050b0
paca = 0xc0000000005ec500
pid = 0, comm = swapper
kernel BUG in rtas_stop_self at arch/powerpc/kernel/rtas.c:829!
===========================================
void rtas_stop_self(void)
{
struct rtas_args *rtas_args = &rtas_stop_self_args;
local_irq_disable();
BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE);
===================================================
#ifdef CONFIG_HOTPLUG_CPU
rtas_stop_self_args.token = rtas_token("stop-self");
#endif /* CONFIG_HOTPLUG_CPU */
#ifdef CONFIG_RTAS_ERROR_LOGGING
rtas_last_error_token = rtas_token("rtas-last-error");
===================================================
Since we are not supported by hardware for cpu hotplug. I have developed
the patch which will disable cpu hotplug on IBM bladecentre JS20. Please
let me know your comments on this please.
Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
Thanks
Srinivasa DS
[-- Attachment #2: cpu_hotplug.fix --]
[-- Type: text/plain, Size: 1839 bytes --]
arch/powerpc/kernel/rtas.c | 9 +++++++++
kernel/cpu.c | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
Index: linux-2.6.19-rc5/arch/powerpc/kernel/rtas.c
===================================================================
--- linux-2.6.19-rc5.orig/arch/powerpc/kernel/rtas.c 2006-11-08 07:54:20.000000000 +0530
+++ linux-2.6.19-rc5/arch/powerpc/kernel/rtas.c 2006-11-13 17:39:10.000000000 +0530
@@ -53,6 +53,9 @@
unsigned long rtas_rmo_buf;
+extern int cpu_hotplug_disabled;
+extern struct mutex cpu_add_remove_lock;
+
/*
* If non-NULL, this gets called when the kernel terminates.
* This is done like this so rtas_flash can be a module.
@@ -881,6 +884,12 @@
#ifdef CONFIG_HOTPLUG_CPU
rtas_stop_self_args.token = rtas_token("stop-self");
+ if(rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE) {
+ mutex_lock(&cpu_add_remove_lock);
+ cpu_hotplug_disabled = 1;
+ mutex_unlock(&cpu_add_remove_lock);
+ }
+
#endif /* CONFIG_HOTPLUG_CPU */
#ifdef CONFIG_RTAS_ERROR_LOGGING
rtas_last_error_token = rtas_token("rtas-last-error");
Index: linux-2.6.19-rc5/kernel/cpu.c
===================================================================
--- linux-2.6.19-rc5.orig/kernel/cpu.c 2006-11-08 07:54:20.000000000 +0530
+++ linux-2.6.19-rc5/kernel/cpu.c 2006-11-13 17:36:22.000000000 +0530
@@ -16,7 +16,7 @@
#include <linux/mutex.h>
/* This protects CPUs going up and down... */
-static DEFINE_MUTEX(cpu_add_remove_lock);
+DEFINE_MUTEX(cpu_add_remove_lock);
static DEFINE_MUTEX(cpu_bitmask_lock);
static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain);
@@ -24,7 +24,7 @@
/* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
* Should always be manipulated under cpu_add_remove_lock
*/
-static int cpu_hotplug_disabled;
+int cpu_hotplug_disabled;
#ifdef CONFIG_HOTPLUG_CPU
next reply other threads:[~2006-11-13 12:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 13:10 Srinivasa Ds [this message]
2006-11-13 13:09 ` [RFC] [PATCH] cpu_hotplug on IBM JS20 system Heiko Carstens
2006-11-13 15:37 ` Gautham R Shenoy
2006-11-13 21:39 ` Benjamin Herrenschmidt
2006-11-14 13:37 ` Srinivasa Ds
2006-11-14 14:14 ` Srinivasa Ds
2006-11-15 2:58 ` Michael Ellerman
2006-11-15 2:58 ` Michael Ellerman
2006-11-15 4:50 ` Srinivasa Ds
2006-11-15 4:50 ` Srinivasa Ds
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=45586EB5.40409@in.ibm.com \
--to=srinivasa@in.ibm.com \
--cc=anton@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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.