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/highmem_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/highmem_32.c')
-rw-r--r-- | arch/x86/mm/highmem_32.c | 20 |
1 files changed, 2 insertions, 18 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 | ||
124 | void *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 | */ |
144 | void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) | 128 | void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) |