From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932872AbbBBSBL (ORCPT ); Mon, 2 Feb 2015 13:01:11 -0500 Received: from shelob.surriel.com ([74.92.59.67]:39679 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753287AbbBBSBB (ORCPT ); Mon, 2 Feb 2015 13:01:01 -0500 From: riel@redhat.com To: oleg@redhat.com Cc: dave.hansen@linux.intel.com, 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: [PATCH 6/6] x86,fpu: remove redundant increments of fpu_counter Date: Mon, 2 Feb 2015 13:00:51 -0500 Message-Id: <1422900051-10778-7-git-send-email-riel@redhat.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1422900051-10778-1-git-send-email-riel@redhat.com> References: <20150129210723.GA31584@redhat.com> <1422900051-10778-1-git-send-email-riel@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rik van Riel fpu.preload only gets set if new->thread.fpu_counter is already larger than 5. Incrementing it further does absolutely nothing. Remove those lines. Signed-off-by: Rik van Riel --- arch/x86/include/asm/fpu-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 085903415cbd..88df5808a2db 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -447,7 +447,6 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta /* Don't change CR0.TS if we just switch! */ if (fpu.preload) { - new->thread.fpu_counter++; __thread_set_has_fpu(new); prefetch(new->thread.fpu.state); } else if (!use_eager_fpu()) @@ -456,7 +455,6 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta old->thread.fpu_counter = 0; task_disable_lazy_fpu_restore(old); if (fpu.preload) { - new->thread.fpu_counter++; if (fpu_lazy_restore(new, cpu)) fpu.preload = 0; else -- 1.9.3