diff mbox

[RFC,PATCHv2,2/2] mm: highmem: Add definitions for kmap_atomic_flush_unused

Message ID 1365554097-21305-2-git-send-email-lauraa@codeaurora.org (mailing list archive)
State New, archived
Headers show

Commit Message

Laura Abbott April 10, 2013, 12:34 a.m. UTC
kmap_flush_unused does not flush kmap_atomic mappings which
are handled separately. Architectures may have use cases to require
these to be flushed. Add an option to let archtectures define
kmap_atomic flushing to get rid of extra mappings.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
 include/linux/highmem.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 7fb31da..e666549 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -39,6 +39,12 @@  extern unsigned long totalhigh_pages;
 
 void kmap_flush_unused(void);
 
+#ifdef CONFIG_ARCH_WANT_KMAP_ATOMIC_FLUSH
+void kmap_atomic_flush_unused(void);
+#else
+static inline void kmap_atomic_flush_unused(void) { }
+#endif
+
 struct page *kmap_to_page(void *addr);
 
 #else /* CONFIG_HIGHMEM */
@@ -79,6 +85,7 @@  static inline void __kunmap_atomic(void *addr)
 #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
 
 #define kmap_flush_unused()	do {} while(0)
+#define kmap_atomic_flush_unused()	do {} while(0)
 #endif
 
 #endif /* CONFIG_HIGHMEM */