From nobody Sat Nov 23 20:33:41 2024 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22EE9B67F for ; Mon, 11 Nov 2024 07:52:55 +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=1731311578; cv=none; b=Mew7OKLCz70bWHTlEqOCHxb0EdRM9FkUqCZEmiY8BaphFAxLTwD629gUPzR71UXV2UE4cLkCOJ2FjxsqxoiRyF0xQcWdqGSUD+o9FAQ+72gInnNrvccsu75JnBeSu/tjRlEamjUw4B6Lbp2Q7ngLuWnfuhv1OKkTxNlP317fgWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731311578; c=relaxed/simple; bh=Ys4OCF2deyCqZjMUjhOfkC5Gwml9HKL1MjNCHufN5tE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ndxR0Ea0bbc6aJaXb0EJtO/VH3u9fKKswJhOT2TOSP6XM+OK2iSD1ruAuyqvZbNgzIhxuhCRVGXk5O+LaKosx0AOZneNgqWNjlEBk/7MVoTfajYRj/36lj/kKwUYXPoxGO31f9myRAtpTOpE7Tq6/OCwbGqFFd6v3MQovNdu5xU= 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 E2DC61D14; Sun, 10 Nov 2024 23:53:24 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.44.165]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ED6893F6A8; Sun, 10 Nov 2024 23:52:51 -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: Change protval as 'pteval_t' in map_range() Date: Mon, 11 Nov 2024 13:22:49 +0530 Message-Id: <20241111075249.609493-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: quoted-printable Content-Type: text/plain; charset="utf-8" pgprot_t has been defined as an encapsulated structure with pteval_t as its element. Hence it is prudent to use pteval_t as the type instead of via the size based u64. Besides pteval_t type might be different size later on with FEAT_D128. 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 Reviewed-by: Gavin Shan --- This applies on v6.12-rc7 arch/arm64/kernel/pi/map_range.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/pi/map_range.c b/arch/arm64/kernel/pi/map_ra= nge.c index 5410b2cac590..2b69e3beeef8 100644 --- a/arch/arm64/kernel/pi/map_range.c +++ b/arch/arm64/kernel/pi/map_range.c @@ -30,7 +30,7 @@ void __init map_range(u64 *pte, u64 start, u64 end, u64 p= a, pgprot_t prot, int level, pte_t *tbl, bool may_use_cont, u64 va_offset) { u64 cmask =3D (level =3D=3D 3) ? CONT_PTE_SIZE - 1 : U64_MAX; - u64 protval =3D pgprot_val(prot) & ~PTE_TYPE_MASK; + pteval_t protval =3D pgprot_val(prot) & ~PTE_TYPE_MASK; int lshift =3D (3 - level) * (PAGE_SHIFT - 3); u64 lmask =3D (PAGE_SIZE << lshift) - 1; =20 --=20 2.30.2