]> git.baikalelectronics.ru Git - kernel.git/commitdiff
arch/kmap: ensure kmap_prot visibility
authorIra Weiny <ira.weiny@intel.com>
Thu, 4 Jun 2020 23:47:50 +0000 (16:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Jun 2020 02:06:22 +0000 (19:06 -0700)
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.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20200507150004.1423069-9-ira.weiny@intel.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/microblaze/include/asm/highmem.h
arch/microblaze/mm/init.c
arch/powerpc/include/asm/highmem.h
arch/powerpc/mm/mem.c
arch/sparc/mm/highmem.c

index c3cbda90391d5e9d00bb9e9f87acc586bd678211..90d96239152f52ce91325031350eb39d8a164882 100644 (file)
@@ -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;
 
 /*
index dcaa53d11339a159e4480cb0b4e136ecf79a6b28..d943f69784b12ced5326dd05a431dbd7575a6332 100644 (file)
@@ -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)
index 373a470df205eff7ea0018a488937758588e16e3..ee5de974c5ef30bce720d5a48e880482c8c85b75 100644 (file)
@@ -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;
 
 /*
index 0fcea21f26b492d70c94c9fe2c380cd9debb0870..7cebb9c818d38c572975e6c200a8fac9c8977df4 100644 (file)
@@ -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",
index 06798ae813b947ef82dbd0bd634a0e94d34537ce..02e23a677c58c40f38538321ff9ba35894bfd419 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/vaddrs.h>
 
 pgprot_t kmap_prot;
+EXPORT_SYMBOL(kmap_prot);
 
 static pte_t *kmap_pte;