Message ID | a69c4631ab86ff9aad3f576c4f88979a223bbc55.1724226076.git.zhengqi.arch@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0262C52D6F for <linux-arm-kernel@archiver.kernel.org>; Wed, 21 Aug 2024 08:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WkLNXpSDw35lj4Q8QTsPG+BhSNUK5Ar50Dqo0ISPkHo=; b=D/30MKDAO7w6vEuXhPE+Ihl6p3 sENDWoAluSHd/U+i6v5lAJBRXEY/ngxIl1SPT3pwEodDVPbm2AmzAtWzliHoa741kxBE6Y/y2N7iX 4qCqvndvHCt/soDk0SfGzvISV7CtDIFUUGl8CP/UC1qYtk3Z+lsuEb/W9FdScEqmWAfrTWGIPHHQM l2nUuODp6dog/K7JKa+Qq4FOAh8XjLFPM+Pla6AE6C37HyZQhZ1mOkHUKYUq93oevC+a1kMneCJfn ltNpzcs6GSFa1cS85MmzhhaKFSlz8C1iDpbu7fGdI8LKhoPZA44x/5o0JBjEaRHV04RojY0LZyASl osj9fdCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggbw-000000082fn-2eSs; Wed, 21 Aug 2024 08:22:32 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggZG-000000081nz-3A0y for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 08:19:48 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2d394313aceso4979204a91.3 for <linux-arm-kernel@lists.infradead.org>; Wed, 21 Aug 2024 01:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1724228386; x=1724833186; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WkLNXpSDw35lj4Q8QTsPG+BhSNUK5Ar50Dqo0ISPkHo=; b=gwTDNKV59JbeDpl47MSC2MM9GjT8D6yxka+tt0ArErlelr58U8aFnGS/rGI17yRHDz XrR0XAw0SKyacX3vZW+nRPkN7bfOhfAsXl44A76a4r7SJ/G58VINDSAt8ipbJpGYQose sarxhAJuYIythvh3bPga8i4CO5QNE3MU2S3eJmm6Ov/IXdFJn2BR89TGngGlYLBoXM5q 09PePz28MSbSPW+BQYPz9e6b/s3PlB4qmKIpdKxBPOHbMCvAZFi+2IAYZkw+Jc0g2Md4 eUpGzV4he2YnDBkCAhjxeWBqJe5vCqZHK8HYTEpkACQK2u7oLqC8tMhTT1F8gnta/V4y CSrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724228386; x=1724833186; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WkLNXpSDw35lj4Q8QTsPG+BhSNUK5Ar50Dqo0ISPkHo=; b=kfPuTvDsRGAk9VQ4Cp4tyfN8lxv+D+CZIhzIwVCmw9RFXTRXc4fx9D93FazVeK46aP 2UmYQv/gyGQ4JnzFgItgwzV499LNM8amZVFISpw7fjTUMo6ZvFYe7mD11Sp+3ySZzick W4Yq8e3ZFileZj2B9GWKfOdL3y52Uro+6xd9PWQnQes4Z/0eHZI61hVQR9ygPKO/wSIc E8Wru5vWDcRdmq/F24ijHdfq/busp3OfxQnYA7ewf/IkilXifkqGHISQb2/cZUTTFuLx /ITqnYtPtS3pjGyA2fI8lrAC2mXNKQZFqyIBO/oSg6s5qFiAFrauq2Da6XDcAlWqQdbV Ktsw== X-Forwarded-Encrypted: i=1; AJvYcCXcL2IM9sl1T01APjrNAwgEIR/3dCG2Vw/HNOUdm4s/A+WUI5iuQZdZBwGmnnRG4vplNn+9qq8sDUZ6dnfw9RcH@lists.infradead.org X-Gm-Message-State: AOJu0Yyom0Iyxneiesr7Wpy8uCeU0pp4K0xeTljx+ziNX1JO1KZJOe7s ERkTmAVpCWQZJfVMivj7SYEk75wEsBDp1Db4Q+k1reuBe0oUiw90o4a0A+kbXUQ= X-Google-Smtp-Source: AGHT+IFyY3NlNyztu6E70clqH4irJgHSXlPUHA4AtOW6RrWWSbwAKaoUYDBEK6KZMX7nlR++kviHPA== X-Received: by 2002:a17:90a:e7c6:b0:2cf:cc0d:96cc with SMTP id 98e67ed59e1d1-2d5e99c8b75mr1585510a91.9.1724228385781; Wed, 21 Aug 2024 01:19:45 -0700 (PDT) Received: from C02DW0BEMD6R.bytedance.net ([203.208.167.150]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d5eb9049b0sm1091453a91.17.2024.08.21.01.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 01:19:45 -0700 (PDT) From: Qi Zheng <zhengqi.arch@bytedance.com> To: david@redhat.com, hughd@google.com, willy@infradead.org, muchun.song@linux.dev, vbabka@kernel.org, akpm@linux-foundation.org, rppt@kernel.org, vishal.moola@gmail.com, peterx@redhat.com, ryan.roberts@arm.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Qi Zheng <zhengqi.arch@bytedance.com> Subject: [PATCH 03/14] powerpc: assert_pte_locked() use pte_offset_map_readonly_nolock() Date: Wed, 21 Aug 2024 16:18:46 +0800 Message-Id: <a69c4631ab86ff9aad3f576c4f88979a223bbc55.1724226076.git.zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <cover.1724226076.git.zhengqi.arch@bytedance.com> References: <cover.1724226076.git.zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_011946_819908_6BCACAE3 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
introduce pte_offset_map_{readonly|maywrite}_nolock()
|
expand
|
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index 7316396e452d8..ae4d236b5cef7 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c @@ -398,7 +398,7 @@ void assert_pte_locked(struct mm_struct *mm, unsigned long addr) */ if (pmd_none(*pmd)) return; - pte = pte_offset_map_nolock(mm, pmd, addr, &ptl); + pte = pte_offset_map_readonly_nolock(mm, pmd, addr, &ptl); BUG_ON(!pte); assert_spin_locked(ptl); pte_unmap(pte);
In assert_pte_locked(), we just get the ptl and assert if it was already held, so convert it to using pte_offset_map_readonly_nolock(). Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> --- arch/powerpc/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)