From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F36A2F83B0; Tue, 12 Aug 2025 16:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755016164; cv=none; b=kCee9Whno7skzW2qx0z+33w2ja1041hrN5kps/e6+PcnoSO06lobZ79ZASSts8CqhnF5XIit4CMO5Ct3Oj8jmUmq0/fIKMc5Ypi+9hHYrSaaKYNSdulNE3A03GCqoh5uP5j5nsMArysOb94x2VamV554WicQ1vV3qzQKbHi6Ilw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755016164; c=relaxed/simple; bh=E5FFVbeyuoL91fZs6JxyY6XKwmihYtlLtav+5KQ8T4Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VUGqAWwZNi3jQUegZS3RqJzD6ibq+Jo5jzJ0dpzxHGgXWauo1TaP11EE6PPfOn1CuBGFBeGlIvGK3L2uuPaq/MM87eWbKJ/+CRMwBWnF0xCwpfPuFQtW/94p7fiyViOXTpE4vg2UxM8dYZcJpbCaNCN2kL4eDWR6WiHfIIvkrKc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C43F5C4CEF6; Tue, 12 Aug 2025 16:29:21 +0000 (UTC) Date: Tue, 12 Aug 2025 17:29:19 +0100 From: Catalin Marinas To: Christophe Leroy Cc: Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, Peter Xu , Oscar Salvador Subject: Re: [PATCH] mm: Remove pud_user() from asm-generic/pgtable-nopmd.h Message-ID: References: Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Aug 12, 2025 at 01:14:19PM +0200, Christophe Leroy wrote: > Commit 2c8a81dc0cc5 ("riscv/mm: fix two page table check related > issues") added pud_user() in include/asm-generic/pgtable-nopmd.h > > But pud_user() only exists on ARM64 and RISCV and is not expected > by any part of MM. > > Add the missing definition in arch/riscv/include/asm/pgtable-32.h > and remove it from asm-generic/pgtable-nopmd.h > > A stub pud_user() is also required for ARM64 after > commit ed928a3402d8 ("arm64/mm: fix page table check compile > error for CONFIG_PGTABLE_LEVELS=2") > > Signed-off-by: Christophe Leroy > Reviewed-by: Peter Xu > Reviewed-by: Oscar Salvador > --- > arch/arm64/include/asm/pgtable.h | 1 + > arch/riscv/include/asm/pgtable-32.h | 5 +++++ > include/asm-generic/pgtable-nopmd.h | 1 - > 3 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index abd2dee416b3b..fef7cc7a340d8 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -955,6 +955,7 @@ static inline pmd_t *pud_pgtable(pud_t pud) > > #define pud_valid(pud) false > #define pud_page_paddr(pud) ({ BUILD_BUG(); 0; }) > +#define pud_user false /* Always 0 with folding */ Doesn't pud_user take an argument? With that fixed: Acked-by: Catalin Marinas (strangely I couldn't get the build to fail without a pud_user definition, even with the PGTABLE_LEVELS=2 and PAGE_TABLE_CHECK=y configuration) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 0FC1ECA0EE4 for ; Tue, 12 Aug 2025 20:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oO3+ux1T6NEGf1ci1rJY32eBZSiTj55cQXEjlgsxXYE=; b=fdhmNyOBg8ZeAi XqClMNjyfVfSRHq8zk3qBgJH61f4avtVIyyqWZG+5OTET0UdLSsArue9Z50PoR3KO7WApXU/a4CmA stBsHwl8FN4kvpSyvjUEndcWu4z8b/3+9YjSNby3mXedJ5E0xb2NpNt5FW0Y/UfMmjr2p7Gtqqg/u ilWDsLsP0BdjfBZRPEsKxtXBavXOBC5Lbr2+iWZJ8Z9Aknmoql/grRTX4BUvIhMgIHRkBAxekSSHA c7U/nYDYsPCsiARFcyzuQUD2Gj+C7n8yoxVHLBaT5gc6UlQir3XPurfmIeDVy5u+XnoF8K4mJT1h9 RNNfMXH2iTmdzUZJn4SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulvgN-0000000BwnQ-135Q; Tue, 12 Aug 2025 20:33:19 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulrsK-0000000BPpv-1xeo; Tue, 12 Aug 2025 16:29:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 2A1DD45861; Tue, 12 Aug 2025 16:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C43F5C4CEF6; Tue, 12 Aug 2025 16:29:21 +0000 (UTC) Date: Tue, 12 Aug 2025 17:29:19 +0100 From: Catalin Marinas To: Christophe Leroy Cc: Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, Peter Xu , Oscar Salvador Subject: Re: [PATCH] mm: Remove pud_user() from asm-generic/pgtable-nopmd.h Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250812_092924_525785_43AA8370 X-CRM114-Status: GOOD ( 18.19 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Aug 12, 2025 at 01:14:19PM +0200, Christophe Leroy wrote: > Commit 2c8a81dc0cc5 ("riscv/mm: fix two page table check related > issues") added pud_user() in include/asm-generic/pgtable-nopmd.h > > But pud_user() only exists on ARM64 and RISCV and is not expected > by any part of MM. > > Add the missing definition in arch/riscv/include/asm/pgtable-32.h > and remove it from asm-generic/pgtable-nopmd.h > > A stub pud_user() is also required for ARM64 after > commit ed928a3402d8 ("arm64/mm: fix page table check compile > error for CONFIG_PGTABLE_LEVELS=2") > > Signed-off-by: Christophe Leroy > Reviewed-by: Peter Xu > Reviewed-by: Oscar Salvador > --- > arch/arm64/include/asm/pgtable.h | 1 + > arch/riscv/include/asm/pgtable-32.h | 5 +++++ > include/asm-generic/pgtable-nopmd.h | 1 - > 3 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index abd2dee416b3b..fef7cc7a340d8 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -955,6 +955,7 @@ static inline pmd_t *pud_pgtable(pud_t pud) > > #define pud_valid(pud) false > #define pud_page_paddr(pud) ({ BUILD_BUG(); 0; }) > +#define pud_user false /* Always 0 with folding */ Doesn't pud_user take an argument? With that fixed: Acked-by: Catalin Marinas (strangely I couldn't get the build to fail without a pud_user definition, even with the PGTABLE_LEVELS=2 and PAGE_TABLE_CHECK=y configuration) _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv