Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1510733imc; Mon, 11 Mar 2019 15:49:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJiB7vtMytRbPrm55y1xlTnyTXjJMlMQLMe8P8KRO9JV5qvTnccUdEckV56Y4OslYsGCq7 X-Received: by 2002:a63:f84c:: with SMTP id v12mr2176312pgj.323.1552344550071; Mon, 11 Mar 2019 15:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552344550; cv=none; d=google.com; s=arc-20160816; b=FyWWK/X+tNefKjTOciu+5K0GKIKsFrdUsreGFLI+ZsygHWsA08/PMbUG80sHzA0HYh TD/J79o3hG6uGzgrGEcDL7sc+MjZRqfV8+ZDjDGwSGJA9moyU637ZhRVzqdxqzdaYSeI PorRwBy9DxSkjfyJMF9hCEF3dvTJYjLnD9m645eRU6+/KjqKddAUb7WU2nDRusaiqseP MsefgwFZAta/vCHXa37WqW55wwGxn71IlKM58ClvPx2pvNoxchcWFqWtctXGP0WJJ3zG aNG8gpuVtfDrIh5Q8xFCVBaIAM8lq0iHkSDNf8Ugev/pkzQ69VvAPA6v0j5TgoHcMhhJ w/HQ== 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=d8IQPpNkwbjFDN6tBtunSuaF3CLzAg6Zf97RE++/2/Q=; b=B6tzo0PFHgUPoV86KmVPyXW4JrL4HNWd6juSA+vSJffPN8TDkFtGx+CvYAC5EFk3Yx 9qHRiLjieXcbqR3kQ7E1U317GxAjrEvXxJ8MM+Xuy3LcIjIjENv7XQKw6vbktxOZOmFs ZZZT2KNu8syhuPy95aQMnA9g1SIV3pwFfD7+vShFd6igWNx6p6K/+3LtqnvOoBru4/dd 40Yi7nGnvqstoGeIgV2pKC7STvrsZJ8Z9g82vrfHO6E9gWrd9kdXEm1OmGjDF3KqLaYI K5Pxo76Vbwg+o7ZZhTXpwvLa7eza88t19Dft9NtLG8WG9H8rixIj6FY50MG9QFsKLQqG EDvQ== 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 f64si6647020plb.302.2019.03.11.15.48.54; Mon, 11 Mar 2019 15:49:10 -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 S1725932AbfCKWsV (ORCPT + 99 others); Mon, 11 Mar 2019 18:48:21 -0400 Received: from foss.arm.com ([217.140.101.70]:33946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726654AbfCKWsS (ORCPT ); Mon, 11 Mar 2019 18:48:18 -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 A576319BF; Mon, 11 Mar 2019 15:48:17 -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 6FC223F59C; Mon, 11 Mar 2019 15:48:16 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 08/14] powerpc: entry: Remove unneeded need_resched() loop Date: Mon, 11 Mar 2019 22:47:46 +0000 Message-Id: <20190311224752.8337-9-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: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/entry_32.S | 6 +----- arch/powerpc/kernel/entry_64.S | 8 +------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0768dfd8a64e..ff3fe3824a4a 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -896,11 +896,7 @@ resume_kernel: */ bl trace_hardirqs_off #endif -1: bl preempt_schedule_irq - CURRENT_THREAD_INFO(r9, r1) - lwz r3,TI_FLAGS(r9) - andi. r0,r3,_TIF_NEED_RESCHED - bne- 1b + bl preempt_schedule_irq #ifdef CONFIG_TRACE_IRQFLAGS /* And now, to properly rebalance the above, we tell lockdep they * are being turned back on, which will happen when we return diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 435927f549c4..9c86c6826856 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -857,13 +857,7 @@ resume_kernel: * sure we are soft-disabled first and reconcile irq state. */ RECONCILE_IRQ_STATE(r3,r4) -1: bl preempt_schedule_irq - - /* Re-test flags and eventually loop */ - CURRENT_THREAD_INFO(r9, r1) - ld r4,TI_FLAGS(r9) - andi. r0,r4,_TIF_NEED_RESCHED - bne 1b + bl preempt_schedule_irq /* * arch_local_irq_restore() from preempt_schedule_irq above may -- 2.20.1