From patchwork Thu Jan 31 18:23:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 10791153 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 0C13C17E9 for ; Thu, 31 Jan 2019 18:24:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01CC0302B6 for ; Thu, 31 Jan 2019 18:24:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9FE0304C3; Thu, 31 Jan 2019 18:24:27 +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 6E0B0302B6 for ; Thu, 31 Jan 2019 18:24:27 +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=9fcNttGpvwnyXL9DO0ELaxGOx0ciW3WeyCOqz/SGar4=; b=VjTC1ISb/7FFJp O8WQiEnLW43OurMJRb13WMm/wJ0taYAalCIfD5dsdK14jmbHnNb4yehZ+lQTXjvWhbnu4xFkB/wmc LHjX6iO14D6Wnxb6Uu49WPSU6MbMGdWprW1IQoIe9qn7WXo1WC7MLTzUvJpur2xhN7aL4G3Xr/qaq asg9XiBh6chn/yVIKwVu7ZJ9qooLmlhNwNPm3tRsr/0AGCcTdMLVXEUK/WdWbXxIimLEwDUzsm8fP QMXhRoAAZnKO8AFpBBxfFi2nv768xEENyq155Hb+qPD+OdQaoXG2ClaUEKpvRIRG0OUk/CVQBsmvb lx9X0q8OyNFz5k4MMReg==; 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 1gpH0j-0004JF-Bo; Thu, 31 Jan 2019 18:24:25 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpH0N-0003zE-9c for linux-arm-kernel@lists.infradead.org; Thu, 31 Jan 2019 18:24:10 +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 8C92DEBD; Thu, 31 Jan 2019 10:24:02 -0800 (PST) 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 C0B193F59C; Thu, 31 Jan 2019 10:24:00 -0800 (PST) From: Valentin Schneider To: linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/3] arm64: entry: Remove unneeded need_resched() loop Date: Thu, 31 Jan 2019 18:23:37 +0000 Message-Id: <20190131182339.9835-2-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131182339.9835-1-valentin.schneider@arm.com> References: <20190131182339.9835-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-20190131_102404_098821_F079F492 X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Julien Thierry , Marc Zyngier , Catalin Marinas , Will Deacon , Julien Grall , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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. Reported-by: Julien Thierry Reported-by: Will Deacon Signed-off-by: Valentin Schneider Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Julien Grall Cc: Julien Thierry Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Julien Thierry Acked-by: Will Deacon --- arch/arm64/kernel/entry.S | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 0ec0c46b2c0c..4d0c81f29a60 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -611,7 +611,7 @@ el1_irq: #ifdef CONFIG_PREEMPT ldr x24, [tsk, #TSK_TI_PREEMPT] // get preempt count cbnz x24, 1f // preempt count != 0 - bl el1_preempt + bl preempt_schedule_irq // irq en/disable is done inside 1: #endif #ifdef CONFIG_TRACE_IRQFLAGS @@ -620,15 +620,6 @@ el1_irq: kernel_exit 1 ENDPROC(el1_irq) -#ifdef CONFIG_PREEMPT -el1_preempt: - mov x24, lr -1: bl preempt_schedule_irq // irq en/disable is done inside - ldr x0, [tsk, #TSK_TI_FLAGS] // get new tasks TI_FLAGS - tbnz x0, #TIF_NEED_RESCHED, 1b // needs rescheduling? - ret x24 -#endif - /* * EL0 mode handlers. */