Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp594617ima; Fri, 15 Mar 2019 09:34:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6ln3ylGQfnmR2V/lnqL1pbsTUXgKnC4fkpF0o4x420bUrLt8PzB4znw90Gz+L41MJQfV/ X-Received: by 2002:a17:902:2d01:: with SMTP id o1mr5175458plb.155.1552667660721; Fri, 15 Mar 2019 09:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552667660; cv=none; d=google.com; s=arc-20160816; b=FaEGcMP9+Xc3K5O1VWdcYSCPQyKJBVROY4BIW/TJ8ViCqyfO/ic03CLEg/pxlpSPSo PwSeTR0cZHZbWVy/JoduAZpodpctwjp9x/pFAun9oWzC5o253kOqAPV3adF4EdftzvcX HFKix4O7tUMGHNJOg6pyB2W/H7mevrUjNKNVdJMgfeiRAAgtPp8RkM02x/xdy5dpraSb yHT7IPSZzs/dOlHthOEiUDTmyZ4rNwV2K/m9rz3Y/6VuQTp2JMbQu1gCyIBqhW2iXcWU CUwrogXcLTgntVQp+PRnGSLQR+fkyYRTsFg7lXbdLDxNSc7nk5+SvJmF6nNklRL/9AUW WLxg== 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=fktDmJcMumj6keMJcJyYoS/Z8BZluAdlqt3jpilYP58=; b=nmm+a3+WX6ZeUmpt8gK+V97a6r40jIRqdmboxDF2u7CKzljWUWSlVBa3A7bKmuPdfO j+CDM46/tPOoUZ9rXSXmwY9PPnDDOeGSsjUxjbZYE6UgNUpmorBUb5ZO9XM+BbvRjh37 LLnlXRnmlbNYFgicRDNY7nyaUrtBYqPvqxCJeX4JsAegujAedSAX2qV9geAvrmP4mbGv LBGgb5XV5grlMo0tjUcACGH+zvr9NdulWSpD1S+C31CQB183Pi8PHL4hUEXe4cOiW/Cd 6EuQmo+/u0dQN8p+euupwGLoQ4cCJq9BO5FpYEmFUSpuZDwKy6Rb84MgzxDjZ+fMvrQR ethQ== 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 s8si2210227pfm.41.2019.03.15.09.34.05; Fri, 15 Mar 2019 09:34:20 -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 S1728449AbfCOQcL (ORCPT + 99 others); Fri, 15 Mar 2019 12:32:11 -0400 Received: from foss.arm.com ([217.140.101.70]:33510 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728171AbfCOQcK (ORCPT ); Fri, 15 Mar 2019 12:32:10 -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 5C00E15AB; Fri, 15 Mar 2019 09:32:10 -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 1F5583F71D; Fri, 15 Mar 2019 09:32:08 -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 v2] MIPS: entry: Remove unneeded need_resched() loop Date: Fri, 15 Mar 2019 16:31:33 +0000 Message-Id: <20190315163133.31632-1-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190311224752.8337-7-valentin.schneider@arm.com> References: <20190311224752.8337-7-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. Note that commit a18815abcdfd ("Use preempt_schedule_irq.") initially removed the existing loop, but missed the final branch to restore_all. Commit cdaed73afb61 ("Fix preemption bug.") missed that and reintroduced the loop. 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index d7de8adcfcc8..5469d43b6966 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -58,15 +58,14 @@ 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 LONG_L t0, PT_STATUS(sp) # Interrupts off? andi t0, 1 beqz t0, restore_all - jal preempt_schedule_irq - b need_resched + PTR_LA ra, restore_all + j preempt_schedule_irq #endif FEXPORT(ret_from_kernel_thread) -- 2.20.1