All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vijay Kumar <vijay.ac.kumar@oracle.com>
To: davem@davemloft.net
Cc: sparclinux@vger.kernel.org, karl.volz@oracle.com,
	rob.gardner@oracle.com, linux-kernel@vger.kernel.org,
	vijay.ac.kumar@oracle.com
Subject: [PATCH v3 1/4] sparc64: Set cpu state to offline when stopped
Date: Wed,  1 Feb 2017 11:34:37 -0800	[thread overview]
Message-ID: <1485977680-203775-2-git-send-email-vijay.ac.kumar@oracle.com> (raw)
In-Reply-To: <1485977680-203775-1-git-send-email-vijay.ac.kumar@oracle.com>

CPU needs to be marked offline before stopping it. When not marked
offline, the xcall receives HV_EWOULDBLOCK and so assumes that not all
CPUs received the message, and retries. After 10000 retries, it finally
fails with fatal mondo timeout.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 arch/sparc/kernel/smp_64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 0ce347f..712bf1b 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1443,6 +1443,7 @@ void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs)
 
 static void stop_this_cpu(void *dummy)
 {
+	set_cpu_online(smp_processor_id(), false);
 	prom_stopself();
 }
 
@@ -1454,6 +1455,8 @@ void smp_send_stop(void)
 		for_each_online_cpu(cpu) {
 			if (cpu == smp_processor_id())
 				continue;
+
+			set_cpu_online(cpu, false);
 #ifdef CONFIG_SUN_LDOMS
 			if (ldom_domaining_enabled) {
 				unsigned long hv_err;
-- 
1.7.1

WARNING: multiple messages have this Message-ID (diff)
From: Vijay Kumar <vijay.ac.kumar@oracle.com>
To: davem@davemloft.net
Cc: sparclinux@vger.kernel.org, karl.volz@oracle.com,
	rob.gardner@oracle.com, linux-kernel@vger.kernel.org,
	vijay.ac.kumar@oracle.com
Subject: [PATCH v3 1/4] sparc64: Set cpu state to offline when stopped
Date: Wed, 01 Feb 2017 19:34:37 +0000	[thread overview]
Message-ID: <1485977680-203775-2-git-send-email-vijay.ac.kumar@oracle.com> (raw)
In-Reply-To: <1485977680-203775-1-git-send-email-vijay.ac.kumar@oracle.com>

CPU needs to be marked offline before stopping it. When not marked
offline, the xcall receives HV_EWOULDBLOCK and so assumes that not all
CPUs received the message, and retries. After 10000 retries, it finally
fails with fatal mondo timeout.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 arch/sparc/kernel/smp_64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 0ce347f..712bf1b 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1443,6 +1443,7 @@ void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs)
 
 static void stop_this_cpu(void *dummy)
 {
+	set_cpu_online(smp_processor_id(), false);
 	prom_stopself();
 }
 
@@ -1454,6 +1455,8 @@ void smp_send_stop(void)
 		for_each_online_cpu(cpu) {
 			if (cpu = smp_processor_id())
 				continue;
+
+			set_cpu_online(cpu, false);
 #ifdef CONFIG_SUN_LDOMS
 			if (ldom_domaining_enabled) {
 				unsigned long hv_err;
-- 
1.7.1


  reply	other threads:[~2017-02-01 19:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01 19:34 [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic Vijay Kumar
2017-02-01 19:34 ` Vijay Kumar
2017-02-01 19:34 ` Vijay Kumar [this message]
2017-02-01 19:34   ` [PATCH v3 1/4] sparc64: Set cpu state to offline when stopped Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 2/4] sparc64: Migrate hvcons irq to panicked cpu Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 3/4] sparc64: Send break twice from console to return to boot prom Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:34 ` [PATCH v3 4/4] Documentation/sparc: Steps for sending break on sunhv console Vijay Kumar
2017-02-01 19:34   ` Vijay Kumar
2017-02-01 19:50 ` [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic David Miller
2017-02-01 19:50   ` David Miller
2017-02-01 21:20   ` Vijay Kumar
2017-02-01 21:20     ` Vijay Kumar
2017-02-23 16:27     ` David Miller
2017-02-23 16:27       ` David Miller

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=1485977680-203775-2-git-send-email-vijay.ac.kumar@oracle.com \
    --to=vijay.ac.kumar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=karl.volz@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.gardner@oracle.com \
    --cc=sparclinux@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 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.