Skip to contentSkip to conversation

SPARC32: wrong scheduling of freshly created processes

PATCH Applied Kirill Tkhai 2 participants 2 messages Mar 31, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SPARC32: wrong scheduling of freshly created processes

SPARC32: Pass task_struct to schedule_tail() in ret_from_fork

Hello, Dave.

We have to pass task_struct of previous process to function schedule_tail(). Currently in ret_from_fork previous thread_info is passed:

switch_to: mov %g6, %g3 /* previous thread_info in g6 */

ret_from_fork: call schedule_tail
mov %g3, %o0 /* previous thread_info is passed */

void schedule_tail(struct task_struct *prev);

sparc/kernel/entry.S renamed from sparc/kernel/entry.S.orig +1 -1
@@ -1283,7 +1283,7 @@ linux_syscall_trace:
 	.globl	ret_from_fork
 ret_from_fork:
 	call	schedule_tail
-	 mov	%g3, %o0
+	 ld	[%g3 + TI_TASK], %o0
 	b	ret_sys_call
 	 ld	[%sp + STACKFRAME_SZ + PT_I0], %o0
 
Applied
#1 lore raw

From: Kirill Tkhai <[email protected]>
Date: Thu, 31 Mar 2011 11:49:51 +0400

Quoted 8 lines

SPARC32: Pass task_struct to schedule_tail() in ret_from_fork

Hello, Dave.

We have to pass task_struct of previous process to function schedule_tail(). Currently in ret_from_fork previous thread_info is passed:

Quoted 8 lines

switch_to: mov %g6, %g3 /* previous thread_info in g6 */

ret_from_fork: call schedule_tail
mov %g3, %o0 /* previous thread_info is passed */

void schedule_tail(struct task_struct *prev);

Applied, thanks a lot.