From nobody Fri Dec 19 20:37:43 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DD583081B8 for ; Tue, 14 Oct 2025 11:06:42 +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=1760440004; cv=none; b=gFgwYnVf8/oljXemd6ghSUT9FkWeMxrgFYyutZwUJyvUG7ldSZfYELZUV0dFhqz2uE+M0CDrxrAHAj/ewkeh0L1nxIhWRw3arcUTEJ8CiywKHJob4uUuiH+YpvsBYdzdK3AfPZq5e+S279ZYcQwZIXCN76F5h8C2jZMcorc1huA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760440004; c=relaxed/simple; bh=5IDXp4li2TMZ9pIMe0Znpdi8ISpR0TA92qXqhPy1VBQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rxQu/lBDpiAJASfkEpgN4eJirGJF+CDDzDPCJ/AJdH5fDswwFNG+WFhg3LLZ5MWLmnJ28DhaVuapatV+Sqd1xthvd/V9U8L7E52ziJowfyy0qWQRlAHU8eao13cwOIhB5cxk/NTekVFfUXgB9JSeo9fjUgOIpv5RK0sRNiQOMrc= 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 C4E971A9A; Tue, 14 Oct 2025 04:06:33 -0700 (PDT) Received: from ergosum.cambridge.arm.com (ergosum.cambridge.arm.com [10.1.196.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B5033F66E; Tue, 14 Oct 2025 04:06:40 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: ryan.roberts@arm.com, Anshuman Khandual , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Subject: [PATCH] arm64/mm: Add a fallback stub for pgd_page_paddr() Date: Tue, 14 Oct 2025 12:06:33 +0100 Message-Id: <20251014110633.304961-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.30.2 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" Add a fallback stub for pgd_page_paddr() when (PGTBALE_LEVELS <=3D 4) which helps in intercepting any unintended usage and which is also in line with existing stubs for similar [pud|p4d]_page_paddr() helpers. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgta= ble.h index aa89c2e67ebc..fb34df92d159 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -1212,6 +1212,8 @@ static inline p4d_t *p4d_offset_kimg(pgd_t *pgdp, u64= addr) =20 static inline bool pgtable_l5_enabled(void) { return false; } =20 +#define pgd_page_paddr(pgd) ({ BUILD_BUG(); 0; }) + #define p4d_index(addr) (((addr) >> P4D_SHIFT) & (PTRS_PER_P4D - 1)) =20 /* Match p4d_offset folding in */ --=20 2.30.2