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