File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 7676#define LIME_SUPPORTS_TIMING
7777#endif
7878
79+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION (2 ,6 ,37 ))
80+ #define LIME_USE_KMAP_ATOMIC
81+ #endif
82+
7983#ifdef CONFIG_ZLIB_DEFLATE
8084#define LIME_SUPPORTS_DEFLATE
8185#endif
Original file line number Diff line number Diff line change @@ -288,6 +288,12 @@ static void write_range(struct resource * res) {
288288 DBG ("Padding partial page: vaddr %p size: %lu" , (void * ) i , (unsigned long ) is );
289289 write_padding (is );
290290 } else {
291+ #ifdef LIME_USE_KMAP_ATOMIC
292+ v = kmap_atomic (p );
293+ copy_page (vpage , v );
294+ kunmap_atomic (v );
295+ s = write_vaddr (vpage , is );
296+ #else
291297 v = kmap (p );
292298 /*
293299 * If we need to compute the digest or compress the output
@@ -300,6 +306,7 @@ static void write_range(struct resource * res) {
300306 s = write_vaddr (v , is );
301307 }
302308 kunmap (p );
309+ #endif
303310
304311 if (s < 0 ) {
305312 DBG ("Failed to write page: vaddr %p. Skipping Range..." , v );
You can’t perform that action at this time.
0 commit comments