| From 327994e18241383adcf4d95cace71ae79c130809 Mon Sep 17 00:00:00 2001 |
| From: Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Date: Fri, 3 Jul 2009 08:30:37 -0500 |
| Subject: [PATCH] frv: Prepare distangling page-fault logic from preempt_count |
| |
| commit 327994e18241383adcf4d95cace71ae79c130809 in tip. |
| |
| With the separation of pagefault_{disable,enable}() from the |
| preempt_count a previously overlooked dependancy became painfully |
| clear. |
| |
| kmap_atomic() is per cpu and relies not only on disabling the |
| pagefault handler, but really needs preemption disabled too. |
| |
| Make this explicit now - so that we can change pagefault_disable(). |
| |
| Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Signed-off-by: Ingo Molnar <mingo@elte.hu> |
| Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
| |
| diff --git a/arch/frv/include/asm/highmem.h b/arch/frv/include/asm/highmem.h |
| index 68e4677..5cb8dff 100644 |
| --- a/arch/frv/include/asm/highmem.h |
| +++ b/arch/frv/include/asm/highmem.h |
| @@ -116,6 +116,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) |
| { |
| unsigned long paddr; |
| |
| + preempt_disable(); |
| pagefault_disable(); |
| debug_kmap_atomic(type); |
| paddr = page_to_phys(page); |
| @@ -173,6 +174,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type) |
| BUG(); |
| } |
| pagefault_enable(); |
| + preempt_enable(); |
| } |
| |
| #endif /* !__ASSEMBLY__ */ |
| -- |
| 1.7.1.1 |
| |