From: Baoquan He <bhe@redhat.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Arnd Bergmann <arnd@arndb.de>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org,
loongarch@lists.linux.dev, linux-mips@vger.kernel.org,
Oscar Salvador <osalvador@suse.de>, Peter Xu <peterx@redhat.com>
Subject: Re: [PATCH v3 1/5] arch/x86: Drop own definition of pgd,p4d_leaf
Date: Tue, 18 Mar 2025 07:52:00 +0800 [thread overview]
Message-ID: <Z9i1oGaAR9c2MPbN@MiWiFi-R3L-srv> (raw)
In-Reply-To: <c81566e5df160587de50f9095d0ec377114fdba8.1720854135.git.christophe.leroy@csgroup.eu>
On 07/13/24 at 09:08am, Christophe Leroy wrote:
> From: Oscar Salvador <osalvador@suse.de>
>
> We provide generic definitions of pXd_leaf in pgtable.h when the arch
> do not define their own, where the generic pXd_leaf always return false.
>
> Although x86 defines {pgd,p4d}_leaf, they end up being a no-op, so drop them
> and make them fallback to the generic one.
>
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> arch/x86/include/asm/pgtable.h | 10 ----------
> 1 file changed, 10 deletions(-)
Seems this series is missed. It does do a great clean up.
>
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index 65b8e5bb902c..772f778bac06 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -252,13 +252,6 @@ static inline unsigned long pgd_pfn(pgd_t pgd)
> return (pgd_val(pgd) & PTE_PFN_MASK) >> PAGE_SHIFT;
> }
>
> -#define p4d_leaf p4d_leaf
> -static inline bool p4d_leaf(p4d_t p4d)
> -{
> - /* No 512 GiB pages yet */
> - return 0;
> -}
> -
> #define pte_page(pte) pfn_to_page(pte_pfn(pte))
>
> #define pmd_leaf pmd_leaf
> @@ -1396,9 +1389,6 @@ static inline bool pgdp_maps_userspace(void *__ptr)
> return (((ptr & ~PAGE_MASK) / sizeof(pgd_t)) < PGD_KERNEL_START);
> }
>
> -#define pgd_leaf pgd_leaf
> -static inline bool pgd_leaf(pgd_t pgd) { return false; }
> -
> #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
> /*
> * All top-level MITIGATION_PAGE_TABLE_ISOLATION page tables are order-1 pages
> --
> 2.44.0
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe@redhat.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Arnd Bergmann <arnd@arndb.de>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org,
loongarch@lists.linux.dev, linux-mips@vger.kernel.org,
Oscar Salvador <osalvador@suse.de>, Peter Xu <peterx@redhat.com>
Subject: Re: [PATCH v3 1/5] arch/x86: Drop own definition of pgd,p4d_leaf
Date: Tue, 18 Mar 2025 07:52:00 +0800 [thread overview]
Message-ID: <Z9i1oGaAR9c2MPbN@MiWiFi-R3L-srv> (raw)
In-Reply-To: <c81566e5df160587de50f9095d0ec377114fdba8.1720854135.git.christophe.leroy@csgroup.eu>
On 07/13/24 at 09:08am, Christophe Leroy wrote:
> From: Oscar Salvador <osalvador@suse.de>
>
> We provide generic definitions of pXd_leaf in pgtable.h when the arch
> do not define their own, where the generic pXd_leaf always return false.
>
> Although x86 defines {pgd,p4d}_leaf, they end up being a no-op, so drop them
> and make them fallback to the generic one.
>
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> arch/x86/include/asm/pgtable.h | 10 ----------
> 1 file changed, 10 deletions(-)
Seems this series is missed. It does do a great clean up.
>
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index 65b8e5bb902c..772f778bac06 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -252,13 +252,6 @@ static inline unsigned long pgd_pfn(pgd_t pgd)
> return (pgd_val(pgd) & PTE_PFN_MASK) >> PAGE_SHIFT;
> }
>
> -#define p4d_leaf p4d_leaf
> -static inline bool p4d_leaf(p4d_t p4d)
> -{
> - /* No 512 GiB pages yet */
> - return 0;
> -}
> -
> #define pte_page(pte) pfn_to_page(pte_pfn(pte))
>
> #define pmd_leaf pmd_leaf
> @@ -1396,9 +1389,6 @@ static inline bool pgdp_maps_userspace(void *__ptr)
> return (((ptr & ~PAGE_MASK) / sizeof(pgd_t)) < PGD_KERNEL_START);
> }
>
> -#define pgd_leaf pgd_leaf
> -static inline bool pgd_leaf(pgd_t pgd) { return false; }
> -
> #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION
> /*
> * All top-level MITIGATION_PAGE_TABLE_ISOLATION page tables are order-1 pages
> --
> 2.44.0
>
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-03-17 23:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 7:08 [PATCH v3 1/5] arch/x86: Drop own definition of pgd,p4d_leaf Christophe Leroy
2024-07-13 7:08 ` Christophe Leroy
2024-07-13 7:08 ` [PATCH v3 2/5] mm: Remove pud_user() from asm-generic/pgtable-nopmd.h Christophe Leroy
2024-07-13 7:08 ` Christophe Leroy
2024-07-13 7:08 ` [PATCH v3 3/5] LoongArch: Do not define pud_leaf() when there is no PMD Christophe Leroy
2024-07-13 7:08 ` Christophe Leroy
2024-07-13 7:08 ` [PATCH v3 4/5] mips: " Christophe Leroy
2024-07-13 7:08 ` Christophe Leroy
2024-07-13 7:08 ` [PATCH v3 5/5] mm: Add p{g/4}d_leaf() in asm-generic/pgtable-nop{4/u}d.h Christophe Leroy
2024-07-13 7:08 ` Christophe Leroy
2025-03-17 23:52 ` Baoquan He [this message]
2025-03-17 23:52 ` [PATCH v3 1/5] arch/x86: Drop own definition of pgd,p4d_leaf Baoquan He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z9i1oGaAR9c2MPbN@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=loongarch@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=osalvador@suse.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterx@redhat.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.