diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-12 22:20:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-12 22:24:53 -0400 |
commit | dd63fdcc63f0f853b116b52e56200a0e0227cf5f (patch) | |
tree | 85cd311ae655787164c7c1247478a69bc251a147 /arch/x86/mm/iomap_32.c | |
parent | 12074fa1073013dd11f1cff41db018d5cff4ecd9 (diff) |
x86: unify kmap_atomic_pfn() and iomap_atomic_prot_pfn(), fix
Impact: build fix
Move kmap_atomic_prot_pfn() to iomap_32.c. It is used on all 32-bit
kernels, while highmem_32.c is only built on highmem kernels.
( Note: the debug_kmap_atomic_prot() check is removed for now, that
problem is handled via another patch. )
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090311143317.GA22244@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/iomap_32.c')
-rw-r--r-- | arch/x86/mm/iomap_32.c | 18 |
1 files changed, 17 insertions, 1 deletions
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 | } |
33 | EXPORT_SYMBOL_GPL(is_io_mapping_possible); | 33 | EXPORT_SYMBOL_GPL(is_io_mapping_possible); |
34 | 34 | ||
35 | /* Map 'pfn' using fixed map 'type' and protections 'prot' | 35 | void *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 | */ |
37 | void * | 53 | void * |
38 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | 54 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) |