Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1511643imc; Mon, 11 Mar 2019 15:50:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIfvcxkZ2Y5o887KM4imDsUVxOMsv2DwdeACBHPjrNiDil7RR5oj0DcOCRipkppwcCrCkX X-Received: by 2002:a17:902:29eb:: with SMTP id h98mr6668090plb.277.1552344658149; Mon, 11 Mar 2019 15:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552344658; cv=none; d=google.com; s=arc-20160816; b=0qiCqLI0VemD3u1mxUSXM0O9kl18ny5jm9oASbQnR4YFosqwbJ9nfFOnL8Yf1SOeLR LXQjMOAEgD+QMNp/jbcPvTq+khTmkrreCI4cIRK2GZQ5hrZo4E2s3JmfHF7zSwNNYyF1 ub6TrLfRWCsK8drMjOWSwEBlafQO85QbxcOaX5gHLOtLFESkf9jSXGtjfKSV9n+qGs/s Vt/egMpWklQd1XXRdoemX8G6jRwb4tZKNSMHvfM0eM190zqQGAwGTB9FJxlvk0/k6W+5 R7w0MnRDKYgJrg1TXgquVW2P/8Q4ZvM67D2rusD4hemoVaNM+nP/9LsvDb2BTmnzQQD6 TRlg== 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=NhXUPl0N1nj5IFqeByb9RuEC0pWzKOJhE6DAv7MCrdU=; b=NZ7FzZO9DS43qvFZQqR24b6pma7CEN2nXx6GESMGGtGvv2ki9wMpw4/Xbq2NB4C4IU sRB9Vc7xpIYruKBALt8NwLcwgzJ9HHWdlXdUGDZbo1aeLpBilfaPKLXWfMmgn/u9SomR cO4IpR31o0qnmb9dsPaww9U3KGxiRXiqmfoRf7eybRCHYem0v9vp578v8sXoLbSe5FWb Nuk4ND2IzRpnIE087POef/v5oNrLvRdxUM3676TqM7yIK+oSVB8i5OMMVRklFufchKI7 btdBtCFihZCC3WoEc3LNFtluEc6iOAAgf/G9m4y5+3q4fC9YN/6ANRLDcN6BFxCF0YSh MpYw== 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 h12si5821691pgs.207.2019.03.11.15.50.41; Mon, 11 Mar 2019 15:50:58 -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 S1726733AbfCKWsW (ORCPT + 99 others); Mon, 11 Mar 2019 18:48:22 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33962 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726684AbfCKWsT (ORCPT ); Mon, 11 Mar 2019 18:48:19 -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 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 Cc: Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.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 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 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: -- 2.20.1