Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp275021iob; Wed, 18 May 2022 01:50:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeUlNIHmStmFGg0TsfYjVT+sPgMhYqb8+EXav05xJbgEkJ/abfFX4V8rmOk8+dFB6BITLg X-Received: by 2002:a63:1645:0:b0:3c5:f0c2:b9c with SMTP id 5-20020a631645000000b003c5f0c20b9cmr22246435pgw.484.1652863805782; Wed, 18 May 2022 01:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652863805; cv=none; d=google.com; s=arc-20160816; b=MPOR6cy8u9fWijqDEpNLxoMCsOq5aml0gTnzZ5pioqZI/exjLvduAdbvPmtzCbsAGQ qmhuFmzQpP9CwwZxZ+vbC6ZdpwxMa96J7qVe/n7JbhtARmdDF8yvrKmEa1hGYXAGg+xP QFTSM68cf1L883VKVc9vZmmFLCX9oRuzr4SWfjq9BtHpFMxs73IRc2HSCZzCHCPEl7GB 1xBswSRr6/PA6OH7zrA5GoUyaFUFSjC+h0QBDo0KNfnU3SWRpmpW5fBZbzeBrLVEA9UG mPsagjry7Ga9pm34RwmreJmzgO5/vPP/qf7ONK8qHs08vuCV8J5bMh7AAWxdsJeKzjQn v55w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uEtzleQtnclzx8nbgGumO7gHV1agPDZ51yPYxlJrO/I=; b=CowkftaT17Tp17hFHuIaHqb16xSwtJy+LIb7eO5oJ3hxwJbEptAf4fcHu5gS2R0riB U3OgGaQvMRSxIH8fLfHady9UTGyFP+GDBGbv/dKt9578vSIeCE4lJ+c2ZKnGQCZxbMIe wM9sqQetjborpvq8R9eRNGDRHbKwmvdic3YrP4vjN9BG4zXY8t9D1R7gdGYyZaKyUWLE 7NvbhN5zg97RM4pTwxSVgsEqVNZxpZqaqzyc1vbzfnwF9Qq/MJVdVGcu+noNCdlwu9Og IeBeb8KgYnItXQkEJyo1n/qd3MjoIHsJ2nIugtP+F/D8WgPeB6Et1zivEq4xrmFHmsiv oWIA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h19-20020a056a001a5300b00512e6ab7b80si2380072pfv.33.2022.05.18.01.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 01:50:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 507B013B8F5; Wed, 18 May 2022 01:49:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233516AbiERItZ (ORCPT + 99 others); Wed, 18 May 2022 04:49:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233525AbiERItV (ORCPT ); Wed, 18 May 2022 04:49:21 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79BC813C1CC for ; Wed, 18 May 2022 01:49:10 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4L369J6Ppjz9srY; Wed, 18 May 2022 10:49:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T7bNQxdeIToW; Wed, 18 May 2022 10:49:08 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4L369J5bm3z9srH; Wed, 18 May 2022 10:49:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AD90B8B77D; Wed, 18 May 2022 10:49:08 +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 ajDl9ScbllcI; Wed, 18 May 2022 10:49:08 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 942678B77C; Wed, 18 May 2022 10:49:08 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 24I8mt5v2968122 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 18 May 2022 10:48:55 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 24I8mtTV2968121; Wed, 18 May 2022 10:48:55 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/irq: remove inline assembly in hard_irq_disable macro Date: Wed, 18 May 2022 10:48:55 +0200 Message-Id: <9f05937d8722ddd2064a7c2362d8f9000e15e1ba.1652863723.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1652863734; l=1048; s=20211009; h=from:subject:message-id; bh=REfAp0B2RYqKCCYWSypqG3oRXhNX7z9oD4h4eZLeFUw=; b=MluBCnm5RlsKVocLp/PugtJ5F31R2vFDM3x0a86lQ2NSfZuZg5rKdvCv3dpZ0neLcK54sk7oTpE0 +kOi4vobD7PAgpm//pRX9t4qJQdgAWONeAkauAk6HGEsjPtokajc X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use WRITE_ONCE() instead of opencoding the saving of current stack pointeur. Signed-off-by: Christophe Leroy --- By the way, is WRITE_ONCE() needed at all ? Could we instead do local_paca->saved_r1 = current_stack_pointer; --- arch/powerpc/include/asm/hw_irq.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 6efab00aa1c8..26ede09c521d 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h @@ -282,9 +282,7 @@ static inline bool pmi_irq_pending(void) flags = irq_soft_mask_set_return(IRQS_ALL_DISABLED); \ local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \ if (!arch_irqs_disabled_flags(flags)) { \ - asm ("stdx %%r1, 0, %1 ;" \ - : "=m" (local_paca->saved_r1) \ - : "b" (&local_paca->saved_r1)); \ + WRITE_ONCE(local_paca->saved_r1, current_stack_pointer);\ trace_hardirqs_off(); \ } \ } while(0) -- 2.35.3