From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763232AbbA3Vqv (ORCPT ); Fri, 30 Jan 2015 16:46:51 -0500 Received: from mga02.intel.com ([134.134.136.20]:47539 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760761AbbA3Vqu (ORCPT ); Fri, 30 Jan 2015 16:46:50 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,494,1418112000"; d="scan'208";a="520431443" Message-ID: <54CBFBC7.7060304@linux.intel.com> Date: Fri, 30 Jan 2015 13:46:47 -0800 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: riel@redhat.com, oleg@redhat.com CC: sbsiddha@gmail.com, luto@amacapital.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, fenghua.yu@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] x86,fpu: use disable_task_lazy_fpu_restore helper References: <20150129210723.GA31584@redhat.com> <1422640170-20020-1-git-send-email-riel@redhat.com> <1422640170-20020-4-git-send-email-riel@redhat.com> In-Reply-To: <1422640170-20020-4-git-send-email-riel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/30/2015 09:49 AM, riel@redhat.com wrote: > @@ -440,8 +440,9 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta > new->thread.fpu_counter > 5); > if (__thread_has_fpu(old)) { > if (!__save_init_fpu(old)) > - cpu = ~0; > - old->thread.fpu.last_cpu = cpu; > + task_disable_lazy_fpu_restore(old); > + else > + old->thread.fpu.last_cpu = cpu; What is the 'else' doing here? It seems a bit disconnected from the other parts of the patch.