Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp819951pxb; Wed, 16 Feb 2022 05:14:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZH0WyJT6lndoUSnvRKqhKuzejtrzW3dMrTZ6XRvebkBI6qPxYA9hr1rLJ9wMwBWihEGqF X-Received: by 2002:a17:906:c12:b0:6cd:795c:9803 with SMTP id s18-20020a1709060c1200b006cd795c9803mr2327533ejf.593.1645017285465; Wed, 16 Feb 2022 05:14:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645017284; cv=none; d=google.com; s=arc-20160816; b=fYJTnXflp9VBwPiYsSa0Z7w3pGHv0scOWbg4tIe4TQcoaUFk59YJTZX2v6kbXygvKd WNiFAlBK8Yiu0lqooT7g8Mt2Nmh+r8ZLEZltNgvyAaGmaVO0Ylb9eGjAoGEqSYz8SLN6 en53PSzdI1xUPROFYwlv/MWHCy5iwNkFrtYSUAKm6NAkwC1jmbRbXUujJP/yFOrycWSC 2vVEqTbzzY8x5nTyuTT1Sjk9595hakSlhQ48Gy6oow/0BJc3iPMrxZy1mkkpDMd/BXpc rdNPnSVYznGkiaBc4o37UD0kBCAYEJIzOlgb61k6bjl46DMGP3BKSv4DNxnYUhRF7lKH mygA== 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:date :message-id:subject:references:in-reply-to:cc:to:from; bh=nkft1Jm/U7TH4gF2SeHy+naEK46rGYNShkpsh0w4Wqs=; b=R15ATXPhzYX2FDpinlHnia0pzfSAo3rM6hb5HOpXEFd6Cb4MuuucnEtSzAgvf6ct5u LU+dIZ7aOxSOUILKts1MIpTsQgXcfTs6LVpBGL60IqWeNh6BeM8qvLWyS/1OyzCgN0bN PSeT6RedBVuLUvfCXFn5bitNxNnPLN0D6cWcgWpeUHYGcfbw/HUUXohQ+qLUeYRcdPVi QueHrnevLIHKx4tuVw2p/3f2Gp4pYuC6avnhH3knmPeUKTpAyCdNO52vE3xwB9CyThZI se3gGFc9fIt5qvXc4LI+1qdVmvW+s3PCVBuzbUdpPLirh4RMrGpke3xMxVmnYSeN5DLN w/xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd18si26880185ejc.961.2022.02.16.05.14.18; Wed, 16 Feb 2022 05:14:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232087AbiBPMak (ORCPT + 99 others); Wed, 16 Feb 2022 07:30:40 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233221AbiBPMa2 (ORCPT ); Wed, 16 Feb 2022 07:30:28 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E27C2A4147 for ; Wed, 16 Feb 2022 04:30:17 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4JzHNQ5CMyz4xn3; Wed, 16 Feb 2022 23:30:14 +1100 (AEDT) From: Michael Ellerman To: Benjamin Herrenschmidt , Christophe Leroy , Michael Ellerman , Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org, Russell Currey , Maxime Bizon , linux-kernel@vger.kernel.org In-Reply-To: <43c3c76a1175ae6dc1a3d3b5c3f7ecb48f683eea.1640344012.git.christophe.leroy@csgroup.eu> References: <43c3c76a1175ae6dc1a3d3b5c3f7ecb48f683eea.1640344012.git.christophe.leroy@csgroup.eu> Subject: Re: [PATCH v3 1/2] powerpc/set_memory: Avoid spinlock recursion in change_page_attr() Message-Id: <164501434734.521186.493750224564400396.b4-ty@ellerman.id.au> Date: Wed, 16 Feb 2022 23:25:47 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Fri, 24 Dec 2021 11:07:33 +0000, Christophe Leroy wrote: > Commit 1f9ad21c3b38 ("powerpc/mm: Implement set_memory() routines") > included a spin_lock() to change_page_attr() in order to > safely perform the three step operations. But then > commit 9f7853d7609d ("powerpc/mm: Fix set_memory_*() against > concurrent accesses") modify it to use pte_update() and do > the operation safely against concurrent access. > > [...] Applied to powerpc/next. [1/2] powerpc/set_memory: Avoid spinlock recursion in change_page_attr() https://git.kernel.org/powerpc/c/a4c182ecf33584b9b2d1aa9dad073014a504c01f [2/2] powerpc: Add set_memory_{p/np}() and remove set_memory_attr() https://git.kernel.org/powerpc/c/f222ab83df92acf72691a2021e1f0d99880dcdf1 cheers