aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/highmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/highmem.h')
-rw-r--r--include/linux/highmem.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index bca8e2dfa355..a515eb0afdfb 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -44,8 +44,13 @@ static inline void *kmap(struct page *page)
44 44
45#define kunmap(page) do { (void) (page); } while (0) 45#define kunmap(page) do { (void) (page); } while (0)
46 46
47#define kmap_atomic(page, idx) \ 47#include <asm/kmap_types.h>
48 ({ pagefault_disable(); page_address(page); }) 48
49static inline void *kmap_atomic(struct page *page, enum km_type idx)
50{
51 pagefault_disable();
52 return page_address(page);
53}
49#define kmap_atomic_prot(page, idx, prot) kmap_atomic(page, idx) 54#define kmap_atomic_prot(page, idx, prot) kmap_atomic(page, idx)
50 55
51#define kunmap_atomic(addr, idx) do { pagefault_enable(); } while (0) 56#define kunmap_atomic(addr, idx) do { pagefault_enable(); } while (0)