From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763413AbbA3VtA (ORCPT ); Fri, 30 Jan 2015 16:49:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39244 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763395AbbA3Vs6 (ORCPT ); Fri, 30 Jan 2015 16:48:58 -0500 Message-ID: <54CBFC35.6090005@redhat.com> Date: Fri, 30 Jan 2015 16:48:37 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Dave Hansen , 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> <54CBFBC7.7060304@linux.intel.com> In-Reply-To: <54CBFBC7.7060304@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/30/2015 04:46 PM, Dave Hansen wrote: > 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. The assignment was already there before, but we would set cpu to ~0 if __save_init_fpu failed. Now there are different branches for failure and success, with the success branch having the same assignment that was there before. - -- All rights reversed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUy/w1AAoJEM553pKExN6D/fsH/RjpQE67P368cvHl6QKa0RUo TDF0iEl4XqLT9wlYPsr+NgVJG0rFK36iVrGtKVV/uziNmk+1H43WZUt/u8tsTC1k gYptwOeBpGVyktmwdperBejTm3q4k9WLYASOvU90S2fMO5IavCpafkM5CJwojFie 0fquULSkgmyxXIJrNTNYznA2YYZaiHcKY8i05H9W0iLYbYQseQhDKl7sZ5uWcfd2 ziWmWpMKSgD0AaC1PbMm8k4kKHkbaKlabR9AyOd+9Nk5voU/pPcJOm4QgQru2ZhR 2wRdVA+MMwoglsPygV3I2OPqJN95o0JAgSTJk5DXfPuiMYoAe2+KWy5pa0ERvMo= =Fmf0 -----END PGP SIGNATURE-----