From patchwork Mon Sep 23 14:36:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 11157111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E406C13BD for ; Mon, 23 Sep 2019 14:37:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C253520835 for ; Mon, 23 Sep 2019 14:37:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L3KAgHOu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C253520835 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org 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=DdWeGppgWP0wA6BMPpCejD/obii5gijk10gIK2i8Uzo=; b=L3KAgHOulTU6nv K9+D8Mli1mXBrX0cAC+YhCWLp7MeL+S9InXzNRmhA+ugMuPev4sfHMSR6Sp7cTL8+WpvdsjWJe5Ab 9XcgoCvboNHj9EPR9ujx4wAETTFhjvr6iDPxk0hMm9kDmgSXNoTX1g9EYBOjYVanxPO+Tj8hnqN6A 8FYEvmnbaCoDuzphqUefH0/nnZ1VWTLp55VxukSZ8EJXCpuupcSkG0Yg8MEokCb2hEXi8WxOTBy+u qsWsP2xR0HlOXwME3fid5yevzNaFJuKcA3FU8e9EhMmCdIc3yh0Fy8p3GrC5sxOk/CoTTDELQN5ko n8xElysIUxvEQAEYRWqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCPSQ-0006vD-CA; Mon, 23 Sep 2019 14:36:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCPSI-0006nq-RT for linux-riscv@lists.infradead.org; Mon, 23 Sep 2019 14:36:48 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190923_073647_236976_81A151F8 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 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 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: