Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1198528pxv; Fri, 25 Jun 2021 07:33:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz16tSsgEycT0dXUesH5yiEObvxU9yc7oi/AnueKQXhc/eKlahX5ABiBSlxIMMDyTKu4YGu X-Received: by 2002:a17:906:6acb:: with SMTP id q11mr11195127ejs.142.1624631614161; Fri, 25 Jun 2021 07:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624631614; cv=none; d=google.com; s=arc-20160816; b=TBi5wO/1nzD6qhcCYx+yuxVzJAd6jsCt1uHAGA0K3EJiT4EwTwzZm0KxYyEn1z45aM 5pADjLUWff37gjLd4Zkwak/VtM05UtS1PDLIpEb8aZECnUVj7Z1ToInrCbKqKKWj2uOg BVnBj5R6hcIdA1A5bWm0FpKe4fkjxN9KSyu2r9YAIe5CDGsmrT1BXxzAprRJ1u2EAHsy t8jhLYkeuKtl+R30M0lHB71AGiqxbVbqk7hqoZctl82ZYl/q5IbdwtENFpPeKbQw6n4k EF2AXHuUfuKezlA1BaiuWAaa2br9D8R02taptaZv5naBCRbVayzTNEpdAlpIM6TASgRe t8Bw== 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:message-id; bh=7eZEfPhmKqTrSMmHYGOMuH/SwpJ8KizVoB9p/GVW79s=; b=VSRF+J/eEsmxfRrTN1DlrGOVaJ+P0WGqMv90Y1m+VpMrv/LZNNeFf9RblWCGqc4peo CthpFGaDDKamtmDIU4PHV6W4ToiZvErDw0sNZvnPTlKGsBHR8WjX6ipgmgnJYnfi545E ApUIOi9AW4M98hM/kPszoGfGsDuwy06uSU3eeecWALZ+7WxG7QUwsPe6VqJ8ziGgpL8b x34GDxCN1ddY9BoveXHILwNr0ej3vsoNnX2sum/O3DW7gnCCfxKJpjl38PKsxP0nJxIV bKJNFwYA45Kwud23+uEyUAjw31syZfPqFajVpS4VG4WQVnMf+B0VGfUjgeeMWVjPxlSX xXmQ== 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 hw6si4139403ejc.243.2021.06.25.07.33.10; Fri, 25 Jun 2021 07:33:34 -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 S229940AbhFYOeL (ORCPT + 99 others); Fri, 25 Jun 2021 10:34:11 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:2655 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbhFYOeJ (ORCPT ); Fri, 25 Jun 2021 10:34:09 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4GBKFb71t6z9tTY; Fri, 25 Jun 2021 16:31:47 +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 MZKXEZKOzaUZ; Fri, 25 Jun 2021 16:31:47 +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 4GBKFZ68RWz9sxY; Fri, 25 Jun 2021 16:31:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C59AF8B80C; Fri, 25 Jun 2021 16:31:46 +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 qbNbyz1k0DR5; Fri, 25 Jun 2021 16:31:46 +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 8BB438B7FF; Fri, 25 Jun 2021 16:31:46 +0200 (CEST) Received: by po9473vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 5EFE06635D; Fri, 25 Jun 2021 14:31:46 +0000 (UTC) Message-Id: <52531029563c1fc823b790058e799d0ca71b028c.1624631463.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 25 Jun 2021 14:31:46 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reduce #ifdefs a bit by making exit_must_hard_disable() return true on PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/interrupt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index cee12f2fd459..1b4a99ecb7e5 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -33,10 +33,10 @@ static inline bool exit_must_hard_disable(void) { return static_branch_unlikely(&interrupt_exit_not_reentrant); } -#elif defined(CONFIG_PPC64) +#else static inline bool exit_must_hard_disable(void) { - return false; + return IS_ENABLED(CONFIG_PPC32); } #endif @@ -56,12 +56,10 @@ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable) /* This must be done with RI=1 because tracing may touch vmaps */ trace_hardirqs_on(); -#ifdef CONFIG_PPC32 - __hard_EE_RI_disable(); -#else if (exit_must_hard_disable() || !restartable) __hard_EE_RI_disable(); +#ifdef CONFIG_PPC64 /* This pattern matches prep_irq_for_idle */ if (unlikely(lazy_irq_pending_nocheck())) { if (exit_must_hard_disable() || !restartable) { -- 2.25.0