Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1511119imc; Mon, 11 Mar 2019 15:49:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBQYTCMtZd4MF4ODoJLdhc82fMTvXDqMR3SRyTdmOLkskBz7xcso0QsZhrBX6do+sPTXPO X-Received: by 2002:a63:e801:: with SMTP id s1mr32294695pgh.378.1552344594592; Mon, 11 Mar 2019 15:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552344594; cv=none; d=google.com; s=arc-20160816; b=hbLDFG29ObuoTL7EU7V7h/ERRyA0sdjpHUPJARNhnItyfFKR44xhkmEt++TfEpg+1O 56Vdvtc77vYX9Zue7SQ4ycOWDKoa/0n5m+FQLS5jdmzLrqVzGsydsg9ySvzCcDHxXUNn +/7tG+Kuiz7aIOeXvNczjsvemp6JLhmyPZ6OFQ8h94jcZh89Th0Ulm3Aa4nWMgYiSdT6 Ks9NhpM63DrefLM2qPIThqq5U6ljvg5lbjGNJiMrk3KTOrwiWu9+Z3Ekhzp/MbCjgten HZVXZg9Sr20uu3DcX29AAMnC1HO9VaeIYrLL9mKZ5wcFUU6uWZ5jtSoSwqMKHhSnJ4aq wtEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ztBSRy2aLpqRQmC4/8Jo02Nj0aCFdWTvEEjYqJVuAfA=; b=Opg7U9aQX7G1ct+A0w/Y4Ut92l99Qn7PFaZ2V/K68NYxAXeiayWkJIzQV3TfVgI4xf LBM4ithnijEowIgHBjRN9QVD7ujftd2HJw5WeVNeNtlPbuRR3igbQntABZG0K4Hcb5My fO/LrxFUoaFrLYlEC71fsf/qXHajzvGcaSlK/KtEOMRS8M+L/i28yuYTIhOaq6KunFMX gbK99QzptdkZLRclnVshwTi3NxYQOnSYYun8hPACK8D1TFllCMqcfXxmNUwAcM3S9Pl2 a8LzKG4snmHwzbccMn5MGIeXsgUhmGrECY14hGERzuazJ1XuuVuMX60hu53BYkEEPjJF 1P/A== 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 b2si6250703pls.31.2019.03.11.15.49.39; Mon, 11 Mar 2019 15:49:54 -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 S1726653AbfCKWsR (ORCPT + 99 others); Mon, 11 Mar 2019 18:48:17 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33932 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbfCKWsP (ORCPT ); Mon, 11 Mar 2019 18:48:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F38F3A78; Mon, 11 Mar 2019 15:48:14 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B7FBC3F59C; Mon, 11 Mar 2019 15:48:13 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org Subject: [PATCH 06/14] MIPS: entry: Remove unneeded need_resched() loop Date: Mon, 11 Mar 2019 22:47:44 +0000 Message-Id: <20190311224752.8337-7-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190311224752.8337-1-valentin.schneider@arm.com> References: <20190311224752.8337-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, we don't need the outer arch code loop. Do note that commit a18815abcdfd ("Use preempt_schedule_irq.") initially removed the existing loop, but commit cdaed73afb61 ("Fix preemption bug.") reintroduced it. It is however not clear what the issue was and why such a loop was reintroduced, so I'm probably missing something. Signed-off-by: Valentin Schneider Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org --- arch/mips/kernel/entry.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index d7de8adcfcc8..2240faeda62a 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -58,7 +58,6 @@ resume_kernel: local_irq_disable lw t0, TI_PRE_COUNT($28) bnez t0, restore_all -need_resched: LONG_L t0, TI_FLAGS($28) andi t1, t0, _TIF_NEED_RESCHED beqz t1, restore_all @@ -66,7 +65,7 @@ need_resched: andi t0, 1 beqz t0, restore_all jal preempt_schedule_irq - b need_resched + j restore_all #endif FEXPORT(ret_from_kernel_thread) -- 2.20.1