aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/highmem_32.c20
-rw-r--r--arch/x86/mm/iomap_32.c18
2 files changed, 19 insertions, 19 deletions
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index f256e73542d7..522db5e3d0bf 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -121,24 +121,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
121 pagefault_enable(); 121 pagefault_enable();
122} 122}
123 123
124void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) 124/*
125{ 125 * This is the same as kmap_atomic() but can map memory that doesn't
126 enum fixed_addresses idx;
127 unsigned long vaddr;
128
129 pagefault_disable();
130
131 debug_kmap_atomic_prot(type);
132
133 idx = type + KM_TYPE_NR * smp_processor_id();
134 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
135 set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
136 arch_flush_lazy_mmu_mode();
137
138 return (void*) vaddr;
139}
140
141/* This is the same as kmap_atomic() but can map memory that doesn't
142 * have a struct page associated with it. 126 * have a struct page associated with it.
143 */ 127 */
144void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) 128void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
index 592984e5496b..6e60ba698cee 100644
--- a/arch/x86/mm/iomap_32.c
+++ b/arch/x86/mm/iomap_32.c
@@ -32,7 +32,23 @@ int is_io_mapping_possible(resource_size_t base, unsigned long size)
32} 32}
33EXPORT_SYMBOL_GPL(is_io_mapping_possible); 33EXPORT_SYMBOL_GPL(is_io_mapping_possible);
34 34
35/* Map 'pfn' using fixed map 'type' and protections 'prot' 35void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
36{
37 enum fixed_addresses idx;
38 unsigned long vaddr;
39
40 pagefault_disable();
41
42 idx = type + KM_TYPE_NR * smp_processor_id();
43 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
44 set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
45 arch_flush_lazy_mmu_mode();
46
47 return (void *)vaddr;
48}
49
50/*
51 * Map 'pfn' using fixed map 'type' and protections 'prot'
36 */ 52 */
37void * 53void *
38iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) 54iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)