From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AA6E282F1 for ; Tue, 7 Jan 2025 02:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736217033; cv=none; b=He+3OyYwUzG14VWm7WTHmf3/CX2ZyJZQ/Tn3d5TDe3PuShbxjFT2m/KpnsV7yc7+wx48WhRcdHZDM2mUENp8Vm1GlCWtpAFPiVbn8l5p0xwjkiV2OMUsYW3eXXOZMrmvdfUbDVAXmfXSs+LVwh9y2H2mLppVRjkPLxNd8J2krOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736217033; c=relaxed/simple; bh=IR5k8aqjC9A7Fa3vcbK6f1wR7KgR3+G1X0ufmR1sL0c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HLzNQs4Id2aLWUJD8mFb4UMc5H5BCOtTpo4A05jUfOrPQ8ao7UF6c9kVfUi8fwGrQI5OGvUP4EkYaz458LzW6VZc1QgqVguzMg+muNgDSBdswyR9IbwrHPfV/TKL6CIPW9OXfABNDxTfg3KF9Dt75QY27rhNwI8MPdujbc+88R8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6AEF8143D; Mon, 6 Jan 2025 18:30:57 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.54.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A50D73F66E; Mon, 6 Jan 2025 18:30:26 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Ard Biesheuvel , Ryan Roberts , Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH] arm64/mm: Rename pte_mkpresent() as pte_mkvalid() Date: Tue, 7 Jan 2025 08:00:16 +0530 Message-Id: <20250107023016.829416-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit pte_present() is no longer synonymous with pte_valid() as it also tests for pte_present_invalid() as well. Hence pte_mkpresent() is misleading, because all that does is make an entry mapped, via setting PTE_VALID. Hence rename the helper as pte_mkvalid() which reflects its functionality appropriately. Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Ryan Roberts Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- This patch applies on v6.13-rc6 arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/mm/trans_pgd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index e20b80229910..f0ba0f47f61a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -273,7 +273,7 @@ static inline pte_t pte_mknoncont(pte_t pte) return clear_pte_bit(pte, __pgprot(PTE_CONT)); } -static inline pte_t pte_mkpresent(pte_t pte) +static inline pte_t pte_mkvalid(pte_t pte) { return set_pte_bit(pte, __pgprot(PTE_VALID)); } diff --git a/arch/arm64/mm/trans_pgd.c b/arch/arm64/mm/trans_pgd.c index 0f7b484cb2ff..19c67ed1a21f 100644 --- a/arch/arm64/mm/trans_pgd.c +++ b/arch/arm64/mm/trans_pgd.c @@ -57,7 +57,7 @@ static void _copy_pte(pte_t *dst_ptep, pte_t *src_ptep, unsigned long addr) */ BUG_ON(!pfn_valid(pte_pfn(pte))); - __set_pte(dst_ptep, pte_mkpresent(pte_mkwrite_novma(pte))); + __set_pte(dst_ptep, pte_mkvalid(pte_mkwrite_novma(pte))); } } -- 2.30.2