Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp259458yba; Fri, 5 Apr 2019 06:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5uQL0FhgmKE8ezMxUJPEKBdwHomSofn19WKeDk8MzSVyG6nNVlBHOxJxepEbk7GgmhOeJ X-Received: by 2002:aa7:9089:: with SMTP id i9mr12641216pfa.115.1554470072225; Fri, 05 Apr 2019 06:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554470072; cv=none; d=google.com; s=arc-20160816; b=wyXBcLFujqhGQCDTVn+O3XgivHA9mejyuSGKG/gNml6ZQ0uSfshPX5nzlpG5ARX6vd QEa0Uiu5Ap93Qo7H6EqkYSTY7n28kh8xS6PefyenPm+IMgkHJQ6lCxuTaNPUkClMUNha y0m57F1K/cFz1cgO3xKYLe+0vVIoGDOPauw8jlrnXYx3l07VFBtY8wLaeYX35q9ckqw8 ZWFrJgD028tBeNrKo6D03k4+yo7CPi5Zq917Q/t6ddp0HaCmLTzMnLuh+8Skl8AscIiR Zp+YMxfEoYXt7aqYQJx9hZ23AhHZrEYNirNb5Cw4Ooy7rtYthbyCAUtJ4QZFOLBcgU44 oaxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=vbLrS9EFUfA9XVaZpJ+vKVkPPMcjeOW2WL275f8enRQ=; b=rxHliB9cy1E0EuoO2yK8+qEf+wwHi+1+lDgn4d2TwVtqBZsmDloCFRDCU8q8oXrAsn 4BmoPWy/bcWWUNDQ20ZEGQQIj0+YfYavn2pJkPSn+2fKda3NJA51HknzuLdPbym5IrKv PU0F4CPAocM1ZIzO9ZXEEInS2k1TuaHhyvwfvNHpA3xCDrV9dT7tieSA569hWpv2nhme YoQpbKWNEbjggpyx+NfOHn8vBhB3EVe/JgOsfcxsdvDr2B0MP8hURrZvRSFQtVg43h54 eZk0rCw2XrsQZ4jlSchqSyoKDSi8R7rsjhIL7gm7du9EgdFAdRiUjw1cyb7UZSC7WTT0 LnDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si5828897plz.67.2019.04.05.06.14.16; Fri, 05 Apr 2019 06:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730650AbfDENNe (ORCPT + 99 others); Fri, 5 Apr 2019 09:13:34 -0400 Received: from terminus.zytor.com ([198.137.202.136]:35803 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728743AbfDENNe (ORCPT ); Fri, 5 Apr 2019 09:13:34 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x35DDJa12765940 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 5 Apr 2019 06:13:20 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x35DDJ5G2765937; Fri, 5 Apr 2019 06:13:19 -0700 Date: Fri, 5 Apr 2019 06:13:19 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Valentin Schneider Message-ID: Cc: hpa@zytor.com, bp@alien8.de, mingo@kernel.org, linux-kernel@vger.kernel.org, luto@kernel.org, tglx@linutronix.de, valentin.schneider@arm.com Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, luto@kernel.org, tglx@linutronix.de, bp@alien8.de, mingo@kernel.org, valentin.schneider@arm.com In-Reply-To: <20190311224752.8337-14-valentin.schneider@arm.com> References: <20190311224752.8337-14-valentin.schneider@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/entry] x86/entry: Remove unneeded need_resched() loop Git-Commit-ID: b5b447b6b4e899e0978b95cb42d272978f8c7b4d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b5b447b6b4e899e0978b95cb42d272978f8c7b4d Gitweb: https://git.kernel.org/tip/b5b447b6b4e899e0978b95cb42d272978f8c7b4d Author: Valentin Schneider AuthorDate: Mon, 11 Mar 2019 22:47:51 +0000 Committer: Thomas Gleixner CommitDate: Fri, 5 Apr 2019 15:08:03 +0200 x86/entry: Remove unneeded need_resched() loop Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, there is no need for the outer architecture specific loop. Signed-off-by: Valentin Schneider Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20190311224752.8337-14-valentin.schneider@arm.com --- arch/x86/entry/entry_32.S | 3 +-- arch/x86/entry/entry_64.S | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index d309f30cf7af..b1856fe9decf 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -766,13 +766,12 @@ END(ret_from_exception) #ifdef CONFIG_PREEMPT ENTRY(resume_kernel) DISABLE_INTERRUPTS(CLBR_ANY) -.Lneed_resched: cmpl $0, PER_CPU_VAR(__preempt_count) jnz restore_all_kernel testl $X86_EFLAGS_IF, PT_EFLAGS(%esp) # interrupts off (exception path) ? jz restore_all_kernel call preempt_schedule_irq - jmp .Lneed_resched + jmp restore_all_kernel END(resume_kernel) #endif diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 1f0efdb7b629..e7e270603fe7 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -645,10 +645,9 @@ retint_kernel: /* Check if we need preemption */ btl $9, EFLAGS(%rsp) /* were interrupts off? */ jnc 1f -0: cmpl $0, PER_CPU_VAR(__preempt_count) + cmpl $0, PER_CPU_VAR(__preempt_count) jnz 1f call preempt_schedule_irq - jmp 0b 1: #endif /*