diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:49:14 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:49:14 -0500 |
| commit | 21e89c0c48bb799beb09181740796fc80c9676e2 (patch) | |
| tree | bd5aef34a980f189ad41c75e881d225bc854bf44 /include | |
| parent | b911a6bdeef5848c468597d040e3407e0aee04ce (diff) | |
| parent | 91c7fbbf63f33c77d8d28de624834a21888842bb (diff) | |
Merge branch 'fscache' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/dma-buf.h | 99 | ||||
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/fscache-cache.h | 71 | ||||
| -rw-r--r-- | include/linux/fscache.h | 50 | ||||
| -rw-r--r-- | include/linux/platform_data/serial-omap.h | 51 | ||||
| -rw-r--r-- | include/linux/platform_data/usb-omap.h | 3 | ||||
| -rw-r--r-- | include/linux/virtio.h | 25 | ||||
| -rw-r--r-- | include/linux/virtio_scsi.h | 28 | ||||
| -rw-r--r-- | include/sound/soc-dai.h | 1 | ||||
| -rw-r--r-- | include/sound/soc.h | 1 | ||||
| -rw-r--r-- | include/uapi/linux/virtio_ids.h | 1 | ||||
| -rw-r--r-- | include/video/omap-panel-tfp410.h | 2 |
12 files changed, 209 insertions, 124 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index eb48f3816df9..bd2e52ccc4f2 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
| @@ -156,7 +156,6 @@ static inline void get_dma_buf(struct dma_buf *dmabuf) | |||
| 156 | get_file(dmabuf->file); | 156 | get_file(dmabuf->file); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | #ifdef CONFIG_DMA_SHARED_BUFFER | ||
| 160 | struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, | 159 | struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, |
| 161 | struct device *dev); | 160 | struct device *dev); |
| 162 | void dma_buf_detach(struct dma_buf *dmabuf, | 161 | void dma_buf_detach(struct dma_buf *dmabuf, |
| @@ -184,103 +183,5 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, | |||
| 184 | unsigned long); | 183 | unsigned long); |
| 185 | void *dma_buf_vmap(struct dma_buf *); | 184 | void *dma_buf_vmap(struct dma_buf *); |
| 186 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); | 185 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); |
| 187 | #else | ||
| 188 | |||
| 189 | static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, | ||
| 190 | struct device *dev) | ||
| 191 | { | ||
| 192 | return ERR_PTR(-ENODEV); | ||
| 193 | } | ||
| 194 | |||
| 195 | static inline void dma_buf_detach(struct dma_buf *dmabuf, | ||
| 196 | struct dma_buf_attachment *dmabuf_attach) | ||
| 197 | { | ||
| 198 | return; | ||
| 199 | } | ||
| 200 | |||
| 201 | static inline struct dma_buf *dma_buf_export(void *priv, | ||
| 202 | const struct dma_buf_ops *ops, | ||
| 203 | size_t size, int flags) | ||
| 204 | { | ||
| 205 | return ERR_PTR(-ENODEV); | ||
| 206 | } | ||
| 207 | |||
| 208 | static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags) | ||
| 209 | { | ||
| 210 | return -ENODEV; | ||
| 211 | } | ||
| 212 | |||
| 213 | static inline struct dma_buf *dma_buf_get(int fd) | ||
| 214 | { | ||
| 215 | return ERR_PTR(-ENODEV); | ||
| 216 | } | ||
| 217 | |||
| 218 | static inline void dma_buf_put(struct dma_buf *dmabuf) | ||
| 219 | { | ||
| 220 | return; | ||
| 221 | } | ||
| 222 | |||
| 223 | static inline struct sg_table *dma_buf_map_attachment( | ||
| 224 | struct dma_buf_attachment *attach, enum dma_data_direction write) | ||
| 225 | { | ||
| 226 | return ERR_PTR(-ENODEV); | ||
| 227 | } | ||
| 228 | |||
| 229 | static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, | ||
| 230 | struct sg_table *sg, enum dma_data_direction dir) | ||
| 231 | { | ||
| 232 | return; | ||
| 233 | } | ||
| 234 | |||
| 235 | static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, | ||
| 236 | size_t start, size_t len, | ||
| 237 | enum dma_data_direction dir) | ||
| 238 | { | ||
| 239 | return -ENODEV; | ||
| 240 | } | ||
| 241 | |||
| 242 | static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf, | ||
| 243 | size_t start, size_t len, | ||
| 244 | enum dma_data_direction dir) | ||
| 245 | { | ||
| 246 | } | ||
| 247 | |||
| 248 | static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf, | ||
| 249 | unsigned long pnum) | ||
| 250 | { | ||
| 251 | return NULL; | ||
| 252 | } | ||
| 253 | |||
| 254 | static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf, | ||
| 255 | unsigned long pnum, void *vaddr) | ||
| 256 | { | ||
| 257 | } | ||
| 258 | |||
| 259 | static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum) | ||
| 260 | { | ||
| 261 | return NULL; | ||
| 262 | } | ||
| 263 | |||
| 264 | static inline void dma_buf_kunmap(struct dma_buf *dmabuf, | ||
| 265 | unsigned long pnum, void *vaddr) | ||
| 266 | { | ||
| 267 | } | ||
| 268 | |||
| 269 | static inline int dma_buf_mmap(struct dma_buf *dmabuf, | ||
| 270 | struct vm_area_struct *vma, | ||
| 271 | unsigned long pgoff) | ||
| 272 | { | ||
| 273 | return -ENODEV; | ||
| 274 | } | ||
| 275 | |||
| 276 | static inline void *dma_buf_vmap(struct dma_buf *dmabuf) | ||
| 277 | { | ||
| 278 | return NULL; | ||
| 279 | } | ||
| 280 | |||
| 281 | static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) | ||
| 282 | { | ||
| 283 | } | ||
| 284 | #endif /* CONFIG_DMA_SHARED_BUFFER */ | ||
| 285 | 186 | ||
| 286 | #endif /* __DMA_BUF_H__ */ | 187 | #endif /* __DMA_BUF_H__ */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 05cd238ad941..7617ee04f066 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1994,6 +1994,7 @@ struct filename { | |||
| 1994 | bool separate; /* should "name" be freed? */ | 1994 | bool separate; /* should "name" be freed? */ |
| 1995 | }; | 1995 | }; |
| 1996 | 1996 | ||
| 1997 | extern long vfs_truncate(struct path *, loff_t); | ||
| 1997 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 1998 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
| 1998 | struct file *filp); | 1999 | struct file *filp); |
| 1999 | extern int do_fallocate(struct file *file, int mode, loff_t offset, | 2000 | extern int do_fallocate(struct file *file, int mode, loff_t offset, |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index ce31408b1e47..5dfa0aa216b6 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -75,6 +75,16 @@ extern wait_queue_head_t fscache_cache_cleared_wq; | |||
| 75 | typedef void (*fscache_operation_release_t)(struct fscache_operation *op); | 75 | typedef void (*fscache_operation_release_t)(struct fscache_operation *op); |
| 76 | typedef void (*fscache_operation_processor_t)(struct fscache_operation *op); | 76 | typedef void (*fscache_operation_processor_t)(struct fscache_operation *op); |
| 77 | 77 | ||
| 78 | enum fscache_operation_state { | ||
| 79 | FSCACHE_OP_ST_BLANK, /* Op is not yet submitted */ | ||
| 80 | FSCACHE_OP_ST_INITIALISED, /* Op is initialised */ | ||
| 81 | FSCACHE_OP_ST_PENDING, /* Op is blocked from running */ | ||
| 82 | FSCACHE_OP_ST_IN_PROGRESS, /* Op is in progress */ | ||
| 83 | FSCACHE_OP_ST_COMPLETE, /* Op is complete */ | ||
| 84 | FSCACHE_OP_ST_CANCELLED, /* Op has been cancelled */ | ||
| 85 | FSCACHE_OP_ST_DEAD /* Op is now dead */ | ||
| 86 | }; | ||
| 87 | |||
| 78 | struct fscache_operation { | 88 | struct fscache_operation { |
| 79 | struct work_struct work; /* record for async ops */ | 89 | struct work_struct work; /* record for async ops */ |
| 80 | struct list_head pend_link; /* link in object->pending_ops */ | 90 | struct list_head pend_link; /* link in object->pending_ops */ |
| @@ -86,10 +96,10 @@ struct fscache_operation { | |||
| 86 | #define FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */ | 96 | #define FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */ |
| 87 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ | 97 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ |
| 88 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ | 98 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ |
| 89 | #define FSCACHE_OP_DEAD 6 /* op is now dead */ | 99 | #define FSCACHE_OP_DEC_READ_CNT 6 /* decrement object->n_reads on destruction */ |
| 90 | #define FSCACHE_OP_DEC_READ_CNT 7 /* decrement object->n_reads on destruction */ | 100 | #define FSCACHE_OP_KEEP_FLAGS 0x0070 /* flags to keep when repurposing an op */ |
| 91 | #define FSCACHE_OP_KEEP_FLAGS 0xc0 /* flags to keep when repurposing an op */ | ||
| 92 | 101 | ||
| 102 | enum fscache_operation_state state; | ||
| 93 | atomic_t usage; | 103 | atomic_t usage; |
| 94 | unsigned debug_id; /* debugging ID */ | 104 | unsigned debug_id; /* debugging ID */ |
| 95 | 105 | ||
| @@ -106,6 +116,7 @@ extern atomic_t fscache_op_debug_id; | |||
| 106 | extern void fscache_op_work_func(struct work_struct *work); | 116 | extern void fscache_op_work_func(struct work_struct *work); |
| 107 | 117 | ||
| 108 | extern void fscache_enqueue_operation(struct fscache_operation *); | 118 | extern void fscache_enqueue_operation(struct fscache_operation *); |
| 119 | extern void fscache_op_complete(struct fscache_operation *, bool); | ||
| 109 | extern void fscache_put_operation(struct fscache_operation *); | 120 | extern void fscache_put_operation(struct fscache_operation *); |
