From patchwork Fri Jun 29 12:55:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Tkhai X-Patchwork-Id: 168068 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 6CCF8B70F9 for ; Fri, 29 Jun 2012 23:01:36 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754723Ab2F2NBe (ORCPT ); Fri, 29 Jun 2012 09:01:34 -0400 Received: from forward8.mail.yandex.net ([77.88.61.38]:40850 "EHLO forward8.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754579Ab2F2NBe (ORCPT ); Fri, 29 Jun 2012 09:01:34 -0400 X-Greylist: delayed 365 seconds by postgrey-1.27 at vger.kernel.org; Fri, 29 Jun 2012 09:01:33 EDT Received: from web19e.yandex.ru (web19e.yandex.ru [77.88.60.23]) by forward8.mail.yandex.net (Yandex) with ESMTP id 4C802F606F7; Fri, 29 Jun 2012 16:55:26 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340974526; bh=5/FHGkWNt/OXigqN+Uj6LX2J2+V16tLAjZP081aTaV8=; h=From:To:Cc:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=oDMBmAXjqdERMM+ZD7Ayx4iUZgGZGJQS0GXZCXXfBI2wYYWyPSc1I6pEe9EXP90Ak e3P8A/hWhUXP9XwFitqdNFielzQdH+7hpQYF+srVUTHLcBeiN0FjkPFKETuViwSlFq vXOAEGOmyYHZEs2GEQbLdfCp7wzzBzuwk6kxhBf0= Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web19e.yandex.ru (Yandex) with ESMTP id 13924162805F; Fri, 29 Jun 2012 16:55:26 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340974526; bh=5/FHGkWNt/OXigqN+Uj6LX2J2+V16tLAjZP081aTaV8=; h=From:To:Cc:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=oDMBmAXjqdERMM+ZD7Ayx4iUZgGZGJQS0GXZCXXfBI2wYYWyPSc1I6pEe9EXP90Ak e3P8A/hWhUXP9XwFitqdNFielzQdH+7hpQYF+srVUTHLcBeiN0FjkPFKETuViwSlFq vXOAEGOmyYHZEs2GEQbLdfCp7wzzBzuwk6kxhBf0= Received: from ns.ineum.ru (ns.ineum.ru [213.247.249.139]) by web19e.yandex.ru with HTTP; Fri, 29 Jun 2012 16:55:25 +0400 From: Kirill Tkhai To: "sparclinux@vger.kernel.org" Cc: David Miller , Tkhai Kirill Subject: [PATCH] sparc32, copy_thread: Clear TIF_USEDFPU flag of created task instead of current MIME-Version: 1.0 Message-Id: <1959391340974525@web19e.yandex.ru> Date: Fri, 29 Jun 2012 16:55:25 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org FPU state is saved into task_struct of created task. Current task continues use of the state, so it needs TIF_USEDFPU flag is not cleared. Created task receives fresh FPU and cleared TIF_USEFPU flag is required for it. Signed-off-by: Kirill Tkhai --- arch/sparc/kernel/process_32.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) -- 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 --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index fe6787c..3c6dec4 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c @@ -358,9 +358,6 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, put_psr(get_psr() | PSR_EF); fpsave(&p->thread.float_regs[0], &p->thread.fsr, &p->thread.fpqueue[0], &p->thread.fpqdepth); -#ifdef CONFIG_SMP - clear_thread_flag(TIF_USEDFPU); -#endif } /* @@ -438,6 +435,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, #ifdef CONFIG_SMP /* FPU must be disabled on SMP. */ childregs->psr &= ~PSR_EF; + clear_tsk_thread_flag(p, TIF_USEDFPU); #endif /* Set the return value for the child. */