diff mbox

[1/4] sparc64: Set cpu state to offline when stopped

Message ID 1478817816-98939-1-git-send-email-vijay.ac.kumar@oracle.com
State Changes Requested
Delegated to: David Miller
Headers show

Commit Message

Vijay Kumar Nov. 10, 2016, 10:43 p.m. UTC
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(-)

Comments

David Miller Nov. 10, 2016, 11:27 p.m. UTC | #1
When submitting a series of patches, you must always provide
a cover posting.

This posting has Subject of the form:

	Subject: [PATCH 0/NN] Toplevel description.

And the body of the message explains what the patch series as
a whole does, why it is doing it, and how it is doing it.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index d3035ba..14138ad 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1435,6 +1435,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();
 }
 
@@ -1446,6 +1447,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;