Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4862878ybi; Tue, 28 May 2019 03:52:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqz59Fg1hgg11S7iaerVJIj507IkEcdK4NLE+KcAJlkSBHytAagpBVv0aVTpAYQjq0/j2DLU X-Received: by 2002:aa7:9577:: with SMTP id x23mr141417407pfq.164.1559040737331; Tue, 28 May 2019 03:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559040737; cv=none; d=google.com; s=arc-20160816; b=sCwRZjAapHZVVH3tQH/IBS7SLfOtMYq5OAPhuDbEyHSw1Jp7PGTwZxoaoDRDiK2FGz 9hqFQT9XV8/rHasgJYcB4aJzOdlxP/Z+s1+LRCevf9IFxegNWpoY6VC8j3Dp/MRk0z/B pC+jykLhmQysQ1sLlArMiOpqo8qVSAe8OldwTUzhP6V2jjiBRCw/sBrwn4pE/CqgCkfZ qGAN4pwub5PuSbQhK6H/F/QbiUqovCJmMrlSz3WZv1fmVQmtmVpj563b+wNvDgaDpJA+ IJLugN3Gw24ZQuvVrka1WfsNmxQVtSZmzM99h0KsAQJd7W6uDNZZK4AP2nOWFOT6FGSO MXGA== 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=+2BGcC4d6jkP/L+nPSRZ+879cT3jbs4N00gmZHn69lY=; b=0Yv8L5kIqZO2hKcYtmH6eRy2A7UAbDQ1/XR0gYlr+TDyO/fM74fW5chW6ghvB0boN6 tn6BxiqQjcAT1SFDNdcbOckD0xb5yyXuLSURKh9UL3ysQzdad+hdl4U5GBLjOY6fRNFF 3+rRG+h1pFbe08wRNuIMiJEfJ1/wa0NHD40xbO97WN7vwOdncGmo4GvCi+6RxAZCMP7v dzVyl7R7rKQpme0dQBBfhsARjhTjf4MLGPpNL+9K7va4BbSPylZWfofu1489ryIUWkQ3 WG4kBwVrYt/j8qvSUzo9PNSlPRYVsfu9BPVRVX3Zvdo+/uSG6ApkiTRtXc2ewkxxpAvf gkbQ== 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 o1si23148320plb.179.2019.05.28.03.52.02; Tue, 28 May 2019 03:52:17 -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 S1726874AbfE1Ktb (ORCPT + 99 others); Tue, 28 May 2019 06:49:31 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54948 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbfE1Ktb (ORCPT ); Tue, 28 May 2019 06:49:31 -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 9DCCF15AD; Tue, 28 May 2019 03:49:30 -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 840293F59C; Tue, 28 May 2019 03:49:29 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Subject: [PATCH RESEND 5/7] RISC-V: entry: Remove unneeded need_resched() loop Date: Tue, 28 May 2019 11:48:46 +0100 Message-Id: <20190528104848.13160-6-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528104848.13160-1-valentin.schneider@arm.com> References: <20190528104848.13160-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. Signed-off-by: Valentin Schneider Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org --- arch/riscv/kernel/entry.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S index 1c1ecc238cfa..d0b1b9660283 100644 --- a/arch/riscv/kernel/entry.S +++ b/arch/riscv/kernel/entry.S @@ -258,12 +258,11 @@ restore_all: resume_kernel: REG_L s0, TASK_TI_PREEMPT_COUNT(tp) bnez s0, restore_all -need_resched: REG_L s0, TASK_TI_FLAGS(tp) andi s0, s0, _TIF_NEED_RESCHED beqz s0, restore_all call preempt_schedule_irq - j need_resched + j restore_all #endif work_pending: -- 2.20.1