mm-huge_vmap-arch-support-cleanup.patch removed from -mm tree
The patch titled
Subject: mm: HUGE_VMAP arch support cleanup
has been removed from the -mm tree. Its filename was
mm-huge_vmap-arch-support-cleanup.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Nicholas Piggin <[email protected]>
Subject: mm: HUGE_VMAP arch support cleanup
This changes the awkward approach where architectures provide init functions to determine which levels they can provide large mappings for, to one where the arch is queried for each call.
This removes code and indirection, and allows constant-folding of dead code for unsupported levels.
This also adds a prot argument to the arch query. This is unused currently but could help with some architectures (e.g., some powerpc processors can't map uncacheable memory with large pages).
---
arch/arm64/include/asm/vmalloc.h | 8 + arch/arm64/mm/mmu.c | 10 +- arch/powerpc/include/asm/vmalloc.h | 8 + arch/powerpc/mm/book3s64/radix_pgtable.c | 8 - arch/x86/include/asm/vmalloc.h | 7 + arch/x86/mm/ioremap.c | 12 +- include/linux/io.h | 9 -- include/linux/vmalloc.h | 6 + init/main.c | 1 mm/debug_vm_pgtable.c | 4 mm/ioremap.c | 94 ++++++++------------- 11 files changed, 87 insertions(+), 80 deletions(-)
arch/arm64/include/asm/vmalloc.h renamed from arch/arm64/include/asm/vmalloc.h~mm-huge_vmap-arch-support-cleanup +8 -0
@@ -1,4 +1,12 @@#ifndef _ASM_ARM64_VMALLOC_H#define _ASM_ARM64_VMALLOC_H +#include <asm/page.h> + +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP +bool arch_vmap_p4d_supported (pgprot_t prot); +bool arch_vmap_pud_supported (pgprot_t prot); +bool arch_vmap_pmd_supported (pgprot_t prot); +#endif +#endif /* _ASM_ARM64_VMALLOC_H */
arch/arm64/mm/mmu.c renamed from arch/arm64/mm/mmu.c~mm-huge_vmap-arch-support-cleanup +5 -5
@@ -1339,12 +1339,12 @@ void *__init fixmap_remap_fdt(phys_addr_return dt_virt; } -int __init arch_ioremap_p4d_supported (void ) +bool arch_vmap_p4d_supported (pgprot_t prot) { -return 0 ; +return false; } -int __init arch_ioremap_pud_supported (void ) +bool arch_vmap_pud_supported (pgprot_t prot) {/* * Only 4k granule supports level 1 block mappings.
@@ -1354,9 +1354,9 @@ int __init arch_ioremap_pud_supported(vo !IS_ENABLED (CONFIG_PTDUMP_DEBUGFS ); } -int __init arch_ioremap_pmd_supported (void ) +bool arch_vmap_pmd_supported (pgprot_t prot) { -/* See arch_ioremap_pud_supported() */ +/* See arch_vmap_pud_supported() */ return !IS_ENABLED (CONFIG_PTDUMP_DEBUGFS ); }
arch/powerpc/include/asm/vmalloc.h renamed from arch/powerpc/include/asm/vmalloc.h~mm-huge_vmap-arch-support-cleanup +8 -0
@@ -1,4 +1,12 @@#ifndef _ASM_POWERPC_VMALLOC_H#define _ASM_POWERPC_VMALLOC_H +#include <asm/page.h> + +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP +bool arch_vmap_p4d_supported (pgprot_t prot); +bool arch_vmap_pud_supported (pgprot_t prot); +bool arch_vmap_pmd_supported (pgprot_t prot); +#endif +#endif /* _ASM_POWERPC_VMALLOC_H */
arch/powerpc/mm/book3s64/radix_pgtable.c renamed from arch/powerpc/mm/book3s64/radix_pgtable.c~mm-huge_vmap-arch-support-cleanup +4 -4
@@ -1082,13 +1082,13 @@ void radix__ptep_modify_prot_commit(struset_pte_at (mm, addr, ptep, pte); } -int __init arch_ioremap_pud_supported (void ) +bool arch_vmap_pud_supported (pgprot_t prot) {/* HPT does not cope with large pages in the vmalloc area */ return radix_enabled (); } -int __init arch_ioremap_pmd_supported (void ) +bool arch_vmap_pmd_supported (pgprot_t prot) {return radix_enabled (); }
@@ -1182,7 +1182,7 @@ int pmd_free_pte_page(pmd_t *pmd, unsignreturn 1 ; } -int __init arch_ioremap_p4d_supported (void ) +bool arch_vmap_p4d_supported (pgprot_t prot) { -return 0 ; +return false; }
arch/x86/include/asm/vmalloc.h renamed from arch/x86/include/asm/vmalloc.h~mm-huge_vmap-arch-support-cleanup +7 -0
@@ -1,6 +1,13 @@#ifndef _ASM_X86_VMALLOC_H#define _ASM_X86_VMALLOC_H +#include <asm/page.h> #include <asm/pgtable_areas.h> +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP +bool arch_vmap_p4d_supported (pgprot_t prot); +bool arch_vmap_pud_supported (pgprot_t prot); +bool arch_vmap_pmd_supported (pgprot_t prot); +#endif +#endif /* _ASM_X86_VMALLOC_H */
arch/x86/mm/ioremap.c renamed from arch/x86/mm/ioremap.c~mm-huge_vmap-arch-support-cleanup +7 -5
@@ -481,24 +481,26 @@ void iounmap(volatile void __iomem *addr }EXPORT_SYMBOL (iounmap); -int __init arch_ioremap_p4d_supported (void ) +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP +bool arch_vmap_p4d_supported (pgprot_t prot) { -return 0 ; +return false; } -int __init arch_ioremap_pud_supported (void ) +bool arch_vmap_pud_supported (pgprot_t prot) {#ifdef CONFIG_X86_64 return boot_cpu_has (X86_FEATURE_GBPAGES );#else -return 0 ; +return false;#endif } -int __init arch_ioremap_pmd_supported (void ) +bool arch_vmap_pmd_supported (pgprot_t prot) {return boot_cpu_has (X86_FEATURE_PSE ); } +#endif /* * Convert a physical pointer to a virtual kernel pointer for /dev/mem
include/linux/io.h renamed from include/linux/io.h~mm-huge_vmap-arch-support-cleanup +0 -9
@@ -31,15 +31,6 @@ static inline int ioremap_page_range(uns }#endif -#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP -void __init ioremap_huge_init (void ); -int arch_ioremap_p4d_supported (void ); -int arch_ioremap_pud_supported (void ); -int arch_ioremap_pmd_supported (void ); -#else -static inline void ioremap_huge_init (void ) { } -#endif -/* * Managed iomap interface */
include/linux/vmalloc.h renamed from include/linux/vmalloc.h~mm-huge_vmap-arch-support-cleanup +6 -0
@@ -78,6 +78,12 @@ struct vmap_area { }; }; +#ifndef CONFIG_HAVE_ARCH_HUGE_VMAP +static inline bool arch_vmap_p4d_supported (pgprot_t prot) {return false; } +static inline bool arch_vmap_pud_supported (pgprot_t prot) {return false; } +static inline bool arch_vmap_pmd_supported (pgprot_t prot) {return false; } +#endif +/* * Highlevel APIs for driver use */
init/main.c renamed from init/main.c~mm-huge_vmap-arch-support-cleanup +0 -1
@@ -837,7 +837,6 @@ static void __init mm_init(void)pgtable_init ();debug_objects_mem_init ();vmalloc_init (); -ioremap_huge_init ();/* Should be run before the first non-init thread is created */ init_espfix_bsp ();/* Should be run after espfix64 is set up. */
mm/debug_vm_pgtable.c renamed from mm/debug_vm_pgtable.c~mm-huge_vmap-arch-support-cleanup +2 -2
@@ -247,7 +247,7 @@ static void __init pmd_huge_tests(pmd_t {pmd_t pmd; -if (!arch_ioremap_pmd_supported ()) +if (!arch_vmap_pmd_supported (prot))return ;pr_debug ("Validating PMD huge\n" );
@@ -385,7 +385,7 @@ static void __init pud_huge_tests(pud_t {pud_t pud; -if (!arch_ioremap_pud_supported ()) +if (!arch_vmap_pud_supported (prot))return ;pr_debug ("Validating PUD huge\n" );
mm/ioremap.c renamed from mm/ioremap.c~mm-huge_vmap-arch-support-cleanup +40 -54
189 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are