diff options
Diffstat (limited to 'include')
30 files changed, 383 insertions, 85 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index d6c379dc64fa..9cca3785cab8 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -141,6 +141,8 @@ extern int __gpio_to_irq(unsigned gpio); | |||
141 | * but more typically is configured entirely from userspace. | 141 | * but more typically is configured entirely from userspace. |
142 | */ | 142 | */ |
143 | extern int gpio_export(unsigned gpio, bool direction_may_change); | 143 | extern int gpio_export(unsigned gpio, bool direction_may_change); |
144 | extern int gpio_export_link(struct device *dev, const char *name, | ||
145 | unsigned gpio); | ||
144 | extern void gpio_unexport(unsigned gpio); | 146 | extern void gpio_unexport(unsigned gpio); |
145 | 147 | ||
146 | #endif /* CONFIG_GPIO_SYSFS */ | 148 | #endif /* CONFIG_GPIO_SYSFS */ |
@@ -185,6 +187,12 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change) | |||
185 | return -ENOSYS; | 187 | return -ENOSYS; |
186 | } | 188 | } |
187 | 189 | ||
190 | static inline int gpio_export_link(struct device *dev, const char *name, | ||
191 | unsigned gpio) | ||
192 | { | ||
193 | return -ENOSYS; | ||
194 | } | ||
195 | |||
188 | static inline void gpio_unexport(unsigned gpio) | 196 | static inline void gpio_unexport(unsigned gpio) |
189 | { | 197 | { |
190 | } | 198 | } |
diff --git a/include/asm-generic/kmap_types.h b/include/asm-generic/kmap_types.h index eddbce0f9fb9..e5f234a08540 100644 --- a/include/asm-generic/kmap_types.h +++ b/include/asm-generic/kmap_types.h | |||
@@ -2,34 +2,35 @@ | |||
2 | #define _ASM_GENERIC_KMAP_TYPES_H | 2 | #define _ASM_GENERIC_KMAP_TYPES_H |
3 | 3 | ||
4 | #ifdef __WITH_KM_FENCE | 4 | #ifdef __WITH_KM_FENCE |
5 | # define D(n) __KM_FENCE_##n , | 5 | # define KMAP_D(n) __KM_FENCE_##n , |
6 | #else | 6 | #else |
7 | # define D(n) | 7 | # define KMAP_D(n) |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | enum km_type { | 10 | enum km_type { |
11 | D(0) KM_BOUNCE_READ, | 11 | KMAP_D(0) KM_BOUNCE_READ, |
12 | D(1) KM_SKB_SUNRPC_DATA, | 12 | KMAP_D(1) KM_SKB_SUNRPC_DATA, |
13 | D(2) KM_SKB_DATA_SOFTIRQ, | 13 | KMAP_D(2) KM_SKB_DATA_SOFTIRQ, |
14 | D(3) KM_USER0, | 14 | KMAP_D(3) KM_USER0, |
15 | D(4) KM_USER1, | 15 | KMAP_D(4) KM_USER1, |
16 | D(5) KM_BIO_SRC_IRQ, | 16 | KMAP_D(5) KM_BIO_SRC_IRQ, |
17 | D(6) KM_BIO_DST_IRQ, | 17 | KMAP_D(6) KM_BIO_DST_IRQ, |
18 | D(7) KM_PTE0, | 18 | KMAP_D(7) KM_PTE0, |
19 | D(8) KM_PTE1, | 19 | KMAP_D(8) KM_PTE1, |
20 | D(9) KM_IRQ0, | 20 | KMAP_D(9) KM_IRQ0, |
21 | D(10) KM_IRQ1, | 21 | KMAP_D(10) KM_IRQ1, |
22 | D(11) KM_SOFTIRQ0, | 22 | KMAP_D(11) KM_SOFTIRQ0, |
23 | D(12) KM_SOFTIRQ1, | 23 | KMAP_D(12) KM_SOFTIRQ1, |
24 | D(13) KM_SYNC_ICACHE, | 24 | KMAP_D(13) KM_SYNC_ICACHE, |
25 | D(14) KM_SYNC_DCACHE, | 25 | KMAP_D(14) KM_SYNC_DCACHE, |
26 | D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ | 26 | /* UML specific, for copy_*_user - used in do_op_one_page */ |
27 | D(16) KM_IRQ_PTE, | 27 | KMAP_D(15) KM_UML_USERCOPY, |
28 | D(17) KM_NMI, | 28 | KMAP_D(16) KM_IRQ_PTE, |
29 | D(18) KM_NMI_PTE, | 29 | KMAP_D(17) KM_NMI, |
30 | D(19) KM_TYPE_NR | 30 | KMAP_D(18) KM_NMI_PTE, |
31 | KMAP_D(19) KM_TYPE_NR | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | #undef D | 34 | #undef KMAP_D |
34 | 35 | ||
35 | #endif | 36 | #endif |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index d083561337f2..b3bfabc258f3 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -23,4 +23,20 @@ extern char __ctors_start[], __ctors_end[]; | |||
23 | #define dereference_function_descriptor(p) (p) | 23 | #define dereference_function_descriptor(p) (p) |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | /* random extra sections (if any). Override | ||
27 | * in asm/sections.h */ | ||
28 | #ifndef arch_is_kernel_text | ||
29 | static inline int arch_is_kernel_text(unsigned long addr) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | #ifndef arch_is_kernel_data | ||
36 | static inline int arch_is_kernel_data(unsigned long addr) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | #endif | ||
41 | |||
26 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 42 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h index e0a0cdc2da43..69a21e0ebd33 100644 --- a/include/linux/anon_inodes.h +++ b/include/linux/anon_inodes.h | |||
@@ -8,6 +8,9 @@ | |||
8 | #ifndef _LINUX_ANON_INODES_H | 8 | #ifndef _LINUX_ANON_INODES_H |
9 | #define _LINUX_ANON_INODES_H | 9 | #define _LINUX_ANON_INODES_H |
10 | 10 | ||
11 | struct file *anon_inode_getfile(const char *name, | ||
12 | const struct file_operations *fops, | ||
13 | void *priv, int flags); | ||
11 | int anon_inode_getfd(const char *name, const struct file_operations *fops, | 14 | int anon_inode_getfd(const char *name, const struct file_operations *fops, |
12 | void *priv, int flags); | 15 | void *priv, int flags); |
13 | 16 | ||
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index b8125b2eb665..47dac5ea8d3a 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h | |||
@@ -52,6 +52,7 @@ struct proc_event { | |||
52 | PROC_EVENT_EXEC = 0x00000002, | 52 | PROC_EVENT_EXEC = 0x00000002, |
53 | PROC_EVENT_UID = 0x00000004, | 53 | PROC_EVENT_UID = 0x00000004, |
54 | PROC_EVENT_GID = 0x00000040, | 54 | PROC_EVENT_GID = 0x00000040, |
55 | PROC_EVENT_SID = 0x00000080, | ||
55 | /* "next" should be 0x00000400 */ | 56 | /* "next" should be 0x00000400 */ |
56 | /* "last" is the last process event: exit */ | 57 | /* "last" is the last process event: exit */ |
57 | PROC_EVENT_EXIT = 0x80000000 | 58 | PROC_EVENT_EXIT = 0x80000000 |
@@ -89,6 +90,11 @@ struct proc_event { | |||
89 | } e; | 90 | } e; |
90 | } id; | 91 | } id; |
91 | 92 | ||
93 | struct sid_proc_event { | ||
94 | __kernel_pid_t process_pid; | ||
95 | __kernel_pid_t process_tgid; | ||
96 | } sid; | ||
97 | |||
92 | struct exit_proc_event { | 98 | struct exit_proc_event { |
93 | __kernel_pid_t process_pid; | 99 | __kernel_pid_t process_pid; |
94 | __kernel_pid_t process_tgid; | 100 | __kernel_pid_t process_tgid; |
@@ -102,6 +108,7 @@ struct proc_event { | |||
102 | void proc_fork_connector(struct task_struct *task); | 108 | void proc_fork_connector(struct task_struct *task); |
103 | void proc_exec_connector(struct task_struct *task); | 109 | void proc_exec_connector(struct task_struct *task); |
104 | void proc_id_connector(struct task_struct *task, int which_id); | 110 | void proc_id_connector(struct task_struct *task, int which_id); |
111 | void proc_sid_connector(struct task_struct *task); | ||
105 | void proc_exit_connector(struct task_struct *task); | 112 | void proc_exit_connector(struct task_struct *task); |
106 | #else | 113 | #else |
107 | static inline void proc_fork_connector(struct task_struct *task) | 114 | static inline void proc_fork_connector(struct task_struct *task) |
@@ -114,6 +121,9 @@ static inline void proc_id_connector(struct task_struct *task, | |||
114 | int which_id) | 121 | int which_id) |
115 | {} | 122 | {} |
116 | 123 | ||
124 | static inline void proc_sid_connector(struct task_struct *task) | ||
125 | {} | ||
126 | |||
117 | static inline void proc_exit_connector(struct task_struct *task) | 127 | static inline void proc_exit_connector(struct task_struct *task) |
118 | {} | 128 | {} |
119 | #endif /* CONFIG_PROC_EVENTS */ | 129 | #endif /* CONFIG_PROC_EVENTS */ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 796df12091b7..9b1d458aac6e 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -715,6 +715,18 @@ static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) | |||
715 | } | 715 | } |
716 | 716 | ||
717 | /** | 717 | /** |
718 | * cpumask_test_and_clear_cpu - atomically test and clear a cpu in a cpumask | ||
719 | * @cpu: cpu number (< nr_cpu_ids) | ||
720 | * @cpumask: the cpumask pointer | ||
721 | * | ||
722 | * test_and_clear_bit wrapper for cpumasks. | ||
723 | */ | ||
724 | static inline int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) | ||
725 | { | ||
726 | return test_and_clear_bit(cpumask_check(cpu), cpumask_bits(cpumask)); | ||
727 | } | ||
728 | |||
729 | /** | ||
718 | * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask | 730 | * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask |
719 | * @dstp: the cpumask pointer | 731 | * @dstp: the cpumask pointer |
720 | */ | 732 | */ |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index 3b85ba6479f4..94dd10366a78 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #ifdef CONFIG_EVENTFD | 28 | #ifdef CONFIG_EVENTFD |
29 | 29 | ||
30 | struct file *eventfd_file_create(unsigned int count, int flags); | ||
30 | struct eventfd_ctx *eventfd_ctx_get(struct eventfd_ctx *ctx); | 31 | struct eventfd_ctx *eventfd_ctx_get(struct eventfd_ctx *ctx); |
31 | void eventfd_ctx_put(struct eventfd_ctx *ctx); | 32 | void eventfd_ctx_put(struct eventfd_ctx *ctx); |
32 | struct file *eventfd_fget(int fd); | 33 | struct file *eventfd_fget(int fd); |
@@ -40,6 +41,11 @@ int eventfd_signal(struct eventfd_ctx *ctx, int n); | |||
40 | * Ugly ugly ugly error layer to support modules that uses eventfd but | 41 | * Ugly ugly ugly error layer to support modules that uses eventfd but |
41 | * pretend to work in !CONFIG_EVENTFD configurations. Namely, AIO. | 42 | * pretend to work in !CONFIG_EVENTFD configurations. Namely, AIO. |
42 | */ | 43 | */ |
44 | static inline struct file *eventfd_file_create(unsigned int count, int flags) | ||
45 | { | ||
46 | return ERR_PTR(-ENOSYS); | ||
47 | } | ||
48 | |||
43 | static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd) | 49 | static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd) |
44 | { | 50 | { |
45 | return ERR_PTR(-ENOSYS); | 51 | return ERR_PTR(-ENOSYS); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index f53e9b868c26..557bdad320b6 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -220,7 +220,7 @@ static inline enum zone_type gfp_zone(gfp_t flags) | |||
220 | ((1 << ZONES_SHIFT) - 1); | 220 | ((1 << ZONES_SHIFT) - 1); |
221 | 221 | ||
222 | if (__builtin_constant_p(bit)) | 222 | if (__builtin_constant_p(bit)) |
223 | BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 223 | MAYBE_BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
224 | else { | 224 | else { |
225 | #ifdef CONFIG_DEBUG_VM | 225 | #ifdef CONFIG_DEBUG_VM |
226 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 226 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index e10c49a5b96e..059bd189d35d 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | 14 | ||
15 | struct device; | ||
16 | |||
15 | /* | 17 | /* |
16 | * Some platforms don't support the GPIO programming interface. | 18 | * Some platforms don't support the GPIO programming interface. |
17 | * | 19 | * |
@@ -89,6 +91,15 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change) | |||
89 | return -EINVAL; | 91 | return -EINVAL; |
90 | } | 92 | } |
91 | 93 | ||
94 | static inline int gpio_export_link(struct device *dev, const char *name, | ||
95 | unsigned gpio) | ||
96 | { | ||
97 | /* GPIO can never have been exported */ | ||
98 | WARN_ON(1); | ||
99 | return -EINVAL; | ||
100 | } | ||
101 | |||
102 | |||
92 | static inline void gpio_unexport(unsigned gpio) | 103 | static inline void gpio_unexport(unsigned gpio) |
93 | { | 104 | { |
94 | /* GPIO can never have been exported */ | 105 | /* GPIO can never have been exported */ |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 786e7b8cece9..83aa81297ea3 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -184,5 +184,9 @@ extern void __devm_release_region(struct device *dev, struct resource *parent, | |||
184 | extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size); | 184 | extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size); |
185 | extern int iomem_is_exclusive(u64 addr); | 185 | extern int iomem_is_exclusive(u64 addr); |
186 | 186 | ||
187 | extern int | ||
188 | walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, | ||
189 | void *arg, int (*func)(unsigned long, unsigned long, void *)); | ||
190 | |||
187 | #endif /* __ASSEMBLY__ */ | 191 | #endif /* __ASSEMBLY__ */ |
188 | #endif /* _LINUX_IOPORT_H */ | 192 | #endif /* _LINUX_IOPORT_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index a1187a0c99b4..331530cd3cc6 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -556,7 +556,7 @@ struct transaction_s | |||
556 | * This transaction is being forced and some process is | 556 | * This transaction is being forced and some process is |
557 | * waiting for it to finish. | 557 | * waiting for it to finish. |
558 | */ | 558 | */ |
559 | int t_synchronous_commit:1; | 559 | unsigned int t_synchronous_commit:1; |
560 | }; | 560 | }; |
561 | 561 | ||
562 | /** | 562 | /** |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2b5b1e0899a8..d3cd23f30039 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -146,7 +146,7 @@ extern int _cond_resched(void); | |||
146 | #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) | 146 | #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) |
147 | 147 | ||
148 | #define abs(x) ({ \ | 148 | #define abs(x) ({ \ |
149 | int __x = (x); \ | 149 | long __x = (x); \ |
150 | (__x < 0) ? -__x : __x; \ | 150 | (__x < 0) ? -__x : __x; \ |
151 | }) | 151 | }) |
152 | 152 | ||
@@ -246,14 +246,16 @@ extern int printk_ratelimit(void); | |||
246 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 246 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
247 | unsigned int interval_msec); | 247 | unsigned int interval_msec); |
248 | 248 | ||
249 | extern int printk_delay_msec; | ||
250 | |||
249 | /* | 251 | /* |
250 | * Print a one-time message (analogous to WARN_ONCE() et al): | 252 | * Print a one-time message (analogous to WARN_ONCE() et al): |
251 | */ | 253 | */ |
252 | #define printk_once(x...) ({ \ | 254 | #define printk_once(x...) ({ \ |
253 | static int __print_once = 1; \ | 255 | static bool __print_once = true; \ |
254 | \ | 256 | \ |
255 | if (__print_once) { \ | 257 | if (__print_once) { \ |
256 | __print_once = 0; \ | 258 | __print_once = false; \ |
257 | printk(x); \ | 259 | printk(x); \ |
258 | } \ | 260 | } \ |
259 | }) | 261 | }) |
@@ -676,13 +678,17 @@ struct sysinfo { | |||
676 | }; | 678 | }; |
677 | 679 | ||
678 | /* Force a compilation error if condition is true */ | 680 | /* Force a compilation error if condition is true */ |
679 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 681 | #define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition)) |
682 | |||
683 | /* Force a compilation error if condition is constant and true */ | ||
684 | #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) | ||
680 | 685 | ||
681 | /* Force a compilation error if condition is true, but also produce a | 686 | /* Force a compilation error if condition is true, but also produce a |
682 | result (of value 0 and type size_t), so the expression can be used | 687 | result (of value 0 and type size_t), so the expression can be used |
683 | e.g. in a structure initializer (or where-ever else comma expressions | 688 | e.g. in a structure initializer (or where-ever else comma expressions |
684 | aren't permitted). */ | 689 | aren't permitted). */ |
685 | #define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) | 690 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
691 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | ||
686 | 692 | ||
687 | /* Trap pasters of __FUNCTION__ at compile-time */ | 693 | /* Trap pasters of __FUNCTION__ at compile-time */ |
688 | #define __FUNCTION__ (__func__) | 694 | #define __FUNCTION__ (__func__) |
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index c8006607f947..e880d4cf9e22 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h | |||
@@ -145,12 +145,14 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size) | |||
145 | 145 | ||
146 | #define kmemcheck_annotate_bitfield(ptr, name) \ | 146 | #define kmemcheck_annotate_bitfield(ptr, name) \ |
147 | do { \ | 147 | do { \ |
148 | int _n; \ | ||
149 | \ | ||
148 | if (!ptr) \ | 150 | if (!ptr) \ |
149 | break; \ | 151 | break; \ |
150 | \ | 152 | \ |
151 | int _n = (long) &((ptr)->name##_end) \ | 153 | _n = (long) &((ptr)->name##_end) \ |
152 | - (long) &((ptr)->name##_begin); \ | 154 | - (long) &((ptr)->name##_begin); \ |
153 | BUILD_BUG_ON(_n < 0); \ | 155 | MAYBE_BUILD_BUG_ON(_n < 0); \ |
154 | \ | 156 | \ |
155 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ | 157 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ |
156 | } while (0) | 158 | } while (0) |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 1923327b9869..76285e01b39e 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -12,7 +12,9 @@ | |||
12 | #define SYSFS_MAGIC 0x62656572 | 12 | #define SYSFS_MAGIC 0x62656572 |
13 | #define SECURITYFS_MAGIC 0x73636673 | 13 | #define SECURITYFS_MAGIC 0x73636673 |
14 | #define SELINUX_MAGIC 0xf97cff8c | 14 | #define SELINUX_MAGIC 0xf97cff8c |
15 | #define RAMFS_MAGIC 0x858458f6 /* some random number */ | ||
15 | #define TMPFS_MAGIC 0x01021994 | 16 | #define TMPFS_MAGIC 0x01021994 |
17 | #define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ | ||
16 | #define SQUASHFS_MAGIC 0x73717368 | 18 | #define SQUASHFS_MAGIC 0x73717368 |
17 | #define EFS_SUPER_MAGIC 0x414A53 | 19 | #define EFS_SUPER_MAGIC 0x414A53 |
18 | #define EXT2_SUPER_MAGIC 0xEF53 | 20 | #define EXT2_SUPER_MAGIC 0xEF53 |
@@ -53,4 +55,8 @@ | |||
53 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA | 55 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA |
54 | 56 | ||
55 | #define STACK_END_MAGIC 0x57AC6E9D | 57 | #define STACK_END_MAGIC 0x57AC6E9D |
58 | |||
59 | #define DEVPTS_SUPER_MAGIC 0x1cd1 | ||
60 | #define SOCKFS_MAGIC 0x534F434B | ||
61 | |||
56 | #endif /* __LINUX_MAGIC_H__ */ | 62 | #endif /* __LINUX_MAGIC_H__ */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index d95f72e79b82..fed969281a41 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -191,14 +191,6 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
191 | 191 | ||
192 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 192 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
193 | 193 | ||
194 | /* | ||
195 | * Walk through all memory which is registered as resource. | ||
196 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
197 | */ | ||
198 | extern int walk_memory_resource(unsigned long start_pfn, | ||
199 | unsigned long nr_pages, void *arg, | ||
200 | int (*func)(unsigned long, unsigned long, void *)); | ||
201 | |||
202 | #ifdef CONFIG_MEMORY_HOTREMOVE | 194 | #ifdef CONFIG_MEMORY_HOTREMOVE |
203 | 195 | ||
204 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); | 196 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5946e2ff9fe8..b6eae5e3144b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -285,6 +285,14 @@ static inline int is_vmalloc_addr(const void *x) | |||
285 | return 0; | 285 | return 0; |
286 | #endif | 286 | #endif |
287 | } | 287 | } |
288 | #ifdef CONFIG_MMU | ||
289 | extern int is_vmalloc_or_module_addr(const void *x); | ||
290 | #else | ||
291 | static int is_vmalloc_or_module_addr(const void *x) | ||
292 | { | ||
293 | return 0; | ||
294 | } | ||
295 | #endif | ||
288 | 296 | ||
289 | static inline struct page *compound_head(struct page *page) | 297 | static inline struct page *compound_head(struct page *page) |
290 | { | 298 | { |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 403aa505f27e..2ee22e8af110 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -40,6 +40,8 @@ struct mmc_csd { | |||
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct mmc_ext_csd { | 42 | struct mmc_ext_csd { |
43 | u8 rev; | ||
44 | unsigned int sa_timeout; /* Units: 100ns */ | ||
43 | unsigned int hs_max_dtr; | 45 | unsigned int hs_max_dtr; |
44 | unsigned int sectors; | 46 | unsigned int sectors; |
45 | }; | 47 | }; |
@@ -62,7 +64,8 @@ struct sdio_cccr { | |||
62 | low_speed:1, | 64 | low_speed:1, |
63 | wide_bus:1, | 65 | wide_bus:1, |
64 | high_power:1, | 66 | high_power:1, |
65 | high_speed:1; | 67 | high_speed:1, |
68 | disable_cd:1; | ||
66 | }; | 69 | }; |
67 | 70 | ||
68 | struct sdio_cis { | 71 | struct sdio_cis { |
@@ -94,6 +97,8 @@ struct mmc_card { | |||
94 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ | 97 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ |
95 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ | 98 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ |
96 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ | 99 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ |
100 | unsigned int quirks; /* card quirks */ | ||
101 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ | ||
97 | 102 | ||
98 | u32 raw_cid[4]; /* raw card CID */ | 103 | u32 raw_cid[4]; /* raw card CID */ |
99 | u32 raw_csd[4]; /* raw card CSD */ | 104 | u32 raw_csd[4]; /* raw card CSD */ |
@@ -129,6 +134,11 @@ struct mmc_card { | |||
129 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | 134 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) |
130 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | 135 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) |
131 | 136 | ||
137 | static inline int mmc_card_lenient_fn0(const struct mmc_card *c) | ||
138 | { | ||
139 | return c->quirks & MMC_QUIRK_LENIENT_FN0; | ||
140 | } | ||
141 | |||
132 | #define mmc_card_name(c) ((c)->cid.prod_name) | 142 | #define mmc_card_name(c) ((c)->cid.prod_name) |
133 | #define mmc_card_id(c) (dev_name(&(c)->dev)) | 143 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
134 | 144 | ||
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 7ac8b500d55c..e4898e9eeb59 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -139,6 +139,7 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int); | |||
139 | 139 | ||
140 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); | 140 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); |
141 | extern void mmc_release_host(struct mmc_host *host); | 141 | extern void mmc_release_host(struct mmc_host *host); |
142 | extern int mmc_try_claim_host(struct mmc_host *host); | ||
142 | 143 | ||
143 | /** | 144 | /** |
144 | * mmc_claim_host - exclusively claim a host | 145 | * mmc_claim_host - exclusively claim a host |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 3e7615e9087e..81bb42358595 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -51,6 +51,35 @@ struct mmc_ios { | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct mmc_host_ops { | 53 | struct mmc_host_ops { |
54 | /* | ||
55 | * Hosts that support power saving can use the 'enable' and 'disable' | ||
56 | * methods to exit and enter power saving states. 'enable' is called | ||
57 | * when the host is claimed and 'disable' is called (or scheduled with | ||
58 | * a delay) when the host is released. The 'disable' is scheduled if | ||
59 | * the disable delay set by 'mmc_set_disable_delay()' is non-zero, | ||
60 | * otherwise 'disable' is called immediately. 'disable' may be | ||
61 | * scheduled repeatedly, to permit ever greater power saving at the | ||
62 | * expense of ever greater latency to re-enable. Rescheduling is | ||
63 | * determined by the return value of the 'disable' method. A positive | ||
64 | * value gives the delay in milliseconds. | ||
65 | * | ||
66 | * In the case where a host function (like set_ios) may be called | ||
67 | * with or without the host claimed, enabling and disabling can be | ||
68 | * done directly and will nest correctly. Call 'mmc_host_enable()' and | ||
69 | * 'mmc_host_lazy_disable()' for this purpose, but note that these | ||
70 | * functions must be paired. | ||
71 | * | ||
72 | * Alternatively, 'mmc_host_enable()' may be paired with | ||
73 | * 'mmc_host_disable()' which calls 'disable' immediately. In this | ||
74 | * case the 'disable' method will be called with 'lazy' set to 0. | ||
75 | * This is mainly useful for error paths. | ||
76 | * | ||
77 | * Because lazy disable may be called from a work queue, the 'disable' | ||
78 | * method must claim the host when 'lazy' != 0, which will work | ||
79 | * correctly because recursion is detected and handled. | ||
80 | */ | ||
81 | int (*enable)(struct mmc_host *host); | ||
82 | int (*disable)(struct mmc_host *host, int lazy); | ||
54 | void (*request)(struct mmc_host *host, struct mmc_request *req); | 83 | void (*request)(struct mmc_host *host, struct mmc_request *req); |
55 | /* | 84 | /* |
56 | * Avoid calling these three functions too often or in a "fast path", | 85 | * Avoid calling these three functions too often or in a "fast path", |
@@ -118,6 +147,9 @@ struct mmc_host { | |||
118 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ | 147 | #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ |
119 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ | 148 | #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ |
120 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ | 149 | #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */ |
150 | #define MMC_CAP_DISABLE (1 << 7) /* Can the host be disabled */ | ||
151 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | ||
152 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | ||
121 | 153 | ||
122 | /* host specific block data */ | 154 | /* host specific block data */ |
123 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 155 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
@@ -142,9 +174,18 @@ struct mmc_host { | |||
142 | unsigned int removed:1; /* host is being removed */ | 174 | unsigned int removed:1; /* host is being removed */ |
143 | #endif | 175 | #endif |
144 | 176 | ||
177 | /* Only used with MMC_CAP_DISABLE */ | ||
178 | int enabled; /* host is enabled */ | ||
179 | int nesting_cnt; /* "enable" nesting count */ | ||
180 | int en_dis_recurs; /* detect recursion */ | ||
181 | unsigned int disable_delay; /* disable delay in msecs */ | ||
182 | struct delayed_work disable; /* disabling work */ | ||
183 | |||
145 | struct mmc_card *card; /* device attached to this host */ | 184 | struct mmc_card *card; /* device attached to this host */ |
146 | 185 | ||
147 | wait_queue_head_t wq; | 186 | wait_queue_head_t wq; |
187 | struct task_struct *claimer; /* task that has host claimed */ | ||
188 | int claim_cnt; /* "claim" nesting count */ | ||
148 | 189 | ||
149 | struct delayed_work detect; | 190 | struct delayed_work detect; |
150 | 191 | ||
@@ -183,6 +224,9 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
183 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 224 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
184 | extern int mmc_resume_host(struct mmc_host *); | 225 | extern int mmc_resume_host(struct mmc_host *); |
185 | 226 | ||
227 | extern void mmc_power_save_host(struct mmc_host *host); | ||
228 | extern void mmc_power_restore_host(struct mmc_host *host); | ||
229 | |||
186 | extern void mmc_detect_change(struct mmc_host *, unsigned long delay); | 230 | extern void mmc_detect_change(struct mmc_host *, unsigned long delay); |
187 | extern void mmc_request_done(struct mmc_host *, struct mmc_request *); | 231 | extern void mmc_request_done(struct mmc_host *, struct mmc_request *); |
188 | 232 | ||
@@ -197,5 +241,19 @@ struct regulator; | |||
197 | int mmc_regulator_get_ocrmask(struct regulator *supply); | 241 | int mmc_regulator_get_ocrmask(struct regulator *supply); |
198 | int mmc_regulator_set_ocr(struct regulator *supply, unsigned short vdd_bit); | 242 | int mmc_regulator_set_ocr(struct regulator *supply, unsigned short vdd_bit); |
199 | 243 | ||
244 | int mmc_card_awake(struct mmc_host *host); | ||
245 | int mmc_card_sleep(struct mmc_host *host); | ||
246 | int mmc_card_can_sleep(struct mmc_host *host); | ||
247 | |||
248 | int mmc_host_enable(struct mmc_host *host); | ||
249 | int mmc_host_disable(struct mmc_host *host); | ||
250 | int mmc_host_lazy_disable(struct mmc_host *host); | ||
251 | |||
252 | static inline void mmc_set_disable_delay(struct mmc_host *host, | ||
253 | unsigned int disable_delay) | ||
254 | { | ||
255 | host->disable_delay = disable_delay; | ||
256 | } | ||
257 | |||
200 | #endif | 258 | #endif |
201 | 259 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 14b81f3e5232..c02c8db73701 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define MMC_ALL_SEND_CID 2 /* bcr R2 */ | 31 | #define MMC_ALL_SEND_CID 2 /* bcr R2 */ |
32 | #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ | 32 | #define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */ |
33 | #define MMC_SET_DSR 4 /* bc [31:16] RCA */ | 33 | #define MMC_SET_DSR 4 /* bc [31:16] RCA */ |
34 | #define MMC_SLEEP_AWAKE 5 /* ac [31:16] RCA 15:flg R1b */ | ||
34 | #define MMC_SWITCH 6 /* ac [31:0] See below R1b */ | 35 | #define MMC_SWITCH 6 /* ac [31:0] See below R1b */ |
35 | #define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */ | 36 | #define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */ |
36 | #define MMC_SEND_EXT_CSD 8 /* adtc R1 */ | 37 | #define MMC_SEND_EXT_CSD 8 /* adtc R1 */ |
@@ -127,6 +128,7 @@ | |||
127 | #define R1_STATUS(x) (x & 0xFFFFE000) | 128 | #define R1_STATUS(x) (x & 0xFFFFE000) |
128 | #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ | 129 | #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ |
129 | #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ | 130 | #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ |
131 | #define R1_SWITCH_ERROR (1 << 7) /* sx, c */ | ||
130 | #define R1_APP_CMD (1 << 5) /* sr, c */ | 132 | #define R1_APP_CMD (1 << 5) /* sr, c */ |
131 | 133 | ||
132 | /* | 134 | /* |
@@ -254,6 +256,7 @@ struct _mmc_csd { | |||
254 | #define EXT_CSD_CARD_TYPE 196 /* RO */ | 256 | #define EXT_CSD_CARD_TYPE 196 /* RO */ |
255 | #define EXT_CSD_REV 192 /* RO */ | 257 | #define EXT_CSD_REV 192 /* RO */ |
256 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ | 258 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ |
259 | #define EXT_CSD_S_A_TIMEOUT 217 | ||
257 | 260 | ||
258 | /* | 261 | /* |
259 | * EXT_CSD field definitions | 262 | * EXT_CSD field definitions |
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index 451bdfc85830..ac3ab683fec6 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
@@ -67,6 +67,7 @@ struct sdio_func { | |||
67 | 67 | ||
68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) | 68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) |
69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) | 69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) |
70 | #define dev_to_sdio_func(d) container_of(d, struct sdio_func, dev) | ||
70 | 71 | ||
71 | /* | 72 | /* |
72 | * SDIO function device driver | 73 | * SDIO function device driver |
@@ -81,6 +82,8 @@ struct sdio_driver { | |||
81 | struct device_driver drv; | 82 | struct device_driver drv; |
82 | }; | 83 | }; |
83 | 84 | ||
85 | #define to_sdio_driver(d) container_of(d, struct sdio_driver, drv) | ||
86 | |||
84 | /** | 87 | /** |
85 | * SDIO_DEVICE - macro used to describe a specific SDIO device | 88 | * SDIO_DEVICE - macro used to describe a specific SDIO device |
86 | * @vend: the 16 bit manufacturer code | 89 | * @vend: the 16 bit manufacturer code |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 1bf5900ffe43..f58e9d836f32 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -399,6 +399,17 @@ struct i2c_device_id { | |||
399 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 399 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
400 | }; | 400 | }; |
401 | 401 | ||
402 | /* spi */ | ||
403 | |||
404 | #define SPI_NAME_SIZE 32 | ||
405 | #define SPI_MODULE_PREFIX "spi:" | ||
406 | |||
407 | struct spi_device_id { | ||
408 | char name[SPI_NAME_SIZE]; | ||
409 | kernel_ulong_t driver_data /* Data private to the driver */ | ||
410 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
411 | }; | ||
412 | |||
402 | /* dmi */ | 413 | /* dmi */ |
403 | enum dmi_field { | 414 | enum dmi_field { |
404 | DMI_NONE, | 415 | DMI_NONE, |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 03bbe9039104..510ffdd5020e 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -60,7 +60,7 @@ extern spinlock_t nfsd_drc_lock; | |||
60 | extern unsigned int nfsd_drc_max_mem; | 60 | extern unsigned int nfsd_drc_max_mem; |
61 | extern unsigned int nfsd_drc_mem_used; | 61 | extern unsigned int nfsd_drc_mem_used; |
62 | 62 | ||
63 | extern struct seq_operations nfs_exports_op; | 63 | extern const struct seq_operations nfs_exports_op; |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Function prototypes. | 66 | * Function prototypes. |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index e6e77d31c418..379eaed72d4b 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -78,10 +78,19 @@ struct proc_dir_entry { | |||
78 | struct list_head pde_openers; /* who did ->open, but not ->release */ | 78 | struct list_head pde_openers; /* who did ->open, but not ->release */ |
79 | }; | 79 | }; |
80 | 80 | ||
81 | enum kcore_type { | ||
82 | KCORE_TEXT, | ||
83 | KCORE_VMALLOC, | ||
84 | KCORE_RAM, | ||
85 | KCORE_VMEMMAP, | ||
86 | KCORE_OTHER, | ||
87 | }; | ||
88 | |||
81 | struct kcore_list { | 89 | struct kcore_list { |
82 | struct kcore_list *next; | 90 | struct list_head list; |
83 | unsigned long addr; | 91 | unsigned long addr; |
84 | size_t size; | 92 | size_t size; |
93 | int type; | ||
85 | }; | 94 | }; |
86 | 95 | ||
87 | struct vmcore { | 96 | struct vmcore { |
@@ -233,11 +242,12 @@ static inline void dup_mm_exe_file(struct mm_struct *oldmm, | |||
233 | #endif /* CONFIG_PROC_FS */ | 242 | #endif /* CONFIG_PROC_FS */ |
234 | 243 | ||
235 | #if !defined(CONFIG_PROC_KCORE) | 244 | #if !defined(CONFIG_PROC_KCORE) |
236 | static inline void kclist_add(struct kcore_list *new, void *addr, size_t size) | 245 | static inline void |
246 | kclist_add(struct kcore_list *new, void *addr, size_t size, int type) | ||
237 | { | 247 | { |
238 | } | 248 | } |
239 | #else | 249 | #else |
240 | extern void kclist_add(struct kcore_list *, void *, size_t); | 250 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); |
241 | #endif | 251 | #endif |
242 | 252 | ||
243 | union proc_op { | 253 | union proc_op { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 97b10da0a3ea..3cbc6c0be666 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -426,6 +426,15 @@ static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm) | |||
426 | return max(mm->hiwater_rss, get_mm_rss(mm)); | 426 | return max(mm->hiwater_rss, get_mm_rss(mm)); |
427 | } | 427 | } |
428 | 428 | ||
429 | static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, | ||
430 | struct mm_struct *mm) | ||
431 | { | ||
432 | unsigned long hiwater_rss = get_mm_hiwater_rss(mm); | ||
433 | |||
434 | if (*maxrss < hiwater_rss) | ||
435 | *maxrss = hiwater_rss; | ||
436 | } | ||
437 | |||
429 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) | 438 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) |
430 | { | 439 | { |
431 | return max(mm->hiwater_vm, mm->total_vm); | 440 | return max(mm->hiwater_vm, mm->total_vm); |
@@ -612,6 +621,7 @@ struct signal_struct { | |||
612 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 621 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
613 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | 622 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; |
614 | unsigned long inblock, oublock, cinblock, coublock; | 623 | unsigned long inblock, oublock, cinblock, coublock; |
624 | unsigned long maxrss, cmaxrss; | ||
615 | struct task_io_accounting ioac; | 625 | struct task_io_accounting ioac; |
616 | 626 | ||
617 | /* | 627 | /* |
@@ -1519,6 +1529,7 @@ struct task_struct { | |||
1519 | /* bitmask of trace recursion */ | 1529 | /* bitmask of trace recursion */ |
1520 | unsigned long trace_recursion; | 1530 | unsigned long trace_recursion; |
1521 | #endif /* CONFIG_TRACING */ | 1531 | #endif /* CONFIG_TRACING */ |
1532 | unsigned long stack_start; | ||
1522 | }; | 1533 | }; |
1523 | 1534 | ||
1524 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | 1535 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ |
diff --git a/include/linux/spi/mc33880.h b/include/linux/spi/mc33880.h new file mode 100644 index 000000000000..82ffccd6fbe5 --- /dev/null +++ b/include/linux/spi/mc33880.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef LINUX_SPI_MC33880_H | ||
2 | #define LINUX_SPI_MC33880_H | ||
3 | |||
4 | struct mc33880_platform_data { | ||
5 | /* number assigned to the first GPIO */ | ||
6 | unsigned base; | ||
7 | }; | ||
8 | |||
9 | #endif | ||
10 | |||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index c47c4b4da97e..97b60b37f445 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define __LINUX_SPI_H | 20 | #define __LINUX_SPI_H |
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/mod_devicetable.h> | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
@@ -86,7 +87,7 @@ struct spi_device { | |||
86 | int irq; | 87 | int irq; |
87 | void *controller_state; | 88 | void *controller_state; |
88 | void *controller_data; | 89 | void *controller_data; |
89 | char modalias[32]; | 90 | char modalias[SPI_NAME_SIZE]; |
90 | 91 | ||
91 | /* | 92 | /* |
92 | * likely need more hooks for more protocol options affecting how | 93 | * likely need more hooks for more protocol options affecting how |
@@ -145,6 +146,7 @@ struct spi_message; | |||
145 | 146 | ||
146 | /** | 147 | /** |
147 | * struct spi_driver - Host side "protocol" driver | 148 | * struct spi_driver - Host side "protocol" driver |
149 | * @id_table: List of SPI devices supported by this driver | ||
148 | * @probe: Binds this driver to the spi device. Drivers can verify | 150 | * @probe: Binds this driver to the spi device. Drivers can verify |
149 | * that the device is actually present, and may need to configure | 151 | * that the device is actually present, and may need to configure |
150 | * characteristics (such as bits_per_word) which weren't needed for | 152 | * characteristics (such as bits_per_word) which weren't needed for |
@@ -170,6 +172,7 @@ struct spi_message; | |||
170 | * MMC, RTC, filesystem character device nodes, and hardware monitoring. | 172 | * MMC, RTC, filesystem character device nodes, and hardware monitoring. |
171 | */ | 173 | */ |
172 | struct spi_driver { | 174 | struct spi_driver { |
175 | const struct spi_device_id *id_table; | ||
173 | int (*probe)(struct spi_device *spi); | 176 | int (*probe)(struct spi_device *spi); |
174 | int (*remove)(struct spi_device *spi); | 177 | int (*remove)(struct spi_device *spi); |
175 | void (*shutdown)(struct spi_device *spi); | 178 | void (*shutdown)(struct spi_device *spi); |
@@ -207,6 +210,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
207 | * each slave has a chipselect signal, but it's common that not | 210 | * each slave has a chipselect signal, but it's common that not |
208 | * every chipselect is connected to a slave. | 211 | * every chipselect is connected to a slave. |
209 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. | 212 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. |
213 | * @mode_bits: flags understood by this controller driver | ||
214 | * @flags: other constraints relevant to this driver | ||
210 | * @setup: updates the device mode and clocking records used by a | 215 | * @setup: updates the device mode and clocking records used by a |
211 | * device's SPI controller; protocol code may call this. This | 216 | * device's SPI controller; protocol code may call this. This |
212 | * must fail if an unrecognized or unsupported mode is requested. | 217 | * must fail if an unrecognized or unsupported mode is requested. |
@@ -253,6 +258,8 @@ struct spi_master { | |||
253 | /* other constraints relevant to this driver */ | 258 | /* other constraints relevant to this driver */ |
254 | u16 flags; | 259 | u16 flags; |
255 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ | 260 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ |
261 | #define SPI_MASTER_NO_RX BIT(1) /* can't do buffer read */ | ||
262 | #define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */ | ||
256 | 263 | ||
257 | /* Setup mode and clock, etc (spi driver may call many times). | 264 | /* Setup mode and clock, etc (spi driver may call many times). |
258 | * | 265 | * |
@@ -533,42 +540,7 @@ static inline void spi_message_free(struct spi_message *m) | |||
533 | } | 540 | } |
534 | 541 | ||
535 | extern int spi_setup(struct spi_device *spi); | 542 | extern int spi_setup(struct spi_device *spi); |
536 | 543 | extern int spi_async(struct spi_device *spi, struct spi_message *message); | |
537 | /** | ||
538 | * spi_async - asynchronous SPI transfer | ||
539 | * @spi: device with which data will be exchanged | ||
540 | * @message: describes the data transfers, including completion callback | ||
541 | * Context: any (irqs may be blocked, etc) | ||
542 | * | ||
543 | * This call may be used in_irq and other contexts which can't sleep, | ||
544 | * as well as from task contexts which can sleep. | ||
545 | * | ||
546 | * The completion callback is invoked in a context which can't sleep. | ||
547 | * Before that invocation, the value of message->status is undefined. | ||
548 | * When the callback is issued, message->status holds either zero (to | ||
549 | * indicate complete success) or a negative error code. After that | ||
550 | * callback returns, the driver which issued the transfer request may | ||
551 | * deallocate the associated memory; it's no longer in use by any SPI | ||
552 | * core or controller driver code. | ||
553 | * | ||
554 | * Note that although all messages to a spi_device are handled in | ||
555 | * FIFO order, messages may go to different devices in other orders. | ||
556 | * Some device might be higher priority, or have various "hard" access | ||
557 | * time requirements, for example. | ||
558 | * | ||
559 | * On detection of any fault during the transfer, processing of | ||
560 | * the entire message is aborted, and the device is deselected. | ||
561 | * Until returning from the associated message completion callback, | ||
562 | * no other spi_message queued to that device will be processed. | ||
563 | * (This rule applies equally to all the synchronous transfer calls, | ||
564 | * which are wrappers around this core asynchronous primitive.) | ||
565 | */ | ||
566 | static inline int | ||
567 | spi_async(struct spi_device *spi, struct spi_message *message) | ||
568 | { | ||
569 | message->spi = spi; | ||
570 | return spi->master->transfer(spi, message); | ||
571 | } | ||
572 | 544 | ||
573 | /*---------------------------------------------------------------------------*/ | 545 | /*---------------------------------------------------------------------------*/ |
574 | 546 | ||
@@ -732,7 +704,7 @@ struct spi_board_info { | |||
732 | * controller_data goes to spi_device.controller_data, | 704 | * controller_data goes to spi_device.controller_data, |
733 | * irq is copied too | 705 | * irq is copied too |
734 | */ | 706 | */ |
735 | char modalias[32]; | 707 | char modalias[SPI_NAME_SIZE]; |
736 | const void *platform_data; | 708 | const void *platform_data; |
737 | void *controller_data; | 709 | void *controller_data; |
738 | int irq; | 710 | int irq; |
@@ -800,4 +772,7 @@ spi_unregister_device(struct spi_device *spi) | |||
800 | device_unregister(&spi->dev); | 772 | device_unregister(&spi->dev); |
801 | } | 773 | } |
802 | 774 | ||
775 | extern const struct spi_device_id * | ||
776 | spi_get_device_id(const struct spi_device *sdev); | ||
777 | |||
803 | #endif /* __LINUX_SPI_H */ | 778 | #endif /* __LINUX_SPI_H */ |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index ae779bb8cc0f..adb44066680c 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <sound/ac97_codec.h> | 26 | #include <sound/ac97_codec.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/gpio.h> | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * UCB1400 AC-link registers | 32 | * UCB1400 AC-link registers |
@@ -82,6 +83,17 @@ | |||
82 | #define UCB_ID 0x7e | 83 | #define UCB_ID 0x7e |
83 | #define UCB_ID_1400 0x4304 | 84 | #define UCB_ID_1400 0x4304 |
84 | 85 | ||
86 | struct ucb1400_gpio_data { | ||
87 | int gpio_offset; | ||
88 | int (*gpio_setup)(struct device *dev, int ngpio); | ||
89 | int (*gpio_teardown)(struct device *dev, int ngpio); | ||
90 | }; | ||
91 | |||
92 | struct ucb1400_gpio { | ||
93 | struct gpio_chip gc; | ||
94 | struct snd_ac97 *ac97; | ||
95 | }; | ||
96 | |||
85 | struct ucb1400_ts { | 97 | struct ucb1400_ts { |
86 | struct input_dev *ts_idev; | 98 | struct input_dev *ts_idev; |
87 | struct task_struct *ts_task; | 99 | struct task_struct *ts_task; |
@@ -95,6 +107,7 @@ struct ucb1400_ts { | |||
95 | 107 | ||
96 | struct ucb1400 { | 108 | struct ucb1400 { |
97 | struct platform_device *ucb1400_ts; | 109 | struct platform_device *ucb1400_ts; |
110 | struct platform_device *ucb1400_gpio; | ||
98 | }; | 111 | }; |
99 | 112 | ||
100 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) | 113 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) |
@@ -147,4 +160,10 @@ static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) | |||
147 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | 160 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, |
148 | int adcsync); | 161 | int adcsync); |
149 | 162 | ||
163 | #ifdef CONFIG_GPIO_UCB1400 | ||
164 | void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data); | ||
165 | #else | ||
166 | static inline void ucb1400_gpio_set_data(struct ucb1400_gpio_data *data) {} | ||
167 | #endif | ||
168 | |||
150 | #endif | 169 | #endif |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index e547e3c8ee9a..0093dd7c1d6f 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -109,8 +109,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
109 | unsigned int fbit) | 109 | unsigned int fbit) |
110 | { | 110 | { |
111 | /* Did you forget to fix assumptions on max features? */ | 111 | /* Did you forget to fix assumptions on max features? */ |
112 | if (__builtin_constant_p(fbit)) | 112 | MAYBE_BUILD_BUG_ON(fbit >= 32); |
113 | BUILD_BUG_ON(fbit >= 32); | ||
114 | 113 | ||
115 | if (fbit < VIRTIO_TRANSPORT_F_START) | 114 | if (fbit < VIRTIO_TRANSPORT_F_START) |
116 | virtio_check_driver_offered_feature(vdev, fbit); | 115 | virtio_check_driver_offered_feature(vdev, fbit); |
diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h new file mode 100644 index 000000000000..c051a50ed528 --- /dev/null +++ b/include/video/da8xx-fb.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * Header file for TI DA8XX LCD controller platform data. | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 MontaVista Software Inc. | ||
5 | * Copyright (C) 2008-2009 Texas Instruments Inc | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef DA8XX_FB_H | ||
13 | #define DA8XX_FB_H | ||
14 | |||
15 | enum panel_type { | ||
16 | QVGA = 0 | ||
17 | }; | ||
18 | |||
19 | enum panel_shade { | ||
20 | MONOCHROME = 0, | ||
21 | COLOR_ACTIVE, | ||
22 | COLOR_PASSIVE, | ||
23 | }; | ||
24 | |||
25 | enum raster_load_mode { | ||
26 | LOAD_DATA = 1, | ||
27 | LOAD_PALETTE, | ||
28 | }; | ||
29 | |||
30 | struct display_panel { | ||
31 | enum panel_type panel_type; /* QVGA */ | ||
32 | int max_bpp; | ||
33 | int min_bpp; | ||
34 | enum panel_shade panel_shade; | ||
35 | }; | ||
36 | |||
37 | struct da8xx_lcdc_platform_data { | ||
38 | const char manu_name[10]; | ||
39 | void *controller_data; | ||
40 | const char type[25]; | ||
41 | }; | ||
42 | |||
43 | struct lcd_ctrl_config { | ||
44 | const struct display_panel *p_disp_panel; | ||
45 | |||
46 | /* AC Bias Pin Frequency */ | ||
47 | int ac_bias; | ||
48 | |||
49 | /* AC Bias Pin Transitions per Interrupt */ | ||
50 | int ac_bias_intrpt; | ||
51 | |||
52 | /* DMA burst size */ | ||
53 | int dma_burst_sz; | ||
54 | |||
55 | /* Bits per pixel */ | ||
56 | int bpp; | ||
57 | |||
58 | /* FIFO DMA Request Delay */ | ||
59 | int fdd; | ||
60 | |||
61 | /* TFT Alternative Signal Mapping (Only for active) */ | ||
62 | unsigned char tft_alt_mode; | ||
63 | |||
64 | /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */ | ||
65 | unsigned char stn_565_mode; | ||
66 | |||
67 | /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */ | ||
68 | unsigned char mono_8bit_mode; | ||
69 | |||
70 | /* Invert line clock */ | ||
71 | unsigned char invert_line_clock; | ||
72 | |||
73 | /* Invert frame clock */ | ||
74 | unsigned char invert_frm_clock; | ||
75 | |||
76 | /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */ | ||
77 | unsigned char sync_edge; | ||
78 | |||
79 | /* Horizontal and Vertical Sync: Control: 0=ignore */ | ||
80 | unsigned char sync_ctrl; | ||
81 | |||
82 | /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */ | ||
83 | unsigned char raster_order; | ||
84 | }; | ||
85 | |||
86 | struct lcd_sync_arg { | ||
87 | int back_porch; | ||
88 | int front_porch; | ||
89 | int pulse_width; | ||
90 | }; | ||
91 | |||
92 | /* ioctls */ | ||
93 | #define FBIOGET_CONTRAST _IOR('F', 1, int) | ||
94 | #define FBIOPUT_CONTRAST _IOW('F', 2, int) | ||
95 | #define FBIGET_BRIGHTNESS _IOR('F', 3, int) | ||
96 | #define FBIPUT_BRIGHTNESS _IOW('F', 3, int) | ||
97 | #define FBIGET_COLOR _IOR('F', 5, int) | ||
98 | #define FBIPUT_COLOR _IOW('F', 6, int) | ||
99 | #define FBIPUT_HSYNC _IOW('F', 9, int) | ||
100 | #define FBIPUT_VSYNC _IOW('F', 10, int) | ||
101 | |||
102 | #endif /* ifndef DA8XX_FB_H */ | ||
103 | |||