diff options
Diffstat (limited to 'arch/i386/mm/highmem.c')
-rw-r--r-- | arch/i386/mm/highmem.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c index f9f647cdbc7b..178bbfe6cbac 100644 --- a/arch/i386/mm/highmem.c +++ b/arch/i386/mm/highmem.c | |||
@@ -32,7 +32,7 @@ void *kmap_atomic(struct page *page, enum km_type type) | |||
32 | unsigned long vaddr; | 32 | unsigned long vaddr; |
33 | 33 | ||
34 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ | 34 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ |
35 | inc_preempt_count(); | 35 | pagefault_disable(); |
36 | if (!PageHighMem(page)) | 36 | if (!PageHighMem(page)) |
37 | return page_address(page); | 37 | return page_address(page); |
38 | 38 | ||
@@ -52,8 +52,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type) | |||
52 | 52 | ||
53 | #ifdef CONFIG_DEBUG_HIGHMEM | 53 | #ifdef CONFIG_DEBUG_HIGHMEM |
54 | if (vaddr >= PAGE_OFFSET && vaddr < (unsigned long)high_memory) { | 54 | if (vaddr >= PAGE_OFFSET && vaddr < (unsigned long)high_memory) { |
55 | dec_preempt_count(); | 55 | pagefault_enable(); |
56 | preempt_check_resched(); | ||
57 | return; | 56 | return; |
58 | } | 57 | } |
59 | 58 | ||
@@ -68,8 +67,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type) | |||
68 | */ | 67 | */ |
69 | kpte_clear_flush(kmap_pte-idx, vaddr); | 68 | kpte_clear_flush(kmap_pte-idx, vaddr); |
70 | 69 | ||
71 | dec_preempt_count(); | 70 | pagefault_enable(); |
72 | preempt_check_resched(); | ||
73 | } | 71 | } |
74 | 72 | ||
75 | /* This is the same as kmap_atomic() but can map memory that doesn't | 73 | /* This is the same as kmap_atomic() but can map memory that doesn't |
@@ -80,7 +78,7 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) | |||
80 | enum fixed_addresses idx; | 78 | enum fixed_addresses idx; |
81 | unsigned long vaddr; | 79 | unsigned long vaddr; |
82 | 80 | ||
83 | inc_preempt_count(); | 81 | pagefault_disable(); |
84 | 82 | ||
85 | idx = type + KM_TYPE_NR*smp_processor_id(); | 83 | idx = type + KM_TYPE_NR*smp_processor_id(); |
86 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 84 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |