Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp276394ybi; Wed, 29 May 2019 21:12:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIXMMnbNVnhWYyyxzjXaQFkjjsX1j8PCE9NPuzFi++OTgSBkhXcc1IkhA4WiCay4HrwYkP X-Received: by 2002:a17:902:3183:: with SMTP id x3mr1830490plb.321.1559189525085; Wed, 29 May 2019 21:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189525; cv=none; d=google.com; s=arc-20160816; b=XCV6EaK+vnIgSkUTT23lRx3h0e2IWq9b9SWZAfZBbiINc09MMd48y5z8l5UCyyIvPI 5locz7ELbAHvvbMZrd2TvJi6ptGtuDMZCtp8l0+hMzARarGka+hJfvXfyPXUs0mRvZUA rqWFyL92BX466KEsrRPrp4z8Lg5LMCGY2XcX3mlwXI0wVVKgMI/h7tH9Y2VOlBo+vK89 +6LxI0S61uhj5I4uEGQREksqGUj8br4LoKCCD8I465lLZVRYYAB2t7v4Y/V8WaPxU5Sd ULP5sxSvEvZhkG39Lf67Kno7k5rsFzAnItzMqzMlKTQzBespJLvcBNmy209RA4FXhXwM VGtw== 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 :message-id:to:from:cc:in-reply-to:subject:date; bh=pgMA0Wfc76ibrLZDaqEAp0iESFpifKaHVOBOP4rz25s=; b=m/DYWqifPZY5tYC1tVS2WcmisJxhCHjiW4B17TadaRfz2VARJ/B4YTna78lpe08rLo fl7Ve9Xq4WvS4AM5sGFYb9CJvKD/NVFmD86W0rXkwvmJCMzFjfbMe3K9xXUTlc1Xs0+L Gz2ASF/9m+oPLvI+791DOOnYm6v5YTXiqm6XQs1kEx3AAYexDLK1bZQaX5fsyRfC1d9p ixjTjMW+jJ695HgHq1I5tFZF0GUwn4R1yhkBHashm2iHo1wMLBR25t6HMlOs5xj72JOU dY0F01PGpus6vortwzVT0Z92QL7MbEzUbgygZ5tqoGGkQNkMh46TP5YecOHz5MvN7D6i xUxw== 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 f10si2017965pgm.425.2019.05.29.21.11.48; Wed, 29 May 2019 21:12:05 -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 S1729093AbfE3EJY (ORCPT + 99 others); Thu, 30 May 2019 00:09:24 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38809 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbfE3EJU (ORCPT ); Thu, 30 May 2019 00:09:20 -0400 Received: by mail-pl1-f196.google.com with SMTP id f97so1979322plb.5 for ; Wed, 29 May 2019 21:09:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=pgMA0Wfc76ibrLZDaqEAp0iESFpifKaHVOBOP4rz25s=; b=GZXUQS6xnZMeSgYPU7yTlk08Z4KF1uhmo/2RKiQPBb2Fz7KiuPt1XmN/71KsZqygdr 7fOiTjrOOz9A2eN462PpqW55OX12N3UsLiZDKBWuU4lFjuinbzlBlVz87QrROT8EKvQO NzlC3WnnlmR/FAWbCUvyqgeyQpk7Vx4yvMNb50Jduber6Mrc27YEhHJyz/3+cuUjhUpQ y6WFe7RWuEa65bA4ywcvCd+SSAJR3WORR8UFWkb3mv8F6RNsCGaCAYIvfy+HznkRIdQE ck86PSwm/comkAqjPua6vmyCj9dXEIVsFqdhJcfXLbE28hqM5XAowlcuBHK7yGiZsV+8 QNEg== X-Gm-Message-State: APjAAAVShlRHlAzJ5vNwPNKdxXi/HtL9bPh5+9YuMatqOYAUeHSPWwQ2 mady2IXSNrch74Hu6/XEcgqtyjbg6IV6jw== X-Received: by 2002:a17:902:a405:: with SMTP id p5mr1741551plq.51.1559189359758; Wed, 29 May 2019 21:09:19 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id s80sm1464910pfs.117.2019.05.29.21.09.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2019 21:09:19 -0700 (PDT) Date: Wed, 29 May 2019 21:09:19 -0700 (PDT) X-Google-Original-Date: Wed, 29 May 2019 20:53:09 PDT (-0700) Subject: Re: [PATCH RESEND 5/7] RISC-V: entry: Remove unneeded need_resched() loop In-Reply-To: <20190528104848.13160-6-valentin.schneider@arm.com> CC: linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org From: Palmer Dabbelt To: valentin.schneider@arm.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 May 2019 03:48:46 PDT (-0700), valentin.schneider@arm.com wrote: > 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 1c1ecc238cfa..d0b1b9660283 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: Sorry I missed this the first time around. Reviewed-by: Palmer Dabbelt Do you want this through the RISC-V tree, or are you going to take it?