diff mbox

Generic idle causes boot hang on T1000

Message ID 20140324.125358.1420654948419843545.davem@davemloft.net
State Accepted
Delegated to: David Miller
Headers show

Commit Message

David Miller March 24, 2014, 4:53 p.m. UTC
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 24 Mar 2014 11:33:30 +0100 (CET)

> 
> On Monday 2014-03-24 01:38, David Miller wrote:
>>> Trying to update beyond 3.9 gives me a boot hang on SPARC T1000.
>>> The following commit is the result of the bisect:
>>> 
>>> commit 87fa05aeb3a5e8e21b1a5510eef6983650eff092
>>> Author: Sam Ravnborg <sam@ravnborg.org>
>>> Date:   Thu Apr 11 21:38:50 2013 +0200
>>> 
>>>     sparc: Use generic idle loop
>>
>>Interesting.
>>
>>> mptbase: ioc0: Initiating bringup
>>> <hangs>
>>> 
>>> after ~1 minute:
>>> 
>>> INFO: rcu_sched self-detected stall on CPU { 0}  (t=30061 jiffies
>>> g=18446744073709551319 c=18446744073709551318 q=414)
>>> INFO: rcu_sched detected stalls on CPUs/tasks:* CPU[  0]:
>>> TSTATE[0000000080001603] TPC[000000000042b9b4] TNPC[000000000042b9b8]
>>> TASK[swapper/0:0]
>>>              TPC[arch_cpu_idle+0x74/0xa0] O7[arch_cpu_idle+0x5c/0xa0]
>>>  I7[cpu_startup_entry+0x114/0x1a0] RPC[start_kernel+0x384/0x394]
>>
>>I suspect the cpu yield hypervisor call requires local cpu interrupts
>>to be enabled in order to function properly.  Prior to this commit
>>above, they did.
>>
>>Please try this:
>>
>>commit 87fa05aeb3a5e8e21b1a5510eef6983650eff092
> 
> This is the same commit as before (both in ID, as well as patch content).
> Did you intend to paste another patch?

My bad, I intended to post this:

--
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

Comments

Jan Engelhardt March 24, 2014, 6:19 p.m. UTC | #1
On Monday 2014-03-24 17:53, David Miller wrote:
>diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
>index 32a280e..d7b4967 100644
>--- a/arch/sparc/kernel/process_64.c
>+++ b/arch/sparc/kernel/process_64.c
>@@ -58,9 +58,12 @@ void arch_cpu_idle(void)
> {
> 	if (tlb_type != hypervisor) {
> 		touch_nmi_watchdog();
>+		local_irq_enable();
> 	} else {
> 		unsigned long pstate;
> 
>+		local_irq_enable();
>+
>                 /* The sun4v sleeping code requires that we have PSTATE.IE cleared over
>                  * the cpu sleep hypervisor call.
>                  */
>@@ -82,7 +85,6 @@ void arch_cpu_idle(void)
> 			: "=&r" (pstate)
> 			: "i" (PSTATE_IE));
> 	}
>-	local_irq_enable();
> }
> 
> #ifdef CONFIG_HOTPLUG_CPU

With this patch, the boot succeeds.
--
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
David Miller March 24, 2014, 6:36 p.m. UTC | #2
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 24 Mar 2014 19:19:44 +0100 (CET)

> 
> On Monday 2014-03-24 17:53, David Miller wrote:
>>diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
>>index 32a280e..d7b4967 100644
>>--- a/arch/sparc/kernel/process_64.c
>>+++ b/arch/sparc/kernel/process_64.c
>>@@ -58,9 +58,12 @@ void arch_cpu_idle(void)
>> {
>> 	if (tlb_type != hypervisor) {
>> 		touch_nmi_watchdog();
>>+		local_irq_enable();
>> 	} else {
>> 		unsigned long pstate;
>> 
>>+		local_irq_enable();
>>+
>>                 /* The sun4v sleeping code requires that we have PSTATE.IE cleared over
>>                  * the cpu sleep hypervisor call.
>>                  */
>>@@ -82,7 +85,6 @@ void arch_cpu_idle(void)
>> 			: "=&r" (pstate)
>> 			: "i" (PSTATE_IE));
>> 	}
>>-	local_irq_enable();
>> }
>> 
>> #ifdef CONFIG_HOTPLUG_CPU
> 
> With this patch, the boot succeeds.

Thanks for testing, I'll get this merged upstream and to -stable.
--
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/process_64.c b/arch/sparc/kernel/process_64.c
index 32a280e..d7b4967 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -58,9 +58,12 @@  void arch_cpu_idle(void)
 {
 	if (tlb_type != hypervisor) {
 		touch_nmi_watchdog();
+		local_irq_enable();
 	} else {
 		unsigned long pstate;
 
+		local_irq_enable();
+
                 /* The sun4v sleeping code requires that we have PSTATE.IE cleared over
                  * the cpu sleep hypervisor call.
                  */
@@ -82,7 +85,6 @@  void arch_cpu_idle(void)
 			: "=&r" (pstate)
 			: "i" (PSTATE_IE));
 	}
-	local_irq_enable();
 }
 
 #ifdef CONFIG_HOTPLUG_CPU