diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2006-12-06 23:32:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:21 -0500 |
commit | ad76fb6b5a5183255279e0ab5260715481770678 (patch) | |
tree | 31034294d70f5fc3d6166a76fe9b7f8cd19db0fd /include/asm-mips/highmem.h | |
parent | a866374aecc90c7d90619727ccd851ac096b2fc7 (diff) |
[PATCH] mm: k{,um}map_atomic() vs in_atomic()
Make kmap_atomic/kunmap_atomic denote a pagefault disabled scope. All non
trivial implementations already do this anyway.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-mips/highmem.h')
-rw-r--r-- | include/asm-mips/highmem.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h index c976bfaaba83..f8c8182f7f2e 100644 --- a/include/asm-mips/highmem.h +++ b/include/asm-mips/highmem.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/uaccess.h> | ||
24 | #include <asm/kmap_types.h> | 25 | #include <asm/kmap_types.h> |
25 | 26 | ||
26 | /* undef for production */ | 27 | /* undef for production */ |
@@ -70,11 +71,16 @@ static inline void *kmap(struct page *page) | |||
70 | 71 | ||
71 | static inline void *kmap_atomic(struct page *page, enum km_type type) | 72 | static inline void *kmap_atomic(struct page *page, enum km_type type) |
72 | { | 73 | { |
74 | pagefault_disable(); | ||
73 | return page_address(page); | 75 | return page_address(page); |
74 | } | 76 | } |
75 | 77 | ||
76 | static inline void kunmap_atomic(void *kvaddr, enum km_type type) { } | 78 | static inline void kunmap_atomic(void *kvaddr, enum km_type type) |
77 | #define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn)) | 79 | { |
80 | pagefault_enable(); | ||
81 | } | ||
82 | |||
83 | #define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx)) | ||
78 | 84 | ||
79 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) | 85 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) |
80 | 86 | ||