The patch titled Subject: arch/kmap: ensure kmap_prot visibility has been added to the -mm tree. Its filename is arch-kmap-ensure-kmap_prot-visibility.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/arch-kmap-ensure-kmap_prot-visibility.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/arch-kmap-ensure-kmap_prot-visibility.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Ira Weiny <ira.weiny@xxxxxxxxx> Subject: arch/kmap: ensure kmap_prot visibility We want to support kmap_atomic_prot() on all architectures and it makes sense to define kmap_atomic() to use the default kmap_prot. So we ensure all arch's have a globally available kmap_prot either as a define or exported symbol. Link: http://lkml.kernel.org/r/20200504010912.982044-9-ira.weiny@xxxxxxxxx Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxxxx> Cc: Christian Koenig <christian.koenig@xxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Chris Zankel <chris@xxxxxxxxxx> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Helge Deller <deller@xxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Huang Rui <ray.huang@xxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Cc: Max Filippov <jcmvbkbc@xxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/microblaze/include/asm/highmem.h | 2 +- arch/microblaze/mm/init.c | 3 --- arch/powerpc/include/asm/highmem.h | 2 +- arch/powerpc/mm/mem.c | 3 --- arch/sparc/mm/highmem.c | 1 + 5 files changed, 3 insertions(+), 8 deletions(-) --- a/arch/microblaze/include/asm/highmem.h~arch-kmap-ensure-kmap_prot-visibility +++ a/arch/microblaze/include/asm/highmem.h @@ -25,8 +25,8 @@ #include <linux/uaccess.h> #include <asm/fixmap.h> +#define kmap_prot PAGE_KERNEL extern pte_t *kmap_pte; -extern pgprot_t kmap_prot; extern pte_t *pkmap_page_table; /* --- a/arch/microblaze/mm/init.c~arch-kmap-ensure-kmap_prot-visibility +++ a/arch/microblaze/mm/init.c @@ -49,8 +49,6 @@ unsigned long lowmem_size; #ifdef CONFIG_HIGHMEM pte_t *kmap_pte; EXPORT_SYMBOL(kmap_pte); -pgprot_t kmap_prot; -EXPORT_SYMBOL(kmap_prot); static inline pte_t *virt_to_kpte(unsigned long vaddr) { @@ -68,7 +66,6 @@ static void __init highmem_init(void) pkmap_page_table = virt_to_kpte(PKMAP_BASE); kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN)); - kmap_prot = PAGE_KERNEL; } static void highmem_setup(void) --- a/arch/powerpc/include/asm/highmem.h~arch-kmap-ensure-kmap_prot-visibility +++ a/arch/powerpc/include/asm/highmem.h @@ -29,8 +29,8 @@ #include <asm/page.h> #include <asm/fixmap.h> +#define kmap_prot PAGE_KERNEL extern pte_t *kmap_pte; -extern pgprot_t kmap_prot; extern pte_t *pkmap_page_table; /* --- a/arch/powerpc/mm/mem.c~arch-kmap-ensure-kmap_prot-visibility +++ a/arch/powerpc/mm/mem.c @@ -64,8 +64,6 @@ bool init_mem_is_free; #ifdef CONFIG_HIGHMEM pte_t *kmap_pte; EXPORT_SYMBOL(kmap_pte); -pgprot_t kmap_prot; -EXPORT_SYMBOL(kmap_prot); #endif pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, @@ -245,7 +243,6 @@ void __init paging_init(void) pkmap_page_table = virt_to_kpte(PKMAP_BASE); kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN)); - kmap_prot = PAGE_KERNEL; #endif /* CONFIG_HIGHMEM */ printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%llx\n", --- a/arch/sparc/mm/highmem.c~arch-kmap-ensure-kmap_prot-visibility +++ a/arch/sparc/mm/highmem.c @@ -33,6 +33,7 @@ #include <asm/vaddrs.h> pgprot_t kmap_prot; +EXPORT_SYMBOL(kmap_prot); static pte_t *kmap_pte; _ Patches currently in -mm which might be from ira.weiny@xxxxxxxxx are arch-kmap-remove-bug_on.patch arch-xtensa-move-kmap-build-bug-out-of-the-way.patch arch-kmap-remove-redundant-arch-specific-kmaps.patch arch-kunmap-remove-duplicate-kunmap-implementations.patch x86powerpcmicroblaze-kmap-move-preempt-disable.patch arch-kmap_atomic-consolidate-duplicate-code.patch arch-kunmap_atomic-consolidate-duplicate-code.patch arch-kmap-ensure-kmap_prot-visibility.patch arch-kmap-dont-hard-code-kmap_prot-values.patch arch-kmap-define-kmap_atomic_prot-for-all-archs.patch drm-remove-drm-specific-kmap_atomic-code.patch kmap-remove-kmap_atomic_to_page.patch parisc-kmap-remove-duplicate-kmap-code.patch