Commit 327994e1 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Thomas Gleixner

frv: Prepare distangling page-fault logic from preempt_count

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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ab70f1d5
...@@ -116,6 +116,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) ...@@ -116,6 +116,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
{ {
unsigned long paddr; unsigned long paddr;
preempt_disable();
pagefault_disable(); pagefault_disable();
debug_kmap_atomic(type); debug_kmap_atomic(type);
paddr = page_to_phys(page); paddr = page_to_phys(page);
...@@ -173,6 +174,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type) ...@@ -173,6 +174,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
BUG(); BUG();
} }
pagefault_enable(); pagefault_enable();
preempt_enable();
} }
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment