Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3477161pxj; Tue, 15 Jun 2021 01:36:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ+o2sGSrdefEmRyMRl8KRnkthKY//N/FOkKkB3mYI/pSlwsWQTvLpbciv7nRgfRp2gGG3 X-Received: by 2002:a05:6e02:108f:: with SMTP id r15mr16393852ilj.86.1623746163741; Tue, 15 Jun 2021 01:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623746163; cv=none; d=google.com; s=arc-20160816; b=0adYAOSWwTPgL/pMgjodPh+EpPWBZVaU3nBzrn9N+KiSeTY4iaCmTZhKjUXg4/xgHq 95BR9NjdThqFDj4mkDQY5cgq4IZsB/jrb1wt5V9sCllVHy+Bj6JjUpnu5FDUqv4ypSD1 R1tMP2/P9Wckmb3oYVVYVaIJqJJUfoXM+4BtjC9o06m3iBGNPmFdwnRDGI10RYA3i8y1 fGcF28b2rgjQjxAizVKZcZScv2BJO4nuYqguxMeyEvrzbiPKZU9GCj0E6GVAgBTycyD1 N9Sinm+KnPVJS7SmFuuYyUcHvboklAVVcVMed5uWbnsuG3UDEp8jF2mkIN5mGRMheXiL x/ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:references:in-reply-to :message-id; bh=bjye70tAdOKPRAr8o6f3u64eSDCZyVNz64PuGFO0+wc=; b=oRnTv0uALqklQAoZb+QtAAPXS3z37HtbvnsbbyjDv3mGUt+hQv7ZiaikSpx941uCVU ijhDhuk0QKnXipX48jbN9WaZBF0V2pfTtDiCGLUj7smaIEgRkCJ8a3dQtSrUt1otVWao dXeN9HCm0KUq8QLrW8Wn6B0Sea6hUyPWLWNgMZPV8Sd6oYUK22I0i2deLVRd72QKdmIj /F6/XUaTW9L7yDU39e7QF2Z1SF7YSIYjx6H+5jOHI1ySfHxZfq1SEAsgnMqeuIbZr6K2 Aod352bpTsfRjrQxihkDLGZj3N9dvuy+GD/rUHAN5WTG6puz/ibhmUCAWsZNhSEaRmVX vN0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si20016587ilc.73.2021.06.15.01.35.51; Tue, 15 Jun 2021 01:36:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231166AbhFOIfu (ORCPT + 99 others); Tue, 15 Jun 2021 04:35:50 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:23497 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbhFOIfl (ORCPT ); Tue, 15 Jun 2021 04:35:41 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4G41mm2RxRzB8jC; Tue, 15 Jun 2021 10:33:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v6F3RINa3SSx; Tue, 15 Jun 2021 10:33:28 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4G41mj6KzbzB2gh; Tue, 15 Jun 2021 10:33:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CEDB08B7AE; Tue, 15 Jun 2021 10:33:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id SY7lQGO-YlRd; Tue, 15 Jun 2021 10:33:25 +0200 (CEST) Received: from po9473vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8E4B78B7A5; Tue, 15 Jun 2021 10:33:25 +0200 (CEST) Received: by po9473vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 6D67366264; Tue, 15 Jun 2021 08:33:25 +0000 (UTC) Message-Id: <1e21c1486087fb1a3c30feafb9371000c860ae13.1623745950.git.christophe.leroy@csgroup.eu> In-Reply-To: <8071cd2e2f2bdc0711e6ac435dff4a09ff21fee2.1623745949.git.christophe.leroy@csgroup.eu> References: <8071cd2e2f2bdc0711e6ac435dff4a09ff21fee2.1623745949.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH v3 5/5] powerpc/interrupt: Remove prep_irq_for_user_exit() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 15 Jun 2021 08:33:25 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org prep_irq_for_user_exit() has only one caller, squash it inside that caller. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/interrupt.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index 05831d99bf26..de335da7ab52 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -75,18 +75,6 @@ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable) return true; } -static notrace __always_inline bool prep_irq_for_user_exit(void) -{ - bool ret; - - user_enter_irqoff(); - ret = prep_irq_for_enabled_exit(true); - if (!ret) - user_exit_irqoff(); - - return ret; -} - /* Has to run notrace because it is entered not completely "reconciled" */ notrace long system_call_exception(long r3, long r4, long r5, long r6, long r7, long r8, @@ -276,7 +264,9 @@ interrupt_exit_user_prepare_main(struct pt_regs *regs, unsigned long ret) } } - if (!prep_irq_for_user_exit()) { + user_enter_irqoff(); + if (!prep_irq_for_enabled_exit(true)) { + user_exit_irqoff(); local_irq_enable(); local_irq_disable(); goto again; -- 2.25.0