Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1525787imc; Mon, 11 Mar 2019 16:15:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHgbypHoq1wg7S4Act0J/6fvzdtuiGaWYXYP/lfCqJBFwH6XDGIcOksI3vtKs3pTdLFP83 X-Received: by 2002:a63:cc44:: with SMTP id q4mr32330218pgi.183.1552346132803; Mon, 11 Mar 2019 16:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552346132; cv=none; d=google.com; s=arc-20160816; b=W4hav3WzAOzPrNOm5WlrR/SIu85iPYBzMgFaJO+2YdI3pMdWHvZ+WGm54ABtco+KT2 PAB/AHlLoxWgspuSl21PSLnkCaG4u7Dyz1eeKuGkRdcNtz5Tc2jzNNrx7hNFYPoSoRwi m+Qfsg2Ja6al+OWY7mjUjJ4I9dzXZhyjE6jwWXBqLeUl/g72PPRUMNraam0lAlvoGiST Ghp1EgAAtszlik+k7RL81Xob25l5lcoFGQqSjxSDvc4tUP8g0LoudDlmE85YgWh93up0 3dhEjMl6MPIOZnteEZrVZg9klGrYHn8270eVCPglgYS0jK4ZXOgLShNM26mNJ78txhZL AFCw== 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:from:subject:cc:to:message-id:date; bh=e+OD/fs/WUHtBjrWhE+NLGq1aXX0supyRHdRhs7LYoo=; b=aYu18Q2tmpt1zWtLhy1zayDdkS5W63PMvhWX3eqcX522yf7McWVGiarDJ8Q5jEQCkz WpFwQ1905QCSQ9C2Ah4fjZDiQwKQwTBI91es1PWIBDmnJRH86db0hAFSiCWdleGc2rG2 2rS1I7QT/9OVPeeNTnmLRx39rOk9ApLE5pPuYmp+/iSrQyADzdfMaQELv3dhf67Ss0a5 DiSWQVvvZ1CdDBV1ld39oQ0/WsSUM06V+tWCigS3+b1I+spHG4QtHc30nNbapUoPtJ8H vvNnct8a5vODVJ+zzonH6jgF4HvDLD3UgYS8tPk0J9dmpUJtmQzX7BGStjxyid5CHMKK DH8w== 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 59si6750539plp.100.2019.03.11.16.15.16; Mon, 11 Mar 2019 16:15:32 -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 S1726549AbfCKXNQ (ORCPT + 99 others); Mon, 11 Mar 2019 19:13:16 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:43028 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725826AbfCKXNQ (ORCPT ); Mon, 11 Mar 2019 19:13:16 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 7320314C7307F; Mon, 11 Mar 2019 16:13:15 -0700 (PDT) Date: Mon, 11 Mar 2019 16:13:13 -0700 (PDT) Message-Id: <20190311.161313.458909688496508375.davem@davemloft.net> To: valentin.schneider@arm.com Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 12/14] sparc64: rtrap: Remove unneeded need_resched() loop From: David Miller In-Reply-To: <20190311224752.8337-13-valentin.schneider@arm.com> References: <20190311224752.8337-1-valentin.schneider@arm.com> <20190311224752.8337-13-valentin.schneider@arm.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 11 Mar 2019 16:13:15 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Valentin Schneider Date: Mon, 11 Mar 2019 22:47:50 +0000 > 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. > > We seem to be looping back somewhere much higher than the usual > preempt/need_resched checks, but AFAICT we would just branch to > 'rtrap_no_irq_enable' and then back to 'to_kernel', which is > a need_resched() loop with a few extra steps. > > Signed-off-by: Valentin Schneider > Cc: "David S. Miller" > Cc: sparclinux@vger.kernel.org > --- > arch/sparc/kernel/rtrap_64.S | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S > index 29aa34f11720..57fb75686957 100644 > --- a/arch/sparc/kernel/rtrap_64.S > +++ b/arch/sparc/kernel/rtrap_64.S > @@ -322,7 +322,6 @@ to_kernel: > nop > call preempt_schedule_irq > nop > - ba,pt %xcc, rtrap > #endif > kern_fpucheck: ldub [%g6 + TI_FPDEPTH], %l5 > brz,pt %l5, rt_continue > -- > 2.20.1 > We must re-evaluate the %tstate value stored in ptregs, you cannot make this change.