diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/compat_ioctl.h | 26 | ||||
-rw-r--r-- | include/linux/crypto.h | 5 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 10 | ||||
-rw-r--r-- | include/linux/elevator.h | 2 | ||||
-rw-r--r-- | include/linux/ext3_fs_i.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 13 | ||||
-rw-r--r-- | include/linux/i2c-id.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 5 | ||||
-rw-r--r-- | include/linux/jffs2_fs_i.h | 4 | ||||
-rw-r--r-- | include/linux/kernel.h | 9 | ||||
-rw-r--r-- | include/linux/loop.h | 4 | ||||
-rw-r--r-- | include/linux/mm.h | 4 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 6 | ||||
-rw-r--r-- | include/linux/mutex-debug.h | 21 | ||||
-rw-r--r-- | include/linux/mutex.h | 119 | ||||
-rw-r--r-- | include/linux/nfsd/nfsfh.h | 6 | ||||
-rw-r--r-- | include/linux/pipe_fs_i.h | 2 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 5 | ||||
-rw-r--r-- | include/linux/video_decoder.h | 2 | ||||
-rw-r--r-- | include/linux/videodev2.h | 16 |
21 files changed, 214 insertions, 50 deletions
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 119f9d064cc6..339878952f12 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -218,32 +218,6 @@ COMPATIBLE_IOCTL(VT_RESIZE) | |||
218 | COMPATIBLE_IOCTL(VT_RESIZEX) | 218 | COMPATIBLE_IOCTL(VT_RESIZEX) |
219 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) | 219 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) |
220 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) | 220 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) |
221 | /* Little v */ | ||
222 | /* Little v, the video4linux ioctls (conflict?) */ | ||
223 | COMPATIBLE_IOCTL(VIDIOCGCAP) | ||
224 | COMPATIBLE_IOCTL(VIDIOCGCHAN) | ||
225 | COMPATIBLE_IOCTL(VIDIOCSCHAN) | ||
226 | COMPATIBLE_IOCTL(VIDIOCGPICT) | ||
227 | COMPATIBLE_IOCTL(VIDIOCSPICT) | ||
228 | COMPATIBLE_IOCTL(VIDIOCCAPTURE) | ||
229 | COMPATIBLE_IOCTL(VIDIOCKEY) | ||
230 | COMPATIBLE_IOCTL(VIDIOCGAUDIO) | ||
231 | COMPATIBLE_IOCTL(VIDIOCSAUDIO) | ||
232 | COMPATIBLE_IOCTL(VIDIOCSYNC) | ||
233 | COMPATIBLE_IOCTL(VIDIOCMCAPTURE) | ||
234 | COMPATIBLE_IOCTL(VIDIOCGMBUF) | ||
235 | COMPATIBLE_IOCTL(VIDIOCGUNIT) | ||
236 | COMPATIBLE_IOCTL(VIDIOCGCAPTURE) | ||
237 | COMPATIBLE_IOCTL(VIDIOCSCAPTURE) | ||
238 | /* BTTV specific... */ | ||
239 | COMPATIBLE_IOCTL(_IOW('v', BASE_VIDIOCPRIVATE+0, char [256])) | ||
240 | COMPATIBLE_IOCTL(_IOR('v', BASE_VIDIOCPRIVATE+1, char [256])) | ||
241 | COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int)) | ||
242 | COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */ | ||
243 | COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int)) | ||
244 | COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int)) | ||
245 | COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int)) | ||
246 | COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int)) | ||
247 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ | 221 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ |
248 | COMPATIBLE_IOCTL(RTC_AIE_ON) | 222 | COMPATIBLE_IOCTL(RTC_AIE_ON) |
249 | COMPATIBLE_IOCTL(RTC_AIE_OFF) | 223 | COMPATIBLE_IOCTL(RTC_AIE_OFF) |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 3c89df6e7768..d88bf8aa8b47 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> | 4 | * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> |
5 | * Copyright (c) 2002 David S. Miller (davem@redhat.com) | 5 | * Copyright (c) 2002 David S. Miller (davem@redhat.com) |
6 | * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au> | ||
6 | * | 7 | * |
7 | * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> | 8 | * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> |
8 | * and Nettle, by Niels Möller. | 9 | * and Nettle, by Niels Möller. |
@@ -126,7 +127,11 @@ struct crypto_alg { | |||
126 | unsigned int cra_blocksize; | 127 | unsigned int cra_blocksize; |
127 | unsigned int cra_ctxsize; | 128 | unsigned int cra_ctxsize; |
128 | unsigned int cra_alignmask; | 129 | unsigned int cra_alignmask; |
130 | |||
131 | int cra_priority; | ||
132 | |||
129 | const char cra_name[CRYPTO_MAX_ALG_NAME]; | 133 | const char cra_name[CRYPTO_MAX_ALG_NAME]; |
134 | const char cra_driver_name[CRYPTO_MAX_ALG_NAME]; | ||
130 | 135 | ||
131 | union { | 136 | union { |
132 | struct cipher_alg cipher; | 137 | struct cipher_alg cipher; |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index d41df7047ed7..c8cbd90ba375 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -240,6 +240,15 @@ struct dvb_frontend_event { | |||
240 | }; | 240 | }; |
241 | 241 | ||
242 | 242 | ||
243 | /** | ||
244 | * When set, this flag will disable any zigzagging or other "normal" tuning | ||
245 | * behaviour. Additionally, there will be no automatic monitoring of the lock | ||
246 | * status, and hence no frontend events will be generated. If a frontend device | ||
247 | * is closed, this flag will be automatically turned off when the device is | ||
248 | * reopened read-write. | ||
249 | */ | ||
250 | #define FE_TUNE_MODE_ONESHOT 0x01 | ||
251 | |||
243 | 252 | ||
244 | #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info) | 253 | #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info) |
245 | 254 | ||
@@ -260,6 +269,7 @@ struct dvb_frontend_event { | |||
260 | 269 | ||
261 | #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters) | 270 | #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters) |
262 | #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) | 271 | #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) |
272 | #define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */ | ||
263 | #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event) | 273 | #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event) |
264 | 274 | ||
265 | #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */ | 275 | #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 4a6f50e31c73..23fe746a1d51 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -66,7 +66,7 @@ struct elevator_type | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * each queue has an elevator_queue assoicated with it | 69 | * each queue has an elevator_queue associated with it |
70 | */ | 70 | */ |
71 | struct elevator_queue | 71 | struct elevator_queue |
72 | { | 72 | { |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 2914f7b07156..e71dd98dbcae 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
87 | #ifdef CONFIG_EXT3_FS_XATTR | 87 | #ifdef CONFIG_EXT3_FS_XATTR |
88 | /* | 88 | /* |
89 | * Extended attributes can be read independently of the main file | 89 | * Extended attributes can be read independently of the main file |
90 | * data. Taking i_sem even when reading would cause contention | 90 | * data. Taking i_mutex even when reading would cause contention |
91 | * between readers of EAs and writers of regular file data, so | 91 | * between readers of EAs and writers of regular file data, so |
92 | * instead we synchronize on xattr_sem when reading or changing | 92 | * instead we synchronize on xattr_sem when reading or changing |
93 | * EAs. | 93 | * EAs. |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4c82219b0fae..92ae3e2067b0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -219,6 +219,7 @@ extern int dir_notify_enable; | |||
219 | #include <linux/prio_tree.h> | 219 | #include <linux/prio_tree.h> |
220 | #include <linux/init.h> | 220 | #include <linux/init.h> |
221 | #include <linux/sched.h> | 221 | #include <linux/sched.h> |
222 | #include <linux/mutex.h> | ||
222 | 223 | ||
223 | #include <asm/atomic.h> | 224 | #include <asm/atomic.h> |
224 | #include <asm/semaphore.h> | 225 | #include <asm/semaphore.h> |
@@ -484,7 +485,7 @@ struct inode { | |||
484 | unsigned long i_blocks; | 485 | unsigned long i_blocks; |
485 | unsigned short i_bytes; | 486 | unsigned short i_bytes; |
486 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 487 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
487 | struct semaphore i_sem; | 488 | struct mutex i_mutex; |
488 | struct rw_semaphore i_alloc_sem; | 489 | struct rw_semaphore i_alloc_sem; |
489 | struct inode_operations *i_op; | 490 | struct inode_operations *i_op; |
490 | struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 491 | struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
@@ -820,7 +821,7 @@ struct super_block { | |||
820 | unsigned long s_magic; | 821 | unsigned long s_magic; |
821 | struct dentry *s_root; | 822 | struct dentry *s_root; |
822 | struct rw_semaphore s_umount; | 823 | struct rw_semaphore s_umount; |
823 | struct semaphore s_lock; | 824 | struct mutex s_lock; |
824 | int s_count; | 825 | int s_count; |
825 | int s_syncing; | 826 | int s_syncing; |
826 | int s_need_sync_fs; | 827 | int s_need_sync_fs; |
@@ -892,13 +893,13 @@ static inline int has_fs_excl(void) | |||
892 | static inline void lock_super(struct super_block * sb) | 893 | static inline void lock_super(struct super_block * sb) |
893 | { | 894 | { |
894 | get_fs_excl(); | 895 | get_fs_excl(); |
895 | down(&sb->s_lock); | 896 | mutex_lock(&sb->s_lock); |
896 | } | 897 | } |
897 | 898 | ||
898 | static inline void unlock_super(struct super_block * sb) | 899 | static inline void unlock_super(struct super_block * sb) |
899 | { | 900 | { |
900 | put_fs_excl(); | 901 | put_fs_excl(); |
901 | up(&sb->s_lock); | 902 | mutex_unlock(&sb->s_lock); |
902 | } | 903 | } |
903 | 904 | ||
904 | /* | 905 | /* |
@@ -1191,7 +1192,7 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc); | |||
1191 | * directory. The name should be stored in the @name (with the | 1192 | * directory. The name should be stored in the @name (with the |
1192 | * understanding that it is already pointing to a a %NAME_MAX+1 sized | 1193 | * understanding that it is already pointing to a a %NAME_MAX+1 sized |
1193 | * buffer. get_name() should return %0 on success, a negative error code | 1194 | * buffer. get_name() should return %0 on success, a negative error code |
1194 | * or error. @get_name will be called without @parent->i_sem held. | 1195 | * or error. @get_name will be called without @parent->i_mutex held. |
1195 | * | 1196 | * |
1196 | * get_parent: | 1197 | * get_parent: |
1197 | * @get_parent should find the parent directory for the given @child which | 1198 | * @get_parent should find the parent directory for the given @child which |
@@ -1213,7 +1214,7 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc); | |||
1213 | * nfsd_find_fh_dentry() in either the @obj or @parent parameters. | 1214 | * nfsd_find_fh_dentry() in either the @obj or @parent parameters. |
1214 | * | 1215 | * |
1215 | * Locking rules: | 1216 | * Locking rules: |
1216 | * get_parent is called with child->d_inode->i_sem down | 1217 | * get_parent is called with child->d_inode->i_mutex down |
1217 | * get_name is not (which is possibly inconsistent) | 1218 | * get_name is not (which is possibly inconsistent) |
1218 | */ | 1219 | */ |
1219 | 1220 | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index fb46f8d56999..6ff2d365895f 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -103,6 +103,7 @@ | |||
103 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ | 103 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ |
104 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ | 104 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ |
105 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ | 105 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ |
106 | #define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ | ||
106 | 107 | ||
107 | #define I2C_DRIVERID_I2CDEV 900 | 108 | #define I2C_DRIVERID_I2CDEV 900 |
108 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 109 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index ef8d0cbb832f..9a8c05dbe4f3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/bio.h> | 18 | #include <linux/bio.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/completion.h> | ||
21 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
@@ -638,7 +639,7 @@ typedef struct ide_drive_s { | |||
638 | int crc_count; /* crc counter to reduce drive speed */ | 639 | int crc_count; /* crc counter to reduce drive speed */ |
639 | struct list_head list; | 640 | struct list_head list; |
640 | struct device gendev; | 641 | struct device gendev; |
641 | struct semaphore gendev_rel_sem; /* to deal with device release() */ | 642 | struct completion gendev_rel_comp; /* to deal with device release() */ |
642 | } ide_drive_t; | 643 | } ide_drive_t; |
643 | 644 | ||
644 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) | 645 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) |
@@ -794,7 +795,7 @@ typedef struct hwif_s { | |||
794 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 795 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
795 | 796 | ||
796 | struct device gendev; | 797 | struct device gendev; |
797 | struct semaphore gendev_rel_sem; /* To deal with device release() */ | 798 | struct completion gendev_rel_comp; /* To deal with device release() */ |
798 | 799 | ||
799 | void *hwif_data; /* extra hwif data */ | 800 | void *hwif_data; /* extra hwif data */ |
800 | 801 | ||
diff --git a/include/linux/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h index ef85ab56302b..ad565bf9dcc1 100644 --- a/include/linux/jffs2_fs_i.h +++ b/include/linux/jffs2_fs_i.h | |||
@@ -8,11 +8,11 @@ | |||
8 | #include <asm/semaphore.h> | 8 | #include <asm/semaphore.h> |
9 | 9 | ||
10 | struct jffs2_inode_info { | 10 | struct jffs2_inode_info { |
11 | /* We need an internal semaphore similar to inode->i_sem. | 11 | /* We need an internal mutex similar to inode->i_mutex. |
12 | Unfortunately, we can't used the existing one, because | 12 | Unfortunately, we can't used the existing one, because |
13 | either the GC would deadlock, or we'd have to release it | 13 | either the GC would deadlock, or we'd have to release it |
14 | before letting GC proceed. Or we'd have to put ugliness | 14 | before letting GC proceed. Or we'd have to put ugliness |
15 | into the GC code so it didn't attempt to obtain the i_sem | 15 | into the GC code so it didn't attempt to obtain the i_mutex |
16 | for the inode(s) which are already locked */ | 16 | for the inode(s) which are already locked */ |
17 | struct semaphore sem; | 17 | struct semaphore sem; |
18 | 18 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ca7ff8fdd090..d0e6ca3b00ef 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -286,6 +286,15 @@ extern void dump_stack(void); | |||
286 | 1; \ | 286 | 1; \ |
287 | }) | 287 | }) |
288 | 288 | ||
289 | /* | ||
290 | * Check at compile time that 'function' is a certain type, or is a pointer | ||
291 | * to that type (needs to use typedef for the function type.) | ||
292 | */ | ||
293 | #define typecheck_fn(type,function) \ | ||
294 | ({ typeof(type) __tmp = function; \ | ||
295 | (void)__tmp; \ | ||
296 | }) | ||
297 | |||
289 | #endif /* __KERNEL__ */ | 298 | #endif /* __KERNEL__ */ |
290 | 299 | ||
291 | #define SI_LOAD_SHIFT 16 | 300 | #define SI_LOAD_SHIFT 16 |
diff --git a/include/linux/loop.h b/include/linux/loop.h index 40f63c9879d2..f96506782ebe 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -58,9 +58,9 @@ struct loop_device { | |||
58 | struct bio *lo_bio; | 58 | struct bio *lo_bio; |
59 | struct bio *lo_biotail; | 59 | struct bio *lo_biotail; |
60 | int lo_state; | 60 | int lo_state; |
61 | struct semaphore lo_sem; | 61 | struct completion lo_done; |
62 | struct completion lo_bh_done; | ||
62 | struct semaphore lo_ctl_mutex; | 63 | struct semaphore lo_ctl_mutex; |
63 | struct semaphore lo_bh_mutex; | ||
64 | int lo_pending; | 64 | int lo_pending; |
65 | 65 | ||
66 | request_queue_t *lo_queue; | 66 | request_queue_t *lo_queue; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index df80e63903b5..3f1fafc0245e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/rbtree.h> | 13 | #include <linux/rbtree.h> |
14 | #include <linux/prio_tree.h> | 14 | #include <linux/prio_tree.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/mutex.h> | ||
16 | 17 | ||
17 | struct mempolicy; | 18 | struct mempolicy; |
18 | struct anon_vma; | 19 | struct anon_vma; |
@@ -1024,6 +1025,9 @@ static inline void vm_stat_account(struct mm_struct *mm, | |||
1024 | static inline void | 1025 | static inline void |
1025 | kernel_map_pages(struct page *page, int numpages, int enable) | 1026 | kernel_map_pages(struct page *page, int numpages, int enable) |
1026 | { | 1027 | { |
1028 | if (!PageHighMem(page) && !enable) | ||
1029 | mutex_debug_check_no_locks_freed(page_address(page), | ||
1030 | page_address(page + numpages)); | ||
1027 | } | 1031 | } |
1028 | #endif | 1032 | #endif |
1029 | 1033 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index aef6042f8f0b..ccd3e13de1e8 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -27,14 +27,15 @@ struct mmc_command { | |||
27 | #define MMC_RSP_MASK (3 << 0) | 27 | #define MMC_RSP_MASK (3 << 0) |
28 | #define MMC_RSP_CRC (1 << 3) /* expect valid crc */ | 28 | #define MMC_RSP_CRC (1 << 3) /* expect valid crc */ |
29 | #define MMC_RSP_BUSY (1 << 4) /* card may send busy */ | 29 | #define MMC_RSP_BUSY (1 << 4) /* card may send busy */ |
30 | #define MMC_RSP_OPCODE (1 << 5) /* response contains opcode */ | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * These are the response types, and correspond to valid bit | 33 | * These are the response types, and correspond to valid bit |
33 | * patterns of the above flags. One additional valid pattern | 34 | * patterns of the above flags. One additional valid pattern |
34 | * is all zeros, which means we don't expect a response. | 35 | * is all zeros, which means we don't expect a response. |
35 | */ | 36 | */ |
36 | #define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC) | 37 | #define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
37 | #define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY) | 38 | #define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
38 | #define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) | 39 | #define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) |
39 | #define MMC_RSP_R3 (MMC_RSP_SHORT) | 40 | #define MMC_RSP_R3 (MMC_RSP_SHORT) |
40 | #define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) | 41 | #define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) |
@@ -64,6 +65,7 @@ struct mmc_data { | |||
64 | #define MMC_DATA_WRITE (1 << 8) | 65 | #define MMC_DATA_WRITE (1 << 8) |
65 | #define MMC_DATA_READ (1 << 9) | 66 | #define MMC_DATA_READ (1 << 9) |
66 | #define MMC_DATA_STREAM (1 << 10) | 67 | #define MMC_DATA_STREAM (1 << 10) |
68 | #define MMC_DATA_MULTI (1 << 11) | ||
67 | 69 | ||
68 | unsigned int bytes_xfered; | 70 | unsigned int bytes_xfered; |
69 | 71 | ||
diff --git a/include/linux/mutex-debug.h b/include/linux/mutex-debug.h new file mode 100644 index 000000000000..0ccd8f983b50 --- /dev/null +++ b/include/linux/mutex-debug.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __LINUX_MUTEX_DEBUG_H | ||
2 | #define __LINUX_MUTEX_DEBUG_H | ||
3 | |||
4 | /* | ||
5 | * Mutexes - debugging helpers: | ||
6 | */ | ||
7 | |||
8 | #define __DEBUG_MUTEX_INITIALIZER(lockname) \ | ||
9 | , .held_list = LIST_HEAD_INIT(lockname.held_list), \ | ||
10 | .name = #lockname , .magic = &lockname | ||
11 | |||
12 | #define mutex_init(sem) __mutex_init(sem, __FUNCTION__) | ||
13 | |||
14 | extern void FASTCALL(mutex_destroy(struct mutex *lock)); | ||
15 | |||
16 | extern void mutex_debug_show_all_locks(void); | ||
17 | extern void mutex_debug_show_held_locks(struct task_struct *filter); | ||
18 | extern void mutex_debug_check_no_locks_held(struct task_struct *task); | ||
19 | extern void mutex_debug_check_no_locks_freed(const void *from, const void *to); | ||
20 | |||
21 | #endif | ||
diff --git a/include/linux/mutex.h b/include/linux/mutex.h new file mode 100644 index 000000000000..9bce0fee68d4 --- /dev/null +++ b/include/linux/mutex.h | |||
@@ -0,0 +1,119 @@ | |||
1 | /* | ||
2 | * Mutexes: blocking mutual exclusion locks | ||
3 | * | ||
4 | * started by Ingo Molnar: | ||
5 | * | ||
6 | * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | ||
7 | * | ||
8 | * This file contains the main data structure and API definitions. | ||
9 | */ | ||
10 | #ifndef __LINUX_MUTEX_H | ||
11 | #define __LINUX_MUTEX_H | ||
12 | |||
13 | #include <linux/list.h> | ||
14 | #include <linux/spinlock_types.h> | ||
15 | |||
16 | #include <asm/atomic.h> | ||
17 | |||
18 | /* | ||
19 | * Simple, straightforward mutexes with strict semantics: | ||
20 | * | ||
21 | * - only one task can hold the mutex at a time | ||
22 | * - only the owner can unlock the mutex | ||
23 | * - multiple unlocks are not permitted | ||
24 | * - recursive locking is not permitted | ||
25 | * - a mutex object must be initialized via the API | ||
26 | * - a mutex object must not be initialized via memset or copying | ||
27 | * - task may not exit with mutex held | ||
28 | * - memory areas where held locks reside must not be freed | ||
29 | * - held mutexes must not be reinitialized | ||
30 | * - mutexes may not be used in irq contexts | ||
31 | * | ||
32 | * These semantics are fully enforced when DEBUG_MUTEXES is | ||
33 | * enabled. Furthermore, besides enforcing the above rules, the mutex | ||
34 | * debugging code also implements a number of additional features | ||
35 | * that make lock debugging easier and faster: | ||
36 | * | ||
37 | * - uses symbolic names of mutexes, whenever they are printed in debug output | ||
38 | * - point-of-acquire tracking, symbolic lookup of function names | ||
39 | * - list of all locks held in the system, printout of them | ||
40 | * - owner tracking | ||
41 | * - detects self-recursing locks and prints out all relevant info | ||
42 | * - detects multi-task circular deadlocks and prints out all affected | ||
43 | * locks and tasks (and only those tasks) | ||
44 | */ | ||
45 | struct mutex { | ||
46 | /* 1: unlocked, 0: locked, negative: locked, possible waiters */ | ||
47 | atomic_t count; | ||
48 | spinlock_t wait_lock; | ||
49 | struct list_head wait_list; | ||
50 | #ifdef CONFIG_DEBUG_MUTEXES | ||
51 | struct thread_info *owner; | ||
52 | struct list_head held_list; | ||
53 | unsigned long acquire_ip; | ||
54 | const char *name; | ||
55 | void *magic; | ||
56 | #endif | ||
57 | }; | ||
58 | |||
59 | /* | ||
60 | * This is the control structure for tasks blocked on mutex, | ||
61 | * which resides on the blocked task's kernel stack: | ||
62 | */ | ||
63 | struct mutex_waiter { | ||
64 | struct list_head list; | ||
65 | struct task_struct *task; | ||
66 | #ifdef CONFIG_DEBUG_MUTEXES | ||
67 | struct mutex *lock; | ||
68 | void *magic; | ||
69 | #endif | ||
70 | }; | ||
71 | |||
72 | #ifdef CONFIG_DEBUG_MUTEXES | ||
73 | # include <linux/mutex-debug.h> | ||
74 | #else | ||
75 | # define __DEBUG_MUTEX_INITIALIZER(lockname) | ||
76 | # define mutex_init(mutex) __mutex_init(mutex, NULL) | ||
77 | # define mutex_destroy(mutex) do { } while (0) | ||
78 | # define mutex_debug_show_all_locks() do { } while (0) | ||
79 | # define mutex_debug_show_held_locks(p) do { } while (0) | ||
80 | # define mutex_debug_check_no_locks_held(task) do { } while (0) | ||
81 | # define mutex_debug_check_no_locks_freed(from, to) do { } while (0) | ||
82 | #endif | ||
83 | |||
84 | #define __MUTEX_INITIALIZER(lockname) \ | ||
85 | { .count = ATOMIC_INIT(1) \ | ||
86 | , .wait_lock = SPIN_LOCK_UNLOCKED \ | ||
87 | , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \ | ||
88 | __DEBUG_MUTEX_INITIALIZER(lockname) } | ||
89 | |||
90 | #define DEFINE_MUTEX(mutexname) \ | ||
91 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ||
92 | |||
93 | extern void fastcall __mutex_init(struct mutex *lock, const char *name); | ||
94 | |||
95 | /*** | ||
96 | * mutex_is_locked - is the mutex locked | ||
97 | * @lock: the mutex to be queried | ||
98 | * | ||
99 | * Returns 1 if the mutex is locked, 0 if unlocked. | ||
100 | */ | ||
101 | static inline int fastcall mutex_is_locked(struct mutex *lock) | ||
102 | { | ||
103 | return atomic_read(&lock->count) != 1; | ||
104 | } | ||
105 | |||
106 | /* | ||
107 | * See kernel/mutex.c for detailed documentation of these APIs. | ||
108 | * Also see Documentation/mutex-design.txt. | ||
109 | */ | ||
110 | extern void fastcall mutex_lock(struct mutex *lock); | ||
111 | extern int fastcall mutex_lock_interruptible(struct mutex *lock); | ||
112 | /* | ||
113 | * NOTE: mutex_trylock() follows the spin_trylock() convention, | ||
114 | * not the down_trylock() convention! | ||
115 | */ | ||
116 | extern int fastcall mutex_trylock(struct mutex *lock); | ||
117 | extern void fastcall mutex_unlock(struct mutex *lock); | ||
118 | |||
119 | #endif | ||
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index bb842ea41033..0798b7781a6e 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -294,7 +294,7 @@ fill_post_wcc(struct svc_fh *fhp) | |||
294 | /* | 294 | /* |
295 | * Lock a file handle/inode | 295 | * Lock a file handle/inode |
296 | * NOTE: both fh_lock and fh_unlock are done "by hand" in | 296 | * NOTE: both fh_lock and fh_unlock are done "by hand" in |
297 | * vfs.c:nfsd_rename as it needs to grab 2 i_sem's at once | 297 | * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once |
298 | * so, any changes here should be reflected there. | 298 | * so, any changes here should be reflected there. |
299 | */ | 299 | */ |
300 | static inline void | 300 | static inline void |
@@ -317,7 +317,7 @@ fh_lock(struct svc_fh *fhp) | |||
317 | } | 317 | } |
318 | 318 | ||
319 | inode = dentry->d_inode; | 319 | inode = dentry->d_inode; |
320 | down(&inode->i_sem); | 320 | mutex_lock(&inode->i_mutex); |
321 | fill_pre_wcc(fhp); | 321 | fill_pre_wcc(fhp); |
322 | fhp->fh_locked = 1; | 322 | fhp->fh_locked = 1; |
323 | } | 323 | } |
@@ -333,7 +333,7 @@ fh_unlock(struct svc_fh *fhp) | |||
333 | 333 | ||
334 | if (fhp->fh_locked) { | 334 | if (fhp->fh_locked) { |
335 | fill_post_wcc(fhp); | 335 | fill_post_wcc(fhp); |
336 | up(&fhp->fh_dentry->d_inode->i_sem); | 336 | mutex_unlock(&fhp->fh_dentry->d_inode->i_mutex); |
337 | fhp->fh_locked = 0; | 337 | fhp->fh_locked = 0; |
338 | } | 338 | } |
339 | } | 339 | } |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 1767073df26f..b12e59c75752 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -37,7 +37,7 @@ struct pipe_inode_info { | |||
37 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ | 37 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ |
38 | #define PIPE_SIZE PAGE_SIZE | 38 | #define PIPE_SIZE PAGE_SIZE |
39 | 39 | ||
40 | #define PIPE_SEM(inode) (&(inode).i_sem) | 40 | #define PIPE_MUTEX(inode) (&(inode).i_mutex) |
41 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) | 41 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) |
42 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) | 42 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) |
43 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) | 43 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 001ab82df051..e276c5ba2bb7 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1857,7 +1857,7 @@ void padd_item(char *item, int total_length, int length); | |||
1857 | #define GET_BLOCK_CREATE 1 /* add anything you need to find block */ | 1857 | #define GET_BLOCK_CREATE 1 /* add anything you need to find block */ |
1858 | #define GET_BLOCK_NO_HOLE 2 /* return -ENOENT for file holes */ | 1858 | #define GET_BLOCK_NO_HOLE 2 /* return -ENOENT for file holes */ |
1859 | #define GET_BLOCK_READ_DIRECT 4 /* read the tail if indirect item not found */ | 1859 | #define GET_BLOCK_READ_DIRECT 4 /* read the tail if indirect item not found */ |
1860 | #define GET_BLOCK_NO_ISEM 8 /* i_sem is not held, don't preallocate */ | 1860 | #define GET_BLOCK_NO_IMUX 8 /* i_mutex is not held, don't preallocate */ |
1861 | #define GET_BLOCK_NO_DANGLE 16 /* don't leave any transactions running */ | 1861 | #define GET_BLOCK_NO_DANGLE 16 /* don't leave any transactions running */ |
1862 | 1862 | ||
1863 | int restart_transaction(struct reiserfs_transaction_handle *th, | 1863 | int restart_transaction(struct reiserfs_transaction_handle *th, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 78eb92ae4d94..85b53f87c703 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -817,6 +817,11 @@ struct task_struct { | |||
817 | /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */ | 817 | /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */ |
818 | spinlock_t proc_lock; | 818 | spinlock_t proc_lock; |
819 | 819 | ||
820 | #ifdef CONFIG_DEBUG_MUTEXES | ||
821 | /* mutex deadlock detection */ | ||
822 | struct mutex_waiter *blocked_on; | ||
823 | #endif | ||
824 | |||
820 | /* journalling filesystem info */ | 825 | /* journalling filesystem info */ |
821 | void *journal_info; | 826 | void *journal_info; |
822 | 827 | ||
diff --git a/include/linux/video_decoder.h b/include/linux/video_decoder.h index 0e9e48b83e3b..121e26da2c18 100644 --- a/include/linux/video_decoder.h +++ b/include/linux/video_decoder.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_VIDEO_DECODER_H | 1 | #ifndef _LINUX_VIDEO_DECODER_H |
2 | #define _LINUX_VIDEO_DECODER_H | 2 | #define _LINUX_VIDEO_DECODER_H |
3 | 3 | ||
4 | #define HAVE_VIDEO_DECODER 1 | ||
5 | |||
4 | struct video_decoder_capability { /* this name is too long */ | 6 | struct video_decoder_capability { /* this name is too long */ |
5 | __u32 flags; | 7 | __u32 flags; |
6 | #define VIDEO_DECODER_PAL 1 /* can decode PAL signal */ | 8 | #define VIDEO_DECODER_PAL 1 /* can decode PAL signal */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 1cded681eb6d..ce40675324bd 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -642,6 +642,12 @@ typedef __u64 v4l2_std_id; | |||
642 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) | 642 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) |
643 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) | 643 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) |
644 | 644 | ||
645 | /* some merged standards */ | ||
646 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) | ||
647 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) | ||
648 | #define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H) | ||
649 | #define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK) | ||
650 | |||
645 | /* some common needed stuff */ | 651 | /* some common needed stuff */ |
646 | #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ | 652 | #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ |
647 | V4L2_STD_PAL_B1 |\ | 653 | V4L2_STD_PAL_B1 |\ |
@@ -662,7 +668,8 @@ typedef __u64 v4l2_std_id; | |||
662 | V4L2_STD_SECAM_G |\ | 668 | V4L2_STD_SECAM_G |\ |
663 | V4L2_STD_SECAM_H |\ | 669 | V4L2_STD_SECAM_H |\ |
664 | V4L2_STD_SECAM_DK |\ | 670 | V4L2_STD_SECAM_DK |\ |
665 | V4L2_STD_SECAM_L) | 671 | V4L2_STD_SECAM_L |\ |
672 | V4L2_STD_SECAM_LC) | ||
666 | 673 | ||
667 | #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ | 674 | #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ |
668 | V4L2_STD_PAL_60 |\ | 675 | V4L2_STD_PAL_60 |\ |
@@ -888,7 +895,6 @@ struct v4l2_audio | |||
888 | 895 | ||
889 | /* Flags for the 'mode' field */ | 896 | /* Flags for the 'mode' field */ |
890 | #define V4L2_AUDMODE_AVL 0x00001 | 897 | #define V4L2_AUDMODE_AVL 0x00001 |
891 | #define V4L2_AUDMODE_32BITS 0x00002 | ||
892 | 898 | ||
893 | struct v4l2_audioout | 899 | struct v4l2_audioout |
894 | { | 900 | { |
@@ -1110,7 +1116,6 @@ int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | |||
1110 | /* names for fancy debug output */ | 1116 | /* names for fancy debug output */ |
1111 | extern char *v4l2_field_names[]; | 1117 | extern char *v4l2_field_names[]; |
1112 | extern char *v4l2_type_names[]; | 1118 | extern char *v4l2_type_names[]; |
1113 | extern char *v4l2_ioctl_names[]; | ||
1114 | 1119 | ||
1115 | /* Compatibility layer interface -- v4l1-compat module */ | 1120 | /* Compatibility layer interface -- v4l1-compat module */ |
1116 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | 1121 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, |
@@ -1118,6 +1123,11 @@ typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | |||
1118 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | 1123 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, |
1119 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | 1124 | int cmd, void *arg, v4l2_kioctl driver_ioctl); |
1120 | 1125 | ||
1126 | /* 32 Bits compatibility layer for 64 bits processors */ | ||
1127 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | ||
1128 | unsigned long arg); | ||
1129 | |||
1130 | |||
1121 | #endif /* __KERNEL__ */ | 1131 | #endif /* __KERNEL__ */ |
1122 | #endif /* __LINUX_VIDEODEV2_H */ | 1132 | #endif /* __LINUX_VIDEODEV2_H */ |
1123 | 1133 | ||