]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Merge branch 'kmap_atomic' of git://github.com/congwang/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 Jul 2012 18:26:48 +0000 (11:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 Jul 2012 18:26:48 +0000 (11:26 -0700)
Pull final kmap_atomic cleanups from Cong Wang:
 "This should be the final round of cleanup, as the definitions of enum
  km_type finally get removed from the whole tree.  The patches have
  been in linux-next for a long time."

* 'kmap_atomic' of git://github.com/congwang/linux:
  pipe: remove KM_USER0 from comments
  vmalloc: remove KM_USER0 from comments
  feature-removal-schedule.txt: remove kmap_atomic(page, km_type)
  tile: remove km_type definitions
  um: remove km_type definitions
  asm-generic: remove km_type definitions
  avr32: remove km_type definitions
  frv: remove km_type definitions
  powerpc: remove km_type definitions
  arm: remove km_type definitions
  highmem: remove the deprecated form of kmap_atomic
  tile: remove usage of enum km_type
  frv: remove the second parameter of kmap_atomic_primary()
  jbd2: remove the second argument of kmap_atomic

18 files changed:
Documentation/feature-removal-schedule.txt
arch/arm/include/asm/kmap_types.h
arch/avr32/include/asm/kmap_types.h
arch/frv/include/asm/highmem.h
arch/frv/include/asm/kmap_types.h
arch/frv/mb93090-mb00/pci-dma.c
arch/frv/mm/cache-page.c
arch/frv/mm/highmem.c
arch/powerpc/include/asm/kmap_types.h
arch/tile/include/asm/kmap_types.h
arch/tile/mm/highmem.c
arch/um/include/asm/kmap_types.h
fs/jbd2/commit.c
fs/pipe.c
include/asm-generic/kmap_types.h
include/linux/highmem.h
include/linux/pipe_fs_i.h
mm/vmalloc.c

index 61d1a89baeaf0032436a72412cd973e648673fb1..76112dac76592f4454fbdb20d43437079aef6c92 100644 (file)
@@ -512,14 +512,6 @@ Who:       Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
 
 ----------------------------
 
-What:  kmap_atomic(page, km_type)
-When:  3.5
-Why:   The old kmap_atomic() with two arguments is deprecated, we only
-       keep it for backward compatibility for few cycles and then drop it.
-Who:   Cong Wang <amwang@redhat.com>
-
-----------------------------
-
 What:  get_robust_list syscall
 When:  2013
 Why:   There appear to be no production users of the get_robust_list syscall,
index e51b1e81df05d01abadb493f0ae808f5778cc11e..83eb2f7729113f9a7d23caf67e80dc20f9150bea 100644 (file)
@@ -4,30 +4,6 @@
 /*
  * This is the "bare minimum".  AIO seems to require this.
  */
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_L1_CACHE,
-       KM_L2_CACHE,
-       KM_KDB,
-       KM_TYPE_NR
-};
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-#define KM_NMI         (-1)
-#define KM_NMI_PTE     (-1)
-#define KM_IRQ_PTE     (-1)
-#endif
+#define KM_TYPE_NR 16
 
 #endif
index b7f5c6870107544024c03383bfe6974126b46e77..479330b89796fe1aeefc116da4f6727fab494e64 100644 (file)
@@ -2,29 +2,9 @@
 #define __ASM_AVR32_KMAP_TYPES_H
 
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
+# define KM_TYPE_NR 29
 #else
-# define D(n)
+# define KM_TYPE_NR 14
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_PTE2,
-D(10)  KM_IRQ0,
-D(11)  KM_IRQ1,
-D(12)  KM_SOFTIRQ0,
-D(13)  KM_SOFTIRQ1,
-D(14)  KM_TYPE_NR
-};
-
-#undef D
-
 #endif /* __ASM_AVR32_KMAP_TYPES_H */
index 716956a5317ba7a8fbda6be0b650771204bffb7e..b3adc93611f32c51ae10716e0decfa8e40ac8b9d 100644 (file)
@@ -76,15 +76,16 @@ extern struct page *kmap_atomic_to_page(void *ptr);
 
 #ifndef __ASSEMBLY__
 
-#define __kmap_atomic_primary(type, paddr, ampr)                                               \
+#define __kmap_atomic_primary(cached, paddr, ampr)                                             \
 ({                                                                                             \
        unsigned long damlr, dampr;                                                             \
                                                                                                \
        dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V;             \
                                                                                                \
-       if (type != __KM_CACHE)                                                                 \
+       if (!cached)                                                                            \
                asm volatile("movgs %0,dampr"#ampr :: "r"(dampr) : "memory");                   \
        else                                                                                    \
+               /* cache flush page attachment point */                                         \
                asm volatile("movgs %0,iampr"#ampr"\n"                                          \
                             "movgs %0,dampr"#ampr"\n"                                          \
                             :: "r"(dampr) : "memory"                                           \
@@ -112,29 +113,20 @@ extern struct page *kmap_atomic_to_page(void *ptr);
        (void *) damlr;                                                                           \
 })
 
-static inline void *kmap_atomic_primary(struct page *page, enum km_type type)
+static inline void *kmap_atomic_primary(struct page *page)
 {
        unsigned long paddr;
 
        pagefault_disable();
        paddr = page_to_phys(page);
 
-       switch (type) {
-        case 0:                return __kmap_atomic_primary(0, paddr, 2);
-        case 1:                return __kmap_atomic_primary(1, paddr, 3);
-        case 2:                return __kmap_atomic_primary(2, paddr, 4);
-        case 3:                return __kmap_atomic_primary(3, paddr, 5);
-
-       default:
-               BUG();
-               return NULL;
-       }
+        return __kmap_atomic_primary(1, paddr, 2);
 }
 
-#define __kunmap_atomic_primary(type, ampr)                            \
+#define __kunmap_atomic_primary(cached, ampr)                          \
 do {                                                                   \
        asm volatile("movgs gr0,dampr"#ampr"\n" ::: "memory");          \
-       if (type == __KM_CACHE)                                         \
+       if (cached)                                                     \
                asm volatile("movgs gr0,iampr"#ampr"\n" ::: "memory");  \
 } while(0)
 
@@ -143,17 +135,9 @@ do {                                                                       \
        asm volatile("tlbpr %0,gr0,#4,#1" : : "r"(vaddr) : "memory");   \
 } while(0)
 
-static inline void kunmap_atomic_primary(void *kvaddr, enum km_type type)
+static inline void kunmap_atomic_primary(void *kvaddr)
 {
-       switch (type) {
-        case 0:                __kunmap_atomic_primary(0, 2);  break;
-        case 1:                __kunmap_atomic_primary(1, 3);  break;
-        case 2:                __kunmap_atomic_primary(2, 4);  break;
-        case 3:                __kunmap_atomic_primary(3, 5);  break;
-
-       default:
-               BUG();
-       }
+        __kunmap_atomic_primary(1, 2);
        pagefault_enable();
 }
 
index f8e16b2a58047c35877fe8d8637133af25ec8023..43901f2209637b2aeea32905389f62e2217237bc 100644 (file)
@@ -2,28 +2,6 @@
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
-enum km_type {
-       /* arch specific kmaps - change the numbers attached to these at your peril */
-       __KM_CACHE,             /* cache flush page attachment point */
-       __KM_PGD,               /* current page directory */
-       __KM_ITLB_PTD,          /* current instruction TLB miss page table lookup */
-       __KM_DTLB_PTD,          /* current data TLB miss page table lookup */
-
-       /* general kmaps */
-        KM_BOUNCE_READ,
-        KM_SKB_SUNRPC_DATA,
-        KM_SKB_DATA_SOFTIRQ,
-        KM_USER0,
-        KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#define KM_TYPE_NR 17
 
 #endif
index 4f8d8bcdc7de53a2d4b7cbf89989a27243e59dea..82478979ac9a8c46c38e3b7746d284f3fe593da6 100644 (file)
@@ -62,14 +62,14 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
        dampr2 = __get_DAMPR(2);
 
        for (i = 0; i < nents; i++) {
-               vaddr = kmap_atomic_primary(sg_page(&sg[i]), __KM_CACHE);
+               vaddr = kmap_atomic_primary(sg_page(&sg[i]));
 
                frv_dcache_writeback((unsigned long) vaddr,
                                     (unsigned long) vaddr + PAGE_SIZE);
 
        }
 
-       kunmap_atomic_primary(vaddr, __KM_CACHE);
+       kunmap_atomic_primary(vaddr);
        if (dampr2) {
                __set_DAMPR(2, dampr2);
                __set_IAMPR(2, dampr2);
index b24ade27a0f09210002916bf0c164aed73777abc..8e09dae0ec3f28c4d25666e34e8c4d613e486900 100644 (file)
@@ -26,11 +26,11 @@ void flush_dcache_page(struct page *page)
 
        dampr2 = __get_DAMPR(2);
 
-       vaddr = kmap_atomic_primary(page, __KM_CACHE);
+       vaddr = kmap_atomic_primary(page);
 
        frv_dcache_writeback((unsigned long) vaddr, (unsigned long) vaddr + PAGE_SIZE);
 
-       kunmap_atomic_primary(vaddr, __KM_CACHE);
+       kunmap_atomic_primary(vaddr);
 
        if (dampr2) {
                __set_DAMPR(2, dampr2);
@@ -54,12 +54,12 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
 
        dampr2 = __get_DAMPR(2);
 
-       vaddr = kmap_atomic_primary(page, __KM_CACHE);
+       vaddr = kmap_atomic_primary(page);
 
        start = (start & ~PAGE_MASK) | (unsigned long) vaddr;
        frv_cache_wback_inv(start, start + len);
 
-       kunmap_atomic_primary(vaddr, __KM_CACHE);
+       kunmap_atomic_primary(vaddr);
 
        if (dampr2) {
                __set_DAMPR(2, dampr2);
index 31902c9d5be5d69f6566744356a568f9f4df41a3..bed9a9bd3c10c84e004c845839f0ad53c0565e45 100644 (file)
@@ -50,11 +50,11 @@ void *kmap_atomic(struct page *page)
        /*
         * The first 4 primary maps are reserved for architecture code
         */
-       case 0:         return __kmap_atomic_primary(4, paddr, 6);
-       case 1:         return __kmap_atomic_primary(5, paddr, 7);
-       case 2:         return __kmap_atomic_primary(6, paddr, 8);
-       case 3:         return __kmap_atomic_primary(7, paddr, 9);
-       case 4:         return __kmap_atomic_primary(8, paddr, 10);
+       case 0:         return __kmap_atomic_primary(0, paddr, 6);
+       case 1:         return __kmap_atomic_primary(0, paddr, 7);
+       case 2:         return __kmap_atomic_primary(0, paddr, 8);
+       case 3:         return __kmap_atomic_primary(0, paddr, 9);
+       case 4:         return __kmap_atomic_primary(0, paddr, 10);
 
        case 5 ... 5 + NR_TLB_LINES - 1:
                return __kmap_atomic_secondary(type - 5, paddr);
@@ -70,11 +70,11 @@ void __kunmap_atomic(void *kvaddr)
 {
        int type = kmap_atomic_idx();
        switch (type) {
-       case 0:         __kunmap_atomic_primary(4, 6);  break;
-       case 1:         __kunmap_atomic_primary(5, 7);  break;
-       case 2:         __kunmap_atomic_primary(6, 8);  break;
-       case 3:         __kunmap_atomic_primary(7, 9);  break;
-       case 4:         __kunmap_atomic_primary(8, 10); break;
+       case 0:         __kunmap_atomic_primary(0, 6);  break;
+       case 1:         __kunmap_atomic_primary(0, 7);  break;
+       case 2:         __kunmap_atomic_primary(0, 8);  break;
+       case 3:         __kunmap_atomic_primary(0, 9);  break;
+       case 4:         __kunmap_atomic_primary(0, 10); break;
 
        case 5 ... 5 + NR_TLB_LINES - 1:
                __kunmap_atomic_secondary(type - 5, kvaddr);
index bca8fdcd254240c82c9fb7b272da6721bc7b966d..5acabbd7ac6f7816f707382d1b2ce6b53b52022e 100644 (file)
  * 2 of the License, or (at your option) any later version.
  */
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_PPC_SYNC_PAGE,
-       KM_PPC_SYNC_ICACHE,
-       KM_KDB,
-       KM_TYPE_NR
-};
-
-/*
- * This is a temporary build fix that (so they say on lkml....) should no longer
- * be required after 2.6.33, because of changes planned to the kmap code.
- * Let's try to remove this cruft then.
- */
-#ifdef CONFIG_DEBUG_HIGHMEM
-#define KM_NMI         (-1)
-#define KM_NMI_PTE     (-1)
-#define KM_IRQ_PTE     (-1)
-#endif
+#define KM_TYPE_NR 16
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_KMAP_TYPES_H */
index 3d0f202462609e1401b4737b905cb324332d8b4c..92b28e3e997270fd0601ccf147f7f08c6bfcb758 100644 (file)
  * adds 4MB of required address-space.  For now we leave KM_TYPE_NR
  * set to depth 8.
  */
-enum km_type {
-       KM_TYPE_NR = 8
-};
-
-/*
- * We provide dummy definitions of all the stray values that used to be
- * required for kmap_atomic() and no longer are.
- */
-enum {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_SYNC_ICACHE,
-       KM_SYNC_DCACHE,
-       KM_UML_USERCOPY,
-       KM_IRQ_PTE,
-       KM_NMI,
-       KM_NMI_PTE,
-       KM_KDB
-};
+#define        KM_TYPE_NR 8
 
 #endif /* _ASM_TILE_KMAP_TYPES_H */
index ef8e5a62b6e37b99cff19e7dc0bac2b26e03fd33..347d123b14be961785fb2031727371c18b95723a 100644 (file)
@@ -93,7 +93,7 @@ static DEFINE_PER_CPU(struct kmap_amps, amps);
  * If we examine it earlier we are exposed to a race where it looks
  * writable earlier, but becomes immutable before we write the PTE.
  */
-static void kmap_atomic_register(struct page *page, enum km_type type,
+static void kmap_atomic_register(struct page *page, int type,
                                 unsigned long va, pte_t *ptep, pte_t pteval)
 {
        unsigned long flags;
index 6c03acdb4405bf0eb1fc4a05d546cebf25aae6e7..2e0a6b1d83000a15cf4695608e1733ed5f538dcc 100644 (file)
@@ -8,22 +8,6 @@
 
 /* No more #include "asm/arch/kmap_types.h" ! */
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_UML_USERCOPY,        /* UML specific, for copy_*_user - used in do_op_one_page */
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#define KM_TYPE_NR 14
 
 #endif
index 216f4299f65e7e2f1e26859c8e1247cdf71c55df..af5280fb579bf392f4f3ca58a4c021568655c104 100644 (file)
@@ -349,12 +349,12 @@ static void jbd2_block_tag_csum_set(journal_t *j, journal_block_tag_t *tag,
                return;
 
        sequence = cpu_to_be32(sequence);
-       addr = kmap_atomic(page, KM_USER0);
+       addr = kmap_atomic(page);
        csum = jbd2_chksum(j, j->j_csum_seed, (__u8 *)&sequence,
                          sizeof(sequence));
        csum = jbd2_chksum(j, csum, addr + offset_in_page(bh->b_data),
                          bh->b_size);
-       kunmap_atomic(addr, KM_USER0);
+       kunmap_atomic(addr);
 
        tag->t_checksum = cpu_to_be32(csum);
 }
index 49c1065256fd10d9d5fdca3cf449b1e56bd58a0a..95cbd6b227e6fb05735126a00296bb7230224429 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -224,7 +224,7 @@ static void anon_pipe_buf_release(struct pipe_inode_info *pipe,
  *     and the caller has to be careful not to fault before calling
  *     the unmap function.
  *
- *     Note that this function occupies KM_USER0 if @atomic != 0.
+ *     Note that this function calls kmap_atomic() if @atomic != 0.
  */
 void *generic_pipe_buf_map(struct pipe_inode_info *pipe,
                           struct pipe_buffer *buf, int atomic)
index 0232ccb76f2b18d86b15992c3c6afa45c83a3340..90f99c74dd386b5412ae36ba0a9ba6ba14e63e55 100644 (file)
@@ -2,39 +2,9 @@
 #define _ASM_GENERIC_KMAP_TYPES_H
 
 #ifdef __WITH_KM_FENCE
-# define KMAP_D(n) __KM_FENCE_##n ,
+# define KM_TYPE_NR 41
 #else
-# define KMAP_D(n)
+# define KM_TYPE_NR 20
 #endif
 
-enum km_type {
-KMAP_D(0)      KM_BOUNCE_READ,
-KMAP_D(1)      KM_SKB_SUNRPC_DATA,
-KMAP_D(2)      KM_SKB_DATA_SOFTIRQ,
-KMAP_D(3)      KM_USER0,
-KMAP_D(4)      KM_USER1,
-KMAP_D(5)      KM_BIO_SRC_IRQ,
-KMAP_D(6)      KM_BIO_DST_IRQ,
-KMAP_D(7)      KM_PTE0,
-KMAP_D(8)      KM_PTE1,
-KMAP_D(9)      KM_IRQ0,
-KMAP_D(10)     KM_IRQ1,
-KMAP_D(11)     KM_SOFTIRQ0,
-KMAP_D(12)     KM_SOFTIRQ1,
-KMAP_D(13)     KM_SYNC_ICACHE,
-KMAP_D(14)     KM_SYNC_DCACHE,
-/* UML specific, for copy_*_user - used in do_op_one_page */
-KMAP_D(15)     KM_UML_USERCOPY,
-KMAP_D(16)     KM_IRQ_PTE,
-KMAP_D(17)     KM_NMI,
-KMAP_D(18)     KM_NMI_PTE,
-KMAP_D(19)     KM_KDB,
-/*
- * Remember to update debug_kmap_atomic() when adding new kmap types!
- */
-KMAP_D(20)     KM_TYPE_NR
-};
-
-#undef KMAP_D
-
 #endif
index d3999b4e26ccfa49090f2a99927af235eedca6aa..774fa47b3b5b2a19f810a166682e1a0912827f3c 100644 (file)
@@ -109,55 +109,16 @@ static inline void kmap_atomic_idx_pop(void)
 
 #endif
 
-/*
- * NOTE:
- * kmap_atomic() and kunmap_atomic() with two arguments are deprecated.
- * We only keep them for backward compatibility, any usage of them
- * are now warned.
- */
-
-#define PASTE(a, b) a ## b
-#define PASTE2(a, b) PASTE(a, b)
-
-#define NARG_(_2, _1, n, ...) n
-#define NARG(...) NARG_(__VA_ARGS__, 2, 1, :)
-
-static inline void __deprecated *kmap_atomic_deprecated(struct page *page,
-                                                       enum km_type km)
-{
-       return kmap_atomic(page);
-}
-
-#define kmap_atomic1(...) kmap_atomic(__VA_ARGS__)
-#define kmap_atomic2(...) kmap_atomic_deprecated(__VA_ARGS__)
-#define kmap_atomic(...) PASTE2(kmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__))
-
-static inline void __deprecated __kunmap_atomic_deprecated(void *addr,
-                                                       enum km_type km)
-{
-       __kunmap_atomic(addr);
-}
-
 /*
  * Prevent people trying to call kunmap_atomic() as if it were kunmap()
  * kunmap_atomic() should get the return value of kmap_atomic, not the page.
  */
-#define kunmap_atomic_deprecated(addr, km)                      \
-do {                                                            \
-       BUILD_BUG_ON(__same_type((addr), struct page *));       \
-       __kunmap_atomic_deprecated(addr, km);                   \
-} while (0)
-
-#define kunmap_atomic_withcheck(addr)                           \
+#define kunmap_atomic(addr)                                     \
 do {                                                            \
        BUILD_BUG_ON(__same_type((addr), struct page *));       \
        __kunmap_atomic(addr);                                  \
 } while (0)
 
-#define kunmap_atomic1(...) kunmap_atomic_withcheck(__VA_ARGS__)
-#define kunmap_atomic2(...) kunmap_atomic_deprecated(__VA_ARGS__)
-#define kunmap_atomic(...) PASTE2(kunmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__))
-/**** End of C pre-processor tricks for deprecated macros ****/
 
 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
 #ifndef clear_user_highpage
index e1ac1ce16fb0b60f07ec961b3ec8f1b7fb0763d0..e11d1c0fc60fc582ef2fd988642d61796566df4c 100644 (file)
@@ -86,11 +86,9 @@ struct pipe_buf_operations {
         * mapping or not. The atomic map is faster, however you can't take
         * page faults before calling ->unmap() again. So if you need to eg
         * access user data through copy_to/from_user(), then you must get
-        * a non-atomic map. ->map() uses the KM_USER0 atomic slot for
-        * atomic maps, so you can't map more than one pipe_buffer at once
-        * and you have to be careful if mapping another page as source
-        * or destination for a copy (IOW, it has to use something else
-        * than KM_USER0).
+        * a non-atomic map. ->map() uses the kmap_atomic slot for
+        * atomic maps, you have to be careful if mapping another page as
+        * source or destination for a copy.
         */
        void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int);
 
index 2aad49981b5740ba496f30dad6eb5d5a0d862edf..c7ac8e1b3ac76480cd05fcfaeab6703e9a2610dd 100644 (file)
@@ -1975,9 +1975,7 @@ static int aligned_vwrite(char *buf, char *addr, unsigned long count)
  *     IOREMAP area is treated as memory hole and no copy is done.
  *
  *     If [addr...addr+count) doesn't includes any intersects with alive
- *     vm_struct area, returns 0.
- *     @buf should be kernel's buffer. Because this function uses KM_USER0,
- *     the caller should guarantee KM_USER0 is not used.
+ *     vm_struct area, returns 0. @buf should be kernel's buffer.
  *
  *     Note: In usual ops, vread() is never necessary because the caller
  *     should know vmalloc() area is valid and can use memcpy().
@@ -2051,9 +2049,7 @@ finished:
  *     IOREMAP area is treated as memory hole and no copy is done.
  *
  *     If [addr...addr+count) doesn't includes any intersects with alive
- *     vm_struct area, returns 0.
- *     @buf should be kernel's buffer. Because this function uses KM_USER0,
- *     the caller should guarantee KM_USER0 is not used.
+ *     vm_struct area, returns 0. @buf should be kernel's buffer.
  *
  *     Note: In usual ops, vwrite() is never necessary because the caller
  *     should know vmalloc() area is valid and can use memcpy().