Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp786897ybn; Wed, 25 Sep 2019 07:43:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzBYy5uXeAkXKAE3eZuWw/brH3emkEOtAw7d3MgsbCvR1IRt1DSTViZfq1GNuLR4RpYOwV X-Received: by 2002:a17:906:16cd:: with SMTP id t13mr4418519ejd.153.1569422619702; Wed, 25 Sep 2019 07:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569422619; cv=none; d=google.com; s=arc-20160816; b=qyW2oSM2P0Z93bz7LCs6A1S0ehHi65xmXI2AjrhicrjymD2eQVIW1lnF5HZ50KB5UM p8OSdD4YZ94zJdFn+eNtU01TWu9B1a0pud8T7VmWs5MdyqJ6veKw4QvbP4Hyns1ypwbx vC/t8zoLxeUT5OgCW+Fj9P+o77FpaKUCg21sd97ar5fALo5rlrGJKmFJLU9QWQjke7ad VLxwDeFIWqao40hzP8aM945JjFLrXWhLtu0wzPx+QQFr8H6DPtq1RG0LddX1iFkfB2f4 49VjNVDn0Q/fiklbcjvN0Qe4ykkogR2Ynj8zl2xNQniaCMPIA1R6f83DMPt9ivpCS8Cl bHOw== 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=dGidnZIOOp0jJsuOpjUbYcRBiCfVMJpR5BHRTLbOslg=; b=oh4qrgOO+8/3XmwbjSc+n8U7/OUFsUuquLbvpmvj1CYjdT1tmzmbULrIOajfsNcOU+ m3orKlvD7mHuj4EYhCmGqv1iUUtIrDJgrlM6G99yBc0DmXkBVdXS53mfb3yfx8Iaxd10 HweWl33Icf4hGHMGTNcitPzSb3L3RxyWeuprWVXrHtG7t+wG79gju9I/5ojPX9AwVFRA fxg6xSvTjJVRIvJYMGmlgiBjkRw1Xh/nxSrSds+QF5GucUCqTGAPO6uhVM4mTLZ1/ymD SFZ1F+For3oaSmoqaMDJhnCmTldGReXTnqcV5dfZ8NRqIVGMCxKFeWVIxtMf8sWdsLrT gEEg== 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 qo6si2759525ejb.386.2019.09.25.07.43.16; Wed, 25 Sep 2019 07:43:39 -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 S2439996AbfIWOgu (ORCPT + 99 others); Mon, 23 Sep 2019 10:36:50 -0400 Received: from foss.arm.com ([217.140.110.172]:43448 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439802AbfIWOgq (ORCPT ); Mon, 23 Sep 2019 10:36:46 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5CD315BF; Mon, 23 Sep 2019 07:36:45 -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 1B8F73F59C; Mon, 23 Sep 2019 07:36:45 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Subject: [PATCH v2 6/9] RISC-V: entry: Remove unneeded need_resched() loop Date: Mon, 23 Sep 2019 15:36:17 +0100 Message-Id: <20190923143620.29334-7-valentin.schneider@arm.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190923143620.29334-1-valentin.schneider@arm.com> References: <20190923143620.29334-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. Reviewed-by: Palmer Dabbelt Signed-off-by: Valentin Schneider 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 74ccfd464071..d0523167d261 100644 --- a/arch/riscv/kernel/entry.S +++ b/arch/riscv/kernel/entry.S @@ -250,12 +250,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.22.0