lkml.org 
[lkml]   [2006]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -rt] update kmap_atomic on !HIGHMEM
I got some scheduling while atomic on x86-64 , and since x86-64 doesn't seem
to have HIGHMEM there's no workaround for kmap_atomic() .

This patch adds the same as i386 HIGHMEM for !HIGHMEM.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

---
include/linux/highmem.h | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletion(-)

Index: linux-2.6.19/include/linux/highmem.h
===================================================================
--- linux-2.6.19.orig/include/linux/highmem.h
+++ linux-2.6.19/include/linux/highmem.h
@@ -42,13 +42,25 @@ static inline void *kmap(struct page *pa

#define kunmap(page) do { (void) (page); } while (0)

+#ifdef CONFIG_PREEMPT_RT
+/*
+ * kmap and kmunmap are above, and they don't really do anything
+ * interesting.
+ */
+# define kmap_atomic(page, idx) kmap(page)
+# define kmap_atomic_pfn(pfn, idx) kmap(pfn_to_page(pfn))
+# define kunmap_atomic(kvaddr, idx) kunmap(kvaddr)
+#else
#define kmap_atomic(page, idx) \
({ pagefault_disable(); page_address(page); })
#define kunmap_atomic(addr, idx) do { pagefault_enable(); } while (0)
#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx))
-#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
#endif

+#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
+
+#endif /* ARCH_HAS_KMAP */
+
#endif /* CONFIG_HIGHMEM */

/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-12-27 20:39    [W:0.758 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site