From patchwork Thu Mar 31 07:49:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 89024 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 210CDB6F75 for ; Thu, 31 Mar 2011 19:00:10 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757147Ab1CaIAI (ORCPT ); Thu, 31 Mar 2011 04:00:08 -0400 Received: from forward5.mail.yandex.net ([77.88.46.21]:44896 "EHLO forward5.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757075Ab1CaIAI (ORCPT ); Thu, 31 Mar 2011 04:00:08 -0400 X-Greylist: delayed 613 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Mar 2011 04:00:08 EDT Received: from smtp4.mail.yandex.net (smtp4.mail.yandex.net [77.88.46.104]) by forward5.mail.yandex.net (Yandex) with ESMTP id 4F0491202B4E; Thu, 31 Mar 2011 11:49:53 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1301557793; bh=XzXs10ODieuetmnnPSKgux6imhgmHzIm0dmG0qCljEA=; h=Subject:From:To:Cc:Content-Type:Date:Message-ID:Mime-Version: Content-Transfer-Encoding; b=EM+ID1sTQOBqp08j7bT+mVJZ8GQ8harG0O9lhHMni5xbz30AdodVpRFrXpd3NpQkU 2o1aiMbD6N8E6LmHQXdHkkD6a5JWbingZRUppV701OO1HNRrN0XOSTpSEuOZFz4vj8 V6bfa/tHHHo9QUNgAPyP2/5shcfbdH9oXOwINYaU= Received: from [192.168.1.5] (unknown [95.73.51.77]) by smtp4.mail.yandex.net (Yandex) with ESMTPSA id 0A82464980D2; Thu, 31 Mar 2011 11:49:52 +0400 (MSD) Subject: [PATCH] SPARC32: wrong scheduling of freshly created processes (bug in ret_from_fork) From: Kirill Tkhai To: "David S. Miller" Cc: sparclinux@vger.kernel.org Date: Thu, 31 Mar 2011 11:49:51 +0400 Message-ID: <1301557791.5962.19.camel@hp> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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); Signed-off-by: Tkhai Kirill --- 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 --- arch/sparc/kernel/entry.S.orig 2011-03-27 22:37:20.000000000 +0400 +++ arch/sparc/kernel/entry.S 2011-03-29 20:52:00.165292813 +0400 @@ -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