From patchwork Mon Mar 11 22:47:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 10848399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C94EA1515 for ; Mon, 11 Mar 2019 22:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B26BD2931A for ; Mon, 11 Mar 2019 22:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6B4F2934E; Mon, 11 Mar 2019 22:48:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8FA8A2931A for ; Mon, 11 Mar 2019 22:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RoOUnORVv07ZRaicwK1HKDZCo5UB7gYPEzNygwtDU2I=; b=cFj0cf4rXiFy6k NMZORyThhl5u8EY7ma1LoixaDh1CDyKzzlpuLBV6yZBZsK11iAmchKeWnvDKzLdS9oq+0MDaw4+5p GwuuHmxe99q63L3rMxybx/PgTfCALm0L66UjcA1XrvMr8Ke4cmn6ud6uAVCjxSkli1vSm+0LBoyYk lnITc0iA3qdrN/EnAV/ASess9nD6/ePeB1fp+buj8B6nAxXkOglwUC29amG1G5+jVEEKeYGbjFW+4 RsHwcaXi8jTzlsv46XzVdzjiuiTwvRVvXAlfoRub1KmV0jV16sSrsgj0DvK9L3yI8HBnBjm3ulNDU 1TO+cur20a1dF3mxr58A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3TiY-0003lY-Lw; Mon, 11 Mar 2019 22:48:22 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3TiV-0003ko-Bc for linux-riscv@lists.infradead.org; Mon, 11 Mar 2019 22:48:21 +0000 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 093301993; Mon, 11 Mar 2019 15:48:19 -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 E2E9D3F59C; Mon, 11 Mar 2019 15:48:17 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Subject: [PATCH 09/14] RISC-V: entry: Remove unneeded need_resched() loop Date: Mon, 11 Mar 2019 22:47:47 +0000 Message-Id: <20190311224752.8337-10-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_154819_403117_E27DA690 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-riscv@lists.infradead.org, Palmer Dabbelt , Albert Ou Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 fd9b57c8b4ce..18e3337e9c30 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: