diff options
Diffstat (limited to 'arch/mips/mm/highmem.c')
-rw-r--r-- | arch/mips/mm/highmem.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index 99ebf3ccc222..675502ada5a2 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c | |||
@@ -39,7 +39,7 @@ void *__kmap_atomic(struct page *page, enum km_type type) | |||
39 | unsigned long vaddr; | 39 | unsigned long vaddr; |
40 | 40 | ||
41 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ | 41 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ |
42 | inc_preempt_count(); | 42 | pagefault_disable(); |
43 | if (!PageHighMem(page)) | 43 | if (!PageHighMem(page)) |
44 | return page_address(page); | 44 | return page_address(page); |
45 | 45 | ||
@@ -62,8 +62,7 @@ void __kunmap_atomic(void *kvaddr, enum km_type type) | |||
62 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); | 62 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); |
63 | 63 | ||
64 | if (vaddr < FIXADDR_START) { // FIXME | 64 | if (vaddr < FIXADDR_START) { // FIXME |
65 | dec_preempt_count(); | 65 | pagefault_enable(); |
66 | preempt_check_resched(); | ||
67 | return; | 66 | return; |
68 | } | 67 | } |
69 | 68 | ||
@@ -78,8 +77,7 @@ void __kunmap_atomic(void *kvaddr, enum km_type type) | |||
78 | local_flush_tlb_one(vaddr); | 77 | local_flush_tlb_one(vaddr); |
79 | #endif | 78 | #endif |
80 | 79 | ||
81 | dec_preempt_count(); | 80 | pagefault_enable(); |
82 | preempt_check_resched(); | ||
83 | } | 81 | } |
84 | 82 | ||
85 | #ifndef CONFIG_LIMITED_DMA | 83 | #ifndef CONFIG_LIMITED_DMA |
@@ -92,7 +90,7 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) | |||
92 | enum fixed_addresses idx; | 90 | enum fixed_addresses idx; |
93 | unsigned long vaddr; | 91 | unsigned long vaddr; |
94 | 92 | ||
95 | inc_preempt_count(); | 93 | pagefault_disable(); |
96 | 94 | ||
97 | idx = type + KM_TYPE_NR*smp_processor_id(); | 95 | idx = type + KM_TYPE_NR*smp_processor_id(); |
98 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 96 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |