diff options
| author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-07-01 07:36:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:56:03 -0400 |
| commit | 47e5243afe0bd2a1aca1e1f05dfbcc214267fbc9 (patch) | |
| tree | 4c71d9b03077f597bc627393ea24099b838a4db9 /include | |
| parent | 8ec4d41f88872e6a5980558e362c0174dce54e40 (diff) | |
[PATCH] uml: make copy_*_user atomic
Make __copy_*_user_inatomic really atomic to avoid "Sleeping function called in
atomic context" warnings, especially from futex code.
This is made by adding another kmap_atomic slot and making copy_*_user_skas
use kmap_atomic; also copy_*_user() becomes atomic, but that's true and is not
a problem for i386 (and we can always add might_sleep there as done
elsewhere). For TT mode kmap is not used, so there's no need for this.
I've had to use another slot since both KM_USER0 and KM_USER1 are used
elsewhere and could cause conflicts. Till now we reused the kmap_atomic slot
list from the subarch, but that's not needed as that list must contain the
common ones (used by generic code) + the ones used in architecture specific
code (and Uml till now used none); so I've taken the i386 one after comparing
it with ones from other archs, and added KM_UML_USERCOPY.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-um/kmap_types.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/asm-um/kmap_types.h b/include/asm-um/kmap_types.h index 0b22ad776e76..6c03acdb4405 100644 --- a/include/asm-um/kmap_types.h +++ b/include/asm-um/kmap_types.h | |||
| @@ -6,6 +6,24 @@ | |||
| 6 | #ifndef __UM_KMAP_TYPES_H | 6 | #ifndef __UM_KMAP_TYPES_H |
| 7 | #define __UM_KMAP_TYPES_H | 7 | #define __UM_KMAP_TYPES_H |
| 8 | 8 | ||
| 9 | #include "asm/arch/kmap_types.h" | 9 | /* No more #include "asm/arch/kmap_types.h" ! */ |
| 10 | |||
| 11 | enum km_type { | ||
| 12 | KM_BOUNCE_READ, | ||
| 13 | KM_SKB_SUNRPC_DATA, | ||
| 14 | KM_SKB_DATA_SOFTIRQ, | ||
| 15 | KM_USER0, | ||
| 16 | KM_USER1, | ||
| 17 | KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ | ||
| 18 | KM_BIO_SRC_IRQ, | ||
| 19 | KM_BIO_DST_IRQ, | ||
| 20 | KM_PTE0, | ||
| 21 | KM_PTE1, | ||
| 22 | KM_IRQ0, | ||
| 23 | KM_IRQ1, | ||
| 24 | KM_SOFTIRQ0, | ||
| 25 | KM_SOFTIRQ1, | ||
| 26 | KM_TYPE_NR | ||
| 27 | }; | ||
| 10 | 28 | ||
| 11 | #endif | 29 | #endif |
