From: Ingo Molnar Date: Tue, 13 May 2025 08:39:22 +0000 (+0200) Subject: Merge branch 'x86/mm' into x86/core, to resolve conflicts X-Git-Tag: v6.16-rc1~195^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34be751998c1407a460efe3a20f9c4ddb8c82b9f;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'x86/mm' into x86/core, to resolve conflicts Conflicts: arch/x86/mm/numa.c arch/x86/mm/pgtable.c Signed-off-by: Ingo Molnar --- 34be751998c1407a460efe3a20f9c4ddb8c82b9f diff --cc arch/x86/mm/numa.c index fed02d1073c78,4bf04be29355f..c24890c40138f --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@@ -18,9 -18,10 +18,10 @@@ #include #include #include -#include + #include +#include - #include "numa_internal.h" + #include "mm_internal.h" int numa_off; diff --cc arch/x86/mm/pgtable.c index e62af72923e8f,c1144e2f24e29..7c253deb46e9a --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@@ -357,31 -305,12 +306,12 @@@ static void pgd_prepopulate_user_pmd(st static inline pgd_t *_pgd_alloc(struct mm_struct *mm) { /* - * If no SHARED_KERNEL_PMD, PAE kernel is running as a Xen domain. - * We allocate one page for pgd. - */ - if (!SHARED_KERNEL_PMD) - return __pgd_alloc(mm, pgd_allocation_order()); - - /* - * Now PAE kernel is not running as a Xen domain. We can allocate - * a 32-byte slab for pgd to save memory space. + * PTI and Xen need a whole page for the PAE PGD + * even though the hardware only needs 32 bytes. + * + * For simplicity, allocate a page for all users. */ - return kmem_cache_alloc(pgd_cache, GFP_PGTABLE_USER); - } - - static inline void _pgd_free(struct mm_struct *mm, pgd_t *pgd) - { - if (!SHARED_KERNEL_PMD) - __pgd_free(mm, pgd); - else - kmem_cache_free(pgd_cache, pgd); - } - #else - - static inline pgd_t *_pgd_alloc(struct mm_struct *mm) - { - return __pgd_alloc(mm, PGD_ALLOCATION_ORDER); + return __pgd_alloc(mm, pgd_allocation_order()); } static inline void _pgd_free(struct mm_struct *mm, pgd_t *pgd)