diff options
Diffstat (limited to 'include')
52 files changed, 632 insertions, 335 deletions
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h index 4ae54e07de83..a7b0914348fd 100644 --- a/include/asm-generic/bitsperlong.h +++ b/include/asm-generic/bitsperlong.h | |||
@@ -28,5 +28,9 @@ | |||
28 | #error Inconsistent word size. Check asm/bitsperlong.h | 28 | #error Inconsistent word size. Check asm/bitsperlong.h |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifndef BITS_PER_LONG_LONG | ||
32 | #define BITS_PER_LONG_LONG 64 | ||
33 | #endif | ||
34 | |||
31 | #endif /* __KERNEL__ */ | 35 | #endif /* __KERNEL__ */ |
32 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ | 36 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ |
diff --git a/include/asm-generic/posix_types.h b/include/asm-generic/posix_types.h index 91d44bd4dde3..fe74fccf18db 100644 --- a/include/asm-generic/posix_types.h +++ b/include/asm-generic/posix_types.h | |||
@@ -23,10 +23,6 @@ typedef __kernel_ulong_t __kernel_ino_t; | |||
23 | typedef unsigned int __kernel_mode_t; | 23 | typedef unsigned int __kernel_mode_t; |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifndef __kernel_nlink_t | ||
27 | typedef __kernel_ulong_t __kernel_nlink_t; | ||
28 | #endif | ||
29 | |||
30 | #ifndef __kernel_pid_t | 26 | #ifndef __kernel_pid_t |
31 | typedef int __kernel_pid_t; | 27 | typedef int __kernel_pid_t; |
32 | #endif | 28 | #endif |
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h index 6bd325fedc87..19a240446fca 100644 --- a/include/drm/drm_mem_util.h +++ b/include/drm/drm_mem_util.h | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | 32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) |
33 | { | 33 | { |
34 | if (size != 0 && nmemb > ULONG_MAX / size) | 34 | if (size != 0 && nmemb > SIZE_MAX / size) |
35 | return NULL; | 35 | return NULL; |
36 | 36 | ||
37 | if (size * nmemb <= PAGE_SIZE) | 37 | if (size * nmemb <= PAGE_SIZE) |
@@ -44,7 +44,7 @@ static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | |||
44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | 44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ |
45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | 45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) |
46 | { | 46 | { |
47 | if (size != 0 && nmemb > ULONG_MAX / size) | 47 | if (size != 0 && nmemb > SIZE_MAX / size) |
48 | return NULL; | 48 | return NULL; |
49 | 49 | ||
50 | if (size * nmemb <= PAGE_SIZE) | 50 | if (size * nmemb <= PAGE_SIZE) |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 7185b8f15ced..8760be30b375 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -226,6 +226,7 @@ header-y += kdev_t.h | |||
226 | header-y += kernel.h | 226 | header-y += kernel.h |
227 | header-y += kernelcapi.h | 227 | header-y += kernelcapi.h |
228 | header-y += kernel-page-flags.h | 228 | header-y += kernel-page-flags.h |
229 | header-y += kexec.h | ||
229 | header-y += keyboard.h | 230 | header-y += keyboard.h |
230 | header-y += keyctl.h | 231 | header-y += keyctl.h |
231 | header-y += l2tp.h | 232 | header-y += l2tp.h |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 5d46217f84ad..4e890394ef99 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -577,8 +577,7 @@ extern ssize_t compat_rw_copy_check_uvector(int type, | |||
577 | const struct compat_iovec __user *uvector, | 577 | const struct compat_iovec __user *uvector, |
578 | unsigned long nr_segs, | 578 | unsigned long nr_segs, |
579 | unsigned long fast_segs, struct iovec *fast_pointer, | 579 | unsigned long fast_segs, struct iovec *fast_pointer, |
580 | struct iovec **ret_pointer, | 580 | struct iovec **ret_pointer); |
581 | int check_access); | ||
582 | 581 | ||
583 | extern void __user *compat_alloc_user_space(unsigned long len); | 582 | extern void __user *compat_alloc_user_space(unsigned long len); |
584 | 583 | ||
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 7230bb59a06f..2e9b9ebbeb78 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -177,6 +177,7 @@ extern void put_online_cpus(void); | |||
177 | #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) | 177 | #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) |
178 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | 178 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) |
179 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | 179 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) |
180 | void clear_tasks_mm_cpumask(int cpu); | ||
180 | int cpu_down(unsigned int cpu); | 181 | int cpu_down(unsigned int cpu); |
181 | 182 | ||
182 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | 183 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 917dc5aeb1d4..ebbed2ce6637 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -277,17 +277,13 @@ static inline void put_cred(const struct cred *_cred) | |||
277 | * @task: The task to query | 277 | * @task: The task to query |
278 | * | 278 | * |
279 | * Access the objective credentials of a task. The caller must hold the RCU | 279 | * Access the objective credentials of a task. The caller must hold the RCU |
280 | * readlock or the task must be dead and unable to change its own credentials. | 280 | * readlock. |
281 | * | 281 | * |
282 | * The result of this function should not be passed directly to get_cred(); | 282 | * The result of this function should not be passed directly to get_cred(); |
283 | * rather get_task_cred() should be used instead. | 283 | * rather get_task_cred() should be used instead. |
284 | */ | 284 | */ |
285 | #define __task_cred(task) \ | 285 | #define __task_cred(task) \ |
286 | ({ \ | 286 | rcu_dereference((task)->real_cred) |
287 | const struct task_struct *__t = (task); \ | ||
288 | rcu_dereference_check(__t->real_cred, \ | ||
289 | task_is_dead(__t)); \ | ||
290 | }) | ||
291 | 287 | ||
292 | /** | 288 | /** |
293 | * get_current_cred - Get the current task's subjective credentials | 289 | * get_current_cred - Get the current task's subjective credentials |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index d3fec584e8c3..56377df39124 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -635,6 +635,18 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg( | |||
635 | dir, flags, NULL); | 635 | dir, flags, NULL); |
636 | } | 636 | } |
637 | 637 | ||
638 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
639 | struct rio_dma_ext; | ||
640 | static inline struct dma_async_tx_descriptor *dmaengine_prep_rio_sg( | ||
641 | struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, | ||
642 | enum dma_transfer_direction dir, unsigned long flags, | ||
643 | struct rio_dma_ext *rio_ext) | ||
644 | { | ||
645 | return chan->device->device_prep_slave_sg(chan, sgl, sg_len, | ||
646 | dir, flags, rio_ext); | ||
647 | } | ||
648 | #endif | ||
649 | |||
638 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( | 650 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( |
639 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, | 651 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, |
640 | size_t period_len, enum dma_transfer_direction dir) | 652 | size_t period_len, enum dma_transfer_direction dir) |
diff --git a/include/linux/errno.h b/include/linux/errno.h index 2d09bfa5c262..e0de516374da 100644 --- a/include/linux/errno.h +++ b/include/linux/errno.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define ENOIOCTLCMD 515 /* No ioctl command */ | 17 | #define ENOIOCTLCMD 515 /* No ioctl command */ |
18 | #define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ | 18 | #define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ |
19 | #define EPROBE_DEFER 517 /* Driver requests probe retry */ | 19 | #define EPROBE_DEFER 517 /* Driver requests probe retry */ |
20 | #define EOPENSTALE 518 /* open found a stale dentry */ | ||
20 | 21 | ||
21 | /* Defined for the NFSv3 protocol */ | 22 | /* Defined for the NFSv3 protocol */ |
22 | #define EBADHANDLE 521 /* Illegal NFS file handle */ | 23 | #define EBADHANDLE 521 /* Illegal NFS file handle */ |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index 91bb4f27238c..3c3ef19a625a 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -34,7 +34,7 @@ void eventfd_ctx_put(struct eventfd_ctx *ctx); | |||
34 | struct file *eventfd_fget(int fd); | 34 | struct file *eventfd_fget(int fd); |
35 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); | 35 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); |
36 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); | 36 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); |
37 | int eventfd_signal(struct eventfd_ctx *ctx, int n); | 37 | __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n); |
38 | ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt); | 38 | ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt); |
39 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait, | 39 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait, |
40 | __u64 *cnt); | 40 | __u64 *cnt); |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 3a4cef5322dc..12291a7ee275 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -165,8 +165,8 @@ struct fid { | |||
165 | */ | 165 | */ |
166 | 166 | ||
167 | struct export_operations { | 167 | struct export_operations { |
168 | int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len, | 168 | int (*encode_fh)(struct inode *inode, __u32 *fh, int *max_len, |
169 | int connectable); | 169 | struct inode *parent); |
170 | struct dentry * (*fh_to_dentry)(struct super_block *sb, struct fid *fid, | 170 | struct dentry * (*fh_to_dentry)(struct super_block *sb, struct fid *fid, |
171 | int fh_len, int fh_type); | 171 | int fh_len, int fh_type); |
172 | struct dentry * (*fh_to_parent)(struct super_block *sb, struct fid *fid, | 172 | struct dentry * (*fh_to_parent)(struct super_block *sb, struct fid *fid, |
diff --git a/include/linux/fb.h b/include/linux/fb.h index a3229d7ab9f2..ac3f1c605843 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -611,6 +611,7 @@ struct fb_deferred_io { | |||
611 | struct mutex lock; /* mutex that protects the page list */ | 611 | struct mutex lock; /* mutex that protects the page list */ |
612 | struct list_head pagelist; /* list of touched pages */ | 612 | struct list_head pagelist; /* list of touched pages */ |
613 | /* callback */ | 613 | /* callback */ |
614 | void (*first_io)(struct fb_info *info); | ||
614 | void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); | 615 | void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); |
615 | }; | 616 | }; |
616 | #endif | 617 | #endif |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 598a5892ff2b..51978ed43e97 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -173,6 +173,15 @@ struct inodes_stat_t { | |||
173 | #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) | 173 | #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) |
174 | #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) | 174 | #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) |
175 | 175 | ||
176 | |||
177 | /* | ||
178 | * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector | ||
179 | * that indicates that they should check the contents of the iovec are | ||
180 | * valid, but not check the memory that the iovec elements | ||
181 | * points too. | ||
182 | */ | ||
183 | #define CHECK_IOVEC_ONLY -1 | ||
184 | |||
176 | #define SEL_IN 1 | 185 | #define SEL_IN 1 |
177 | #define SEL_OUT 2 | 186 | #define SEL_OUT 2 |
178 | #define SEL_EX 4 | 187 | #define SEL_EX 4 |
@@ -1683,6 +1692,7 @@ struct inode_operations { | |||
1683 | int (*removexattr) (struct dentry *, const char *); | 1692 | int (*removexattr) (struct dentry *, const char *); |
1684 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1693 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
1685 | u64 len); | 1694 | u64 len); |
1695 | int (*update_time)(struct inode *, struct timespec *, int); | ||
1686 | } ____cacheline_aligned; | 1696 | } ____cacheline_aligned; |
1687 | 1697 | ||
1688 | struct seq_file; | 1698 | struct seq_file; |
@@ -1690,8 +1700,7 @@ struct seq_file; | |||
1690 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, | 1700 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, |
1691 | unsigned long nr_segs, unsigned long fast_segs, | 1701 | unsigned long nr_segs, unsigned long fast_segs, |
1692 | struct iovec *fast_pointer, | 1702 | struct iovec *fast_pointer, |
1693 | struct iovec **ret_pointer, | 1703 | struct iovec **ret_pointer); |
1694 | int check_access); | ||
1695 | 1704 | ||
1696 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); | 1705 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); |
1697 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); | 1706 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); |
@@ -1842,6 +1851,13 @@ static inline void inode_inc_iversion(struct inode *inode) | |||
1842 | spin_unlock(&inode->i_lock); | 1851 | spin_unlock(&inode->i_lock); |
1843 | } | 1852 | } |
1844 | 1853 | ||
1854 | enum file_time_flags { | ||
1855 | S_ATIME = 1, | ||
1856 | S_MTIME = 2, | ||
1857 | S_CTIME = 4, | ||
1858 | S_VERSION = 8, | ||
1859 | }; | ||
1860 | |||
1845 | extern void touch_atime(struct path *); | 1861 | extern void touch_atime(struct path *); |
1846 | static inline void file_accessed(struct file *file) | 1862 | static inline void file_accessed(struct file *file) |
1847 | { | 1863 | { |
@@ -2575,7 +2591,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *); | |||
2575 | extern int inode_newsize_ok(const struct inode *, loff_t offset); | 2591 | extern int inode_newsize_ok(const struct inode *, loff_t offset); |
2576 | extern void setattr_copy(struct inode *inode, const struct iattr *attr); | 2592 | extern void setattr_copy(struct inode *inode, const struct iattr *attr); |
2577 | 2593 | ||
2578 | extern void file_update_time(struct file *file); | 2594 | extern int file_update_time(struct file *file); |
2579 | 2595 | ||
2580 | extern int generic_show_options(struct seq_file *m, struct dentry *root); | 2596 | extern int generic_show_options(struct seq_file *m, struct dentry *root); |
2581 | extern void save_mount_options(struct super_block *sb, char *options); | 2597 | extern void save_mount_options(struct super_block *sb, char *options); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 91d0e0a34ef3..63d966d5c2ea 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -60,7 +60,7 @@ | |||
60 | #define FS_EVENTS_POSS_ON_CHILD (FS_ACCESS | FS_MODIFY | FS_ATTRIB |\ | 60 | #define FS_EVENTS_POSS_ON_CHILD (FS_ACCESS | FS_MODIFY | FS_ATTRIB |\ |
61 | FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN |\ | 61 | FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN |\ |
62 | FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\ | 62 | FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\ |
63 | FS_DELETE) | 63 | FS_DELETE | FS_OPEN_PERM | FS_ACCESS_PERM) |
64 | 64 | ||
65 | #define FS_MOVE (FS_MOVED_FROM | FS_MOVED_TO) | 65 | #define FS_MOVE (FS_MOVED_FROM | FS_MOVED_TO) |
66 | 66 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c91171599cb6..e68a8e53bb59 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -142,8 +142,6 @@ request_any_context_irq(unsigned int irq, irq_handler_t handler, | |||
142 | extern int __must_check | 142 | extern int __must_check |
143 | request_percpu_irq(unsigned int irq, irq_handler_t handler, | 143 | request_percpu_irq(unsigned int irq, irq_handler_t handler, |
144 | const char *devname, void __percpu *percpu_dev_id); | 144 | const char *devname, void __percpu *percpu_dev_id); |
145 | |||
146 | extern void exit_irq_thread(void); | ||
147 | #else | 145 | #else |
148 | 146 | ||
149 | extern int __must_check | 147 | extern int __must_check |
@@ -177,8 +175,6 @@ request_percpu_irq(unsigned int irq, irq_handler_t handler, | |||
177 | { | 175 | { |
178 | return request_irq(irq, handler, 0, devname, percpu_dev_id); | 176 | return request_irq(irq, handler, 0, devname, percpu_dev_id); |
179 | } | 177 | } |
180 | |||
181 | static inline void exit_irq_thread(void) { } | ||
182 | #endif | 178 | #endif |
183 | 179 | ||
184 | extern void free_irq(unsigned int, void *); | 180 | extern void free_irq(unsigned int, void *); |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 8a297a5e794c..5499c92a9153 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -62,6 +62,8 @@ struct ipc_namespace { | |||
62 | unsigned int mq_queues_max; /* initialized to DFLT_QUEUESMAX */ | 62 | unsigned int mq_queues_max; /* initialized to DFLT_QUEUESMAX */ |
63 | unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */ | 63 | unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */ |
64 | unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */ | 64 | unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */ |
65 | unsigned int mq_msg_default; | ||
66 | unsigned int mq_msgsize_default; | ||
65 | 67 | ||
66 | /* user_ns which owns the ipc ns */ | 68 | /* user_ns which owns the ipc ns */ |
67 | struct user_namespace *user_ns; | 69 | struct user_namespace *user_ns; |
@@ -90,11 +92,41 @@ static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {} | |||
90 | 92 | ||
91 | #ifdef CONFIG_POSIX_MQUEUE | 93 | #ifdef CONFIG_POSIX_MQUEUE |
92 | extern int mq_init_ns(struct ipc_namespace *ns); | 94 | extern int mq_init_ns(struct ipc_namespace *ns); |
93 | /* default values */ | 95 | /* |
94 | #define DFLT_QUEUESMAX 256 /* max number of message queues */ | 96 | * POSIX Message Queue default values: |
95 | #define DFLT_MSGMAX 10 /* max number of messages in each queue */ | 97 | * |
96 | #define HARD_MSGMAX (32768*sizeof(void *)/4) | 98 | * MIN_*: Lowest value an admin can set the maximum unprivileged limit to |
97 | #define DFLT_MSGSIZEMAX 8192 /* max message size */ | 99 | * DFLT_*MAX: Default values for the maximum unprivileged limits |
100 | * DFLT_{MSG,MSGSIZE}: Default values used when the user doesn't supply | ||
101 | * an attribute to the open call and the queue must be created | ||
102 | * HARD_*: Highest value the maximums can be set to. These are enforced | ||
103 | * on CAP_SYS_RESOURCE apps as well making them inviolate (so make them | ||
104 | * suitably high) | ||
105 | * | ||
106 | * POSIX Requirements: | ||
107 | * Per app minimum openable message queues - 8. This does not map well | ||
108 | * to the fact that we limit the number of queues on a per namespace | ||
109 | * basis instead of a per app basis. So, make the default high enough | ||
110 | * that no given app should have a hard time opening 8 queues. | ||
111 | * Minimum maximum for HARD_MSGMAX - 32767. I bumped this to 65536. | ||
112 | * Minimum maximum for HARD_MSGSIZEMAX - POSIX is silent on this. However, | ||
113 | * we have run into a situation where running applications in the wild | ||
114 | * require this to be at least 5MB, and preferably 10MB, so I set the | ||
115 | * value to 16MB in hopes that this user is the worst of the bunch and | ||
116 | * the new maximum will handle anyone else. I may have to revisit this | ||
117 | * in the future. | ||
118 | */ | ||
119 | #define MIN_QUEUESMAX 1 | ||
120 | #define DFLT_QUEUESMAX 256 | ||
121 | #define HARD_QUEUESMAX 1024 | ||
122 | #define MIN_MSGMAX 1 | ||
123 | #define DFLT_MSG 10U | ||
124 | #define DFLT_MSGMAX 10 | ||
125 | #define HARD_MSGMAX 65536 | ||
126 | #define MIN_MSGSIZEMAX 128 | ||
127 | #define DFLT_MSGSIZE 8192U | ||
128 | #define DFLT_MSGSIZEMAX 8192 | ||
129 | #define HARD_MSGSIZEMAX (16*1024*1024) | ||
98 | #else | 130 | #else |
99 | static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } | 131 | static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } |
100 | #endif | 132 | #endif |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 912c30a8ddb1..f334c7fab967 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <crypto/hash.h> | ||
34 | #endif | 35 | #endif |
35 | 36 | ||
36 | #define journal_oom_retry 1 | 37 | #define journal_oom_retry 1 |
@@ -147,12 +148,24 @@ typedef struct journal_header_s | |||
147 | #define JBD2_CRC32_CHKSUM 1 | 148 | #define JBD2_CRC32_CHKSUM 1 |
148 | #define JBD2_MD5_CHKSUM 2 | 149 | #define JBD2_MD5_CHKSUM 2 |
149 | #define JBD2_SHA1_CHKSUM 3 | 150 | #define JBD2_SHA1_CHKSUM 3 |
151 | #define JBD2_CRC32C_CHKSUM 4 | ||
150 | 152 | ||
151 | #define JBD2_CRC32_CHKSUM_SIZE 4 | 153 | #define JBD2_CRC32_CHKSUM_SIZE 4 |
152 | 154 | ||
153 | #define JBD2_CHECKSUM_BYTES (32 / sizeof(u32)) | 155 | #define JBD2_CHECKSUM_BYTES (32 / sizeof(u32)) |
154 | /* | 156 | /* |
155 | * Commit block header for storing transactional checksums: | 157 | * Commit block header for storing transactional checksums: |
158 | * | ||
159 | * NOTE: If FEATURE_COMPAT_CHECKSUM (checksum v1) is set, the h_chksum* | ||
160 | * fields are used to store a checksum of the descriptor and data blocks. | ||
161 | * | ||
162 | * If FEATURE_INCOMPAT_CSUM_V2 (checksum v2) is set, then the h_chksum | ||
163 | * field is used to store crc32c(uuid+commit_block). Each journal metadata | ||
164 | * block gets its own checksum, and data block checksums are stored in | ||
165 | * journal_block_tag (in the descriptor). The other h_chksum* fields are | ||
166 | * not used. | ||
167 | * | ||
168 | * Checksum v1 and v2 are mutually exclusive features. | ||
156 | */ | 169 | */ |
157 | struct commit_header { | 170 | struct commit_header { |
158 | __be32 h_magic; | 171 | __be32 h_magic; |
@@ -175,13 +188,19 @@ struct commit_header { | |||
175 | typedef struct journal_block_tag_s | 188 | typedef struct journal_block_tag_s |
176 | { | 189 | { |
177 | __be32 t_blocknr; /* The on-disk block number */ | 190 | __be32 t_blocknr; /* The on-disk block number */ |
178 | __be32 t_flags; /* See below */ | 191 | __be16 t_checksum; /* truncated crc32c(uuid+seq+block) */ |
192 | __be16 t_flags; /* See below */ | ||
179 | __be32 t_blocknr_high; /* most-significant high 32bits. */ | 193 | __be32 t_blocknr_high; /* most-significant high 32bits. */ |
180 | } journal_block_tag_t; | 194 | } journal_block_tag_t; |
181 | 195 | ||
182 | #define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high)) | 196 | #define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high)) |
183 | #define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t)) | 197 | #define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t)) |
184 | 198 | ||
199 | /* Tail of descriptor block, for checksumming */ | ||
200 | struct jbd2_journal_block_tail { | ||
201 | __be32 t_checksum; /* crc32c(uuid+descr_block) */ | ||
202 | }; | ||
203 | |||
185 | /* | 204 | /* |
186 | * The revoke descriptor: used on disk to describe a series of blocks to | 205 | * The revoke descriptor: used on disk to describe a series of blocks to |
187 | * be revoked from the log | 206 | * be revoked from the log |
@@ -192,6 +211,10 @@ typedef struct jbd2_journal_revoke_header_s | |||
192 | __be32 r_count; /* Count of bytes used in the block */ | 211 | __be32 r_count; /* Count of bytes used in the block */ |
193 | } jbd2_journal_revoke_header_t; | 212 | } jbd2_journal_revoke_header_t; |
194 | 213 | ||
214 | /* Tail of revoke block, for checksumming */ | ||
215 | struct jbd2_journal_revoke_tail { | ||
216 | __be32 r_checksum; /* crc32c(uuid+revoke_block) */ | ||
217 | }; | ||
195 | 218 | ||
196 | /* Definitions for the journal tag flags word: */ | 219 | /* Definitions for the journal tag flags word: */ |
197 | #define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */ | 220 | #define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */ |
@@ -241,7 +264,10 @@ typedef struct journal_superblock_s | |||
241 | __be32 s_max_trans_data; /* Limit of data blocks per trans. */ | 264 | __be32 s_max_trans_data; /* Limit of data blocks per trans. */ |
242 | 265 | ||
243 | /* 0x0050 */ | 266 | /* 0x0050 */ |
244 | __u32 s_padding[44]; | 267 | __u8 s_checksum_type; /* checksum type */ |
268 | __u8 s_padding2[3]; | ||
269 | __u32 s_padding[42]; | ||
270 | __be32 s_checksum; /* crc32c(superblock) */ | ||
245 | 271 | ||
246 | /* 0x0100 */ | 272 | /* 0x0100 */ |
247 | __u8 s_users[16*48]; /* ids of all fs'es sharing the log */ | 273 | __u8 s_users[16*48]; /* ids of all fs'es sharing the log */ |
@@ -263,13 +289,15 @@ typedef struct journal_superblock_s | |||
263 | #define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001 | 289 | #define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001 |
264 | #define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002 | 290 | #define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002 |
265 | #define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004 | 291 | #define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004 |
292 | #define JBD2_FEATURE_INCOMPAT_CSUM_V2 0x00000008 | ||
266 | 293 | ||
267 | /* Features known to this kernel version: */ | 294 | /* Features known to this kernel version: */ |
268 | #define JBD2_KNOWN_COMPAT_FEATURES JBD2_FEATURE_COMPAT_CHECKSUM | 295 | #define JBD2_KNOWN_COMPAT_FEATURES JBD2_FEATURE_COMPAT_CHECKSUM |
269 | #define JBD2_KNOWN_ROCOMPAT_FEATURES 0 | 296 | #define JBD2_KNOWN_ROCOMPAT_FEATURES 0 |
270 | #define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | \ | 297 | #define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | \ |
271 | JBD2_FEATURE_INCOMPAT_64BIT | \ | 298 | JBD2_FEATURE_INCOMPAT_64BIT | \ |
272 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) | 299 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT | \ |
300 | JBD2_FEATURE_INCOMPAT_CSUM_V2) | ||
273 | 301 | ||
274 | #ifdef __KERNEL__ | 302 | #ifdef __KERNEL__ |
275 | 303 | ||
@@ -939,6 +967,12 @@ struct journal_s | |||
939 | * superblock pointer here | 967 | * superblock pointer here |
940 | */ | 968 | */ |
941 | void *j_private; | 969 | void *j_private; |
970 | |||
971 | /* Reference to checksum algorithm driver via cryptoapi */ | ||
972 | struct crypto_shash *j_chksum_driver; | ||
973 | |||
974 | /* Precomputed journal UUID checksum for seeding other checksums */ | ||
975 | __u32 j_csum_seed; | ||
942 | }; | 976 | }; |
943 | 977 | ||
944 | /* | 978 | /* |
@@ -1268,6 +1302,25 @@ static inline int jbd_space_needed(journal_t *journal) | |||
1268 | 1302 | ||
1269 | extern int jbd_blocks_per_page(struct inode *inode); | 1303 | extern int jbd_blocks_per_page(struct inode *inode); |
1270 | 1304 | ||
1305 | static inline u32 jbd2_chksum(journal_t *journal, u32 crc, | ||
1306 | const void *address, unsigned int length) | ||
1307 | { | ||
1308 | struct { | ||
1309 | struct shash_desc shash; | ||
1310 | char ctx[crypto_shash_descsize(journal->j_chksum_driver)]; | ||
1311 | } desc; | ||
1312 | int err; | ||
1313 | |||
1314 | desc.shash.tfm = journal->j_chksum_driver; | ||
1315 | desc.shash.flags = 0; | ||
1316 | *(u32 *)desc.ctx = crc; | ||
1317 | |||
1318 | err = crypto_shash_update(&desc.shash, address, length); | ||
1319 | BUG_ON(err); | ||
1320 | |||
1321 | return *(u32 *)desc.ctx; | ||
1322 | } | ||
1323 | |||
1271 | #ifdef __KERNEL__ | 1324 | #ifdef __KERNEL__ |
1272 | 1325 | ||
1273 | #define buffer_trace_init(bh) do {} while (0) | 1326 | #define buffer_trace_init(bh) do {} while (0) |
diff --git a/include/linux/jbd_common.h b/include/linux/jbd_common.h index 6230f8556a4e..6133679bc4c0 100644 --- a/include/linux/jbd_common.h +++ b/include/linux/jbd_common.h | |||
@@ -12,6 +12,7 @@ enum jbd_state_bits { | |||
12 | BH_State, /* Pins most journal_head state */ | 12 | BH_State, /* Pins most journal_head state */ |
13 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ | 13 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ |
14 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ | 14 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ |
15 | BH_Verified, /* Metadata block has been verified ok */ | ||
15 | BH_JBDPrivateStart, /* First bit available for private use by FS */ | 16 | BH_JBDPrivateStart, /* First bit available for private use by FS */ |
16 | }; | 17 | }; |
17 | 18 | ||
@@ -24,6 +25,7 @@ TAS_BUFFER_FNS(Revoked, revoked) | |||
24 | BUFFER_FNS(RevokeValid, revokevalid) | 25 | BUFFER_FNS(RevokeValid, revokevalid) |
25 | TAS_BUFFER_FNS(RevokeValid, revokevalid) | 26 | TAS_BUFFER_FNS(RevokeValid, revokevalid) |
26 | BUFFER_FNS(Freed, freed) | 27 | BUFFER_FNS(Freed, freed) |
28 | BUFFER_FNS(Verified, verified) | ||
27 | 29 | ||
28 | static inline struct buffer_head *jh2bh(struct journal_head *jh) | 30 | static inline struct buffer_head *jh2bh(struct journal_head *jh) |
29 | { | 31 | { |
diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h new file mode 100644 index 000000000000..2dcd1b3aafc8 --- /dev/null +++ b/include/linux/kcmp.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _LINUX_KCMP_H | ||
2 | #define _LINUX_KCMP_H | ||
3 | |||
4 | /* Comparison type */ | ||
5 | enum kcmp_type { | ||
6 | KCMP_FILE, | ||
7 | KCMP_VM, | ||
8 | KCMP_FILES, | ||
9 | KCMP_FS, | ||
10 | KCMP_SIGHAND, | ||
11 | KCMP_IO, | ||
12 | KCMP_SYSVSEM, | ||
13 | |||
14 | KCMP_TYPES, | ||
15 | }; | ||
16 | |||
17 | #endif /* _LINUX_KCMP_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ec55a3c8ba77..e07f5e0c5df4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define LLONG_MAX ((long long)(~0ULL>>1)) | 35 | #define LLONG_MAX ((long long)(~0ULL>>1)) |
36 | #define LLONG_MIN (-LLONG_MAX - 1) | 36 | #define LLONG_MIN (-LLONG_MAX - 1) |
37 | #define ULLONG_MAX (~0ULL) | 37 | #define ULLONG_MAX (~0ULL) |
38 | #define SIZE_MAX (~(size_t)0) | ||
38 | 39 | ||
39 | #define STACK_MAGIC 0xdeadbeef | 40 | #define STACK_MAGIC 0xdeadbeef |
40 | 41 | ||
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 0d7d6a1b172f..37c5f7261142 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -1,8 +1,58 @@ | |||
1 | #ifndef LINUX_KEXEC_H | 1 | #ifndef LINUX_KEXEC_H |
2 | #define LINUX_KEXEC_H | 2 | #define LINUX_KEXEC_H |
3 | 3 | ||
4 | #ifdef CONFIG_KEXEC | 4 | /* kexec system call - It loads the new kernel to boot into. |
5 | * kexec does not sync, or unmount filesystems so if you need | ||
6 | * that to happen you need to do that yourself. | ||
7 | */ | ||
8 | |||
5 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | |||
11 | /* kexec flags for different usage scenarios */ | ||
12 | #define KEXEC_ON_CRASH 0x00000001 | ||
13 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 | ||
14 | #define KEXEC_ARCH_MASK 0xffff0000 | ||
15 | |||
16 | /* These values match the ELF architecture values. | ||
17 | * Unless there is a good reason that should continue to be the case. | ||
18 | */ | ||
19 | #define KEXEC_ARCH_DEFAULT ( 0 << 16) | ||
20 | #define KEXEC_ARCH_386 ( 3 << 16) | ||
21 | #define KEXEC_ARCH_X86_64 (62 << 16) | ||
22 | #define KEXEC_ARCH_PPC (20 << 16) | ||
23 | #define KEXEC_ARCH_PPC64 (21 << 16) | ||
24 | #define KEXEC_ARCH_IA_64 (50 << 16) | ||
25 | #define KEXEC_ARCH_ARM (40 << 16) | ||
26 | #define KEXEC_ARCH_S390 (22 << 16) | ||
27 | #define KEXEC_ARCH_SH (42 << 16) | ||
28 | #define KEXEC_ARCH_MIPS_LE (10 << 16) | ||
29 | #define KEXEC_ARCH_MIPS ( 8 << 16) | ||
30 | |||
31 | /* The artificial cap on the number of segments passed to kexec_load. */ | ||
32 | #define KEXEC_SEGMENT_MAX 16 | ||
33 | |||
34 | #ifndef __KERNEL__ | ||
35 | /* | ||
36 | * This structure is used to hold the arguments that are used when | ||
37 | * loading kernel binaries. | ||
38 | */ | ||
39 | struct kexec_segment { | ||
40 | const void *buf; | ||
41 | size_t bufsz; | ||
42 | const void *mem; | ||
43 | size_t memsz; | ||
44 | }; | ||
45 | |||
46 | /* Load a new kernel image as described by the kexec_segment array | ||
47 | * consisting of passed number of segments at the entry-point address. | ||
48 | * The flags allow different useage types. | ||
49 | */ | ||
50 | extern int kexec_load(void *, size_t, struct kexec_segment *, | ||
51 | unsigned long int); | ||
52 | #endif /* __KERNEL__ */ | ||
53 | |||
54 | #ifdef __KERNEL__ | ||
55 | #ifdef CONFIG_KEXEC | ||
6 | #include <linux/list.h> | 56 | #include <linux/list.h> |
7 | #include <linux/linkage.h> | 57 | #include <linux/linkage.h> |
8 | #include <linux/compat.h> | 58 | #include <linux/compat.h> |
@@ -67,11 +117,10 @@ typedef unsigned long kimage_entry_t; | |||
67 | #define IND_DONE 0x4 | 117 | #define IND_DONE 0x4 |
68 | #define IND_SOURCE 0x8 | 118 | #define IND_SOURCE 0x8 |
69 | 119 | ||
70 | #define KEXEC_SEGMENT_MAX 16 | ||
71 | struct kexec_segment { | 120 | struct kexec_segment { |
72 | void __user *buf; | 121 | void __user *buf; |
73 | size_t bufsz; | 122 | size_t bufsz; |
74 | unsigned long mem; /* User space sees this as a (void *) ... */ | 123 | unsigned long mem; |
75 | size_t memsz; | 124 | size_t memsz; |
76 | }; | 125 | }; |
77 | 126 | ||
@@ -175,25 +224,6 @@ extern struct kimage *kexec_crash_image; | |||
175 | #define kexec_flush_icache_page(page) | 224 | #define kexec_flush_icache_page(page) |
176 | #endif | 225 | #endif |
177 | 226 | ||
178 | #define KEXEC_ON_CRASH 0x00000001 | ||
179 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 | ||
180 | #define KEXEC_ARCH_MASK 0xffff0000 | ||
181 | |||
182 | /* These values match the ELF architecture values. | ||
183 | * Unless there is a good reason that should continue to be the case. | ||
184 | */ | ||
185 | #define KEXEC_ARCH_DEFAULT ( 0 << 16) | ||
186 | #define KEXEC_ARCH_386 ( 3 << 16) | ||
187 | #define KEXEC_ARCH_X86_64 (62 << 16) | ||
188 | #define KEXEC_ARCH_PPC (20 << 16) | ||
189 | #define KEXEC_ARCH_PPC64 (21 << 16) | ||
190 | #define KEXEC_ARCH_IA_64 (50 << 16) | ||
191 | #define KEXEC_ARCH_ARM (40 << 16) | ||
192 | #define KEXEC_ARCH_S390 (22 << 16) | ||
193 | #define KEXEC_ARCH_SH (42 << 16) | ||
194 | #define KEXEC_ARCH_MIPS_LE (10 << 16) | ||
195 | #define KEXEC_ARCH_MIPS ( 8 << 16) | ||
196 | |||
197 | /* List of defined/legal kexec flags */ | 227 | /* List of defined/legal kexec flags */ |
198 | #ifndef CONFIG_KEXEC_JUMP | 228 | #ifndef CONFIG_KEXEC_JUMP |
199 | #define KEXEC_FLAGS KEXEC_ON_CRASH | 229 | #define KEXEC_FLAGS KEXEC_ON_CRASH |
@@ -228,4 +258,5 @@ struct task_struct; | |||
228 | static inline void crash_kexec(struct pt_regs *regs) { } | 258 | static inline void crash_kexec(struct pt_regs *regs) { } |
229 | static inline int kexec_should_crash(struct task_struct *p) { return 0; } | 259 | static inline int kexec_should_crash(struct task_struct *p) { return 0; } |
230 | #endif /* CONFIG_KEXEC */ | 260 | #endif /* CONFIG_KEXEC */ |
261 | #endif /* __KERNEL__ */ | ||
231 | #endif /* LINUX_KEXEC_H */ | 262 | #endif /* LINUX_KEXEC_H */ |
diff --git a/include/linux/key.h b/include/linux/key.h index 5231800770e1..4cd22ed627ef 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -308,9 +308,6 @@ static inline bool key_is_instantiated(const struct key *key) | |||
308 | #ifdef CONFIG_SYSCTL | 308 | #ifdef CONFIG_SYSCTL |
309 | extern ctl_table key_sysctls[]; | 309 | extern ctl_table key_sysctls[]; |
310 | #endif | 310 | #endif |
311 | |||
312 | extern void key_replace_session_keyring(void); | ||
313 | |||
314 | /* | 311 | /* |
315 | * the userspace interface | 312 | * the userspace interface |
316 | */ | 313 | */ |
@@ -334,7 +331,6 @@ extern void key_init(void); | |||
334 | #define key_fsuid_changed(t) do { } while(0) | 331 | #define key_fsuid_changed(t) do { } while(0) |
335 | #define key_fsgid_changed(t) do { } while(0) | 332 | #define key_fsgid_changed(t) do { } while(0) |
336 | #define key_init() do { } while(0) | 333 | #define key_init() do { } while(0) |
337 | #define key_replace_session_keyring() do { } while(0) | ||
338 | 334 | ||
339 | #endif /* CONFIG_KEYS */ | 335 | #endif /* CONFIG_KEYS */ |
340 | #endif /* __KERNEL__ */ | 336 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index dd99c329e161..5398d5807075 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -66,40 +66,10 @@ struct subprocess_info { | |||
66 | void *data; | 66 | void *data; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* Allocate a subprocess_info structure */ | 69 | extern int |
70 | struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, | ||
71 | char **envp, gfp_t gfp_mask); | ||
72 | |||
73 | /* Set various pieces of state into the subprocess_info structure */ | ||
74 | void call_usermodehelper_setfns(struct subprocess_info *info, | ||
75 | int (*init)(struct subprocess_info *info, struct cred *new), | ||
76 | void (*cleanup)(struct subprocess_info *info), | ||
77 | void *data); | ||
78 | |||
79 | /* Actually execute the sub-process */ | ||
80 | int call_usermodehelper_exec(struct subprocess_info *info, int wait); | ||
81 | |||
82 | /* Free the subprocess_info. This is only needed if you're not going | ||
83 | to call call_usermodehelper_exec */ | ||
84 | void call_usermodehelper_freeinfo(struct subprocess_info *info); | ||
85 | |||
86 | static inline int | ||
87 | call_usermodehelper_fns(char *path, char **argv, char **envp, int wait, | 70 | call_usermodehelper_fns(char *path, char **argv, char **envp, int wait, |
88 | int (*init)(struct subprocess_info *info, struct cred *new), | 71 | int (*init)(struct subprocess_info *info, struct cred *new), |
89 | void (*cleanup)(struct subprocess_info *), void *data) | 72 | void (*cleanup)(struct subprocess_info *), void *data); |
90 | { | ||
91 | struct subprocess_info *info; | ||
92 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; | ||
93 | |||
94 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); | ||
95 | |||
96 | if (info == NULL) | ||
97 | return -ENOMEM; | ||
98 | |||
99 | call_usermodehelper_setfns(info, init, cleanup, data); | ||
100 | |||
101 | return call_usermodehelper_exec(info, wait); | ||
102 | } | ||
103 | 73 | ||
104 | static inline int | 74 | static inline int |
105 | call_usermodehelper(char *path, char **argv, char **envp, int wait) | 75 | call_usermodehelper(char *path, char **argv, char **envp, int wait) |
diff --git a/include/linux/lglock.h b/include/linux/lglock.h index 87f402ccec55..f01e5f6d1f07 100644 --- a/include/linux/lglock.h +++ b/include/linux/lglock.h | |||
@@ -23,28 +23,17 @@ | |||
23 | #include <linux/lockdep.h> | 23 | #include <linux/lockdep.h> |
24 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
25 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
26 | #include <linux/notifier.h> | ||
26 | 27 | ||
27 | /* can make br locks by using local lock for read side, global lock for write */ | 28 | /* can make br locks by using local lock for read side, global lock for write */ |
28 | #define br_lock_init(name) name##_lock_init() | 29 | #define br_lock_init(name) lg_lock_init(name, #name) |
29 | #define br_read_lock(name) name##_local_lock() | 30 | #define br_read_lock(name) lg_local_lock(name) |
30 | #define br_read_unlock(name) name##_local_unlock() | 31 | #define br_read_unlock(name) lg_local_unlock(name) |
31 | #define br_write_lock(name) name##_global_lock_online() | 32 | #define br_write_lock(name) lg_global_lock(name) |
32 | #define br_write_unlock(name) name##_global_unlock_online() | 33 | #define br_write_unlock(name) lg_global_unlock(name) |
33 | 34 | ||
34 | #define DECLARE_BRLOCK(name) DECLARE_LGLOCK(name) | ||
35 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) | 35 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) |
36 | 36 | ||
37 | |||
38 | #define lg_lock_init(name) name##_lock_init() | ||
39 | #define lg_local_lock(name) name##_local_lock() | ||
40 | #define lg_local_unlock(name) name##_local_unlock() | ||
41 | #define lg_local_lock_cpu(name, cpu) name##_local_lock_cpu(cpu) | ||
42 | #define lg_local_unlock_cpu(name, cpu) name##_local_unlock_cpu(cpu) | ||
43 | #define lg_global_lock(name) name##_global_lock() | ||
44 | #define lg_global_unlock(name) name##_global_unlock() | ||
45 | #define lg_global_lock_online(name) name##_global_lock_online() | ||
46 | #define lg_global_unlock_online(name) name##_global_unlock_online() | ||
47 | |||
48 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 37 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
49 | #define LOCKDEP_INIT_MAP lockdep_init_map | 38 | #define LOCKDEP_INIT_MAP lockdep_init_map |
50 | 39 | ||
@@ -59,142 +48,26 @@ | |||
59 | #define DEFINE_LGLOCK_LOCKDEP(name) | 48 | #define DEFINE_LGLOCK_LOCKDEP(name) |
60 | #endif | 49 | #endif |
61 | 50 | ||
62 | 51 | struct lglock { | |
63 | #define DECLARE_LGLOCK(name) \ | 52 | arch_spinlock_t __percpu *lock; |
64 | extern void name##_lock_init(void); \ | 53 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
65 | extern void name##_local_lock(void); \ | 54 | struct lock_class_key lock_key; |
66 | extern void name##_local_unlock(void); \ | 55 | struct lockdep_map lock_dep_map; |
67 | extern void name##_local_lock_cpu(int cpu); \ | 56 | #endif |
68 | extern void name##_local_unlock_cpu(int cpu); \ | 57 | }; |
69 | extern void name##_global_lock(void); \ | ||
70 | extern void name##_global_unlock(void); \ | ||
71 | extern void name##_global_lock_online(void); \ | ||
72 | extern void name##_global_unlock_online(void); \ | ||
73 | 58 | ||
74 | #define DEFINE_LGLOCK(name) \ | 59 | #define DEFINE_LGLOCK(name) \ |
75 | \ | 60 | DEFINE_LGLOCK_LOCKDEP(name); \ |
76 | DEFINE_SPINLOCK(name##_cpu_lock); \ | 61 | DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ |
77 | cpumask_t name##_cpus __read_mostly; \ | 62 | = __ARCH_SPIN_LOCK_UNLOCKED; \ |
78 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ | 63 | struct lglock name = { .lock = &name ## _lock } |
79 | DEFINE_LGLOCK_LOCKDEP(name); \ | 64 | |
80 | \ | 65 | void lg_lock_init(struct lglock *lg, char *name); |
81 | static int \ | 66 | void lg_local_lock(struct lglock *lg); |
82 | name##_lg_cpu_callback(struct notifier_block *nb, \ | 67 | void lg_local_unlock(struct lglock *lg); |
83 | unsigned long action, void *hcpu) \ | 68 | void lg_local_lock_cpu(struct lglock *lg, int cpu); |
84 | { \ | 69 | void lg_local_unlock_cpu(struct lglock *lg, int cpu); |
85 | switch (action & ~CPU_TASKS_FROZEN) { \ | 70 | void lg_global_lock(struct lglock *lg); |
86 | case CPU_UP_PREPARE: \ | 71 | void lg_global_unlock(struct lglock *lg); |
87 | spin_lock(&name##_cpu_lock); \ | 72 | |
88 | cpu_set((unsigned long)hcpu, name##_cpus); \ | ||
89 | spin_unlock(&name##_cpu_lock); \ | ||
90 | break; \ | ||
91 | case CPU_UP_CANCELED: case CPU_DEAD: \ | ||
92 | spin_lock(&name##_cpu_lock); \ | ||
93 | cpu_clear((unsigned long)hcpu, name##_cpus); \ | ||
94 | spin_unlock(&name##_cpu_lock); \ | ||
95 | } \ | ||
96 | return NOTIFY_OK; \ | ||
97 | } \ | ||
98 | static struct notifier_block name##_lg_cpu_notifier = { \ | ||
99 | .notifier_call = name##_lg_cpu_callback, \ | ||
100 | }; \ | ||
101 | void name##_lock_init(void) { \ | ||
102 | int i; \ | ||
103 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ | ||
104 | for_each_possible_cpu(i) { \ | ||
105 | arch_spinlock_t *lock; \ | ||
106 | lock = &per_cpu(name##_lock, i); \ | ||
107 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ | ||
108 | } \ | ||
109 | register_hotcpu_notifier(&name##_lg_cpu_notifier); \ | ||
110 | get_online_cpus(); \ | ||
111 | for_each_online_cpu(i) \ | ||
112 | cpu_set(i, name##_cpus); \ | ||
113 | put_online_cpus(); \ | ||
114 | } \ | ||
115 | EXPORT_SYMBOL(name##_lock_init); \ | ||
116 | \ | ||
117 | void name##_local_lock(void) { \ | ||
118 | arch_spinlock_t *lock; \ | ||
119 | preempt_disable(); \ | ||
120 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
121 | lock = &__get_cpu_var(name##_lock); \ | ||
122 | arch_spin_lock(lock); \ | ||
123 | } \ | ||
124 | EXPORT_SYMBOL(name##_local_lock); \ | ||
125 | \ | ||
126 | void name##_local_unlock(void) { \ | ||
127 | arch_spinlock_t *lock; \ | ||
128 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
129 | lock = &__get_cpu_var(name##_lock); \ | ||
130 | arch_spin_unlock(lock); \ | ||
131 | preempt_enable(); \ | ||
132 | } \ | ||
133 | EXPORT_SYMBOL(name##_local_unlock); \ | ||
134 | \ | ||
135 | void name##_local_lock_cpu(int cpu) { \ | ||
136 | arch_spinlock_t *lock; \ | ||
137 | preempt_disable(); \ | ||
138 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
139 | lock = &per_cpu(name##_lock, cpu); \ | ||
140 | arch_spin_lock(lock); \ | ||
141 | } \ | ||
142 | EXPORT_SYMBOL(name##_local_lock_cpu); \ | ||
143 | \ | ||
144 | void name##_local_unlock_cpu(int cpu) { \ | ||
145 | arch_spinlock_t *lock; \ | ||
146 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
147 | lock = &per_cpu(name##_lock, cpu); \ | ||
148 | arch_spin_unlock(lock); \ | ||
149 | preempt_enable(); \ | ||
150 | } \ | ||
151 | EXPORT_SYMBOL(name##_local_unlock_cpu); \ | ||
152 | \ | ||
153 | void name##_global_lock_online(void) { \ | ||
154 | int i; \ | ||
155 | spin_lock(&name##_cpu_lock); \ | ||
156 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
157 | for_each_cpu(i, &name##_cpus) { \ | ||
158 | arch_spinlock_t *lock; \ | ||
159 | lock = &per_cpu(name##_lock, i); \ | ||
160 | arch_spin_lock(lock); \ | ||
161 | } \ | ||
162 | } \ | ||
163 | EXPORT_SYMBOL(name##_global_lock_online); \ | ||
164 | \ | ||
165 | void name##_global_unlock_online(void) { \ | ||
166 | int i; \ | ||
167 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
168 | for_each_cpu(i, &name##_cpus) { \ | ||
169 | arch_spinlock_t *lock; \ | ||
170 | lock = &per_cpu(name##_lock, i); \ | ||
171 | arch_spin_unlock(lock); \ | ||
172 | } \ | ||
173 | spin_unlock(&name##_cpu_lock); \ | ||
174 | } \ | ||
175 | EXPORT_SYMBOL(name##_global_unlock_online); \ | ||
176 | \ | ||
177 | void name##_global_lock(void) { \ | ||
178 | int i; \ | ||
179 | preempt_disable(); \ | ||
180 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
181 | for_each_possible_cpu(i) { \ | ||
182 | arch_spinlock_t *lock; \ | ||
183 | lock = &per_cpu(name##_lock, i); \ | ||
184 | arch_spin_lock(lock); \ | ||
185 | } \ | ||
186 | } \ | ||
187 | EXPORT_SYMBOL(name##_global_lock); \ | ||
188 | \ | ||
189 | void name##_global_unlock(void) { \ | ||
190 | int i; \ | ||
191 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
192 | for_each_possible_cpu(i) { \ | ||
193 | arch_spinlock_t *lock; \ | ||
194 | lock = &per_cpu(name##_lock, i); \ | ||
195 | arch_spin_unlock(lock); \ | ||
196 | } \ | ||
197 | preempt_enable(); \ | ||
198 | } \ | ||
199 | EXPORT_SYMBOL(name##_global_unlock); | ||
200 | #endif | 73 | #endif |
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 11a966e5f829..4d24d64578c4 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -54,7 +54,7 @@ extern void nlmclnt_done(struct nlm_host *host); | |||
54 | 54 | ||
55 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, | 55 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, |
56 | struct file_lock *fl); | 56 | struct file_lock *fl); |
57 | extern int lockd_up(void); | 57 | extern int lockd_up(struct net *net); |
58 | extern void lockd_down(void); | 58 | extern void lockd_down(struct net *net); |
59 | 59 | ||
60 | #endif /* LINUX_LOCKD_BIND_H */ | 60 | #endif /* LINUX_LOCKD_BIND_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index ce26716238c3..b36d08ce5c57 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1392,7 +1392,7 @@ extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned lo | |||
1392 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1392 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1393 | unsigned long len, unsigned long flags, | 1393 | unsigned long len, unsigned long flags, |
1394 | vm_flags_t vm_flags, unsigned long pgoff); | 1394 | vm_flags_t vm_flags, unsigned long pgoff); |
1395 | extern unsigned long do_mmap(struct file *, unsigned long, | 1395 | extern unsigned long do_mmap_pgoff(struct file *, unsigned long, |
1396 | unsigned long, unsigned long, | 1396 | unsigned long, unsigned long, |
1397 | unsigned long, unsigned long); | 1397 | unsigned long, unsigned long); |
1398 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); | 1398 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 34066e65fdeb..11cc2ac67e75 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -21,8 +21,9 @@ | |||
21 | #define CT_LE_W(v) cpu_to_le16(v) | 21 | #define CT_LE_W(v) cpu_to_le16(v) |
22 | #define CT_LE_L(v) cpu_to_le32(v) | 22 | #define CT_LE_L(v) cpu_to_le32(v) |
23 | 23 | ||
24 | #define MSDOS_ROOT_INO 1 /* The root inode number */ | ||
25 | #define MSDOS_FSINFO_INO 2 /* Used for managing the FSINFO block */ | ||
24 | 26 | ||
25 | #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ | ||
26 | #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ | 27 | #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ |
27 | 28 | ||
28 | /* directory limit */ | 29 | /* directory limit */ |
diff --git a/include/linux/mtd/gpmi-nand.h b/include/linux/mtd/gpmi-nand.h index 69b6dbf46b5e..ed3c4e09f3d1 100644 --- a/include/linux/mtd/gpmi-nand.h +++ b/include/linux/mtd/gpmi-nand.h | |||
@@ -23,12 +23,12 @@ | |||
23 | #define GPMI_NAND_RES_SIZE 6 | 23 | #define GPMI_NAND_RES_SIZE 6 |
24 | 24 | ||
25 | /* Resource names for the GPMI NAND driver. */ | 25 | /* Resource names for the GPMI NAND driver. */ |
26 | #define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "GPMI NAND GPMI Registers" | 26 | #define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "gpmi-nand" |
27 | #define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt" | 27 | #define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt" |
28 | #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "GPMI NAND BCH Registers" | 28 | #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch" |
29 | #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "GPMI NAND BCH Interrupt" | 29 | #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch" |
30 | #define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels" | 30 | #define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels" |
31 | #define GPMI_NAND_DMA_INTERRUPT_RES_NAME "GPMI NAND DMA Interrupt" | 31 | #define GPMI_NAND_DMA_INTERRUPT_RES_NAME "gpmi-dma" |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * struct gpmi_nand_platform_data - GPMI NAND driver platform data. | 34 | * struct gpmi_nand_platform_data - GPMI NAND driver platform data. |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index cf5ea8cdcf8e..63dadc0dfb62 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -157,6 +157,15 @@ struct mtd_info { | |||
157 | unsigned int erasesize_mask; | 157 | unsigned int erasesize_mask; |
158 | unsigned int writesize_mask; | 158 | unsigned int writesize_mask; |
159 | 159 | ||
160 | /* | ||
161 | * read ops return -EUCLEAN if max number of bitflips corrected on any | ||
162 | * one region comprising an ecc step equals or exceeds this value. | ||
163 | * Settable by driver, else defaults to ecc_strength. User can override | ||
164 | * in sysfs. N.B. The meaning of the -EUCLEAN return code has changed; | ||
165 | * see Documentation/ABI/testing/sysfs-class-mtd for more detail. | ||
166 | */ | ||
167 | unsigned int bitflip_threshold; | ||
168 | |||
160 | // Kernel-only stuff starts here. | 169 | // Kernel-only stuff starts here. |
161 | const char *name; | 170 | const char *name; |
162 | int index; | 171 | int index; |
@@ -164,7 +173,7 @@ struct mtd_info { | |||
164 | /* ECC layout structure pointer - read only! */ | 173 | /* ECC layout structure pointer - read only! */ |
165 | struct nand_ecclayout *ecclayout; | 174 | struct nand_ecclayout *ecclayout; |
166 | 175 | ||
167 | /* max number of correctible bit errors per writesize */ | 176 | /* max number of correctible bit errors per ecc step */ |
168 | unsigned int ecc_strength; | 177 | unsigned int ecc_strength; |
169 | 178 | ||
170 | /* Data for variable erase regions. If numeraseregions is zero, | 179 | /* Data for variable erase regions. If numeraseregions is zero, |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1482340d3d9f..57977c640529 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -161,8 +161,6 @@ typedef enum { | |||
161 | * Option constants for bizarre disfunctionality and real | 161 | * Option constants for bizarre disfunctionality and real |
162 | * features. | 162 | * features. |
163 | */ | 163 | */ |
164 | /* Chip can not auto increment pages */ | ||
165 | #define NAND_NO_AUTOINCR 0x00000001 | ||
166 | /* Buswidth is 16 bit */ | 164 | /* Buswidth is 16 bit */ |
167 | #define NAND_BUSWIDTH_16 0x00000002 | 165 | #define NAND_BUSWIDTH_16 0x00000002 |
168 | /* Device supports partial programming without padding */ | 166 | /* Device supports partial programming without padding */ |
@@ -207,7 +205,6 @@ typedef enum { | |||
207 | (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK) | 205 | (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK) |
208 | 206 | ||
209 | /* Macros to identify the above */ | 207 | /* Macros to identify the above */ |
210 | #define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR)) | ||
211 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) | 208 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) |
212 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) | 209 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) |
213 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) | 210 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) |
@@ -216,7 +213,7 @@ typedef enum { | |||
216 | && (chip->page_shift > 9)) | 213 | && (chip->page_shift > 9)) |
217 | 214 | ||
218 | /* Mask to zero out the chip options, which come from the id table */ | 215 | /* Mask to zero out the chip options, which come from the id table */ |
219 | #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) | 216 | #define NAND_CHIPOPTIONS_MSK 0x0000ffff |
220 | 217 | ||
221 | /* Non chip related options */ | 218 | /* Non chip related options */ |
222 | /* This option skips the bbt scan during initialization. */ | 219 | /* This option skips the bbt scan during initialization. */ |
@@ -363,21 +360,20 @@ struct nand_ecc_ctrl { | |||
363 | int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, | 360 | int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, |
364 | uint8_t *calc_ecc); | 361 | uint8_t *calc_ecc); |
365 | int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 362 | int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
366 | uint8_t *buf, int page); | 363 | uint8_t *buf, int oob_required, int page); |
367 | void (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 364 | void (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
368 | const uint8_t *buf); | 365 | const uint8_t *buf, int oob_required); |
369 | int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, | 366 | int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, |
370 | uint8_t *buf, int page); | 367 | uint8_t *buf, int oob_required, int page); |
371 | int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, | 368 | int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, |
372 | uint32_t offs, uint32_t len, uint8_t *buf); | 369 | uint32_t offs, uint32_t len, uint8_t *buf); |
373 | void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, | 370 | void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, |
374 | const uint8_t *buf); | 371 | const uint8_t *buf, int oob_required); |
375 | int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 372 | int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
376 | int page); | 373 | int page); |
377 | int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 374 | int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
378 | int page, int sndcmd); | 375 | int page); |
379 | int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page, | 376 | int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page); |
380 | int sndcmd); | ||
381 | int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip, | 377 | int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip, |
382 | int page); | 378 | int page); |
383 | }; | 379 | }; |
@@ -459,6 +455,8 @@ struct nand_buffers { | |||
459 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 455 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
460 | * @pagebuf: [INTERN] holds the pagenumber which is currently in | 456 | * @pagebuf: [INTERN] holds the pagenumber which is currently in |
461 | * data_buf. | 457 | * data_buf. |
458 | * @pagebuf_bitflips: [INTERN] holds the bitflip count for the page which is | ||
459 | * currently in data_buf. | ||
462 | * @subpagesize: [INTERN] holds the subpagesize | 460 | * @subpagesize: [INTERN] holds the subpagesize |
463 | * @onfi_version: [INTERN] holds the chip ONFI version (BCD encoded), | 461 | * @onfi_version: [INTERN] holds the chip ONFI version (BCD encoded), |
464 | * non 0 if ONFI supported. | 462 | * non 0 if ONFI supported. |
@@ -505,7 +503,8 @@ struct nand_chip { | |||
505 | int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, | 503 | int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, |
506 | int status, int page); | 504 | int status, int page); |
507 | int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, | 505 | int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, |
508 | const uint8_t *buf, int page, int cached, int raw); | 506 | const uint8_t *buf, int oob_required, int page, |
507 | int cached, int raw); | ||
509 | 508 | ||
510 | int chip_delay; | 509 | int chip_delay; |
511 | unsigned int options; | 510 | unsigned int options; |
@@ -519,6 +518,7 @@ struct nand_chip { | |||
519 | uint64_t chipsize; | 518 | uint64_t chipsize; |
520 | int pagemask; | 519 | int pagemask; |
521 | int pagebuf; | 520 | int pagebuf; |
521 | unsigned int pagebuf_bitflips; | ||
522 | int subpagesize; | 522 | int subpagesize; |
523 | uint8_t cellinfo; | 523 | uint8_t cellinfo; |
524 | int badblockpos; | 524 | int badblockpos; |
@@ -654,6 +654,7 @@ struct platform_nand_ctrl { | |||
654 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl); | 654 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl); |
655 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); | 655 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); |
656 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); | 656 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); |
657 | unsigned char (*read_byte)(struct mtd_info *mtd); | ||
657 | void *priv; | 658 | void *priv; |
658 | }; | 659 | }; |
659 | 660 | ||
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index f85308e688fd..e33f747b173c 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -103,6 +103,7 @@ struct svc_export { | |||
103 | struct nfsd4_fs_locations ex_fslocs; | 103 | struct nfsd4_fs_locations ex_fslocs; |
104 | int ex_nflavors; | 104 | int ex_nflavors; |
105 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; | 105 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; |
106 | struct cache_detail *cd; | ||
106 | }; | 107 | }; |
107 | 108 | ||
108 | /* an "export key" (expkey) maps a filehandlefragement to an | 109 | /* an "export key" (expkey) maps a filehandlefragement to an |
@@ -129,24 +130,22 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); | |||
129 | /* | 130 | /* |
130 | * Function declarations | 131 | * Function declarations |
131 | */ | 132 | */ |
132 | int nfsd_export_init(void); | 133 | int nfsd_export_init(struct net *); |
133 | void nfsd_export_shutdown(void); | 134 | void nfsd_export_shutdown(struct net *); |
134 | void nfsd_export_flush(void); | 135 | void nfsd_export_flush(struct net *); |
135 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, | 136 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, |
136 | struct path *); | 137 | struct path *); |
137 | struct svc_export * rqst_exp_parent(struct svc_rqst *, | 138 | struct svc_export * rqst_exp_parent(struct svc_rqst *, |
138 | struct path *); | 139 | struct path *); |
139 | struct svc_export * rqst_find_fsidzero_export(struct svc_rqst *); | 140 | struct svc_export * rqst_find_fsidzero_export(struct svc_rqst *); |
140 | int exp_rootfh(struct auth_domain *, | 141 | int exp_rootfh(struct net *, struct auth_domain *, |
141 | char *path, struct knfsd_fh *, int maxsize); | 142 | char *path, struct knfsd_fh *, int maxsize); |
142 | __be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *); | 143 | __be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *); |
143 | __be32 nfserrno(int errno); | 144 | __be32 nfserrno(int errno); |
144 | 145 | ||
145 | extern struct cache_detail svc_export_cache; | ||
146 | |||
147 | static inline void exp_put(struct svc_export *exp) | 146 | static inline void exp_put(struct svc_export *exp) |
148 | { | 147 | { |
149 | cache_put(&exp->h, &svc_export_cache); | 148 | cache_put(&exp->h, exp->cd); |
150 | } | 149 | } |
151 | 150 | ||
152 | static inline void exp_get(struct svc_export *exp) | 151 | static inline void exp_get(struct svc_export *exp) |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 78b76e24cc7e..711e0a30aacc 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -113,6 +113,12 @@ | |||
113 | # define PR_SET_MM_START_STACK 5 | 113 | # define PR_SET_MM_START_STACK 5 |
114 | # define PR_SET_MM_START_BRK 6 | 114 | # define PR_SET_MM_START_BRK 6 |
115 | # define PR_SET_MM_BRK 7 | 115 | # define PR_SET_MM_BRK 7 |
116 | # define PR_SET_MM_ARG_START 8 | ||
117 | # define PR_SET_MM_ARG_END 9 | ||
118 | # define PR_SET_MM_ENV_START 10 | ||
119 | # define PR_SET_MM_ENV_END 11 | ||
120 | # define PR_SET_MM_AUXV 12 | ||
121 | # define PR_SET_MM_EXE_FILE 13 | ||
116 | 122 | ||
117 | /* | 123 | /* |
118 | * Set specific pid that is allowed to ptrace the current task. | 124 | * Set specific pid that is allowed to ptrace the current task. |
diff --git a/include/linux/rio.h b/include/linux/rio.h index 4d50611112ba..a90ebadd9da0 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/rio_regs.h> | 22 | #include <linux/rio_regs.h> |
23 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
24 | #include <linux/dmaengine.h> | ||
25 | #endif | ||
23 | 26 | ||
24 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
25 | #define RIO_INVALID_DESTID 0xffff | 28 | #define RIO_INVALID_DESTID 0xffff |
@@ -254,6 +257,9 @@ struct rio_mport { | |||
254 | u32 phys_efptr; | 257 | u32 phys_efptr; |
255 | unsigned char name[40]; | 258 | unsigned char name[40]; |
256 | void *priv; /* Master port private data */ | 259 | void *priv; /* Master port private data */ |
260 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
261 | struct dma_device dma; | ||
262 | #endif | ||
257 | }; | 263 | }; |
258 | 264 | ||
259 | /** | 265 | /** |
@@ -395,6 +401,47 @@ union rio_pw_msg { | |||
395 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; | 401 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; |
396 | }; | 402 | }; |
397 | 403 | ||
404 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
405 | |||
406 | /** | ||
407 | * enum rio_write_type - RIO write transaction types used in DMA transfers | ||
408 | * | ||
409 | * Note: RapidIO specification defines write (NWRITE) and | ||
410 | * write-with-response (NWRITE_R) data transfer operations. | ||
411 | * Existing DMA controllers that service RapidIO may use one of these operations | ||
412 | * for entire data transfer or their combination with only the last data packet | ||
413 | * requires response. | ||
414 | */ | ||
415 | enum rio_write_type { | ||
416 | RDW_DEFAULT, /* default method used by DMA driver */ | ||
417 | RDW_ALL_NWRITE, /* all packets use NWRITE */ | ||
418 | RDW_ALL_NWRITE_R, /* all packets use NWRITE_R */ | ||
419 | RDW_LAST_NWRITE_R, /* last packet uses NWRITE_R, others - NWRITE */ | ||
420 | }; | ||
421 | |||
422 | struct rio_dma_ext { | ||
423 | u16 destid; | ||
424 | u64 rio_addr; /* low 64-bits of 66-bit RapidIO address */ | ||
425 | u8 rio_addr_u; /* upper 2-bits of 66-bit RapidIO address */ | ||
426 | enum rio_write_type wr_type; /* preferred RIO write operation type */ | ||
427 | }; | ||
428 | |||
429 | struct rio_dma_data { | ||
430 | /* Local data (as scatterlist) */ | ||
431 | struct scatterlist *sg; /* I/O scatter list */ | ||
432 | unsigned int sg_len; /* size of scatter list */ | ||
433 | /* Remote device address (flat buffer) */ | ||
434 | u64 rio_addr; /* low 64-bits of 66-bit RapidIO address */ | ||
435 | u8 rio_addr_u; /* upper 2-bits of 66-bit RapidIO address */ | ||
436 | enum rio_write_type wr_type; /* preferred RIO write operation type */ | ||
437 | }; | ||
438 | |||
439 | static inline struct rio_mport *dma_to_mport(struct dma_device *ddev) | ||
440 | { | ||
441 | return container_of(ddev, struct rio_mport, dma); | ||
442 | } | ||
443 | #endif /* CONFIG_RAPIDIO_DMA_ENGINE */ | ||
444 | |||
398 | /* Architecture and hardware-specific functions */ | 445 | /* Architecture and hardware-specific functions */ |
399 | extern int rio_register_mport(struct rio_mport *); | 446 | extern int rio_register_mport(struct rio_mport *); |
400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 447 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 7f07470e1ed9..31ad146be316 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -377,6 +377,15 @@ void rio_unregister_driver(struct rio_driver *); | |||
377 | struct rio_dev *rio_dev_get(struct rio_dev *); | 377 | struct rio_dev *rio_dev_get(struct rio_dev *); |
378 | void rio_dev_put(struct rio_dev *); | 378 | void rio_dev_put(struct rio_dev *); |
379 | 379 | ||
380 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
381 | extern struct dma_chan *rio_request_dma(struct rio_dev *rdev); | ||
382 | extern void rio_release_dma(struct dma_chan *dchan); | ||
383 | extern struct dma_async_tx_descriptor *rio_dma_prep_slave_sg( | ||
384 | struct rio_dev *rdev, struct dma_chan *dchan, | ||
385 | struct rio_dma_data *data, | ||
386 | enum dma_transfer_direction direction, unsigned long flags); | ||
387 | #endif | ||
388 | |||
380 | /** | 389 | /** |
381 | * rio_name - Get the unique RIO device identifier | 390 | * rio_name - Get the unique RIO device identifier |
382 | * @rdev: RIO device | 391 | * @rdev: RIO device |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f45c0b280b5d..f34437e835a7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1301,11 +1301,6 @@ struct task_struct { | |||
1301 | unsigned sched_reset_on_fork:1; | 1301 | unsigned sched_reset_on_fork:1; |
1302 | unsigned sched_contributes_to_load:1; | 1302 | unsigned sched_contributes_to_load:1; |
1303 | 1303 | ||
1304 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
1305 | /* IRQ handler threads */ | ||
1306 | unsigned irq_thread:1; | ||
1307 | #endif | ||
1308 | |||
1309 | pid_t pid; | 1304 | pid_t pid; |
1310 | pid_t tgid; | 1305 | pid_t tgid; |
1311 | 1306 | ||
@@ -1313,10 +1308,9 @@ struct task_struct { | |||
1313 | /* Canary value for the -fstack-protector gcc feature */ | 1308 | /* Canary value for the -fstack-protector gcc feature */ |
1314 | unsigned long stack_canary; | 1309 | unsigned long stack_canary; |
1315 | #endif | 1310 | #endif |
1316 | 1311 | /* | |
1317 | /* | ||
1318 | * pointers to (original) parent process, youngest child, younger sibling, | 1312 | * pointers to (original) parent process, youngest child, younger sibling, |
1319 | * older sibling, respectively. (p->father can be replaced with | 1313 | * older sibling, respectively. (p->father can be replaced with |
1320 | * p->real_parent->pid) | 1314 | * p->real_parent->pid) |
1321 | */ | 1315 | */ |
1322 | struct task_struct __rcu *real_parent; /* real parent process */ | 1316 | struct task_struct __rcu *real_parent; /* real parent process */ |
@@ -1363,8 +1357,6 @@ struct task_struct { | |||
1363 | * credentials (COW) */ | 1357 | * credentials (COW) */ |
1364 | const struct cred __rcu *cred; /* effective (overridable) subjective task | 1358 | const struct cred __rcu *cred; /* effective (overridable) subjective task |
1365 | * credentials (COW) */ | 1359 | * credentials (COW) */ |
1366 | struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ | ||
1367 | |||
1368 | char comm[TASK_COMM_LEN]; /* executable name excluding path | 1360 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
1369 | - access with [gs]et_task_comm (which lock | 1361 | - access with [gs]et_task_comm (which lock |
1370 | it with task_lock()) | 1362 | it with task_lock()) |
@@ -1400,6 +1392,8 @@ struct task_struct { | |||
1400 | int (*notifier)(void *priv); | 1392 | int (*notifier)(void *priv); |
1401 | void *notifier_data; | 1393 | void *notifier_data; |
1402 | sigset_t *notifier_mask; | 1394 | sigset_t *notifier_mask; |
1395 | struct hlist_head task_works; | ||
1396 | |||
1403 | struct audit_context *audit_context; | 1397 | struct audit_context *audit_context; |
1404 | #ifdef CONFIG_AUDITSYSCALL | 1398 | #ifdef CONFIG_AUDITSYSCALL |
1405 | uid_t loginuid; | 1399 | uid_t loginuid; |
@@ -2213,6 +2207,20 @@ extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | |||
2213 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); | 2207 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); |
2214 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); | 2208 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); |
2215 | 2209 | ||
2210 | static inline void restore_saved_sigmask(void) | ||
2211 | { | ||
2212 | if (test_and_clear_restore_sigmask()) | ||
2213 | __set_current_blocked(¤t->saved_sigmask); | ||
2214 | } | ||
2215 | |||
2216 | static inline sigset_t *sigmask_to_save(void) | ||
2217 | { | ||
2218 | sigset_t *res = ¤t->blocked; | ||
2219 | if (unlikely(test_restore_sigmask())) | ||
2220 | res = ¤t->saved_sigmask; | ||
2221 | return res; | ||
2222 | } | ||
2223 | |||
2216 | static inline int kill_cad_pid(int sig, int priv) | 2224 | static inline int kill_cad_pid(int sig, int priv) |
2217 | { | 2225 | { |
2218 | return kill_pid(cad_pid, sig, priv); | 2226 | return kill_pid(cad_pid, sig, priv); |
diff --git a/include/linux/security.h b/include/linux/security.h index ab0e091ce5fa..4e5a73cdbbef 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -86,9 +86,9 @@ extern int cap_inode_setxattr(struct dentry *dentry, const char *name, | |||
86 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); | 86 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); |
87 | extern int cap_inode_need_killpriv(struct dentry *dentry); | 87 | extern int cap_inode_need_killpriv(struct dentry *dentry); |
88 | extern int cap_inode_killpriv(struct dentry *dentry); | 88 | extern int cap_inode_killpriv(struct dentry *dentry); |
89 | extern int cap_file_mmap(struct file *file, unsigned long reqprot, | 89 | extern int cap_mmap_addr(unsigned long addr); |
90 | unsigned long prot, unsigned long flags, | 90 | extern int cap_mmap_file(struct file *file, unsigned long reqprot, |
91 | unsigned long addr, unsigned long addr_only); | 91 | unsigned long prot, unsigned long flags); |
92 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 92 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
93 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 93 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
94 | unsigned long arg4, unsigned long arg5); | 94 | unsigned long arg4, unsigned long arg5); |
@@ -586,15 +586,17 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
586 | * simple integer value. When @arg represents a user space pointer, it | 586 | * simple integer value. When @arg represents a user space pointer, it |
587 | * should never be used by the security module. | 587 | * should never be used by the security module. |
588 | * Return 0 if permission is granted. | 588 | * Return 0 if permission is granted. |
589 | * @file_mmap : | 589 | * @mmap_addr : |
590 | * Check permissions for a mmap operation at @addr. | ||
591 | * @addr contains virtual address that will be used for the operation. | ||
592 | * Return 0 if permission is granted. | ||
593 | * @mmap_file : | ||
590 | * Check permissions for a mmap operation. The @file may be NULL, e.g. | 594 | * Check permissions for a mmap operation. The @file may be NULL, e.g. |
591 | * if mapping anonymous memory. | 595 | * if mapping anonymous memory. |
592 | * @file contains the file structure for file to map (may be NULL). | 596 | * @file contains the file structure for file to map (may be NULL). |
593 | * @reqprot contains the protection requested by the application. | 597 | * @reqprot contains the protection requested by the application. |
594 | * @prot contains the protection that will be applied by the kernel. | 598 | * @prot contains the protection that will be applied by the kernel. |
595 | * @flags contains the operational flags. | 599 | * @flags contains the operational flags. |
596 | * @addr contains virtual address that will be used for the operation. | ||
597 | * @addr_only contains a boolean: 0 if file-backed VMA, otherwise 1. | ||
598 | * Return 0 if permission is granted. | 600 | * Return 0 if permission is granted. |
599 | * @file_mprotect: | 601 | * @file_mprotect: |
600 | * Check permissions before changing memory access permissions. | 602 | * Check permissions before changing memory access permissions. |
@@ -1481,10 +1483,10 @@ struct security_operations { | |||
1481 | void (*file_free_security) (struct file *file); | 1483 | void (*file_free_security) (struct file *file); |
1482 | int (*file_ioctl) (struct file *file, unsigned int cmd, | 1484 | int (*file_ioctl) (struct file *file, unsigned int cmd, |
1483 | unsigned long arg); | 1485 | unsigned long arg); |
1484 | int (*file_mmap) (struct file *file, | 1486 | int (*mmap_addr) (unsigned long addr); |
1487 | int (*mmap_file) (struct file *file, | ||
1485 | unsigned long reqprot, unsigned long prot, | 1488 | unsigned long reqprot, unsigned long prot, |
1486 | unsigned long flags, unsigned long addr, | 1489 | unsigned long flags); |
1487 | unsigned long addr_only); | ||
1488 | int (*file_mprotect) (struct vm_area_struct *vma, | 1490 | int (*file_mprotect) (struct vm_area_struct *vma, |
1489 | unsigned long reqprot, | 1491 | unsigned long reqprot, |
1490 | unsigned long prot); | 1492 | unsigned long prot); |
@@ -1743,9 +1745,9 @@ int security_file_permission(struct file *file, int mask); | |||
1743 | int security_file_alloc(struct file *file); | 1745 | int security_file_alloc(struct file *file); |
1744 | void security_file_free(struct file *file); | 1746 | void security_file_free(struct file *file); |
1745 | int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | 1747 | int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
1746 | int security_file_mmap(struct file *file, unsigned long reqprot, | 1748 | int security_mmap_file(struct file *file, unsigned long prot, |
1747 | unsigned long prot, unsigned long flags, | 1749 | unsigned long flags); |
1748 | unsigned long addr, unsigned long addr_only); | 1750 | int security_mmap_addr(unsigned long addr); |
1749 | int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, | 1751 | int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, |
1750 | unsigned long prot); | 1752 | unsigned long prot); |
1751 | int security_file_lock(struct file *file, unsigned int cmd); | 1753 | int security_file_lock(struct file *file, unsigned int cmd); |
@@ -2181,13 +2183,15 @@ static inline int security_file_ioctl(struct file *file, unsigned int cmd, | |||
2181 | return 0; | 2183 | return 0; |
2182 | } | 2184 | } |
2183 | 2185 | ||
2184 | static inline int security_file_mmap(struct file *file, unsigned long reqprot, | 2186 | static inline int security_mmap_file(struct file *file, unsigned long prot, |
2185 | unsigned long prot, | 2187 | unsigned long flags) |
2186 | unsigned long flags, | 2188 | { |
2187 | unsigned long addr, | 2189 | return 0; |
2188 | unsigned long addr_only) | 2190 | } |
2191 | |||
2192 | static inline int security_mmap_addr(unsigned long addr) | ||
2189 | { | 2193 | { |
2190 | return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); | 2194 | return cap_mmap_addr(addr); |
2191 | } | 2195 | } |
2192 | 2196 | ||
2193 | static inline int security_file_mprotect(struct vm_area_struct *vma, | 2197 | static inline int security_file_mprotect(struct vm_area_struct *vma, |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 17046cc484bc..26b424adc842 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -250,12 +250,13 @@ extern long do_sigpending(void __user *, unsigned long); | |||
250 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, | 250 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, |
251 | const struct timespec *); | 251 | const struct timespec *); |
252 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 252 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
253 | extern void set_current_blocked(const sigset_t *); | 253 | extern void set_current_blocked(sigset_t *); |
254 | extern void __set_current_blocked(const sigset_t *); | ||
254 | extern int show_unhandled_signals; | 255 | extern int show_unhandled_signals; |
255 | extern int sigsuspend(sigset_t *); | 256 | extern int sigsuspend(sigset_t *); |
256 | 257 | ||
257 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 258 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
258 | extern void block_sigmask(struct k_sigaction *ka, int signr); | 259 | extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping); |
259 | extern void exit_signals(struct task_struct *tsk); | 260 | extern void exit_signals(struct task_struct *tsk); |
260 | 261 | ||
261 | extern struct kmem_cache *sighand_cachep; | 262 | extern struct kmem_cache *sighand_cachep; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index a595dce6b0c7..67d5d94b783a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -242,7 +242,7 @@ size_t ksize(const void *); | |||
242 | */ | 242 | */ |
243 | static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags) | 243 | static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags) |
244 | { | 244 | { |
245 | if (size != 0 && n > ULONG_MAX / size) | 245 | if (size != 0 && n > SIZE_MAX / size) |
246 | return NULL; | 246 | return NULL; |
247 | return __kmalloc(n * size, flags); | 247 | return __kmalloc(n * size, flags); |
248 | } | 248 | } |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 51b29ac45a8e..40e0a273faea 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -232,7 +232,6 @@ struct svc_rqst { | |||
232 | struct svc_pool * rq_pool; /* thread pool */ | 232 | struct svc_pool * rq_pool; /* thread pool */ |
233 | struct svc_procedure * rq_procinfo; /* procedure info */ | 233 | struct svc_procedure * rq_procinfo; /* procedure info */ |
234 | struct auth_ops * rq_authop; /* authentication flavour */ | 234 | struct auth_ops * rq_authop; /* authentication flavour */ |
235 | u32 rq_flavor; /* pseudoflavor */ | ||
236 | struct svc_cred rq_cred; /* auth info */ | 235 | struct svc_cred rq_cred; /* auth info */ |
237 | void * rq_xprt_ctxt; /* transport specific context ptr */ | 236 | void * rq_xprt_ctxt; /* transport specific context ptr */ |
238 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ | 237 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ |
@@ -416,6 +415,7 @@ struct svc_procedure { | |||
416 | */ | 415 | */ |
417 | int svc_rpcb_setup(struct svc_serv *serv, struct net *net); | 416 | int svc_rpcb_setup(struct svc_serv *serv, struct net *net); |
418 | void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net); | 417 | void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net); |
418 | int svc_bind(struct svc_serv *serv, struct net *net); | ||
419 | struct svc_serv *svc_create(struct svc_program *, unsigned int, | 419 | struct svc_serv *svc_create(struct svc_program *, unsigned int, |
420 | void (*shutdown)(struct svc_serv *, struct net *net)); | 420 | void (*shutdown)(struct svc_serv *, struct net *net)); |
421 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 421 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 548790e9113b..dd74084a9799 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -15,14 +15,23 @@ | |||
15 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
16 | #include <linux/sunrpc/cache.h> | 16 | #include <linux/sunrpc/cache.h> |
17 | #include <linux/hash.h> | 17 | #include <linux/hash.h> |
18 | #include <linux/cred.h> | ||
18 | 19 | ||
19 | #define SVC_CRED_NGROUPS 32 | ||
20 | struct svc_cred { | 20 | struct svc_cred { |
21 | uid_t cr_uid; | 21 | uid_t cr_uid; |
22 | gid_t cr_gid; | 22 | gid_t cr_gid; |
23 | struct group_info *cr_group_info; | 23 | struct group_info *cr_group_info; |
24 | u32 cr_flavor; /* pseudoflavor */ | ||
25 | char *cr_principal; /* for gss */ | ||
24 | }; | 26 | }; |
25 | 27 | ||
28 | static inline void free_svc_cred(struct svc_cred *cred) | ||
29 | { | ||
30 | if (cred->cr_group_info) | ||
31 | put_group_info(cred->cr_group_info); | ||
32 | kfree(cred->cr_principal); | ||
33 | } | ||
34 | |||
26 | struct svc_rqst; /* forward decl */ | 35 | struct svc_rqst; /* forward decl */ |
27 | struct in6_addr; | 36 | struct in6_addr; |
28 | 37 | ||
@@ -131,7 +140,7 @@ extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *ne | |||
131 | extern struct auth_domain *auth_domain_find(char *name); | 140 | extern struct auth_domain *auth_domain_find(char *name); |
132 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); | 141 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); |
133 | extern int auth_unix_forget_old(struct auth_domain *dom); | 142 | extern int auth_unix_forget_old(struct auth_domain *dom); |
134 | extern void svcauth_unix_purge(void); | 143 | extern void svcauth_unix_purge(struct net *net); |
135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); | 144 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 145 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
137 | 146 | ||
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index 7c32daa025eb..726aff1a5201 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
@@ -22,7 +22,6 @@ int gss_svc_init_net(struct net *net); | |||
22 | void gss_svc_shutdown_net(struct net *net); | 22 | void gss_svc_shutdown_net(struct net *net); |
23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); | 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
24 | u32 svcauth_gss_flavor(struct auth_domain *dom); | 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); |
25 | char *svc_gss_principal(struct svc_rqst *); | ||
26 | 25 | ||
27 | #endif /* __KERNEL__ */ | 26 | #endif /* __KERNEL__ */ |
28 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ | 27 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3de3acb84a95..19439c75c5b2 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -858,4 +858,6 @@ asmlinkage long sys_process_vm_writev(pid_t pid, | |||
858 | unsigned long riovcnt, | 858 | unsigned long riovcnt, |
859 | unsigned long flags); | 859 | unsigned long flags); |
860 | 860 | ||
861 | asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, | ||
862 | unsigned long idx1, unsigned long idx2); | ||
861 | #endif | 863 | #endif |
diff --git a/include/linux/task_work.h b/include/linux/task_work.h new file mode 100644 index 000000000000..294d5d5e90b1 --- /dev/null +++ b/include/linux/task_work.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _LINUX_TASK_WORK_H | ||
2 | #define _LINUX_TASK_WORK_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | #include <linux/sched.h> | ||
6 | |||
7 | struct task_work; | ||
8 | typedef void (*task_work_func_t)(struct task_work *); | ||
9 | |||
10 | struct task_work { | ||
11 | struct hlist_node hlist; | ||
12 | task_work_func_t func; | ||
13 | void *data; | ||
14 | }; | ||
15 | |||
16 | static inline void | ||
17 | init_task_work(struct task_work *twork, task_work_func_t func, void *data) | ||
18 | { | ||
19 | twork->func = func; | ||
20 | twork->data = data; | ||
21 | } | ||
22 | |||
23 | int task_work_add(struct task_struct *task, struct task_work *twork, bool); | ||
24 | struct task_work *task_work_cancel(struct task_struct *, task_work_func_t); | ||
25 | void task_work_run(void); | ||
26 | |||
27 | static inline void exit_task_work(struct task_struct *task) | ||
28 | { | ||
29 | if (unlikely(!hlist_empty(&task->task_works))) | ||
30 | task_work_run(); | ||
31 | } | ||
32 | |||
33 | #endif /* _LINUX_TASK_WORK_H */ | ||
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index db78775eff3b..ccc1899bd62e 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define _LINUX_THREAD_INFO_H | 8 | #define _LINUX_THREAD_INFO_H |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/bug.h> | ||
11 | 12 | ||
12 | struct timespec; | 13 | struct timespec; |
13 | struct compat_timespec; | 14 | struct compat_timespec; |
@@ -125,10 +126,26 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) | |||
125 | static inline void set_restore_sigmask(void) | 126 | static inline void set_restore_sigmask(void) |
126 | { | 127 | { |
127 | set_thread_flag(TIF_RESTORE_SIGMASK); | 128 | set_thread_flag(TIF_RESTORE_SIGMASK); |
128 | set_thread_flag(TIF_SIGPENDING); | 129 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
130 | } | ||
131 | static inline void clear_restore_sigmask(void) | ||
132 | { | ||
133 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
134 | } | ||
135 | static inline bool test_restore_sigmask(void) | ||
136 | { | ||
137 | return test_thread_flag(TIF_RESTORE_SIGMASK); | ||
138 | } | ||
139 | static inline bool test_and_clear_restore_sigmask(void) | ||
140 | { | ||
141 | return test_and_clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
129 | } | 142 | } |
130 | #endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */ | 143 | #endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */ |
131 | 144 | ||
145 | #ifndef HAVE_SET_RESTORE_SIGMASK | ||
146 | #error "no set_restore_sigmask() provided and default one won't work" | ||
147 | #endif | ||
148 | |||
132 | #endif /* __KERNEL__ */ | 149 | #endif /* __KERNEL__ */ |
133 | 150 | ||
134 | #endif /* _LINUX_THREAD_INFO_H */ | 151 | #endif /* _LINUX_THREAD_INFO_H */ |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 51bd91d911c3..6a4d82bedb03 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/sched.h> | 49 | #include <linux/sched.h> |
50 | #include <linux/ptrace.h> | 50 | #include <linux/ptrace.h> |
51 | #include <linux/security.h> | 51 | #include <linux/security.h> |
52 | #include <linux/task_work.h> | ||
52 | struct linux_binprm; | 53 | struct linux_binprm; |
53 | 54 | ||
54 | /* | 55 | /* |
@@ -153,7 +154,6 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info, | |||
153 | ptrace_notify(SIGTRAP); | 154 | ptrace_notify(SIGTRAP); |
154 | } | 155 | } |
155 | 156 | ||
156 | #ifdef TIF_NOTIFY_RESUME | ||
157 | /** | 157 | /** |
158 | * set_notify_resume - cause tracehook_notify_resume() to be called | 158 | * set_notify_resume - cause tracehook_notify_resume() to be called |
159 | * @task: task that will call tracehook_notify_resume() | 159 | * @task: task that will call tracehook_notify_resume() |
@@ -165,8 +165,10 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info, | |||
165 | */ | 165 | */ |
166 | static inline void set_notify_resume(struct task_struct *task) | 166 | static inline void set_notify_resume(struct task_struct *task) |
167 | { | 167 | { |
168 | #ifdef TIF_NOTIFY_RESUME | ||
168 | if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_RESUME)) | 169 | if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_RESUME)) |
169 | kick_process(task); | 170 | kick_process(task); |
171 | #endif | ||
170 | } | 172 | } |
171 | 173 | ||
172 | /** | 174 | /** |
@@ -184,7 +186,14 @@ static inline void set_notify_resume(struct task_struct *task) | |||
184 | */ | 186 | */ |
185 | static inline void tracehook_notify_resume(struct pt_regs *regs) | 187 | static inline void tracehook_notify_resume(struct pt_regs *regs) |
186 | { | 188 | { |
189 | /* | ||
190 | * The caller just cleared TIF_NOTIFY_RESUME. This barrier | ||
191 | * pairs with task_work_add()->set_notify_resume() after | ||
192 | * hlist_add_head(task->task_works); | ||
193 | */ | ||
194 | smp_mb__after_clear_bit(); | ||
195 | if (unlikely(!hlist_empty(¤t->task_works))) | ||
196 | task_work_run(); | ||
187 | } | 197 | } |
188 | #endif /* TIF_NOTIFY_RESUME */ | ||
189 | 198 | ||
190 | #endif /* <linux/tracehook.h> */ | 199 | #endif /* <linux/tracehook.h> */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 4990ef2b1fb7..9f47ab540f65 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -268,7 +268,6 @@ struct tty_struct { | |||
268 | struct mutex ldisc_mutex; | 268 | struct mutex ldisc_mutex; |
269 | struct tty_ldisc *ldisc; | 269 | struct tty_ldisc *ldisc; |
270 | 270 | ||
271 | struct mutex legacy_mutex; | ||
272 | struct mutex termios_mutex; | 271 | struct mutex termios_mutex; |
273 | spinlock_t ctrl_lock; | 272 | spinlock_t ctrl_lock; |
274 | /* Termios values are protected by the termios mutex */ | 273 | /* Termios values are protected by the termios mutex */ |
@@ -606,12 +605,8 @@ extern long vt_compat_ioctl(struct tty_struct *tty, | |||
606 | 605 | ||
607 | /* tty_mutex.c */ | 606 | /* tty_mutex.c */ |
608 | /* functions for preparation of BKL removal */ | 607 | /* functions for preparation of BKL removal */ |
609 | extern void __lockfunc tty_lock(struct tty_struct *tty); | 608 | extern void __lockfunc tty_lock(void) __acquires(tty_lock); |
610 | extern void __lockfunc tty_unlock(struct tty_struct *tty); | 609 | extern void __lockfunc tty_unlock(void) __releases(tty_lock); |
611 | extern void __lockfunc tty_lock_pair(struct tty_struct *tty, | ||
612 | struct tty_struct *tty2); | ||
613 | extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | ||
614 | struct tty_struct *tty2); | ||
615 | 610 | ||
616 | /* | 611 | /* |
617 | * this shall be called only from where BTM is held (like close) | 612 | * this shall be called only from where BTM is held (like close) |
@@ -626,9 +621,9 @@ extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | |||
626 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | 621 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, |
627 | long timeout) | 622 | long timeout) |
628 | { | 623 | { |
629 | tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */ | 624 | tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */ |
630 | tty_wait_until_sent(tty, timeout); | 625 | tty_wait_until_sent(tty, timeout); |
631 | tty_lock(tty); | 626 | tty_lock(); |
632 | } | 627 | } |
633 | 628 | ||
634 | /* | 629 | /* |
@@ -643,16 +638,16 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | |||
643 | * | 638 | * |
644 | * Do not use in new code. | 639 | * Do not use in new code. |
645 | */ | 640 | */ |
646 | #define wait_event_interruptible_tty(tty, wq, condition) \ | 641 | #define wait_event_interruptible_tty(wq, condition) \ |
647 | ({ \ | 642 | ({ \ |
648 | int __ret = 0; \ | 643 | int __ret = 0; \ |
649 | if (!(condition)) { \ | 644 | if (!(condition)) { \ |
650 | __wait_event_interruptible_tty(tty, wq, condition, __ret); \ | 645 | __wait_event_interruptible_tty(wq, condition, __ret); \ |
651 | } \ | 646 | } \ |
652 | __ret; \ | 647 | __ret; \ |
653 | }) | 648 | }) |
654 | 649 | ||
655 | #define __wait_event_interruptible_tty(tty, wq, condition, ret) \ | 650 | #define __wait_event_interruptible_tty(wq, condition, ret) \ |
656 | do { \ | 651 | do { \ |
657 | DEFINE_WAIT(__wait); \ | 652 | DEFINE_WAIT(__wait); \ |
658 | \ | 653 | \ |
@@ -661,9 +656,9 @@ do { \ | |||
661 | if (condition) \ | 656 | if (condition) \ |
662 | break; \ | 657 | break; \ |
663 | if (!signal_pending(current)) { \ | 658 | if (!signal_pending(current)) { \ |
664 | tty_unlock(tty); \ | 659 | tty_unlock(); \ |
665 | schedule(); \ | 660 | schedule(); \ |
666 | tty_lock(tty); \ | 661 | tty_lock(); \ |
667 | continue; \ | 662 | continue; \ |
668 | } \ | 663 | } \ |
669 | ret = -ERESTARTSYS; \ | 664 | ret = -ERESTARTSYS; \ |
diff --git a/include/linux/types.h b/include/linux/types.h index 7f480db60231..9c1bd539ea70 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -25,7 +25,7 @@ typedef __kernel_dev_t dev_t; | |||
25 | typedef __kernel_ino_t ino_t; | 25 | typedef __kernel_ino_t ino_t; |
26 | typedef __kernel_mode_t mode_t; | 26 | typedef __kernel_mode_t mode_t; |
27 | typedef unsigned short umode_t; | 27 | typedef unsigned short umode_t; |
28 | typedef __kernel_nlink_t nlink_t; | 28 | typedef __u32 nlink_t; |
29 | typedef __kernel_off_t off_t; | 29 | typedef __kernel_off_t off_t; |
30 | typedef __kernel_pid_t pid_t; | 30 | typedef __kernel_pid_t pid_t; |
31 | typedef __kernel_daddr_t daddr_t; | 31 | typedef __kernel_daddr_t daddr_t; |
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h new file mode 100644 index 000000000000..609efe8c686e --- /dev/null +++ b/include/video/auo_k190xfb.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /* | ||
2 | * Definitions for AUO-K190X framebuffer drivers | ||
3 | * | ||
4 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _LINUX_VIDEO_AUO_K190XFB_H_ | ||
12 | #define _LINUX_VIDEO_AUO_K190XFB_H_ | ||
13 | |||
14 | /* Controller standby command needs a param */ | ||
15 | #define AUOK190X_QUIRK_STANDBYPARAM (1 << 0) | ||
16 | |||
17 | /* Controller standby is completely broken */ | ||
18 | #define AUOK190X_QUIRK_STANDBYBROKEN (1 << 1) | ||
19 | |||
20 | /* | ||
21 | * Resolutions for the displays | ||
22 | */ | ||
23 | #define AUOK190X_RESOLUTION_800_600 0 | ||
24 | #define AUOK190X_RESOLUTION_1024_768 1 | ||
25 | |||
26 | /* | ||
27 | * struct used by auok190x. board specific stuff comes from *board | ||
28 | */ | ||
29 | struct auok190xfb_par { | ||
30 | struct fb_info *info; | ||
31 | struct auok190x_board *board; | ||
32 | |||
33 | struct regulator *regulator; | ||
34 | |||
35 | struct mutex io_lock; | ||
36 | struct delayed_work work; | ||
37 | wait_queue_head_t waitq; | ||
38 | int resolution; | ||
39 | int rotation; | ||
40 | int consecutive_threshold; | ||
41 | int update_cnt; | ||
42 | |||
43 | /* panel and controller informations */ | ||
44 | int epd_type; | ||
45 | int panel_size_int; | ||
46 | int panel_size_float; | ||
47 | int panel_model; | ||
48 | int tcon_version; | ||
49 | int lut_version; | ||
50 | |||
51 | /* individual controller callbacks */ | ||
52 | void (*update_partial)(struct auok190xfb_par *par, u16 y1, u16 y2); | ||
53 | void (*update_all)(struct auok190xfb_par *par); | ||
54 | bool (*need_refresh)(struct auok190xfb_par *par); | ||
55 | void (*init)(struct auok190xfb_par *par); | ||
56 | void (*recover)(struct auok190xfb_par *par); | ||
57 | |||
58 | int update_mode; /* mode to use for updates */ | ||
59 | int last_mode; /* update mode last used */ | ||
60 | int flash; | ||
61 | |||
62 | /* power management */ | ||
63 | int autosuspend_delay; | ||
64 | bool standby; | ||
65 | bool manual_standby; | ||
66 | }; | ||
67 | |||
68 | /** | ||
69 | * Board specific platform-data | ||
70 | * @init: initialize the controller interface | ||
71 | * @cleanup: cleanup the controller interface | ||
72 | * @wait_for_rdy: wait until the controller is not busy anymore | ||
73 | * @set_ctl: change an interface control | ||
74 | * @set_hdb: write a value to the data register | ||
75 | * @get_hdb: read a value from the data register | ||
76 | * @setup_irq: method to setup the irq handling on the busy gpio | ||
77 | * @gpio_nsleep: sleep gpio | ||
78 | * @gpio_nrst: reset gpio | ||
79 | * @gpio_nbusy: busy gpio | ||
80 | * @resolution: one of the AUOK190X_RESOLUTION constants | ||
81 | * @rotation: rotation of the framebuffer | ||
82 | * @quirks: controller quirks to honor | ||
83 | * @fps: frames per second for defio | ||
84 | */ | ||
85 | struct auok190x_board { | ||
86 | int (*init)(struct auok190xfb_par *); | ||
87 | void (*cleanup)(struct auok190xfb_par *); | ||
88 | int (*wait_for_rdy)(struct auok190xfb_par *); | ||
89 | |||
90 | void (*set_ctl)(struct auok190xfb_par *, unsigned char, u8); | ||
91 | void (*set_hdb)(struct auok190xfb_par *, u16); | ||
92 | u16 (*get_hdb)(struct auok190xfb_par *); | ||
93 | |||
94 | int (*setup_irq)(struct fb_info *); | ||
95 | |||
96 | int gpio_nsleep; | ||
97 | int gpio_nrst; | ||
98 | int gpio_nbusy; | ||
99 | |||
100 | int resolution; | ||
101 | int rotation; | ||
102 | int quirks; | ||
103 | int fps; | ||
104 | }; | ||
105 | |||
106 | #endif | ||
diff --git a/include/video/exynos_dp.h b/include/video/exynos_dp.h index 8847a9d6dd42..bd8cabd344db 100644 --- a/include/video/exynos_dp.h +++ b/include/video/exynos_dp.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #define DP_TIMEOUT_LOOP_COUNT 100 | 15 | #define DP_TIMEOUT_LOOP_COUNT 100 |
16 | #define MAX_CR_LOOP 5 | 16 | #define MAX_CR_LOOP 5 |
17 | #define MAX_EQ_LOOP 4 | 17 | #define MAX_EQ_LOOP 5 |
18 | 18 | ||
19 | enum link_rate_type { | 19 | enum link_rate_type { |
20 | LINK_RATE_1_62GBPS = 0x06, | 20 | LINK_RATE_1_62GBPS = 0x06, |
diff --git a/include/video/exynos_mipi_dsim.h b/include/video/exynos_mipi_dsim.h index 772c770535f1..83ce5e667d47 100644 --- a/include/video/exynos_mipi_dsim.h +++ b/include/video/exynos_mipi_dsim.h | |||
@@ -315,6 +315,7 @@ struct mipi_dsim_lcd_device { | |||
315 | int id; | 315 | int id; |
316 | int bus_id; | 316 | int bus_id; |
317 | int irq; | 317 | int irq; |
318 | int panel_reverse; | ||
318 | 319 | ||
319 | struct mipi_dsim_device *master; | 320 | struct mipi_dsim_device *master; |
320 | void *platform_data; | 321 | void *platform_data; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 1c46a14341dd..c8e59b4a3364 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | struct omap_dss_device; | 52 | struct omap_dss_device; |
53 | struct omap_overlay_manager; | 53 | struct omap_overlay_manager; |
54 | struct snd_aes_iec958; | ||
55 | struct snd_cea_861_aud_if; | ||
54 | 56 | ||
55 | enum omap_display_type { | 57 | enum omap_display_type { |
56 | OMAP_DISPLAY_TYPE_NONE = 0, | 58 | OMAP_DISPLAY_TYPE_NONE = 0, |
@@ -158,6 +160,13 @@ enum omap_dss_display_state { | |||
158 | OMAP_DSS_DISPLAY_SUSPENDED, | 160 | OMAP_DSS_DISPLAY_SUSPENDED, |
159 | }; | 161 | }; |
160 | 162 | ||
163 | enum omap_dss_audio_state { | ||
164 | OMAP_DSS_AUDIO_DISABLED = 0, | ||
165 | OMAP_DSS_AUDIO_ENABLED, | ||
166 | OMAP_DSS_AUDIO_CONFIGURED, | ||
167 | OMAP_DSS_AUDIO_PLAYING, | ||
168 | }; | ||
169 | |||
161 | /* XXX perhaps this should be removed */ | 170 | /* XXX perhaps this should be removed */ |
162 | enum omap_dss_overlay_managers { | 171 | enum omap_dss_overlay_managers { |
163 | OMAP_DSS_OVL_MGR_LCD, | 172 | OMAP_DSS_OVL_MGR_LCD, |
@@ -166,8 +175,9 @@ enum omap_dss_overlay_managers { | |||
166 | }; | 175 | }; |
167 | 176 | ||
168 | enum omap_dss_rotation_type { | 177 | enum omap_dss_rotation_type { |
169 | OMAP_DSS_ROT_DMA = 0, | 178 | OMAP_DSS_ROT_DMA = 1 << 0, |
170 | OMAP_DSS_ROT_VRFB = 1, | 179 | OMAP_DSS_ROT_VRFB = 1 << 1, |
180 | OMAP_DSS_ROT_TILER = 1 << 2, | ||
171 | }; | 181 | }; |
172 | 182 | ||
173 | /* clockwise rotation angle */ | 183 | /* clockwise rotation angle */ |
@@ -309,6 +319,7 @@ struct omap_dss_board_info { | |||
309 | struct omap_dss_device *default_device; | 319 | struct omap_dss_device *default_device; |
310 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | 320 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
311 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | 321 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); |
322 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | ||
312 | }; | 323 | }; |
313 | 324 | ||
314 | /* Init with the board info */ | 325 | /* Init with the board info */ |
@@ -316,11 +327,6 @@ extern int omap_display_init(struct omap_dss_board_info *board_data); | |||
316 | /* HDMI mux init*/ | 327 | /* HDMI mux init*/ |
317 | extern int omap_hdmi_init(enum omap_hdmi_flags flags); | 328 | extern int omap_hdmi_init(enum omap_hdmi_flags flags); |
318 | 329 | ||
319 | struct omap_display_platform_data { | ||
320 | struct omap_dss_board_info *board_data; | ||
321 | /* TODO: Additional members to be added when PM is considered */ | ||
322 | }; | ||
323 | |||
324 | struct omap_video_timings { | 330 | struct omap_video_timings { |
325 | /* Unit: pixels */ | 331 | /* Unit: pixels */ |
326 | u16 x_res; | 332 | u16 x_res; |
@@ -587,6 +593,8 @@ struct omap_dss_device { | |||
587 | 593 | ||
588 | enum omap_dss_display_state state; | 594 | enum omap_dss_display_state state; |
589 | 595 | ||
596 | enum omap_dss_audio_state audio_state; | ||
597 | |||
590 | /* platform specific */ | 598 | /* platform specific */ |
591 | int (*platform_enable)(struct omap_dss_device *dssdev); | 599 | int (*platform_enable)(struct omap_dss_device *dssdev); |
592 | void (*platform_disable)(struct omap_dss_device *dssdev); | 600 | void (*platform_disable)(struct omap_dss_device *dssdev); |
@@ -599,6 +607,11 @@ struct omap_dss_hdmi_data | |||
599 | int hpd_gpio; | 607 | int hpd_gpio; |
600 | }; | 608 | }; |
601 | 609 | ||
610 | struct omap_dss_audio { | ||
611 | struct snd_aes_iec958 *iec; | ||
612 | struct snd_cea_861_aud_if *cea; | ||
613 | }; | ||
614 | |||
602 | struct omap_dss_driver { | 615 | struct omap_dss_driver { |
603 | struct device_driver driver; | 616 | struct device_driver driver; |
604 | 617 | ||
@@ -646,6 +659,24 @@ struct omap_dss_driver { | |||
646 | 659 | ||
647 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | 660 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); |
648 | bool (*detect)(struct omap_dss_device *dssdev); | 661 | bool (*detect)(struct omap_dss_device *dssdev); |
662 | |||
663 | /* | ||
664 | * For display drivers that support audio. This encompasses | ||
665 | * HDMI and DisplayPort at the moment. | ||
666 | */ | ||
667 | /* | ||
668 | * Note: These functions might sleep. Do not call while | ||
669 | * holding a spinlock/readlock. | ||
670 | */ | ||
671 | int (*audio_enable)(struct omap_dss_device *dssdev); | ||
672 | void (*audio_disable)(struct omap_dss_device *dssdev); | ||
673 | bool (*audio_supported)(struct omap_dss_device *dssdev); | ||
674 | int (*audio_config)(struct omap_dss_device *dssdev, | ||
675 | struct omap_dss_audio *audio); | ||
676 | /* Note: These functions may not sleep */ | ||
677 | int (*audio_start)(struct omap_dss_device *dssdev); | ||
678 | void (*audio_stop)(struct omap_dss_device *dssdev); | ||
679 | |||
649 | }; | 680 | }; |
650 | 681 | ||
651 | int omap_dss_register_driver(struct omap_dss_driver *); | 682 | int omap_dss_register_driver(struct omap_dss_driver *); |
@@ -670,6 +701,8 @@ struct omap_overlay *omap_dss_get_overlay(int num); | |||
670 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | 701 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, |
671 | u16 *xres, u16 *yres); | 702 | u16 *xres, u16 *yres); |
672 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | 703 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); |
704 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | ||
705 | struct omap_video_timings *timings); | ||
673 | 706 | ||
674 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | 707 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); |
675 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 708 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
diff --git a/include/video/sh_mobile_hdmi.h b/include/video/sh_mobile_hdmi.h index 728f9de9c258..63d20efa254a 100644 --- a/include/video/sh_mobile_hdmi.h +++ b/include/video/sh_mobile_hdmi.h | |||
@@ -18,9 +18,11 @@ struct clk; | |||
18 | /* | 18 | /* |
19 | * flags format | 19 | * flags format |
20 | * | 20 | * |
21 | * 0x0000000A | 21 | * 0x00000CBA |
22 | * | 22 | * |
23 | * A: Audio source select | 23 | * A: Audio source select |
24 | * B: Int output option | ||
25 | * C: Chip specific option | ||
24 | */ | 26 | */ |
25 | 27 | ||
26 | /* Audio source select */ | 28 | /* Audio source select */ |
@@ -30,6 +32,14 @@ struct clk; | |||
30 | #define HDMI_SND_SRC_DSD (2 << 0) | 32 | #define HDMI_SND_SRC_DSD (2 << 0) |
31 | #define HDMI_SND_SRC_HBR (3 << 0) | 33 | #define HDMI_SND_SRC_HBR (3 << 0) |
32 | 34 | ||
35 | /* Int output option */ | ||
36 | #define HDMI_OUTPUT_PUSH_PULL (1 << 4) /* System control : output mode */ | ||
37 | #define HDMI_OUTPUT_POLARITY_HI (1 << 5) /* System control : output polarity */ | ||
38 | |||
39 | /* Chip specific option */ | ||
40 | #define HDMI_32BIT_REG (1 << 8) | ||
41 | #define HDMI_HAS_HTOP1 (1 << 9) | ||
42 | |||
33 | struct sh_mobile_hdmi_info { | 43 | struct sh_mobile_hdmi_info { |
34 | unsigned int flags; | 44 | unsigned int flags; |
35 | long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, | 45 | long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, |