diff options
Diffstat (limited to 'include/linux')
57 files changed, 1110 insertions, 255 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 3da73f5f0ae9..2c60f1f70b38 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -248,6 +248,8 @@ int acpi_check_region(resource_size_t start, resource_size_t n, | |||
248 | int acpi_check_mem_region(resource_size_t start, resource_size_t n, | 248 | int acpi_check_mem_region(resource_size_t start, resource_size_t n, |
249 | const char *name); | 249 | const char *name); |
250 | 250 | ||
251 | int acpi_resources_are_enforced(void); | ||
252 | |||
251 | #ifdef CONFIG_PM_SLEEP | 253 | #ifdef CONFIG_PM_SLEEP |
252 | void __init acpi_no_s4_hw_signature(void); | 254 | void __init acpi_no_s4_hw_signature(void); |
253 | void __init acpi_old_suspend_ordering(void); | 255 | void __init acpi_old_suspend_ordering(void); |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 811dbb369379..7a8db4155281 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -212,6 +212,8 @@ extern void kick_iocb(struct kiocb *iocb); | |||
212 | extern int aio_complete(struct kiocb *iocb, long res, long res2); | 212 | extern int aio_complete(struct kiocb *iocb, long res, long res2); |
213 | struct mm_struct; | 213 | struct mm_struct; |
214 | extern void exit_aio(struct mm_struct *mm); | 214 | extern void exit_aio(struct mm_struct *mm); |
215 | extern long do_io_submit(aio_context_t ctx_id, long nr, | ||
216 | struct iocb __user *__user *iocbpp, bool compat); | ||
215 | #else | 217 | #else |
216 | static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } | 218 | static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } |
217 | static inline int aio_put_req(struct kiocb *iocb) { return 0; } | 219 | static inline int aio_put_req(struct kiocb *iocb) { return 0; } |
@@ -219,6 +221,9 @@ static inline void kick_iocb(struct kiocb *iocb) { } | |||
219 | static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; } | 221 | static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; } |
220 | struct mm_struct; | 222 | struct mm_struct; |
221 | static inline void exit_aio(struct mm_struct *mm) { } | 223 | static inline void exit_aio(struct mm_struct *mm) { } |
224 | static inline long do_io_submit(aio_context_t ctx_id, long nr, | ||
225 | struct iocb __user * __user *iocbpp, | ||
226 | bool compat) { return 0; } | ||
222 | #endif /* CONFIG_AIO */ | 227 | #endif /* CONFIG_AIO */ |
223 | 228 | ||
224 | static inline struct kiocb *list_kiocb(struct list_head *h) | 229 | static inline struct kiocb *list_kiocb(struct list_head *h) |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index daf8c480c786..6fb2720882fc 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -141,6 +141,7 @@ extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | |||
141 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 141 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
142 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 142 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
143 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); | 143 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); |
144 | extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); | ||
144 | 145 | ||
145 | #define BITMAP_LAST_WORD_MASK(nbits) \ | 146 | #define BITMAP_LAST_WORD_MASK(nbits) \ |
146 | ( \ | 147 | ( \ |
diff --git a/include/linux/byteorder/big_endian.h b/include/linux/byteorder/big_endian.h index d53a67dff018..3c80fd7e8b56 100644 --- a/include/linux/byteorder/big_endian.h +++ b/include/linux/byteorder/big_endian.h | |||
@@ -7,9 +7,6 @@ | |||
7 | #ifndef __BIG_ENDIAN_BITFIELD | 7 | #ifndef __BIG_ENDIAN_BITFIELD |
8 | #define __BIG_ENDIAN_BITFIELD | 8 | #define __BIG_ENDIAN_BITFIELD |
9 | #endif | 9 | #endif |
10 | #ifndef __BYTE_ORDER | ||
11 | #define __BYTE_ORDER __BIG_ENDIAN | ||
12 | #endif | ||
13 | 10 | ||
14 | #include <linux/types.h> | 11 | #include <linux/types.h> |
15 | #include <linux/swab.h> | 12 | #include <linux/swab.h> |
diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h index f7f8ad13adb6..83195fb82962 100644 --- a/include/linux/byteorder/little_endian.h +++ b/include/linux/byteorder/little_endian.h | |||
@@ -7,9 +7,6 @@ | |||
7 | #ifndef __LITTLE_ENDIAN_BITFIELD | 7 | #ifndef __LITTLE_ENDIAN_BITFIELD |
8 | #define __LITTLE_ENDIAN_BITFIELD | 8 | #define __LITTLE_ENDIAN_BITFIELD |
9 | #endif | 9 | #endif |
10 | #ifndef __BYTE_ORDER | ||
11 | #define __BYTE_ORDER __LITTLE_ENDIAN | ||
12 | #endif | ||
13 | 10 | ||
14 | #include <linux/types.h> | 11 | #include <linux/types.h> |
15 | #include <linux/swab.h> | 12 | #include <linux/swab.h> |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 8f78073d7caa..0c621604baa1 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -397,7 +397,7 @@ struct cftype { | |||
397 | * This callback must be implemented, if you want provide | 397 | * This callback must be implemented, if you want provide |
398 | * notification functionality. | 398 | * notification functionality. |
399 | */ | 399 | */ |
400 | int (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, | 400 | void (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, |
401 | struct eventfd_ctx *eventfd); | 401 | struct eventfd_ctx *eventfd); |
402 | }; | 402 | }; |
403 | 403 | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index 717c691ecd8e..168f7daa7bde 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -356,5 +356,9 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | |||
356 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | 356 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, |
357 | int flags, int mode); | 357 | int flags, int mode); |
358 | 358 | ||
359 | extern ssize_t compat_rw_copy_check_uvector(int type, | ||
360 | const struct compat_iovec __user *uvector, unsigned long nr_segs, | ||
361 | unsigned long fast_segs, struct iovec *fast_pointer, | ||
362 | struct iovec **ret_pointer); | ||
359 | #endif /* CONFIG_COMPAT */ | 363 | #endif /* CONFIG_COMPAT */ |
360 | #endif /* _LINUX_COMPAT_H */ | 364 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 20b51cab6593..457ed765a116 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -69,6 +69,7 @@ extern void cpuset_task_status_allowed(struct seq_file *m, | |||
69 | struct task_struct *task); | 69 | struct task_struct *task); |
70 | 70 | ||
71 | extern int cpuset_mem_spread_node(void); | 71 | extern int cpuset_mem_spread_node(void); |
72 | extern int cpuset_slab_spread_node(void); | ||
72 | 73 | ||
73 | static inline int cpuset_do_page_mem_spread(void) | 74 | static inline int cpuset_do_page_mem_spread(void) |
74 | { | 75 | { |
@@ -194,6 +195,11 @@ static inline int cpuset_mem_spread_node(void) | |||
194 | return 0; | 195 | return 0; |
195 | } | 196 | } |
196 | 197 | ||
198 | static inline int cpuset_slab_spread_node(void) | ||
199 | { | ||
200 | return 0; | ||
201 | } | ||
202 | |||
197 | static inline int cpuset_do_page_mem_spread(void) | 203 | static inline int cpuset_do_page_mem_spread(void) |
198 | { | 204 | { |
199 | return 0; | 205 | return 0; |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 52507c3e1387..75c0fa881308 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -156,7 +156,6 @@ extern int copy_creds(struct task_struct *, unsigned long); | |||
156 | extern struct cred *cred_alloc_blank(void); | 156 | extern struct cred *cred_alloc_blank(void); |
157 | extern struct cred *prepare_creds(void); | 157 | extern struct cred *prepare_creds(void); |
158 | extern struct cred *prepare_exec_creds(void); | 158 | extern struct cred *prepare_exec_creds(void); |
159 | extern struct cred *prepare_usermodehelper_creds(void); | ||
160 | extern int commit_creds(struct cred *); | 159 | extern int commit_creds(struct cred *); |
161 | extern void abort_creds(struct cred *); | 160 | extern void abort_creds(struct cred *); |
162 | extern const struct cred *override_creds(const struct cred *); | 161 | extern const struct cred *override_creds(const struct cred *); |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ca32ed78b057..89b7e1a605b8 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -40,16 +40,6 @@ struct dma_map_ops { | |||
40 | void (*sync_single_for_device)(struct device *dev, | 40 | void (*sync_single_for_device)(struct device *dev, |
41 | dma_addr_t dma_handle, size_t size, | 41 | dma_addr_t dma_handle, size_t size, |
42 | enum dma_data_direction dir); | 42 | enum dma_data_direction dir); |
43 | void (*sync_single_range_for_cpu)(struct device *dev, | ||
44 | dma_addr_t dma_handle, | ||
45 | unsigned long offset, | ||
46 | size_t size, | ||
47 | enum dma_data_direction dir); | ||
48 | void (*sync_single_range_for_device)(struct device *dev, | ||
49 | dma_addr_t dma_handle, | ||
50 | unsigned long offset, | ||
51 | size_t size, | ||
52 | enum dma_data_direction dir); | ||
53 | void (*sync_sg_for_cpu)(struct device *dev, | 43 | void (*sync_sg_for_cpu)(struct device *dev, |
54 | struct scatterlist *sg, int nents, | 44 | struct scatterlist *sg, int nents, |
55 | enum dma_data_direction dir); | 45 | enum dma_data_direction dir); |
@@ -105,21 +95,6 @@ static inline int is_device_dma_capable(struct device *dev) | |||
105 | #include <asm-generic/dma-mapping-broken.h> | 95 | #include <asm-generic/dma-mapping-broken.h> |
106 | #endif | 96 | #endif |
107 | 97 | ||
108 | /* for backwards compatibility, removed soon */ | ||
109 | static inline void __deprecated dma_sync_single(struct device *dev, | ||
110 | dma_addr_t addr, size_t size, | ||
111 | enum dma_data_direction dir) | ||
112 | { | ||
113 | dma_sync_single_for_cpu(dev, addr, size, dir); | ||
114 | } | ||
115 | |||
116 | static inline void __deprecated dma_sync_sg(struct device *dev, | ||
117 | struct scatterlist *sg, int nelems, | ||
118 | enum dma_data_direction dir) | ||
119 | { | ||
120 | dma_sync_sg_for_cpu(dev, sg, nelems, dir); | ||
121 | } | ||
122 | |||
123 | static inline u64 dma_get_mask(struct device *dev) | 98 | static inline u64 dma_get_mask(struct device *dev) |
124 | { | 99 | { |
125 | if (dev && dev->dma_mask && *dev->dma_mask) | 100 | if (dev && dev->dma_mask && *dev->dma_mask) |
diff --git a/include/linux/fec.h b/include/linux/fec.h new file mode 100644 index 000000000000..5d3523d8dd0c --- /dev/null +++ b/include/linux/fec.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* include/linux/fec.h | ||
2 | * | ||
3 | * Copyright (c) 2009 Orex Computed Radiography | ||
4 | * Baruch Siach <baruch@tkos.co.il> | ||
5 | * | ||
6 | * Header file for the FEC platform data | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __LINUX_FEC_H__ | ||
13 | #define __LINUX_FEC_H__ | ||
14 | |||
15 | #include <linux/phy.h> | ||
16 | |||
17 | struct fec_platform_data { | ||
18 | phy_interface_t phy; | ||
19 | }; | ||
20 | |||
21 | #endif | ||
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 4bd94bf5e739..72e2b8ac2a5a 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -55,13 +55,11 @@ | |||
55 | #define CSR_DESCRIPTOR 0x01 | 55 | #define CSR_DESCRIPTOR 0x01 |
56 | #define CSR_VENDOR 0x03 | 56 | #define CSR_VENDOR 0x03 |
57 | #define CSR_HARDWARE_VERSION 0x04 | 57 | #define CSR_HARDWARE_VERSION 0x04 |
58 | #define CSR_NODE_CAPABILITIES 0x0c | ||
59 | #define CSR_UNIT 0x11 | 58 | #define CSR_UNIT 0x11 |
60 | #define CSR_SPECIFIER_ID 0x12 | 59 | #define CSR_SPECIFIER_ID 0x12 |
61 | #define CSR_VERSION 0x13 | 60 | #define CSR_VERSION 0x13 |
62 | #define CSR_DEPENDENT_INFO 0x14 | 61 | #define CSR_DEPENDENT_INFO 0x14 |
63 | #define CSR_MODEL 0x17 | 62 | #define CSR_MODEL 0x17 |
64 | #define CSR_INSTANCE 0x18 | ||
65 | #define CSR_DIRECTORY_ID 0x20 | 63 | #define CSR_DIRECTORY_ID 0x20 |
66 | 64 | ||
67 | struct fw_csr_iterator { | 65 | struct fw_csr_iterator { |
@@ -89,7 +87,6 @@ struct fw_card { | |||
89 | int current_tlabel; | 87 | int current_tlabel; |
90 | u64 tlabel_mask; | 88 | u64 tlabel_mask; |
91 | struct list_head transaction_list; | 89 | struct list_head transaction_list; |
92 | struct timer_list flush_timer; | ||
93 | unsigned long reset_jiffies; | 90 | unsigned long reset_jiffies; |
94 | 91 | ||
95 | unsigned long long guid; | 92 | unsigned long long guid; |
@@ -290,6 +287,8 @@ struct fw_transaction { | |||
290 | int tlabel; | 287 | int tlabel; |
291 | int timestamp; | 288 | int timestamp; |
292 | struct list_head link; | 289 | struct list_head link; |
290 | struct fw_card *card; | ||
291 | struct timer_list split_timeout_timer; | ||
293 | 292 | ||
294 | struct fw_packet packet; | 293 | struct fw_packet packet; |
295 | 294 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index b336cb9ca9a0..85e823adcd4a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2228,6 +2228,7 @@ extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | |||
2228 | 2228 | ||
2229 | extern void | 2229 | extern void |
2230 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 2230 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
2231 | extern loff_t noop_llseek(struct file *file, loff_t offset, int origin); | ||
2231 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); | 2232 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); |
2232 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); | 2233 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); |
2233 | extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset, | 2234 | extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset, |
@@ -2250,10 +2251,15 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
2250 | #endif | 2251 | #endif |
2251 | 2252 | ||
2252 | #ifdef CONFIG_BLOCK | 2253 | #ifdef CONFIG_BLOCK |
2254 | struct bio; | ||
2255 | typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, | ||
2256 | loff_t file_offset); | ||
2257 | void dio_end_io(struct bio *bio, int error); | ||
2258 | |||
2253 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 2259 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2254 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 2260 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
2255 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | 2261 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
2256 | int lock_type); | 2262 | dio_submit_t submit_io, int lock_type); |
2257 | 2263 | ||
2258 | enum { | 2264 | enum { |
2259 | /* need locking between buffered and direct access */ | 2265 | /* need locking between buffered and direct access */ |
@@ -2269,7 +2275,7 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | |||
2269 | dio_iodone_t end_io) | 2275 | dio_iodone_t end_io) |
2270 | { | 2276 | { |
2271 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2277 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2272 | nr_segs, get_block, end_io, | 2278 | nr_segs, get_block, end_io, NULL, |
2273 | DIO_LOCKING | DIO_SKIP_HOLES); | 2279 | DIO_LOCKING | DIO_SKIP_HOLES); |
2274 | } | 2280 | } |
2275 | 2281 | ||
@@ -2279,7 +2285,7 @@ static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | |||
2279 | dio_iodone_t end_io) | 2285 | dio_iodone_t end_io) |
2280 | { | 2286 | { |
2281 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2287 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2282 | nr_segs, get_block, end_io, 0); | 2288 | nr_segs, get_block, end_io, NULL, 0); |
2283 | } | 2289 | } |
2284 | #endif | 2290 | #endif |
2285 | 2291 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index c082f223e2fe..3167f2df4126 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -73,18 +73,25 @@ struct trace_iterator { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | 75 | ||
76 | struct trace_event; | ||
77 | |||
76 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, | 78 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, |
77 | int flags); | 79 | int flags, struct trace_event *event); |
78 | struct trace_event { | 80 | |
79 | struct hlist_node node; | 81 | struct trace_event_functions { |
80 | struct list_head list; | ||
81 | int type; | ||
82 | trace_print_func trace; | 82 | trace_print_func trace; |
83 | trace_print_func raw; | 83 | trace_print_func raw; |
84 | trace_print_func hex; | 84 | trace_print_func hex; |
85 | trace_print_func binary; | 85 | trace_print_func binary; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | struct trace_event { | ||
89 | struct hlist_node node; | ||
90 | struct list_head list; | ||
91 | int type; | ||
92 | struct trace_event_functions *funcs; | ||
93 | }; | ||
94 | |||
88 | extern int register_ftrace_event(struct trace_event *event); | 95 | extern int register_ftrace_event(struct trace_event *event); |
89 | extern int unregister_ftrace_event(struct trace_event *event); | 96 | extern int unregister_ftrace_event(struct trace_event *event); |
90 | 97 | ||
@@ -116,28 +123,70 @@ void tracing_record_cmdline(struct task_struct *tsk); | |||
116 | 123 | ||
117 | struct event_filter; | 124 | struct event_filter; |
118 | 125 | ||
126 | enum trace_reg { | ||
127 | TRACE_REG_REGISTER, | ||
128 | TRACE_REG_UNREGISTER, | ||
129 | TRACE_REG_PERF_REGISTER, | ||
130 | TRACE_REG_PERF_UNREGISTER, | ||
131 | }; | ||
132 | |||
133 | struct ftrace_event_call; | ||
134 | |||
135 | struct ftrace_event_class { | ||
136 | char *system; | ||
137 | void *probe; | ||
138 | #ifdef CONFIG_PERF_EVENTS | ||
139 | void *perf_probe; | ||
140 | #endif | ||
141 | int (*reg)(struct ftrace_event_call *event, | ||
142 | enum trace_reg type); | ||
143 | int (*define_fields)(struct ftrace_event_call *); | ||
144 | struct list_head *(*get_fields)(struct ftrace_event_call *); | ||
145 | struct list_head fields; | ||
146 | int (*raw_init)(struct ftrace_event_call *); | ||
147 | }; | ||
148 | |||
149 | enum { | ||
150 | TRACE_EVENT_FL_ENABLED_BIT, | ||
151 | TRACE_EVENT_FL_FILTERED_BIT, | ||
152 | }; | ||
153 | |||
154 | enum { | ||
155 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), | ||
156 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), | ||
157 | }; | ||
158 | |||
119 | struct ftrace_event_call { | 159 | struct ftrace_event_call { |
120 | struct list_head list; | 160 | struct list_head list; |
161 | struct ftrace_event_class *class; | ||
121 | char *name; | 162 | char *name; |
122 | char *system; | ||
123 | struct dentry *dir; | 163 | struct dentry *dir; |
124 | struct trace_event *event; | 164 | struct trace_event event; |
125 | int enabled; | ||
126 | int (*regfunc)(struct ftrace_event_call *); | ||
127 | void (*unregfunc)(struct ftrace_event_call *); | ||
128 | int id; | ||
129 | const char *print_fmt; | 165 | const char *print_fmt; |
130 | int (*raw_init)(struct ftrace_event_call *); | ||
131 | int (*define_fields)(struct ftrace_event_call *); | ||
132 | struct list_head fields; | ||
133 | int filter_active; | ||
134 | struct event_filter *filter; | 166 | struct event_filter *filter; |
135 | void *mod; | 167 | void *mod; |
136 | void *data; | 168 | void *data; |
137 | 169 | ||
170 | /* | ||
171 | * 32 bit flags: | ||
172 | * bit 1: enabled | ||
173 | * bit 2: filter_active | ||
174 | * | ||
175 | * Changes to flags must hold the event_mutex. | ||
176 | * | ||
177 | * Note: Reads of flags do not hold the event_mutex since | ||
178 | * they occur in critical sections. But the way flags | ||
179 | * is currently used, these changes do no affect the code | ||
180 | * except that when a change is made, it may have a slight | ||
181 | * delay in propagating the changes to other CPUs due to | ||
182 | * caching and such. | ||
183 | */ | ||
184 | unsigned int flags; | ||
185 | |||
186 | #ifdef CONFIG_PERF_EVENTS | ||
138 | int perf_refcount; | 187 | int perf_refcount; |
139 | int (*perf_event_enable)(struct ftrace_event_call *); | 188 | struct hlist_head *perf_events; |
140 | void (*perf_event_disable)(struct ftrace_event_call *); | 189 | #endif |
141 | }; | 190 | }; |
142 | 191 | ||
143 | #define PERF_MAX_TRACE_SIZE 2048 | 192 | #define PERF_MAX_TRACE_SIZE 2048 |
@@ -194,24 +243,22 @@ struct perf_event; | |||
194 | 243 | ||
195 | DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); | 244 | DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); |
196 | 245 | ||
197 | extern int perf_trace_enable(int event_id); | 246 | extern int perf_trace_init(struct perf_event *event); |
198 | extern void perf_trace_disable(int event_id); | 247 | extern void perf_trace_destroy(struct perf_event *event); |
199 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 248 | extern int perf_trace_enable(struct perf_event *event); |
249 | extern void perf_trace_disable(struct perf_event *event); | ||
250 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | ||
200 | char *filter_str); | 251 | char *filter_str); |
201 | extern void ftrace_profile_free_filter(struct perf_event *event); | 252 | extern void ftrace_profile_free_filter(struct perf_event *event); |
202 | extern void * | 253 | extern void *perf_trace_buf_prepare(int size, unsigned short type, |
203 | perf_trace_buf_prepare(int size, unsigned short type, int *rctxp, | 254 | struct pt_regs *regs, int *rctxp); |
204 | unsigned long *irq_flags); | ||
205 | 255 | ||
206 | static inline void | 256 | static inline void |
207 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 257 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
208 | u64 count, unsigned long irq_flags, struct pt_regs *regs) | 258 | u64 count, struct pt_regs *regs, void *head) |
209 | { | 259 | { |
210 | struct trace_entry *entry = raw_data; | 260 | perf_tp_event(addr, count, raw_data, size, regs, head); |
211 | |||
212 | perf_tp_event(entry->type, addr, count, raw_data, size, regs); | ||
213 | perf_swevent_put_recursion_context(rctx); | 261 | perf_swevent_put_recursion_context(rctx); |
214 | local_irq_restore(irq_flags); | ||
215 | } | 262 | } |
216 | #endif | 263 | #endif |
217 | 264 | ||
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 4e949a5b5b85..03f616b78cfa 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
@@ -51,6 +51,11 @@ static inline int gpio_direction_output(unsigned gpio, int value) | |||
51 | return -ENOSYS; | 51 | return -ENOSYS; |
52 | } | 52 | } |
53 | 53 | ||
54 | static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) | ||
55 | { | ||
56 | return -ENOSYS; | ||
57 | } | ||
58 | |||
54 | static inline int gpio_get_value(unsigned gpio) | 59 | static inline int gpio_get_value(unsigned gpio) |
55 | { | 60 | { |
56 | /* GPIO can never have been requested or set as {in,out}put */ | 61 | /* GPIO can never have been requested or set as {in,out}put */ |
diff --git a/include/linux/i2c/adp8860.h b/include/linux/i2c/adp8860.h new file mode 100644 index 000000000000..0b4d39855c91 --- /dev/null +++ b/include/linux/i2c/adp8860.h | |||
@@ -0,0 +1,154 @@ | |||
1 | /* | ||
2 | * Definitions and platform data for Analog Devices | ||
3 | * Backlight drivers ADP8860 | ||
4 | * | ||
5 | * Copyright 2009-2010 Analog Devices Inc. | ||
6 | * | ||
7 | * Licensed under the GPL-2 or later. | ||
8 | */ | ||
9 | |||
10 | #ifndef __LINUX_I2C_ADP8860_H | ||
11 | #define __LINUX_I2C_ADP8860_H | ||
12 | |||
13 | #include <linux/leds.h> | ||
14 | #include <linux/types.h> | ||
15 | |||
16 | #define ID_ADP8860 8860 | ||
17 | |||
18 | #define ADP8860_MAX_BRIGHTNESS 0x7F | ||
19 | #define FLAG_OFFT_SHIFT 8 | ||
20 | |||
21 | /* | ||
22 | * LEDs subdevice platform data | ||
23 | */ | ||
24 | |||
25 | #define ADP8860_LED_DIS_BLINK (0 << FLAG_OFFT_SHIFT) | ||
26 | #define ADP8860_LED_OFFT_600ms (1 << FLAG_OFFT_SHIFT) | ||
27 | #define ADP8860_LED_OFFT_1200ms (2 << FLAG_OFFT_SHIFT) | ||
28 | #define ADP8860_LED_OFFT_1800ms (3 << FLAG_OFFT_SHIFT) | ||
29 | |||
30 | #define ADP8860_LED_ONT_200ms 0 | ||
31 | #define ADP8860_LED_ONT_600ms 1 | ||
32 | #define ADP8860_LED_ONT_800ms 2 | ||
33 | #define ADP8860_LED_ONT_1200ms 3 | ||
34 | |||
35 | #define ADP8860_LED_D7 (7) | ||
36 | #define ADP8860_LED_D6 (6) | ||
37 | #define ADP8860_LED_D5 (5) | ||
38 | #define ADP8860_LED_D4 (4) | ||
39 | #define ADP8860_LED_D3 (3) | ||
40 | #define ADP8860_LED_D2 (2) | ||
41 | #define ADP8860_LED_D1 (1) | ||
42 | |||
43 | /* | ||
44 | * Backlight subdevice platform data | ||
45 | */ | ||
46 | |||
47 | #define ADP8860_BL_D7 (1 << 6) | ||
48 | #define ADP8860_BL_D6 (1 << 5) | ||
49 | #define ADP8860_BL_D5 (1 << 4) | ||
50 | #define ADP8860_BL_D4 (1 << 3) | ||
51 | #define ADP8860_BL_D3 (1 << 2) | ||
52 | #define ADP8860_BL_D2 (1 << 1) | ||
53 | #define ADP8860_BL_D1 (1 << 0) | ||
54 | |||
55 | #define ADP8860_FADE_T_DIS 0 /* Fade Timer Disabled */ | ||
56 | #define ADP8860_FADE_T_300ms 1 /* 0.3 Sec */ | ||
57 | #define ADP8860_FADE_T_600ms 2 | ||
58 | #define ADP8860_FADE_T_900ms 3 | ||
59 | #define ADP8860_FADE_T_1200ms 4 | ||
60 | #define ADP8860_FADE_T_1500ms 5 | ||
61 | #define ADP8860_FADE_T_1800ms 6 | ||
62 | #define ADP8860_FADE_T_2100ms 7 | ||
63 | #define ADP8860_FADE_T_2400ms 8 | ||
64 | #define ADP8860_FADE_T_2700ms 9 | ||
65 | #define ADP8860_FADE_T_3000ms 10 | ||
66 | #define ADP8860_FADE_T_3500ms 11 | ||
67 | #define ADP8860_FADE_T_4000ms 12 | ||
68 | #define ADP8860_FADE_T_4500ms 13 | ||
69 | #define ADP8860_FADE_T_5000ms 14 | ||
70 | #define ADP8860_FADE_T_5500ms 15 /* 5.5 Sec */ | ||
71 | |||
72 | #define ADP8860_FADE_LAW_LINEAR 0 | ||
73 | #define ADP8860_FADE_LAW_SQUARE 1 | ||
74 | #define ADP8860_FADE_LAW_CUBIC1 2 | ||
75 | #define ADP8860_FADE_LAW_CUBIC2 3 | ||
76 | |||
77 | #define ADP8860_BL_AMBL_FILT_80ms 0 /* Light sensor filter time */ | ||
78 | #define ADP8860_BL_AMBL_FILT_160ms 1 | ||
79 | #define ADP8860_BL_AMBL_FILT_320ms 2 | ||
80 | #define ADP8860_BL_AMBL_FILT_640ms 3 | ||
81 | #define ADP8860_BL_AMBL_FILT_1280ms 4 | ||
82 | #define ADP8860_BL_AMBL_FILT_2560ms 5 | ||
83 | #define ADP8860_BL_AMBL_FILT_5120ms 6 | ||
84 | #define ADP8860_BL_AMBL_FILT_10240ms 7 /* 10.24 sec */ | ||
85 | |||
86 | /* | ||
87 | * Blacklight current 0..30mA | ||
88 | */ | ||
89 | #define ADP8860_BL_CUR_mA(I) ((I * 127) / 30) | ||
90 | |||
91 | /* | ||
92 | * L2 comparator current 0..1106uA | ||
93 | */ | ||
94 | #define ADP8860_L2_COMP_CURR_uA(I) ((I * 255) / 1106) | ||
95 | |||
96 | /* | ||
97 | * L3 comparator current 0..138uA | ||
98 | */ | ||
99 | #define ADP8860_L3_COMP_CURR_uA(I) ((I * 255) / 138) | ||
100 | |||
101 | struct adp8860_backlight_platform_data { | ||
102 | u8 bl_led_assign; /* 1 = Backlight 0 = Individual LED */ | ||
103 | |||
104 | u8 bl_fade_in; /* Backlight Fade-In Timer */ | ||
105 | u8 bl_fade_out; /* Backlight Fade-Out Timer */ | ||
106 | u8 bl_fade_law; /* fade-on/fade-off transfer characteristic */ | ||
107 | |||
108 | u8 en_ambl_sens; /* 1 = enable ambient light sensor */ | ||
109 | u8 abml_filt; /* Light sensor filter time */ | ||
110 | |||
111 | u8 l1_daylight_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
112 | u8 l1_daylight_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
113 | u8 l2_office_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
114 | u8 l2_office_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
115 | u8 l3_dark_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
116 | u8 l3_dark_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */ | ||
117 | |||
118 | u8 l2_trip; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
119 | u8 l2_hyst; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */ | ||
120 | u8 l3_trip; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
121 | u8 l3_hyst; /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */ | ||
122 | |||
123 | /** | ||
124 | * Independent Current Sinks / LEDS | ||
125 | * Sinks not assigned to the Backlight can be exposed to | ||
126 | * user space using the LEDS CLASS interface | ||
127 | */ | ||
128 | |||
129 | int num_leds; | ||
130 | struct led_info *leds; | ||
131 | u8 led_fade_in; /* LED Fade-In Timer */ | ||
132 | u8 led_fade_out; /* LED Fade-Out Timer */ | ||
133 | u8 led_fade_law; /* fade-on/fade-off transfer characteristic */ | ||
134 | u8 led_on_time; | ||
135 | |||
136 | /** | ||
137 | * Gain down disable. Setting this option does not allow the | ||
138 | * charge pump to switch to lower gains. NOT AVAILABLE on ADP8860 | ||
139 | * 1 = the charge pump doesn't switch down in gain until all LEDs are 0. | ||
140 | * The charge pump switches up in gain as needed. This feature is | ||
141 | * useful if the ADP8863 charge pump is used to drive an external load. | ||
142 | * This feature must be used when utilizing small fly capacitors | ||
143 | * (0402 or smaller). | ||
144 | * 0 = the charge pump automatically switches up and down in gain. | ||
145 | * This provides optimal efficiency, but is not suitable for driving | ||
146 | * loads that are not connected through the ADP8863 diode drivers. | ||
147 | * Additionally, the charge pump fly capacitors should be low ESR | ||
148 | * and sized 0603 or greater. | ||
149 | */ | ||
150 | |||
151 | u8 gdwn_dis; | ||
152 | }; | ||
153 | |||
154 | #endif /* __LINUX_I2C_ADP8860_H */ | ||
diff --git a/include/linux/i2c/max732x.h b/include/linux/i2c/max732x.h index e10336631c62..c04bac8bf2fe 100644 --- a/include/linux/i2c/max732x.h +++ b/include/linux/i2c/max732x.h | |||
@@ -7,6 +7,9 @@ struct max732x_platform_data { | |||
7 | /* number of the first GPIO */ | 7 | /* number of the first GPIO */ |
8 | unsigned gpio_base; | 8 | unsigned gpio_base; |
9 | 9 | ||
10 | /* interrupt base */ | ||
11 | int irq_base; | ||
12 | |||
10 | void *context; /* param to setup/teardown */ | 13 | void *context; /* param to setup/teardown */ |
11 | 14 | ||
12 | int (*setup)(struct i2c_client *client, | 15 | int (*setup)(struct i2c_client *client, |
diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h index d5c5a60c8a0b..139ba52667c8 100644 --- a/include/linux/i2c/pca953x.h +++ b/include/linux/i2c/pca953x.h | |||
@@ -24,7 +24,7 @@ struct pca953x_platform_data { | |||
24 | int (*teardown)(struct i2c_client *client, | 24 | int (*teardown)(struct i2c_client *client, |
25 | unsigned gpio, unsigned ngpio, | 25 | unsigned gpio, unsigned ngpio, |
26 | void *context); | 26 | void *context); |
27 | char **names; | 27 | const char *const *names; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | #endif /* _LINUX_PCA953X_H */ | 30 | #endif /* _LINUX_PCA953X_H */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 7996fc2c9ba9..2beaa13492be 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -16,7 +16,7 @@ extern struct files_struct init_files; | |||
16 | extern struct fs_struct init_fs; | 16 | extern struct fs_struct init_fs; |
17 | 17 | ||
18 | #define INIT_SIGNALS(sig) { \ | 18 | #define INIT_SIGNALS(sig) { \ |
19 | .count = ATOMIC_INIT(1), \ | 19 | .nr_threads = 1, \ |
20 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ | 20 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ |
21 | .shared_pending = { \ | 21 | .shared_pending = { \ |
22 | .list = LIST_HEAD_INIT(sig.shared_pending.list), \ | 22 | .list = LIST_HEAD_INIT(sig.shared_pending.list), \ |
@@ -35,7 +35,7 @@ extern struct nsproxy init_nsproxy; | |||
35 | 35 | ||
36 | #define INIT_SIGHAND(sighand) { \ | 36 | #define INIT_SIGHAND(sighand) { \ |
37 | .count = ATOMIC_INIT(1), \ | 37 | .count = ATOMIC_INIT(1), \ |
38 | .action = { { { .sa_handler = NULL, } }, }, \ | 38 | .action = { { { .sa_handler = SIG_DFL, } }, }, \ |
39 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ | 39 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ |
40 | .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \ | 40 | .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \ |
41 | } | 41 | } |
@@ -45,9 +45,9 @@ extern struct group_info init_groups; | |||
45 | #define INIT_STRUCT_PID { \ | 45 | #define INIT_STRUCT_PID { \ |
46 | .count = ATOMIC_INIT(1), \ | 46 | .count = ATOMIC_INIT(1), \ |
47 | .tasks = { \ | 47 | .tasks = { \ |
48 | { .first = &init_task.pids[PIDTYPE_PID].node }, \ | 48 | { .first = NULL }, \ |
49 | { .first = &init_task.pids[PIDTYPE_PGID].node }, \ | 49 | { .first = NULL }, \ |
50 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ | 50 | { .first = NULL }, \ |
51 | }, \ | 51 | }, \ |
52 | .level = 0, \ | 52 | .level = 0, \ |
53 | .numbers = { { \ | 53 | .numbers = { { \ |
@@ -61,7 +61,7 @@ extern struct group_info init_groups; | |||
61 | { \ | 61 | { \ |
62 | .node = { \ | 62 | .node = { \ |
63 | .next = NULL, \ | 63 | .next = NULL, \ |
64 | .pprev = &init_struct_pid.tasks[type].first, \ | 64 | .pprev = NULL, \ |
65 | }, \ | 65 | }, \ |
66 | .pid = &init_struct_pid, \ | 66 | .pid = &init_struct_pid, \ |
67 | } | 67 | } |
@@ -163,6 +163,7 @@ extern struct cred init_cred; | |||
163 | [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ | 163 | [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ |
164 | [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ | 164 | [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ |
165 | }, \ | 165 | }, \ |
166 | .thread_group = LIST_HEAD_INIT(tsk.thread_group), \ | ||
166 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ | 167 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ |
167 | INIT_IDS \ | 168 | INIT_IDS \ |
168 | INIT_PERF_EVENTS(tsk) \ | 169 | INIT_PERF_EVENTS(tsk) \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 83524e4f3290..6fcc9101beeb 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1155,7 +1155,7 @@ struct input_dev { | |||
1155 | 1155 | ||
1156 | int sync; | 1156 | int sync; |
1157 | 1157 | ||
1158 | int abs[ABS_MAX + 1]; | 1158 | int abs[ABS_CNT]; |
1159 | int rep[REP_MAX + 1]; | 1159 | int rep[REP_MAX + 1]; |
1160 | 1160 | ||
1161 | unsigned long key[BITS_TO_LONGS(KEY_CNT)]; | 1161 | unsigned long key[BITS_TO_LONGS(KEY_CNT)]; |
@@ -1163,11 +1163,11 @@ struct input_dev { | |||
1163 | unsigned long snd[BITS_TO_LONGS(SND_CNT)]; | 1163 | unsigned long snd[BITS_TO_LONGS(SND_CNT)]; |
1164 | unsigned long sw[BITS_TO_LONGS(SW_CNT)]; | 1164 | unsigned long sw[BITS_TO_LONGS(SW_CNT)]; |
1165 | 1165 | ||
1166 | int absmax[ABS_MAX + 1]; | 1166 | int absmax[ABS_CNT]; |
1167 | int absmin[ABS_MAX + 1]; | 1167 | int absmin[ABS_CNT]; |
1168 | int absfuzz[ABS_MAX + 1]; | 1168 | int absfuzz[ABS_CNT]; |
1169 | int absflat[ABS_MAX + 1]; | 1169 | int absflat[ABS_CNT]; |
1170 | int absres[ABS_MAX + 1]; | 1170 | int absres[ABS_CNT]; |
1171 | 1171 | ||
1172 | int (*open)(struct input_dev *dev); | 1172 | int (*open)(struct input_dev *dev); |
1173 | void (*close)(struct input_dev *dev); | 1173 | void (*close)(struct input_dev *dev); |
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index 9e20c29c1e14..47199b13e0eb 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h | |||
@@ -64,8 +64,8 @@ struct js_event { | |||
64 | #define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */ | 64 | #define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */ |
65 | #define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */ | 65 | #define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */ |
66 | 66 | ||
67 | #define JSIOCSAXMAP _IOW('j', 0x31, __u8[ABS_MAX + 1]) /* set axis mapping */ | 67 | #define JSIOCSAXMAP _IOW('j', 0x31, __u8[ABS_CNT]) /* set axis mapping */ |
68 | #define JSIOCGAXMAP _IOR('j', 0x32, __u8[ABS_MAX + 1]) /* get axis mapping */ | 68 | #define JSIOCGAXMAP _IOR('j', 0x32, __u8[ABS_CNT]) /* get axis mapping */ |
69 | #define JSIOCSBTNMAP _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC + 1]) /* set button mapping */ | 69 | #define JSIOCSBTNMAP _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC + 1]) /* set button mapping */ |
70 | #define JSIOCGBTNMAP _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC + 1]) /* get button mapping */ | 70 | #define JSIOCGBTNMAP _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC + 1]) /* get button mapping */ |
71 | 71 | ||
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index facb27fe7de0..6efd7a78de6a 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
26 | #include <linux/workqueue.h> | ||
26 | 27 | ||
27 | #define KMOD_PATH_LEN 256 | 28 | #define KMOD_PATH_LEN 256 |
28 | 29 | ||
@@ -45,19 +46,6 @@ static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; | |||
45 | 46 | ||
46 | struct key; | 47 | struct key; |
47 | struct file; | 48 | struct file; |
48 | struct subprocess_info; | ||
49 | |||
50 | /* Allocate a subprocess_info structure */ | ||
51 | struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, | ||
52 | char **envp, gfp_t gfp_mask); | ||
53 | |||
54 | /* Set various pieces of state into the subprocess_info structure */ | ||
55 | void call_usermodehelper_setkeys(struct subprocess_info *info, | ||
56 | struct key *session_keyring); | ||
57 | int call_usermodehelper_stdinpipe(struct subprocess_info *sub_info, | ||
58 | struct file **filp); | ||
59 | void call_usermodehelper_setcleanup(struct subprocess_info *info, | ||
60 | void (*cleanup)(char **argv, char **envp)); | ||
61 | 49 | ||
62 | enum umh_wait { | 50 | enum umh_wait { |
63 | UMH_NO_WAIT = -1, /* don't wait at all */ | 51 | UMH_NO_WAIT = -1, /* don't wait at all */ |
@@ -65,6 +53,29 @@ enum umh_wait { | |||
65 | UMH_WAIT_PROC = 1, /* wait for the process to complete */ | 53 | UMH_WAIT_PROC = 1, /* wait for the process to complete */ |
66 | }; | 54 | }; |
67 | 55 | ||
56 | struct subprocess_info { | ||
57 | struct work_struct work; | ||
58 | struct completion *complete; | ||
59 | char *path; | ||
60 | char **argv; | ||
61 | char **envp; | ||
62 | enum umh_wait wait; | ||
63 | int retval; | ||
64 | int (*init)(struct subprocess_info *info); | ||
65 | void (*cleanup)(struct subprocess_info *info); | ||
66 | void *data; | ||
67 | }; | ||
68 | |||
69 | /* Allocate a subprocess_info structure */ | ||
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), | ||
76 | void (*cleanup)(struct subprocess_info *info), | ||
77 | void *data); | ||
78 | |||
68 | /* Actually execute the sub-process */ | 79 | /* Actually execute the sub-process */ |
69 | int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait); | 80 | int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait); |
70 | 81 | ||
@@ -73,38 +84,33 @@ int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait); | |||
73 | void call_usermodehelper_freeinfo(struct subprocess_info *info); | 84 | void call_usermodehelper_freeinfo(struct subprocess_info *info); |
74 | 85 | ||
75 | static inline int | 86 | static inline int |
76 | call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) | 87 | call_usermodehelper_fns(char *path, char **argv, char **envp, |
88 | enum umh_wait wait, | ||
89 | int (*init)(struct subprocess_info *info), | ||
90 | void (*cleanup)(struct subprocess_info *), void *data) | ||
77 | { | 91 | { |
78 | struct subprocess_info *info; | 92 | struct subprocess_info *info; |
79 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; | 93 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; |
80 | 94 | ||
81 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); | 95 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); |
96 | |||
82 | if (info == NULL) | 97 | if (info == NULL) |
83 | return -ENOMEM; | 98 | return -ENOMEM; |
99 | |||
100 | call_usermodehelper_setfns(info, init, cleanup, data); | ||
101 | |||
84 | return call_usermodehelper_exec(info, wait); | 102 | return call_usermodehelper_exec(info, wait); |
85 | } | 103 | } |
86 | 104 | ||
87 | static inline int | 105 | static inline int |
88 | call_usermodehelper_keys(char *path, char **argv, char **envp, | 106 | call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) |
89 | struct key *session_keyring, enum umh_wait wait) | ||
90 | { | 107 | { |
91 | struct subprocess_info *info; | 108 | return call_usermodehelper_fns(path, argv, envp, wait, |
92 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; | 109 | NULL, NULL, NULL); |
93 | |||
94 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); | ||
95 | if (info == NULL) | ||
96 | return -ENOMEM; | ||
97 | |||
98 | call_usermodehelper_setkeys(info, session_keyring); | ||
99 | return call_usermodehelper_exec(info, wait); | ||
100 | } | 110 | } |
101 | 111 | ||
102 | extern void usermodehelper_init(void); | 112 | extern void usermodehelper_init(void); |
103 | 113 | ||
104 | struct file; | ||
105 | extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[], | ||
106 | struct file **filp); | ||
107 | |||
108 | extern int usermodehelper_disable(void); | 114 | extern int usermodehelper_disable(void); |
109 | extern void usermodehelper_enable(void); | 115 | extern void usermodehelper_enable(void); |
110 | 116 | ||
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index c67fecafff90..8877123f2d6e 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -69,6 +69,29 @@ struct lcd_device { | |||
69 | struct device dev; | 69 | struct device dev; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | struct lcd_platform_data { | ||
73 | /* reset lcd panel device. */ | ||
74 | int (*reset)(struct lcd_device *ld); | ||
75 | /* on or off to lcd panel. if 'enable' is 0 then | ||
76 | lcd power off and 1, lcd power on. */ | ||
77 | int (*power_on)(struct lcd_device *ld, int enable); | ||
78 | |||
79 | /* it indicates whether lcd panel was enabled | ||
80 | from bootloader or not. */ | ||
81 | int lcd_enabled; | ||
82 | /* it means delay for stable time when it becomes low to high | ||
83 | or high to low that is dependent on whether reset gpio is | ||
84 | low active or high active. */ | ||
85 | unsigned int reset_delay; | ||
86 | /* stable time needing to become lcd power on. */ | ||
87 | unsigned int power_on_delay; | ||
88 | /* stable time needing to become lcd power off. */ | ||
89 | unsigned int power_off_delay; | ||
90 | |||
91 | /* it could be used for any purpose. */ | ||
92 | void *pdata; | ||
93 | }; | ||
94 | |||
72 | static inline void lcd_set_power(struct lcd_device *ld, int power) | 95 | static inline void lcd_set_power(struct lcd_device *ld, int power) |
73 | { | 96 | { |
74 | mutex_lock(&ld->update_lock); | 97 | mutex_lock(&ld->update_lock); |
diff --git a/include/linux/leds.h b/include/linux/leds.h index d8bf9665e70c..ba6986a11663 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -149,14 +149,18 @@ struct gpio_led { | |||
149 | unsigned default_state : 2; | 149 | unsigned default_state : 2; |
150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ | 150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ |
151 | }; | 151 | }; |
152 | #define LEDS_GPIO_DEFSTATE_OFF 0 | 152 | #define LEDS_GPIO_DEFSTATE_OFF 0 |
153 | #define LEDS_GPIO_DEFSTATE_ON 1 | 153 | #define LEDS_GPIO_DEFSTATE_ON 1 |
154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 | 154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 |
155 | 155 | ||
156 | struct gpio_led_platform_data { | 156 | struct gpio_led_platform_data { |
157 | int num_leds; | 157 | int num_leds; |
158 | struct gpio_led *leds; | 158 | struct gpio_led *leds; |
159 | int (*gpio_blink_set)(unsigned gpio, | 159 | |
160 | #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ | ||
161 | #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ | ||
162 | #define GPIO_LED_BLINK 2 /* Plase, blink */ | ||
163 | int (*gpio_blink_set)(unsigned gpio, int state, | ||
160 | unsigned long *delay_on, | 164 | unsigned long *delay_on, |
161 | unsigned long *delay_off); | 165 | unsigned long *delay_off); |
162 | }; | 166 | }; |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 05894795fdc1..9411d32840b0 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -90,7 +90,8 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | |||
90 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); | 90 | extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); |
91 | 91 | ||
92 | extern int | 92 | extern int |
93 | mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr); | 93 | mem_cgroup_prepare_migration(struct page *page, |
94 | struct page *newpage, struct mem_cgroup **ptr); | ||
94 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | 95 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, |
95 | struct page *oldpage, struct page *newpage); | 96 | struct page *oldpage, struct page *newpage); |
96 | 97 | ||
@@ -227,7 +228,8 @@ static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) | |||
227 | } | 228 | } |
228 | 229 | ||
229 | static inline int | 230 | static inline int |
230 | mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr) | 231 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
232 | struct mem_cgroup **ptr) | ||
231 | { | 233 | { |
232 | return 0; | 234 | return 0; |
233 | } | 235 | } |
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index 8895d9d8879c..4a894f688549 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
@@ -64,6 +64,70 @@ static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) | |||
64 | MC13783_ADC0_TSMOD1 | \ | 64 | MC13783_ADC0_TSMOD1 | \ |
65 | MC13783_ADC0_TSMOD2) | 65 | MC13783_ADC0_TSMOD2) |
66 | 66 | ||
67 | struct mc13783_led_platform_data { | ||
68 | #define MC13783_LED_MD 0 | ||
69 | #define MC13783_LED_AD 1 | ||
70 | #define MC13783_LED_KP 2 | ||
71 | #define MC13783_LED_R1 3 | ||
72 | #define MC13783_LED_G1 4 | ||
73 | #define MC13783_LED_B1 5 | ||
74 | #define MC13783_LED_R2 6 | ||
75 | #define MC13783_LED_G2 7 | ||
76 | #define MC13783_LED_B2 8 | ||
77 | #define MC13783_LED_R3 9 | ||
78 | #define MC13783_LED_G3 10 | ||
79 | #define MC13783_LED_B3 11 | ||
80 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
81 | int id; | ||
82 | const char *name; | ||
83 | const char *default_trigger; | ||
84 | |||
85 | /* Three or two bits current selection depending on the led */ | ||
86 | char max_current; | ||
87 | }; | ||
88 | |||
89 | struct mc13783_leds_platform_data { | ||
90 | int num_leds; | ||
91 | struct mc13783_led_platform_data *led; | ||
92 | |||
93 | #define MC13783_LED_TRIODE_MD (1 << 0) | ||
94 | #define MC13783_LED_TRIODE_AD (1 << 1) | ||
95 | #define MC13783_LED_TRIODE_KP (1 << 2) | ||
96 | #define MC13783_LED_BOOST_EN (1 << 3) | ||
97 | #define MC13783_LED_TC1HALF (1 << 4) | ||
98 | #define MC13783_LED_SLEWLIMTC (1 << 5) | ||
99 | #define MC13783_LED_SLEWLIMBL (1 << 6) | ||
100 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | ||
101 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | ||
102 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | ||
103 | int flags; | ||
104 | |||
105 | #define MC13783_LED_AB_DISABLED 0 | ||
106 | #define MC13783_LED_AB_MD1 1 | ||
107 | #define MC13783_LED_AB_MD12 2 | ||
108 | #define MC13783_LED_AB_MD123 3 | ||
109 | #define MC13783_LED_AB_MD1234 4 | ||
110 | #define MC13783_LED_AB_MD1234_AD1 5 | ||
111 | #define MC13783_LED_AB_MD1234_AD12 6 | ||
112 | #define MC13783_LED_AB_MD1_AD 7 | ||
113 | char abmode; | ||
114 | |||
115 | #define MC13783_LED_ABREF_200MV 0 | ||
116 | #define MC13783_LED_ABREF_400MV 1 | ||
117 | #define MC13783_LED_ABREF_600MV 2 | ||
118 | #define MC13783_LED_ABREF_800MV 3 | ||
119 | char abref; | ||
120 | |||
121 | #define MC13783_LED_PERIOD_10MS 0 | ||
122 | #define MC13783_LED_PERIOD_100MS 1 | ||
123 | #define MC13783_LED_PERIOD_500MS 2 | ||
124 | #define MC13783_LED_PERIOD_2S 3 | ||
125 | char bl_period; | ||
126 | char tc1_period; | ||
127 | char tc2_period; | ||
128 | char tc3_period; | ||
129 | }; | ||
130 | |||
67 | /* to be cleaned up */ | 131 | /* to be cleaned up */ |
68 | struct regulator_init_data; | 132 | struct regulator_init_data; |
69 | 133 | ||
@@ -80,12 +144,14 @@ struct mc13783_regulator_platform_data { | |||
80 | struct mc13783_platform_data { | 144 | struct mc13783_platform_data { |
81 | int num_regulators; | 145 | int num_regulators; |
82 | struct mc13783_regulator_init_data *regulators; | 146 | struct mc13783_regulator_init_data *regulators; |
147 | struct mc13783_leds_platform_data *leds; | ||
83 | 148 | ||
84 | #define MC13783_USE_TOUCHSCREEN (1 << 0) | 149 | #define MC13783_USE_TOUCHSCREEN (1 << 0) |
85 | #define MC13783_USE_CODEC (1 << 1) | 150 | #define MC13783_USE_CODEC (1 << 1) |
86 | #define MC13783_USE_ADC (1 << 2) | 151 | #define MC13783_USE_ADC (1 << 2) |
87 | #define MC13783_USE_RTC (1 << 3) | 152 | #define MC13783_USE_RTC (1 << 3) |
88 | #define MC13783_USE_REGULATOR (1 << 4) | 153 | #define MC13783_USE_REGULATOR (1 << 4) |
154 | #define MC13783_USE_LED (1 << 5) | ||
89 | unsigned int flags; | 155 | unsigned int flags; |
90 | }; | 156 | }; |
91 | 157 | ||
diff --git a/include/linux/mfd/pcf50633/backlight.h b/include/linux/mfd/pcf50633/backlight.h new file mode 100644 index 000000000000..83747e217b27 --- /dev/null +++ b/include/linux/mfd/pcf50633/backlight.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> | ||
3 | * PCF50633 backlight device driver | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | * | ||
10 | * You should have received a copy of the GNU General Public License along | ||
11 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
12 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __LINUX_MFD_PCF50633_BACKLIGHT | ||
17 | #define __LINUX_MFD_PCF50633_BACKLIGHT | ||
18 | |||
19 | /* | ||
20 | * @default_brightness: Backlight brightness is initialized to this value | ||
21 | * | ||
22 | * Brightness to be used after the driver has been probed. | ||
23 | * Valid range 0-63. | ||
24 | * | ||
25 | * @default_brightness_limit: The actual brightness is limited by this value | ||
26 | * | ||
27 | * Brightness limit to be used after the driver has been probed. This is useful | ||
28 | * when it is not known how much power is available for the backlight during | ||
29 | * probe. | ||
30 | * Valid range 0-63. Can be changed later with pcf50633_bl_set_brightness_limit. | ||
31 | * | ||
32 | * @ramp_time: Display ramp time when changing brightness | ||
33 | * | ||
34 | * When changing the backlights brightness the change is not instant, instead | ||
35 | * it fades smooth from one state to another. This value specifies how long | ||
36 | * the fade should take. The lower the value the higher the fade time. | ||
37 | * Valid range 0-255 | ||
38 | */ | ||
39 | struct pcf50633_bl_platform_data { | ||
40 | unsigned int default_brightness; | ||
41 | unsigned int default_brightness_limit; | ||
42 | uint8_t ramp_time; | ||
43 | }; | ||
44 | |||
45 | |||
46 | struct pcf50633; | ||
47 | |||
48 | int pcf50633_bl_set_brightness_limit(struct pcf50633 *pcf, unsigned int limit); | ||
49 | |||
50 | #endif | ||
51 | |||
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h index 3398bd9aab11..ad411a78870c 100644 --- a/include/linux/mfd/pcf50633/core.h +++ b/include/linux/mfd/pcf50633/core.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/regulator/driver.h> | 18 | #include <linux/regulator/driver.h> |
19 | #include <linux/regulator/machine.h> | 19 | #include <linux/regulator/machine.h> |
20 | #include <linux/power_supply.h> | 20 | #include <linux/power_supply.h> |
21 | #include <linux/mfd/pcf50633/backlight.h> | ||
21 | 22 | ||
22 | struct pcf50633; | 23 | struct pcf50633; |
23 | 24 | ||
@@ -43,6 +44,8 @@ struct pcf50633_platform_data { | |||
43 | void (*force_shutdown)(struct pcf50633 *); | 44 | void (*force_shutdown)(struct pcf50633 *); |
44 | 45 | ||
45 | u8 resumers[5]; | 46 | u8 resumers[5]; |
47 | |||
48 | struct pcf50633_bl_platform_data *backlight_data; | ||
46 | }; | 49 | }; |
47 | 50 | ||
48 | struct pcf50633_irq { | 51 | struct pcf50633_irq { |
@@ -152,6 +155,7 @@ struct pcf50633 { | |||
152 | struct platform_device *mbc_pdev; | 155 | struct platform_device *mbc_pdev; |
153 | struct platform_device *adc_pdev; | 156 | struct platform_device *adc_pdev; |
154 | struct platform_device *input_pdev; | 157 | struct platform_device *input_pdev; |
158 | struct platform_device *bl_pdev; | ||
155 | struct platform_device *regulator_pdev[PCF50633_NUM_REGULATORS]; | 159 | struct platform_device *regulator_pdev[PCF50633_NUM_REGULATORS]; |
156 | }; | 160 | }; |
157 | 161 | ||
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 8b5f7cc0fba6..b631c46cffd9 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -31,6 +31,8 @@ | |||
31 | #define FUSE_MINOR 229 | 31 | #define FUSE_MINOR 229 |
32 | #define KVM_MINOR 232 | 32 | #define KVM_MINOR 232 |
33 | #define VHOST_NET_MINOR 233 | 33 | #define VHOST_NET_MINOR 233 |
34 | #define BTRFS_MINOR 234 | ||
35 | #define AUTOFS_MINOR 235 | ||
34 | #define MISC_DYNAMIC_MINOR 255 | 36 | #define MISC_DYNAMIC_MINOR 255 |
35 | 37 | ||
36 | struct device; | 38 | struct device; |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 3196c84cc630..f65913c9f5a4 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -230,7 +230,7 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
230 | #define mmc_classdev(x) (&(x)->class_dev) | 230 | #define mmc_classdev(x) (&(x)->class_dev) |
231 | #define mmc_hostname(x) (dev_name(&(x)->class_dev)) | 231 | #define mmc_hostname(x) (dev_name(&(x)->class_dev)) |
232 | 232 | ||
233 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 233 | extern int mmc_suspend_host(struct mmc_host *); |
234 | extern int mmc_resume_host(struct mmc_host *); | 234 | extern int mmc_resume_host(struct mmc_host *); |
235 | 235 | ||
236 | extern void mmc_power_save_host(struct mmc_host *host); | 236 | extern void mmc_power_save_host(struct mmc_host *host); |
diff --git a/include/linux/mmc/sdhci-spear.h b/include/linux/mmc/sdhci-spear.h new file mode 100644 index 000000000000..9188c973f3e1 --- /dev/null +++ b/include/linux/mmc/sdhci-spear.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * include/linux/mmc/sdhci-spear.h | ||
3 | * | ||
4 | * SDHCI declarations specific to ST SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2010 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef MMC_SDHCI_SPEAR_H | ||
15 | #define MMC_SDHCI_SPEAR_H | ||
16 | |||
17 | #include <linux/platform_device.h> | ||
18 | /* | ||
19 | * struct sdhci_plat_data: spear sdhci platform data structure | ||
20 | * | ||
21 | * @card_power_gpio: gpio pin for enabling/disabling power to sdhci socket | ||
22 | * @power_active_high: if set, enable power to sdhci socket by setting | ||
23 | * card_power_gpio | ||
24 | * @power_always_enb: If set, then enable power on probe, otherwise enable only | ||
25 | * on card insertion and disable on card removal. | ||
26 | * card_int_gpio: gpio pin used for card detection | ||
27 | */ | ||
28 | struct sdhci_plat_data { | ||
29 | int card_power_gpio; | ||
30 | int power_active_high; | ||
31 | int power_always_enb; | ||
32 | int card_int_gpio; | ||
33 | }; | ||
34 | |||
35 | /* This function is used to set platform_data field of pdev->dev */ | ||
36 | static inline void | ||
37 | sdhci_set_plat_data(struct platform_device *pdev, struct sdhci_plat_data *data) | ||
38 | { | ||
39 | pdev->dev.platform_data = data; | ||
40 | } | ||
41 | |||
42 | #endif /* MMC_SDHCI_SPEAR_H */ | ||
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index c6c0cceba5fe..31baaf82f458 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
@@ -145,6 +145,9 @@ extern void sdio_writew(struct sdio_func *func, u16 b, | |||
145 | extern void sdio_writel(struct sdio_func *func, u32 b, | 145 | extern void sdio_writel(struct sdio_func *func, u32 b, |
146 | unsigned int addr, int *err_ret); | 146 | unsigned int addr, int *err_ret); |
147 | 147 | ||
148 | extern u8 sdio_writeb_readb(struct sdio_func *func, u8 write_byte, | ||
149 | unsigned int addr, int *err_ret); | ||
150 | |||
148 | extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, | 151 | extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, |
149 | void *src, int count); | 152 | void *src, int count); |
150 | extern int sdio_writesb(struct sdio_func *func, unsigned int addr, | 153 | extern int sdio_writesb(struct sdio_func *func, unsigned int addr, |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h new file mode 100644 index 000000000000..aafe832f18aa --- /dev/null +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/linux/mmc/sh_mmcif.h | ||
3 | * | ||
4 | * platform data for eMMC driver | ||
5 | * | ||
6 | * Copyright (C) 2010 Renesas Solutions Corp. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __SH_MMCIF_H__ | ||
15 | #define __SH_MMCIF_H__ | ||
16 | |||
17 | /* | ||
18 | * MMCIF : CE_CLK_CTRL [19:16] | ||
19 | * 1000 : Peripheral clock / 512 | ||
20 | * 0111 : Peripheral clock / 256 | ||
21 | * 0110 : Peripheral clock / 128 | ||
22 | * 0101 : Peripheral clock / 64 | ||
23 | * 0100 : Peripheral clock / 32 | ||
24 | * 0011 : Peripheral clock / 16 | ||
25 | * 0010 : Peripheral clock / 8 | ||
26 | * 0001 : Peripheral clock / 4 | ||
27 | * 0000 : Peripheral clock / 2 | ||
28 | * 1111 : Peripheral clock (sup_pclk set '1') | ||
29 | */ | ||
30 | |||
31 | struct sh_mmcif_plat_data { | ||
32 | void (*set_pwr)(struct platform_device *pdev, int state); | ||
33 | void (*down_pwr)(struct platform_device *pdev); | ||
34 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ | ||
35 | unsigned long caps; | ||
36 | u32 ocr; | ||
37 | }; | ||
38 | |||
39 | #endif /* __SH_MMCIF_H__ */ | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 0fa491326c4a..b4d109e389b8 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -671,6 +671,12 @@ void memory_present(int nid, unsigned long start, unsigned long end); | |||
671 | static inline void memory_present(int nid, unsigned long start, unsigned long end) {} | 671 | static inline void memory_present(int nid, unsigned long start, unsigned long end) {} |
672 | #endif | 672 | #endif |
673 | 673 | ||
674 | #ifdef CONFIG_HAVE_MEMORYLESS_NODES | ||
675 | int local_memory_node(int node_id); | ||
676 | #else | ||
677 | static inline int local_memory_node(int node_id) { return node_id; }; | ||
678 | #endif | ||
679 | |||
674 | #ifdef CONFIG_NEED_NODE_MEMMAP_SIZE | 680 | #ifdef CONFIG_NEED_NODE_MEMMAP_SIZE |
675 | unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); | 681 | unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); |
676 | #endif | 682 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a1bff6518166..40291f375024 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1407,17 +1407,25 @@ struct softnet_data { | |||
1407 | struct softnet_data *rps_ipi_next; | 1407 | struct softnet_data *rps_ipi_next; |
1408 | unsigned int cpu; | 1408 | unsigned int cpu; |
1409 | unsigned int input_queue_head; | 1409 | unsigned int input_queue_head; |
1410 | unsigned int input_queue_tail; | ||
1410 | #endif | 1411 | #endif |
1411 | unsigned dropped; | 1412 | unsigned dropped; |
1412 | struct sk_buff_head input_pkt_queue; | 1413 | struct sk_buff_head input_pkt_queue; |
1413 | struct napi_struct backlog; | 1414 | struct napi_struct backlog; |
1414 | }; | 1415 | }; |
1415 | 1416 | ||
1416 | static inline void input_queue_head_add(struct softnet_data *sd, | 1417 | static inline void input_queue_head_incr(struct softnet_data *sd) |
1417 | unsigned int len) | ||
1418 | { | 1418 | { |
1419 | #ifdef CONFIG_RPS | 1419 | #ifdef CONFIG_RPS |
1420 | sd->input_queue_head += len; | 1420 | sd->input_queue_head++; |
1421 | #endif | ||
1422 | } | ||
1423 | |||
1424 | static inline void input_queue_tail_incr_save(struct softnet_data *sd, | ||
1425 | unsigned int *qtail) | ||
1426 | { | ||
1427 | #ifdef CONFIG_RPS | ||
1428 | *qtail = ++sd->input_queue_tail; | ||
1421 | #endif | 1429 | #endif |
1422 | } | 1430 | } |
1423 | 1431 | ||
@@ -2326,7 +2334,7 @@ do { \ | |||
2326 | #define netif_vdbg(priv, type, dev, format, args...) \ | 2334 | #define netif_vdbg(priv, type, dev, format, args...) \ |
2327 | ({ \ | 2335 | ({ \ |
2328 | if (0) \ | 2336 | if (0) \ |
2329 | netif_printk(KERN_DEBUG, dev, format, ##args); \ | 2337 | netif_printk(priv, type, KERN_DEBUG, dev, format, ##args); \ |
2330 | 0; \ | 2338 | 0; \ |
2331 | }) | 2339 | }) |
2332 | #endif | 2340 | #endif |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c2ee5d8550cf..c00cc0c4d0b7 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -333,7 +333,7 @@ struct xt_target { | |||
333 | /* Called when user tries to insert an entry of this type: | 333 | /* Called when user tries to insert an entry of this type: |
334 | hook_mask is a bitmask of hooks from which it can be | 334 | hook_mask is a bitmask of hooks from which it can be |
335 | called. */ | 335 | called. */ |
336 | /* Should return true or false, or an error code (-Exxxx). */ | 336 | /* Should return 0 on success or an error code otherwise (-Exxxx). */ |
337 | int (*checkentry)(const struct xt_tgchk_param *); | 337 | int (*checkentry)(const struct xt_tgchk_param *); |
338 | 338 | ||
339 | /* Called when entry of this type deleted. */ | 339 | /* Called when entry of this type deleted. */ |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index dba35e413371..8a8f1d09c133 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -66,6 +66,8 @@ | |||
66 | * int num_online_nodes() Number of online Nodes | 66 | * int num_online_nodes() Number of online Nodes |
67 | * int num_possible_nodes() Number of all possible Nodes | 67 | * int num_possible_nodes() Number of all possible Nodes |
68 | * | 68 | * |
69 | * int node_random(mask) Random node with set bit in mask | ||
70 | * | ||
69 | * int node_online(node) Is some node online? | 71 | * int node_online(node) Is some node online? |
70 | * int node_possible(node) Is some node possible? | 72 | * int node_possible(node) Is some node possible? |
71 | * | 73 | * |
@@ -430,6 +432,10 @@ static inline void node_set_offline(int nid) | |||
430 | node_clear_state(nid, N_ONLINE); | 432 | node_clear_state(nid, N_ONLINE); |
431 | nr_online_nodes = num_node_state(N_ONLINE); | 433 | nr_online_nodes = num_node_state(N_ONLINE); |
432 | } | 434 | } |
435 | |||
436 | #define node_random(mask) __node_random(&(mask)) | ||
437 | extern int __node_random(const nodemask_t *maskp); | ||
438 | |||
433 | #else | 439 | #else |
434 | 440 | ||
435 | static inline int node_state(int node, enum node_states state) | 441 | static inline int node_state(int node, enum node_states state) |
@@ -460,6 +466,8 @@ static inline int num_node_state(enum node_states state) | |||
460 | 466 | ||
461 | #define node_set_online(node) node_set_state((node), N_ONLINE) | 467 | #define node_set_online(node) node_set_state((node), N_ONLINE) |
462 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) | 468 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) |
469 | |||
470 | static inline int node_random(const nodemask_t mask) { return 0; } | ||
463 | #endif | 471 | #endif |
464 | 472 | ||
465 | #define node_online_map node_states[N_ONLINE] | 473 | #define node_online_map node_states[N_ONLINE] |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 7c3609622334..540703b555cb 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -164,7 +164,10 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, | |||
164 | /* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */ | 164 | /* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */ |
165 | static inline int notifier_from_errno(int err) | 165 | static inline int notifier_from_errno(int err) |
166 | { | 166 | { |
167 | return NOTIFY_STOP_MASK | (NOTIFY_OK - err); | 167 | if (err) |
168 | return NOTIFY_STOP_MASK | (NOTIFY_OK - err); | ||
169 | |||
170 | return NOTIFY_OK; | ||
168 | } | 171 | } |
169 | 172 | ||
170 | /* Restore (negative) errno value from notify return value. */ | 173 | /* Restore (negative) errno value from notify return value. */ |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index aef22ae2af47..5bb13b3db84d 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -40,6 +40,7 @@ enum { | |||
40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | 42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ |
43 | PCG_MIGRATION, /* under page migration */ | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | #define TESTPCGFLAG(uname, lname) \ | 46 | #define TESTPCGFLAG(uname, lname) \ |
@@ -79,6 +80,10 @@ SETPCGFLAG(FileMapped, FILE_MAPPED) | |||
79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | 80 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) |
80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | 81 | TESTPCGFLAG(FileMapped, FILE_MAPPED) |
81 | 82 | ||
83 | SETPCGFLAG(Migration, MIGRATION) | ||
84 | CLEARPCGFLAG(Migration, MIGRATION) | ||
85 | TESTPCGFLAG(Migration, MIGRATION) | ||
86 | |||
82 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 87 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
83 | { | 88 | { |
84 | return page_to_nid(pc->page); | 89 | return page_to_nid(pc->page); |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3fd5c82e0e18..fb6c91eac7e3 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -485,6 +485,7 @@ struct perf_guest_info_callbacks { | |||
485 | #include <linux/ftrace.h> | 485 | #include <linux/ftrace.h> |
486 | #include <linux/cpu.h> | 486 | #include <linux/cpu.h> |
487 | #include <asm/atomic.h> | 487 | #include <asm/atomic.h> |
488 | #include <asm/local.h> | ||
488 | 489 | ||
489 | #define PERF_MAX_STACK_DEPTH 255 | 490 | #define PERF_MAX_STACK_DEPTH 255 |
490 | 491 | ||
@@ -587,21 +588,19 @@ struct perf_mmap_data { | |||
587 | struct rcu_head rcu_head; | 588 | struct rcu_head rcu_head; |
588 | #ifdef CONFIG_PERF_USE_VMALLOC | 589 | #ifdef CONFIG_PERF_USE_VMALLOC |
589 | struct work_struct work; | 590 | struct work_struct work; |
591 | int page_order; /* allocation order */ | ||
590 | #endif | 592 | #endif |
591 | int data_order; | ||
592 | int nr_pages; /* nr of data pages */ | 593 | int nr_pages; /* nr of data pages */ |
593 | int writable; /* are we writable */ | 594 | int writable; /* are we writable */ |
594 | int nr_locked; /* nr pages mlocked */ | 595 | int nr_locked; /* nr pages mlocked */ |
595 | 596 | ||
596 | atomic_t poll; /* POLL_ for wakeups */ | 597 | atomic_t poll; /* POLL_ for wakeups */ |
597 | atomic_t events; /* event_id limit */ | ||
598 | 598 | ||
599 | atomic_long_t head; /* write position */ | 599 | local_t head; /* write position */ |
600 | atomic_long_t done_head; /* completed head */ | 600 | local_t nest; /* nested writers */ |
601 | 601 | local_t events; /* event limit */ | |
602 | atomic_t lock; /* concurrent writes */ | 602 | local_t wakeup; /* wakeup stamp */ |
603 | atomic_t wakeup; /* needs a wakeup */ | 603 | local_t lost; /* nr records lost */ |
604 | atomic_t lost; /* nr records lost */ | ||
605 | 604 | ||
606 | long watermark; /* wakeup watermark */ | 605 | long watermark; /* wakeup watermark */ |
607 | 606 | ||
@@ -728,6 +727,7 @@ struct perf_event { | |||
728 | perf_overflow_handler_t overflow_handler; | 727 | perf_overflow_handler_t overflow_handler; |
729 | 728 | ||
730 | #ifdef CONFIG_EVENT_TRACING | 729 | #ifdef CONFIG_EVENT_TRACING |
730 | struct ftrace_event_call *tp_event; | ||
731 | struct event_filter *filter; | 731 | struct event_filter *filter; |
732 | #endif | 732 | #endif |
733 | 733 | ||
@@ -803,11 +803,12 @@ struct perf_cpu_context { | |||
803 | struct perf_output_handle { | 803 | struct perf_output_handle { |
804 | struct perf_event *event; | 804 | struct perf_event *event; |
805 | struct perf_mmap_data *data; | 805 | struct perf_mmap_data *data; |
806 | unsigned long head; | 806 | unsigned long wakeup; |
807 | unsigned long offset; | 807 | unsigned long size; |
808 | void *addr; | ||
809 | int page; | ||
808 | int nmi; | 810 | int nmi; |
809 | int sample; | 811 | int sample; |
810 | int locked; | ||
811 | }; | 812 | }; |
812 | 813 | ||
813 | #ifdef CONFIG_PERF_EVENTS | 814 | #ifdef CONFIG_PERF_EVENTS |
@@ -993,8 +994,9 @@ static inline bool perf_paranoid_kernel(void) | |||
993 | } | 994 | } |
994 | 995 | ||
995 | extern void perf_event_init(void); | 996 | extern void perf_event_init(void); |
996 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, | 997 | extern void perf_tp_event(u64 addr, u64 count, void *record, |
997 | int entry_size, struct pt_regs *regs); | 998 | int entry_size, struct pt_regs *regs, |
999 | struct hlist_head *head); | ||
998 | extern void perf_bp_event(struct perf_event *event, void *data); | 1000 | extern void perf_bp_event(struct perf_event *event, void *data); |
999 | 1001 | ||
1000 | #ifndef perf_misc_flags | 1002 | #ifndef perf_misc_flags |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 370abb1e99cb..e38ae53f3529 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -9,6 +9,10 @@ | |||
9 | 9 | ||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | 11 | ||
12 | #define DQUOT_SPACE_WARN 0x1 | ||
13 | #define DQUOT_SPACE_RESERVE 0x2 | ||
14 | #define DQUOT_SPACE_NOFAIL 0x4 | ||
15 | |||
12 | static inline struct quota_info *sb_dqopt(struct super_block *sb) | 16 | static inline struct quota_info *sb_dqopt(struct super_block *sb) |
13 | { | 17 | { |
14 | return &sb->s_dquot; | 18 | return &sb->s_dquot; |
@@ -41,9 +45,8 @@ int dquot_scan_active(struct super_block *sb, | |||
41 | struct dquot *dquot_alloc(struct super_block *sb, int type); | 45 | struct dquot *dquot_alloc(struct super_block *sb, int type); |
42 | void dquot_destroy(struct dquot *dquot); | 46 | void dquot_destroy(struct dquot *dquot); |
43 | 47 | ||
44 | int __dquot_alloc_space(struct inode *inode, qsize_t number, | 48 | int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags); |
45 | int warn, int reserve); | 49 | void __dquot_free_space(struct inode *inode, qsize_t number, int flags); |
46 | void __dquot_free_space(struct inode *inode, qsize_t number, int reserve); | ||
47 | 50 | ||
48 | int dquot_alloc_inode(const struct inode *inode); | 51 | int dquot_alloc_inode(const struct inode *inode); |
49 | 52 | ||
@@ -242,17 +245,17 @@ static inline int dquot_transfer(struct inode *inode, struct iattr *iattr) | |||
242 | } | 245 | } |
243 | 246 | ||
244 | static inline int __dquot_alloc_space(struct inode *inode, qsize_t number, | 247 | static inline int __dquot_alloc_space(struct inode *inode, qsize_t number, |
245 | int warn, int reserve) | 248 | int flags) |
246 | { | 249 | { |
247 | if (!reserve) | 250 | if (!(flags & DQUOT_SPACE_RESERVE)) |
248 | inode_add_bytes(inode, number); | 251 | inode_add_bytes(inode, number); |
249 | return 0; | 252 | return 0; |
250 | } | 253 | } |
251 | 254 | ||
252 | static inline void __dquot_free_space(struct inode *inode, qsize_t number, | 255 | static inline void __dquot_free_space(struct inode *inode, qsize_t number, |
253 | int reserve) | 256 | int flags) |
254 | { | 257 | { |
255 | if (!reserve) | 258 | if (!(flags & DQUOT_SPACE_RESERVE)) |
256 | inode_sub_bytes(inode, number); | 259 | inode_sub_bytes(inode, number); |
257 | } | 260 | } |
258 | 261 | ||
@@ -268,7 +271,13 @@ static inline int dquot_claim_space_nodirty(struct inode *inode, qsize_t number) | |||
268 | 271 | ||
269 | static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) | 272 | static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) |
270 | { | 273 | { |
271 | return __dquot_alloc_space(inode, nr, 1, 0); | 274 | return __dquot_alloc_space(inode, nr, DQUOT_SPACE_WARN); |
275 | } | ||
276 | |||
277 | static inline void dquot_alloc_space_nofail(struct inode *inode, qsize_t nr) | ||
278 | { | ||
279 | __dquot_alloc_space(inode, nr, DQUOT_SPACE_WARN|DQUOT_SPACE_NOFAIL); | ||
280 | mark_inode_dirty(inode); | ||
272 | } | 281 | } |
273 | 282 | ||
274 | static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) | 283 | static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) |
@@ -286,6 +295,11 @@ static inline int dquot_alloc_block_nodirty(struct inode *inode, qsize_t nr) | |||
286 | return dquot_alloc_space_nodirty(inode, nr << inode->i_blkbits); | 295 | return dquot_alloc_space_nodirty(inode, nr << inode->i_blkbits); |
287 | } | 296 | } |
288 | 297 | ||
298 | static inline void dquot_alloc_block_nofail(struct inode *inode, qsize_t nr) | ||
299 | { | ||
300 | dquot_alloc_space_nofail(inode, nr << inode->i_blkbits); | ||
301 | } | ||
302 | |||
289 | static inline int dquot_alloc_block(struct inode *inode, qsize_t nr) | 303 | static inline int dquot_alloc_block(struct inode *inode, qsize_t nr) |
290 | { | 304 | { |
291 | return dquot_alloc_space(inode, nr << inode->i_blkbits); | 305 | return dquot_alloc_space(inode, nr << inode->i_blkbits); |
@@ -293,7 +307,7 @@ static inline int dquot_alloc_block(struct inode *inode, qsize_t nr) | |||
293 | 307 | ||
294 | static inline int dquot_prealloc_block_nodirty(struct inode *inode, qsize_t nr) | 308 | static inline int dquot_prealloc_block_nodirty(struct inode *inode, qsize_t nr) |
295 | { | 309 | { |
296 | return __dquot_alloc_space(inode, nr << inode->i_blkbits, 0, 0); | 310 | return __dquot_alloc_space(inode, nr << inode->i_blkbits, 0); |
297 | } | 311 | } |
298 | 312 | ||
299 | static inline int dquot_prealloc_block(struct inode *inode, qsize_t nr) | 313 | static inline int dquot_prealloc_block(struct inode *inode, qsize_t nr) |
@@ -308,7 +322,8 @@ static inline int dquot_prealloc_block(struct inode *inode, qsize_t nr) | |||
308 | 322 | ||
309 | static inline int dquot_reserve_block(struct inode *inode, qsize_t nr) | 323 | static inline int dquot_reserve_block(struct inode *inode, qsize_t nr) |
310 | { | 324 | { |
311 | return __dquot_alloc_space(inode, nr << inode->i_blkbits, 1, 1); | 325 | return __dquot_alloc_space(inode, nr << inode->i_blkbits, |
326 | DQUOT_SPACE_WARN|DQUOT_SPACE_RESERVE); | ||
312 | } | 327 | } |
313 | 328 | ||
314 | static inline int dquot_claim_block(struct inode *inode, qsize_t nr) | 329 | static inline int dquot_claim_block(struct inode *inode, qsize_t nr) |
@@ -345,7 +360,7 @@ static inline void dquot_free_block(struct inode *inode, qsize_t nr) | |||
345 | static inline void dquot_release_reservation_block(struct inode *inode, | 360 | static inline void dquot_release_reservation_block(struct inode *inode, |
346 | qsize_t nr) | 361 | qsize_t nr) |
347 | { | 362 | { |
348 | __dquot_free_space(inode, nr << inode->i_blkbits, 1); | 363 | __dquot_free_space(inode, nr << inode->i_blkbits, DQUOT_SPACE_RESERVE); |
349 | } | 364 | } |
350 | 365 | ||
351 | #endif /* _LINUX_QUOTAOPS_ */ | 366 | #endif /* _LINUX_QUOTAOPS_ */ |
diff --git a/include/linux/random.h b/include/linux/random.h index 25d02fe5c9b5..fb7ab9de5f36 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -40,6 +40,10 @@ struct rand_pool_info { | |||
40 | __u32 buf[0]; | 40 | __u32 buf[0]; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct rnd_state { | ||
44 | __u32 s1, s2, s3; | ||
45 | }; | ||
46 | |||
43 | /* Exported functions */ | 47 | /* Exported functions */ |
44 | 48 | ||
45 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
@@ -74,6 +78,30 @@ unsigned long randomize_range(unsigned long start, unsigned long end, unsigned l | |||
74 | u32 random32(void); | 78 | u32 random32(void); |
75 | void srandom32(u32 seed); | 79 | void srandom32(u32 seed); |
76 | 80 | ||
81 | u32 prandom32(struct rnd_state *); | ||
82 | |||
83 | /* | ||
84 | * Handle minimum values for seeds | ||
85 | */ | ||
86 | static inline u32 __seed(u32 x, u32 m) | ||
87 | { | ||
88 | return (x < m) ? x + m : x; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * prandom32_seed - set seed for prandom32(). | ||
93 | * @state: pointer to state structure to receive the seed. | ||
94 | * @seed: arbitrary 64-bit value to use as a seed. | ||
95 | */ | ||
96 | static inline void prandom32_seed(struct rnd_state *state, u64 seed) | ||
97 | { | ||
98 | u32 i = (seed >> 32) ^ (seed << 10) ^ seed; | ||
99 | |||
100 | state->s1 = __seed(i, 1); | ||
101 | state->s2 = __seed(i, 7); | ||
102 | state->s3 = __seed(i, 15); | ||
103 | } | ||
104 | |||
77 | #endif /* __KERNEL___ */ | 105 | #endif /* __KERNEL___ */ |
78 | 106 | ||
79 | #endif /* _LINUX_RANDOM_H */ | 107 | #endif /* _LINUX_RANDOM_H */ |
diff --git a/include/linux/rio.h b/include/linux/rio.h index dc0c75556c63..19b5f227096e 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -64,10 +64,13 @@ | |||
64 | #define RIO_INB_MBOX_RESOURCE 1 | 64 | #define RIO_INB_MBOX_RESOURCE 1 |
65 | #define RIO_OUTB_MBOX_RESOURCE 2 | 65 | #define RIO_OUTB_MBOX_RESOURCE 2 |
66 | 66 | ||
67 | #define RIO_PW_MSG_SIZE 64 | ||
68 | |||
67 | extern struct bus_type rio_bus_type; | 69 | extern struct bus_type rio_bus_type; |
68 | extern struct list_head rio_devices; /* list of all devices */ | 70 | extern struct list_head rio_devices; /* list of all devices */ |
69 | 71 | ||
70 | struct rio_mport; | 72 | struct rio_mport; |
73 | union rio_pw_msg; | ||
71 | 74 | ||
72 | /** | 75 | /** |
73 | * struct rio_dev - RIO device info | 76 | * struct rio_dev - RIO device info |
@@ -107,11 +110,15 @@ struct rio_dev { | |||
107 | u32 swpinfo; /* Only used for switches */ | 110 | u32 swpinfo; /* Only used for switches */ |
108 | u32 src_ops; | 111 | u32 src_ops; |
109 | u32 dst_ops; | 112 | u32 dst_ops; |
113 | u32 comp_tag; | ||
114 | u32 phys_efptr; | ||
115 | u32 em_efptr; | ||
110 | u64 dma_mask; | 116 | u64 dma_mask; |
111 | struct rio_switch *rswitch; /* RIO switch info */ | 117 | struct rio_switch *rswitch; /* RIO switch info */ |
112 | struct rio_driver *driver; /* RIO driver claiming this device */ | 118 | struct rio_driver *driver; /* RIO driver claiming this device */ |
113 | struct device dev; /* LDM device structure */ | 119 | struct device dev; /* LDM device structure */ |
114 | struct resource riores[RIO_MAX_DEV_RESOURCES]; | 120 | struct resource riores[RIO_MAX_DEV_RESOURCES]; |
121 | int (*pwcback) (struct rio_dev *rdev, union rio_pw_msg *msg, int step); | ||
115 | u16 destid; | 122 | u16 destid; |
116 | }; | 123 | }; |
117 | 124 | ||
@@ -211,8 +218,12 @@ struct rio_net { | |||
211 | * @hopcount: Hopcount to this switch | 218 | * @hopcount: Hopcount to this switch |
212 | * @destid: Associated destid in the path | 219 | * @destid: Associated destid in the path |
213 | * @route_table: Copy of switch routing table | 220 | * @route_table: Copy of switch routing table |
221 | * @port_ok: Status of each port (one bit per port) - OK=1 or UNINIT=0 | ||
214 | * @add_entry: Callback for switch-specific route add function | 222 | * @add_entry: Callback for switch-specific route add function |
215 | * @get_entry: Callback for switch-specific route get function | 223 | * @get_entry: Callback for switch-specific route get function |
224 | * @clr_table: Callback for switch-specific clear route table function | ||
225 | * @em_init: Callback for switch-specific error management initialization function | ||
226 | * @em_handle: Callback for switch-specific error management handler function | ||
216 | */ | 227 | */ |
217 | struct rio_switch { | 228 | struct rio_switch { |
218 | struct list_head node; | 229 | struct list_head node; |
@@ -220,10 +231,19 @@ struct rio_switch { | |||
220 | u16 hopcount; | 231 | u16 hopcount; |
221 | u16 destid; | 232 | u16 destid; |
222 | u8 *route_table; | 233 | u8 *route_table; |
234 | u32 port_ok; | ||
223 | int (*add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, | 235 | int (*add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, |
224 | u16 table, u16 route_destid, u8 route_port); | 236 | u16 table, u16 route_destid, u8 route_port); |
225 | int (*get_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, | 237 | int (*get_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, |
226 | u16 table, u16 route_destid, u8 * route_port); | 238 | u16 table, u16 route_destid, u8 * route_port); |
239 | int (*clr_table) (struct rio_mport *mport, u16 destid, u8 hopcount, | ||
240 | u16 table); | ||
241 | int (*set_domain) (struct rio_mport *mport, u16 destid, u8 hopcount, | ||
242 | u8 sw_domain); | ||
243 | int (*get_domain) (struct rio_mport *mport, u16 destid, u8 hopcount, | ||
244 | u8 *sw_domain); | ||
245 | int (*em_init) (struct rio_dev *dev); | ||
246 | int (*em_handle) (struct rio_dev *dev, u8 swport); | ||
227 | }; | 247 | }; |
228 | 248 | ||
229 | /* Low-level architecture-dependent routines */ | 249 | /* Low-level architecture-dependent routines */ |
@@ -235,6 +255,7 @@ struct rio_switch { | |||
235 | * @cread: Callback to perform network read of config space. | 255 | * @cread: Callback to perform network read of config space. |
236 | * @cwrite: Callback to perform network write of config space. | 256 | * @cwrite: Callback to perform network write of config space. |
237 | * @dsend: Callback to send a doorbell message. | 257 | * @dsend: Callback to send a doorbell message. |
258 | * @pwenable: Callback to enable/disable port-write message handling. | ||
238 | */ | 259 | */ |
239 | struct rio_ops { | 260 | struct rio_ops { |
240 | int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len, | 261 | int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len, |
@@ -246,6 +267,7 @@ struct rio_ops { | |||
246 | int (*cwrite) (struct rio_mport *mport, int index, u16 destid, | 267 | int (*cwrite) (struct rio_mport *mport, int index, u16 destid, |
247 | u8 hopcount, u32 offset, int len, u32 data); | 268 | u8 hopcount, u32 offset, int len, u32 data); |
248 | int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data); | 269 | int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data); |
270 | int (*pwenable) (struct rio_mport *mport, int enable); | ||
249 | }; | 271 | }; |
250 | 272 | ||
251 | #define RIO_RESOURCE_MEM 0x00000100 | 273 | #define RIO_RESOURCE_MEM 0x00000100 |
@@ -302,21 +324,28 @@ struct rio_device_id { | |||
302 | }; | 324 | }; |
303 | 325 | ||
304 | /** | 326 | /** |
305 | * struct rio_route_ops - Per-switch route operations | 327 | * struct rio_switch_ops - Per-switch operations |
306 | * @vid: RIO vendor ID | 328 | * @vid: RIO vendor ID |
307 | * @did: RIO device ID | 329 | * @did: RIO device ID |
308 | * @add_hook: Callback that adds a route entry | 330 | * @init_hook: Callback that performs switch device initialization |
309 | * @get_hook: Callback that gets a route entry | ||
310 | * | 331 | * |
311 | * Defines the operations that are necessary to manipulate the route | 332 | * Defines the operations that are necessary to initialize/control |
312 | * tables for a particular RIO switch device. | 333 | * a particular RIO switch device. |
313 | */ | 334 | */ |
314 | struct rio_route_ops { | 335 | struct rio_switch_ops { |
315 | u16 vid, did; | 336 | u16 vid, did; |
316 | int (*add_hook) (struct rio_mport * mport, u16 destid, u8 hopcount, | 337 | int (*init_hook) (struct rio_dev *rdev, int do_enum); |
317 | u16 table, u16 route_destid, u8 route_port); | 338 | }; |
318 | int (*get_hook) (struct rio_mport * mport, u16 destid, u8 hopcount, | 339 | |
319 | u16 table, u16 route_destid, u8 * route_port); | 340 | union rio_pw_msg { |
341 | struct { | ||
342 | u32 comptag; /* Component Tag CSR */ | ||
343 | u32 errdetect; /* Port N Error Detect CSR */ | ||
344 | u32 is_port; /* Implementation specific + PortID */ | ||
345 | u32 ltlerrdet; /* LTL Error Detect CSR */ | ||
346 | u32 padding[12]; | ||
347 | } em; | ||
348 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; | ||
320 | }; | 349 | }; |
321 | 350 | ||
322 | /* Architecture and hardware-specific functions */ | 351 | /* Architecture and hardware-specific functions */ |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index c93a58a40033..edc55da717b3 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -413,6 +413,12 @@ void rio_release_regions(struct rio_dev *); | |||
413 | int rio_request_region(struct rio_dev *, int, char *); | 413 | int rio_request_region(struct rio_dev *, int, char *); |
414 | void rio_release_region(struct rio_dev *, int); | 414 | void rio_release_region(struct rio_dev *, int); |
415 | 415 | ||
416 | /* Port-Write management */ | ||
417 | extern int rio_request_inb_pwrite(struct rio_dev *, | ||
418 | int (*)(struct rio_dev *, union rio_pw_msg*, int)); | ||
419 | extern int rio_release_inb_pwrite(struct rio_dev *); | ||
420 | extern int rio_inb_pwrite_handler(union rio_pw_msg *pw_msg); | ||
421 | |||
416 | /* LDM support */ | 422 | /* LDM support */ |
417 | int rio_register_driver(struct rio_driver *); | 423 | int rio_register_driver(struct rio_driver *); |
418 | void rio_unregister_driver(struct rio_driver *); | 424 | void rio_unregister_driver(struct rio_driver *); |
diff --git a/include/linux/rio_ids.h b/include/linux/rio_ids.h index 919d4e07d54e..db50e1c288b7 100644 --- a/include/linux/rio_ids.h +++ b/include/linux/rio_ids.h | |||
@@ -20,5 +20,19 @@ | |||
20 | 20 | ||
21 | #define RIO_VID_TUNDRA 0x000d | 21 | #define RIO_VID_TUNDRA 0x000d |
22 | #define RIO_DID_TSI500 0x0500 | 22 | #define RIO_DID_TSI500 0x0500 |
23 | #define RIO_DID_TSI568 0x0568 | ||
24 | #define RIO_DID_TSI572 0x0572 | ||
25 | #define RIO_DID_TSI574 0x0574 | ||
26 | #define RIO_DID_TSI576 0x0578 /* Same ID as Tsi578 */ | ||
27 | #define RIO_DID_TSI577 0x0577 | ||
28 | #define RIO_DID_TSI578 0x0578 | ||
29 | |||
30 | #define RIO_VID_IDT 0x0038 | ||
31 | #define RIO_DID_IDT70K200 0x0310 | ||
32 | #define RIO_DID_IDTCPS8 0x035c | ||
33 | #define RIO_DID_IDTCPS12 0x035d | ||
34 | #define RIO_DID_IDTCPS16 0x035b | ||
35 | #define RIO_DID_IDTCPS6Q 0x035f | ||
36 | #define RIO_DID_IDTCPS10Q 0x035e | ||
23 | 37 | ||
24 | #endif /* LINUX_RIO_IDS_H */ | 38 | #endif /* LINUX_RIO_IDS_H */ |
diff --git a/include/linux/rio_regs.h b/include/linux/rio_regs.h index 326540f9b54e..aedee0489fb4 100644 --- a/include/linux/rio_regs.h +++ b/include/linux/rio_regs.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #define RIO_PEF_INB_MBOX2 0x00200000 /* [II] Mailbox 2 */ | 39 | #define RIO_PEF_INB_MBOX2 0x00200000 /* [II] Mailbox 2 */ |
40 | #define RIO_PEF_INB_MBOX3 0x00100000 /* [II] Mailbox 3 */ | 40 | #define RIO_PEF_INB_MBOX3 0x00100000 /* [II] Mailbox 3 */ |
41 | #define RIO_PEF_INB_DOORBELL 0x00080000 /* [II] Doorbells */ | 41 | #define RIO_PEF_INB_DOORBELL 0x00080000 /* [II] Doorbells */ |
42 | #define RIO_PEF_EXT_RT 0x00000200 /* [III, 1.3] Extended route table support */ | ||
43 | #define RIO_PEF_STD_RT 0x00000100 /* [III, 1.3] Standard route table support */ | ||
42 | #define RIO_PEF_CTLS 0x00000010 /* [III] CTLS */ | 44 | #define RIO_PEF_CTLS 0x00000010 /* [III] CTLS */ |
43 | #define RIO_PEF_EXT_FEATURES 0x00000008 /* [I] EFT_PTR valid */ | 45 | #define RIO_PEF_EXT_FEATURES 0x00000008 /* [I] EFT_PTR valid */ |
44 | #define RIO_PEF_ADDR_66 0x00000004 /* [I] 66 bits */ | 46 | #define RIO_PEF_ADDR_66 0x00000004 /* [I] 66 bits */ |
@@ -91,7 +93,10 @@ | |||
91 | #define RIO_OPS_ATOMIC_CLR 0x00000010 /* [I] Atomic clr op */ | 93 | #define RIO_OPS_ATOMIC_CLR 0x00000010 /* [I] Atomic clr op */ |
92 | #define RIO_OPS_PORT_WRITE 0x00000004 /* [I] Port-write op */ | 94 | #define RIO_OPS_PORT_WRITE 0x00000004 /* [I] Port-write op */ |
93 | 95 | ||
94 | /* 0x20-0x3c *//* Reserved */ | 96 | /* 0x20-0x30 *//* Reserved */ |
97 | |||
98 | #define RIO_SWITCH_RT_LIMIT 0x34 /* [III, 1.3] Switch Route Table Destination ID Limit CAR */ | ||
99 | #define RIO_RT_MAX_DESTID 0x0000ffff | ||
95 | 100 | ||
96 | #define RIO_MBOX_CSR 0x40 /* [II] Mailbox CSR */ | 101 | #define RIO_MBOX_CSR 0x40 /* [II] Mailbox CSR */ |
97 | #define RIO_MBOX0_AVAIL 0x80000000 /* [II] Mbox 0 avail */ | 102 | #define RIO_MBOX0_AVAIL 0x80000000 /* [II] Mbox 0 avail */ |
@@ -153,7 +158,11 @@ | |||
153 | #define RIO_HOST_DID_LOCK_CSR 0x68 /* [III] Host Base Device ID Lock CSR */ | 158 | #define RIO_HOST_DID_LOCK_CSR 0x68 /* [III] Host Base Device ID Lock CSR */ |
154 | #define RIO_COMPONENT_TAG_CSR 0x6c /* [III] Component Tag CSR */ | 159 | #define RIO_COMPONENT_TAG_CSR 0x6c /* [III] Component Tag CSR */ |
155 | 160 | ||
156 | /* 0x70-0xf8 *//* Reserved */ | 161 | #define RIO_STD_RTE_CONF_DESTID_SEL_CSR 0x70 |
162 | #define RIO_STD_RTE_CONF_PORT_SEL_CSR 0x74 | ||
163 | #define RIO_STD_RTE_DEFAULT_PORT 0x78 | ||
164 | |||
165 | /* 0x7c-0xf8 *//* Reserved */ | ||
157 | /* 0x100-0xfff8 *//* [I] Extended Features Space */ | 166 | /* 0x100-0xfff8 *//* [I] Extended Features Space */ |
158 | /* 0x10000-0xfffff8 *//* [I] Implementation-defined Space */ | 167 | /* 0x10000-0xfffff8 *//* [I] Implementation-defined Space */ |
159 | 168 | ||
@@ -183,9 +192,14 @@ | |||
183 | #define RIO_EFB_PAR_EP_ID 0x0001 /* [IV] LP/LVDS EP Devices */ | 192 | #define RIO_EFB_PAR_EP_ID 0x0001 /* [IV] LP/LVDS EP Devices */ |
184 | #define RIO_EFB_PAR_EP_REC_ID 0x0002 /* [IV] LP/LVDS EP Recovery Devices */ | 193 | #define RIO_EFB_PAR_EP_REC_ID 0x0002 /* [IV] LP/LVDS EP Recovery Devices */ |
185 | #define RIO_EFB_PAR_EP_FREE_ID 0x0003 /* [IV] LP/LVDS EP Free Devices */ | 194 | #define RIO_EFB_PAR_EP_FREE_ID 0x0003 /* [IV] LP/LVDS EP Free Devices */ |
195 | #define RIO_EFB_SER_EP_ID_V13P 0x0001 /* [VI] LP/Serial EP Devices, RapidIO Spec ver 1.3 and above */ | ||
196 | #define RIO_EFB_SER_EP_REC_ID_V13P 0x0002 /* [VI] LP/Serial EP Recovery Devices, RapidIO Spec ver 1.3 and above */ | ||
197 | #define RIO_EFB_SER_EP_FREE_ID_V13P 0x0003 /* [VI] LP/Serial EP Free Devices, RapidIO Spec ver 1.3 and above */ | ||
186 | #define RIO_EFB_SER_EP_ID 0x0004 /* [VI] LP/Serial EP Devices */ | 198 | #define RIO_EFB_SER_EP_ID 0x0004 /* [VI] LP/Serial EP Devices */ |
187 | #define RIO_EFB_SER_EP_REC_ID 0x0005 /* [VI] LP/Serial EP Recovery Devices */ | 199 | #define RIO_EFB_SER_EP_REC_ID 0x0005 /* [VI] LP/Serial EP Recovery Devices */ |
188 | #define RIO_EFB_SER_EP_FREE_ID 0x0006 /* [VI] LP/Serial EP Free Devices */ | 200 | #define RIO_EFB_SER_EP_FREE_ID 0x0006 /* [VI] LP/Serial EP Free Devices */ |
201 | #define RIO_EFB_SER_EP_FREC_ID 0x0009 /* [VI] LP/Serial EP Free Recovery Devices */ | ||
202 | #define RIO_EFB_ERR_MGMNT 0x0007 /* [VIII] Error Management Extensions */ | ||
189 | 203 | ||
190 | /* | 204 | /* |
191 | * Physical 8/16 LP-LVDS | 205 | * Physical 8/16 LP-LVDS |
@@ -201,15 +215,71 @@ | |||
201 | #define RIO_PORT_MNT_HEADER 0x0000 | 215 | #define RIO_PORT_MNT_HEADER 0x0000 |
202 | #define RIO_PORT_REQ_CTL_CSR 0x0020 | 216 | #define RIO_PORT_REQ_CTL_CSR 0x0020 |
203 | #define RIO_PORT_RSP_CTL_CSR 0x0024 /* 0x0001/0x0002 */ | 217 | #define RIO_PORT_RSP_CTL_CSR 0x0024 /* 0x0001/0x0002 */ |
218 | #define RIO_PORT_LINKTO_CTL_CSR 0x0020 /* Serial */ | ||
219 | #define RIO_PORT_RSPTO_CTL_CSR 0x0024 /* Serial */ | ||
204 | #define RIO_PORT_GEN_CTL_CSR 0x003c | 220 | #define RIO_PORT_GEN_CTL_CSR 0x003c |
205 | #define RIO_PORT_GEN_HOST 0x80000000 | 221 | #define RIO_PORT_GEN_HOST 0x80000000 |
206 | #define RIO_PORT_GEN_MASTER 0x40000000 | 222 | #define RIO_PORT_GEN_MASTER 0x40000000 |
207 | #define RIO_PORT_GEN_DISCOVERED 0x20000000 | 223 | #define RIO_PORT_GEN_DISCOVERED 0x20000000 |
208 | #define RIO_PORT_N_MNT_REQ_CSR(x) (0x0040 + x*0x20) /* 0x0002 */ | 224 | #define RIO_PORT_N_MNT_REQ_CSR(x) (0x0040 + x*0x20) /* 0x0002 */ |
209 | #define RIO_PORT_N_MNT_RSP_CSR(x) (0x0044 + x*0x20) /* 0x0002 */ | 225 | #define RIO_PORT_N_MNT_RSP_CSR(x) (0x0044 + x*0x20) /* 0x0002 */ |
226 | #define RIO_PORT_N_MNT_RSP_RVAL 0x80000000 /* Response Valid */ | ||
227 | #define RIO_PORT_N_MNT_RSP_ASTAT 0x000003e0 /* ackID Status */ | ||
228 | #define RIO_PORT_N_MNT_RSP_LSTAT 0x0000001f /* Link Status */ | ||
210 | #define RIO_PORT_N_ACK_STS_CSR(x) (0x0048 + x*0x20) /* 0x0002 */ | 229 | #define RIO_PORT_N_ACK_STS_CSR(x) (0x0048 + x*0x20) /* 0x0002 */ |
211 | #define RIO_PORT_N_ERR_STS_CSR(x) (0x58 + x*0x20) | 230 | #define RIO_PORT_N_ACK_CLEAR 0x80000000 |
212 | #define PORT_N_ERR_STS_PORT_OK 0x00000002 | 231 | #define RIO_PORT_N_ACK_INBOUND 0x1f000000 |
213 | #define RIO_PORT_N_CTL_CSR(x) (0x5c + x*0x20) | 232 | #define RIO_PORT_N_ACK_OUTSTAND 0x00001f00 |
233 | #define RIO_PORT_N_ACK_OUTBOUND 0x0000001f | ||
234 | #define RIO_PORT_N_ERR_STS_CSR(x) (0x0058 + x*0x20) | ||
235 | #define RIO_PORT_N_ERR_STS_PW_OUT_ES 0x00010000 /* Output Error-stopped */ | ||
236 | #define RIO_PORT_N_ERR_STS_PW_INP_ES 0x00000100 /* Input Error-stopped */ | ||
237 | #define RIO_PORT_N_ERR_STS_PW_PEND 0x00000010 /* Port-Write Pending */ | ||
238 | #define RIO_PORT_N_ERR_STS_PORT_ERR 0x00000004 | ||
239 | #define RIO_PORT_N_ERR_STS_PORT_OK 0x00000002 | ||
240 | #define RIO_PORT_N_ERR_STS_PORT_UNINIT 0x00000001 | ||
241 | #define RIO_PORT_N_ERR_STS_CLR_MASK 0x07120204 | ||
242 | #define RIO_PORT_N_CTL_CSR(x) (0x005c + x*0x20) | ||
243 | #define RIO_PORT_N_CTL_PWIDTH 0xc0000000 | ||
244 | #define RIO_PORT_N_CTL_PWIDTH_1 0x00000000 | ||
245 | #define RIO_PORT_N_CTL_PWIDTH_4 0x40000000 | ||
246 | #define RIO_PORT_N_CTL_P_TYP_SER 0x00000001 | ||
247 | #define RIO_PORT_N_CTL_LOCKOUT 0x00000002 | ||
248 | #define RIO_PORT_N_CTL_EN_RX_SER 0x00200000 | ||
249 | #define RIO_PORT_N_CTL_EN_TX_SER 0x00400000 | ||
250 | #define RIO_PORT_N_CTL_EN_RX_PAR 0x08000000 | ||
251 | #define RIO_PORT_N_CTL_EN_TX_PAR 0x40000000 | ||
252 | |||
253 | /* | ||
254 | * Error Management Extensions (RapidIO 1.3+, Part 8) | ||
255 | * | ||
256 | * Extended Features Block ID=0x0007 | ||
257 | */ | ||
258 | |||
259 | /* General EM Registers (Common for all Ports) */ | ||
260 | |||
261 | #define RIO_EM_EFB_HEADER 0x000 /* Error Management Extensions Block Header */ | ||
262 | #define RIO_EM_LTL_ERR_DETECT 0x008 /* Logical/Transport Layer Error Detect CSR */ | ||
263 | #define RIO_EM_LTL_ERR_EN 0x00c /* Logical/Transport Layer Error Enable CSR */ | ||
264 | #define RIO_EM_LTL_HIADDR_CAP 0x010 /* Logical/Transport Layer High Address Capture CSR */ | ||
265 | #define RIO_EM_LTL_ADDR_CAP 0x014 /* Logical/Transport Layer Address Capture CSR */ | ||
266 | #define RIO_EM_LTL_DEVID_CAP 0x018 /* Logical/Transport Layer Device ID Capture CSR */ | ||
267 | #define RIO_EM_LTL_CTRL_CAP 0x01c /* Logical/Transport Layer Control Capture CSR */ | ||
268 | #define RIO_EM_PW_TGT_DEVID 0x028 /* Port-write Target deviceID CSR */ | ||
269 | #define RIO_EM_PKT_TTL 0x02c /* Packet Time-to-live CSR */ | ||
270 | |||
271 | /* Per-Port EM Registers */ | ||
272 | |||
273 | #define RIO_EM_PN_ERR_DETECT(x) (0x040 + x*0x40) /* Port N Error Detect CSR */ | ||
274 | #define REM_PED_IMPL_SPEC 0x80000000 | ||
275 | #define REM_PED_LINK_TO 0x00000001 | ||
276 | #define RIO_EM_PN_ERRRATE_EN(x) (0x044 + x*0x40) /* Port N Error Rate Enable CSR */ | ||
277 | #define RIO_EM_PN_ATTRIB_CAP(x) (0x048 + x*0x40) /* Port N Attributes Capture CSR */ | ||
278 | #define RIO_EM_PN_PKT_CAP_0(x) (0x04c + x*0x40) /* Port N Packet/Control Symbol Capture 0 CSR */ | ||
279 | #define RIO_EM_PN_PKT_CAP_1(x) (0x050 + x*0x40) /* Port N Packet Capture 1 CSR */ | ||
280 | #define RIO_EM_PN_PKT_CAP_2(x) (0x054 + x*0x40) /* Port N Packet Capture 2 CSR */ | ||
281 | #define RIO_EM_PN_PKT_CAP_3(x) (0x058 + x*0x40) /* Port N Packet Capture 3 CSR */ | ||
282 | #define RIO_EM_PN_ERRRATE(x) (0x068 + x*0x40) /* Port N Error Rate CSR */ | ||
283 | #define RIO_EM_PN_ERRRATE_TR(x) (0x06c + x*0x40) /* Port N Error Rate Threshold CSR */ | ||
214 | 284 | ||
215 | #endif /* LINUX_RIO_REGS_H */ | 285 | #endif /* LINUX_RIO_REGS_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index c0151ffd3541..f118809c953f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -268,7 +268,6 @@ extern void init_idle(struct task_struct *idle, int cpu); | |||
268 | extern void init_idle_bootup_task(struct task_struct *idle); | 268 | extern void init_idle_bootup_task(struct task_struct *idle); |
269 | 269 | ||
270 | extern int runqueue_is_locked(int cpu); | 270 | extern int runqueue_is_locked(int cpu); |
271 | extern void task_rq_unlock_wait(struct task_struct *p); | ||
272 | 271 | ||
273 | extern cpumask_var_t nohz_cpu_mask; | 272 | extern cpumask_var_t nohz_cpu_mask; |
274 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 273 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
@@ -527,8 +526,9 @@ struct thread_group_cputimer { | |||
527 | * the locking of signal_struct. | 526 | * the locking of signal_struct. |
528 | */ | 527 | */ |
529 | struct signal_struct { | 528 | struct signal_struct { |
530 | atomic_t count; | 529 | atomic_t sigcnt; |
531 | atomic_t live; | 530 | atomic_t live; |
531 | int nr_threads; | ||
532 | 532 | ||
533 | wait_queue_head_t wait_chldexit; /* for wait4() */ | 533 | wait_queue_head_t wait_chldexit; /* for wait4() */ |
534 | 534 | ||
@@ -1423,6 +1423,7 @@ struct task_struct { | |||
1423 | nodemask_t mems_allowed; /* Protected by alloc_lock */ | 1423 | nodemask_t mems_allowed; /* Protected by alloc_lock */ |
1424 | int mems_allowed_change_disable; | 1424 | int mems_allowed_change_disable; |
1425 | int cpuset_mem_spread_rotor; | 1425 | int cpuset_mem_spread_rotor; |
1426 | int cpuset_slab_spread_rotor; | ||
1426 | #endif | 1427 | #endif |
1427 | #ifdef CONFIG_CGROUPS | 1428 | #ifdef CONFIG_CGROUPS |
1428 | /* Control Group info protected by css_set_lock */ | 1429 | /* Control Group info protected by css_set_lock */ |
@@ -2035,7 +2036,7 @@ extern int do_notify_parent(struct task_struct *, int); | |||
2035 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); | 2036 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); |
2036 | extern void force_sig(int, struct task_struct *); | 2037 | extern void force_sig(int, struct task_struct *); |
2037 | extern int send_sig(int, struct task_struct *, int); | 2038 | extern int send_sig(int, struct task_struct *, int); |
2038 | extern void zap_other_threads(struct task_struct *p); | 2039 | extern int zap_other_threads(struct task_struct *p); |
2039 | extern struct sigqueue *sigqueue_alloc(void); | 2040 | extern struct sigqueue *sigqueue_alloc(void); |
2040 | extern void sigqueue_free(struct sigqueue *); | 2041 | extern void sigqueue_free(struct sigqueue *); |
2041 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | 2042 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); |
@@ -2100,7 +2101,6 @@ extern void flush_thread(void); | |||
2100 | extern void exit_thread(void); | 2101 | extern void exit_thread(void); |
2101 | 2102 | ||
2102 | extern void exit_files(struct task_struct *); | 2103 | extern void exit_files(struct task_struct *); |
2103 | extern void __cleanup_signal(struct signal_struct *); | ||
2104 | extern void __cleanup_sighand(struct sighand_struct *); | 2104 | extern void __cleanup_sighand(struct sighand_struct *); |
2105 | 2105 | ||
2106 | extern void exit_itimers(struct signal_struct *); | 2106 | extern void exit_itimers(struct signal_struct *); |
@@ -2147,6 +2147,11 @@ extern bool current_is_single_threaded(void); | |||
2147 | #define while_each_thread(g, t) \ | 2147 | #define while_each_thread(g, t) \ |
2148 | while ((t = next_thread(t)) != g) | 2148 | while ((t = next_thread(t)) != g) |
2149 | 2149 | ||
2150 | static inline int get_nr_threads(struct task_struct *tsk) | ||
2151 | { | ||
2152 | return tsk->signal->nr_threads; | ||
2153 | } | ||
2154 | |||
2150 | /* de_thread depends on thread_group_leader not being a pid based check */ | 2155 | /* de_thread depends on thread_group_leader not being a pid based check */ |
2151 | #define thread_group_leader(p) (p == p->group_leader) | 2156 | #define thread_group_leader(p) (p == p->group_leader) |
2152 | 2157 | ||
@@ -2393,10 +2398,6 @@ static inline void thread_group_cputime_init(struct signal_struct *sig) | |||
2393 | spin_lock_init(&sig->cputimer.lock); | 2398 | spin_lock_init(&sig->cputimer.lock); |
2394 | } | 2399 | } |
2395 | 2400 | ||
2396 | static inline void thread_group_cputime_free(struct signal_struct *sig) | ||
2397 | { | ||
2398 | } | ||
2399 | |||
2400 | /* | 2401 | /* |
2401 | * Reevaluate whether the task has signals pending delivery. | 2402 | * Reevaluate whether the task has signals pending delivery. |
2402 | * Wake the task if so. | 2403 | * Wake the task if so. |
diff --git a/include/linux/sdhci-pltfm.h b/include/linux/sdhci-pltfm.h new file mode 100644 index 000000000000..0239bd70241e --- /dev/null +++ b/include/linux/sdhci-pltfm.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Platform data declarations for the sdhci-pltfm driver. | ||
3 | * | ||
4 | * Copyright (c) 2010 MontaVista Software, LLC. | ||
5 | * | ||
6 | * Author: Anton Vorontsov <avorontsov@ru.mvista.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or (at | ||
11 | * your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef _SDHCI_PLTFM_H | ||
15 | #define _SDHCI_PLTFM_H | ||
16 | |||
17 | struct sdhci_ops; | ||
18 | struct sdhci_host; | ||
19 | |||
20 | /** | ||
21 | * struct sdhci_pltfm_data - SDHCI platform-specific information & hooks | ||
22 | * @ops: optional pointer to the platform-provided SDHCI ops | ||
23 | * @quirks: optional SDHCI quirks | ||
24 | * @init: optional hook that is called during device probe, before the | ||
25 | * driver tries to access any SDHCI registers | ||
26 | * @exit: optional hook that is called during device removal | ||
27 | */ | ||
28 | struct sdhci_pltfm_data { | ||
29 | struct sdhci_ops *ops; | ||
30 | unsigned int quirks; | ||
31 | int (*init)(struct sdhci_host *host); | ||
32 | void (*exit)(struct sdhci_host *host); | ||
33 | }; | ||
34 | |||
35 | #endif /* _SDHCI_PLTFM_H */ | ||
diff --git a/include/linux/sem.h b/include/linux/sem.h index 8a4adbef8a0f..f2961afa2f66 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -79,6 +79,7 @@ struct seminfo { | |||
79 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | #include <asm/atomic.h> | 80 | #include <asm/atomic.h> |
81 | #include <linux/rcupdate.h> | 81 | #include <linux/rcupdate.h> |
82 | #include <linux/cache.h> | ||
82 | 83 | ||
83 | struct task_struct; | 84 | struct task_struct; |
84 | 85 | ||
@@ -91,7 +92,8 @@ struct sem { | |||
91 | 92 | ||
92 | /* One sem_array data structure for each set of semaphores in the system. */ | 93 | /* One sem_array data structure for each set of semaphores in the system. */ |
93 | struct sem_array { | 94 | struct sem_array { |
94 | struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ | 95 | struct kern_ipc_perm ____cacheline_aligned_in_smp |
96 | sem_perm; /* permissions .. see ipc.h */ | ||
95 | time_t sem_otime; /* last semop time */ | 97 | time_t sem_otime; /* last semop time */ |
96 | time_t sem_ctime; /* last change time */ | 98 | time_t sem_ctime; /* last change time */ |
97 | struct sem *sem_base; /* ptr to first semaphore in array */ | 99 | struct sem *sem_base; /* ptr to first semaphore in array */ |
diff --git a/include/linux/sfi.h b/include/linux/sfi.h index 9a6f7607174e..0299b4ce63db 100644 --- a/include/linux/sfi.h +++ b/include/linux/sfi.h | |||
@@ -73,6 +73,8 @@ | |||
73 | #define SFI_SIG_SPIB "SPIB" | 73 | #define SFI_SIG_SPIB "SPIB" |
74 | #define SFI_SIG_I2CB "I2CB" | 74 | #define SFI_SIG_I2CB "I2CB" |
75 | #define SFI_SIG_GPEM "GPEM" | 75 | #define SFI_SIG_GPEM "GPEM" |
76 | #define SFI_SIG_DEVS "DEVS" | ||
77 | #define SFI_SIG_GPIO "GPIO" | ||
76 | 78 | ||
77 | #define SFI_SIGNATURE_SIZE 4 | 79 | #define SFI_SIGNATURE_SIZE 4 |
78 | #define SFI_OEM_ID_SIZE 6 | 80 | #define SFI_OEM_ID_SIZE 6 |
@@ -145,6 +147,27 @@ struct sfi_rtc_table_entry { | |||
145 | u32 irq; | 147 | u32 irq; |
146 | } __packed; | 148 | } __packed; |
147 | 149 | ||
150 | struct sfi_device_table_entry { | ||
151 | u8 type; /* bus type, I2C, SPI or ...*/ | ||
152 | #define SFI_DEV_TYPE_SPI 0 | ||
153 | #define SFI_DEV_TYPE_I2C 1 | ||
154 | #define SFI_DEV_TYPE_UART 2 | ||
155 | #define SFI_DEV_TYPE_HSI 3 | ||
156 | #define SFI_DEV_TYPE_IPC 4 | ||
157 | |||
158 | u8 host_num; /* attached to host 0, 1...*/ | ||
159 | u16 addr; | ||
160 | u8 irq; | ||
161 | u32 max_freq; | ||
162 | char name[16]; | ||
163 | } __packed; | ||
164 | |||
165 | struct sfi_gpio_table_entry { | ||
166 | char controller_name[16]; | ||
167 | u16 pin_no; | ||
168 | char pin_name[16]; | ||
169 | } __packed; | ||
170 | |||
148 | struct sfi_spi_table_entry { | 171 | struct sfi_spi_table_entry { |
149 | u16 host_num; /* attached to host 0, 1...*/ | 172 | u16 host_num; /* attached to host 0, 1...*/ |
150 | u16 cs; /* chip select */ | 173 | u16 cs; /* chip select */ |
@@ -166,7 +189,6 @@ struct sfi_gpe_table_entry { | |||
166 | u16 phys_id; /* physical GPE id */ | 189 | u16 phys_id; /* physical GPE id */ |
167 | } __packed; | 190 | } __packed; |
168 | 191 | ||
169 | |||
170 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); | 192 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); |
171 | 193 | ||
172 | #ifdef CONFIG_SFI | 194 | #ifdef CONFIG_SFI |
diff --git a/include/linux/swap.h b/include/linux/swap.h index b6b614364dd8..ff4acea9bbdb 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -282,6 +282,11 @@ extern void kswapd_stop(int nid); | |||
282 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 282 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
283 | #endif /* CONFIG_MMU */ | 283 | #endif /* CONFIG_MMU */ |
284 | 284 | ||
285 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | ||
286 | extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff, | ||
287 | struct page **pagep, swp_entry_t *ent); | ||
288 | #endif | ||
289 | |||
285 | extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); | 290 | extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); |
286 | 291 | ||
287 | #ifdef CONFIG_SWAP | 292 | #ifdef CONFIG_SWAP |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index febedcf67c7e..81a4e213c6cf 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -73,16 +73,6 @@ extern void | |||
73 | swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | 73 | swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, |
74 | int nelems, enum dma_data_direction dir); | 74 | int nelems, enum dma_data_direction dir); |
75 | 75 | ||
76 | extern void | ||
77 | swiotlb_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dev_addr, | ||
78 | unsigned long offset, size_t size, | ||
79 | enum dma_data_direction dir); | ||
80 | |||
81 | extern void | ||
82 | swiotlb_sync_single_range_for_device(struct device *hwdev, dma_addr_t dev_addr, | ||
83 | unsigned long offset, size_t size, | ||
84 | enum dma_data_direction dir); | ||
85 | |||
86 | extern int | 76 | extern int |
87 | swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); | 77 | swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr); |
88 | 78 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 057929b0a651..a1a86a53bc73 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -103,22 +103,6 @@ struct perf_event_attr; | |||
103 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 103 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
104 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 104 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
105 | 105 | ||
106 | #ifdef CONFIG_PERF_EVENTS | ||
107 | |||
108 | #define TRACE_SYS_ENTER_PERF_INIT(sname) \ | ||
109 | .perf_event_enable = perf_sysenter_enable, \ | ||
110 | .perf_event_disable = perf_sysenter_disable, | ||
111 | |||
112 | #define TRACE_SYS_EXIT_PERF_INIT(sname) \ | ||
113 | .perf_event_enable = perf_sysexit_enable, \ | ||
114 | .perf_event_disable = perf_sysexit_disable, | ||
115 | #else | ||
116 | #define TRACE_SYS_ENTER_PERF(sname) | ||
117 | #define TRACE_SYS_ENTER_PERF_INIT(sname) | ||
118 | #define TRACE_SYS_EXIT_PERF(sname) | ||
119 | #define TRACE_SYS_EXIT_PERF_INIT(sname) | ||
120 | #endif /* CONFIG_PERF_EVENTS */ | ||
121 | |||
122 | #ifdef CONFIG_FTRACE_SYSCALLS | 106 | #ifdef CONFIG_FTRACE_SYSCALLS |
123 | #define __SC_STR_ADECL1(t, a) #a | 107 | #define __SC_STR_ADECL1(t, a) #a |
124 | #define __SC_STR_ADECL2(t, a, ...) #a, __SC_STR_ADECL1(__VA_ARGS__) | 108 | #define __SC_STR_ADECL2(t, a, ...) #a, __SC_STR_ADECL1(__VA_ARGS__) |
@@ -134,54 +118,43 @@ struct perf_event_attr; | |||
134 | #define __SC_STR_TDECL5(t, a, ...) #t, __SC_STR_TDECL4(__VA_ARGS__) | 118 | #define __SC_STR_TDECL5(t, a, ...) #t, __SC_STR_TDECL4(__VA_ARGS__) |
135 | #define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__) | 119 | #define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__) |
136 | 120 | ||
121 | extern struct ftrace_event_class event_class_syscall_enter; | ||
122 | extern struct ftrace_event_class event_class_syscall_exit; | ||
123 | extern struct trace_event_functions enter_syscall_print_funcs; | ||
124 | extern struct trace_event_functions exit_syscall_print_funcs; | ||
125 | |||
137 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 126 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
138 | static const struct syscall_metadata __syscall_meta_##sname; \ | 127 | static struct syscall_metadata __syscall_meta_##sname; \ |
139 | static struct ftrace_event_call \ | 128 | static struct ftrace_event_call \ |
140 | __attribute__((__aligned__(4))) event_enter_##sname; \ | 129 | __attribute__((__aligned__(4))) event_enter_##sname; \ |
141 | static struct trace_event enter_syscall_print_##sname = { \ | ||
142 | .trace = print_syscall_enter, \ | ||
143 | }; \ | ||
144 | static struct ftrace_event_call __used \ | 130 | static struct ftrace_event_call __used \ |
145 | __attribute__((__aligned__(4))) \ | 131 | __attribute__((__aligned__(4))) \ |
146 | __attribute__((section("_ftrace_events"))) \ | 132 | __attribute__((section("_ftrace_events"))) \ |
147 | event_enter_##sname = { \ | 133 | event_enter_##sname = { \ |
148 | .name = "sys_enter"#sname, \ | 134 | .name = "sys_enter"#sname, \ |
149 | .system = "syscalls", \ | 135 | .class = &event_class_syscall_enter, \ |
150 | .event = &enter_syscall_print_##sname, \ | 136 | .event.funcs = &enter_syscall_print_funcs, \ |
151 | .raw_init = init_syscall_trace, \ | ||
152 | .define_fields = syscall_enter_define_fields, \ | ||
153 | .regfunc = reg_event_syscall_enter, \ | ||
154 | .unregfunc = unreg_event_syscall_enter, \ | ||
155 | .data = (void *)&__syscall_meta_##sname,\ | 137 | .data = (void *)&__syscall_meta_##sname,\ |
156 | TRACE_SYS_ENTER_PERF_INIT(sname) \ | ||
157 | } | 138 | } |
158 | 139 | ||
159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 140 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
160 | static const struct syscall_metadata __syscall_meta_##sname; \ | 141 | static struct syscall_metadata __syscall_meta_##sname; \ |
161 | static struct ftrace_event_call \ | 142 | static struct ftrace_event_call \ |
162 | __attribute__((__aligned__(4))) event_exit_##sname; \ | 143 | __attribute__((__aligned__(4))) event_exit_##sname; \ |
163 | static struct trace_event exit_syscall_print_##sname = { \ | ||
164 | .trace = print_syscall_exit, \ | ||
165 | }; \ | ||
166 | static struct ftrace_event_call __used \ | 144 | static struct ftrace_event_call __used \ |
167 | __attribute__((__aligned__(4))) \ | 145 | __attribute__((__aligned__(4))) \ |
168 | __attribute__((section("_ftrace_events"))) \ | 146 | __attribute__((section("_ftrace_events"))) \ |
169 | event_exit_##sname = { \ | 147 | event_exit_##sname = { \ |
170 | .name = "sys_exit"#sname, \ | 148 | .name = "sys_exit"#sname, \ |
171 | .system = "syscalls", \ | 149 | .class = &event_class_syscall_exit, \ |
172 | .event = &exit_syscall_print_##sname, \ | 150 | .event.funcs = &exit_syscall_print_funcs, \ |
173 | .raw_init = init_syscall_trace, \ | ||
174 | .define_fields = syscall_exit_define_fields, \ | ||
175 | .regfunc = reg_event_syscall_exit, \ | ||
176 | .unregfunc = unreg_event_syscall_exit, \ | ||
177 | .data = (void *)&__syscall_meta_##sname,\ | 151 | .data = (void *)&__syscall_meta_##sname,\ |
178 | TRACE_SYS_EXIT_PERF_INIT(sname) \ | ||
179 | } | 152 | } |
180 | 153 | ||
181 | #define SYSCALL_METADATA(sname, nb) \ | 154 | #define SYSCALL_METADATA(sname, nb) \ |
182 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 155 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
183 | SYSCALL_TRACE_EXIT_EVENT(sname); \ | 156 | SYSCALL_TRACE_EXIT_EVENT(sname); \ |
184 | static const struct syscall_metadata __used \ | 157 | static struct syscall_metadata __used \ |
185 | __attribute__((__aligned__(4))) \ | 158 | __attribute__((__aligned__(4))) \ |
186 | __attribute__((section("__syscalls_metadata"))) \ | 159 | __attribute__((section("__syscalls_metadata"))) \ |
187 | __syscall_meta_##sname = { \ | 160 | __syscall_meta_##sname = { \ |
@@ -191,12 +164,14 @@ struct perf_event_attr; | |||
191 | .args = args_##sname, \ | 164 | .args = args_##sname, \ |
192 | .enter_event = &event_enter_##sname, \ | 165 | .enter_event = &event_enter_##sname, \ |
193 | .exit_event = &event_exit_##sname, \ | 166 | .exit_event = &event_exit_##sname, \ |
167 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ | ||
168 | .exit_fields = LIST_HEAD_INIT(__syscall_meta_##sname.exit_fields), \ | ||
194 | }; | 169 | }; |
195 | 170 | ||
196 | #define SYSCALL_DEFINE0(sname) \ | 171 | #define SYSCALL_DEFINE0(sname) \ |
197 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ | 172 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ |
198 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ | 173 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ |
199 | static const struct syscall_metadata __used \ | 174 | static struct syscall_metadata __used \ |
200 | __attribute__((__aligned__(4))) \ | 175 | __attribute__((__aligned__(4))) \ |
201 | __attribute__((section("__syscalls_metadata"))) \ | 176 | __attribute__((section("__syscalls_metadata"))) \ |
202 | __syscall_meta__##sname = { \ | 177 | __syscall_meta__##sname = { \ |
@@ -204,6 +179,8 @@ struct perf_event_attr; | |||
204 | .nb_args = 0, \ | 179 | .nb_args = 0, \ |
205 | .enter_event = &event_enter__##sname, \ | 180 | .enter_event = &event_enter__##sname, \ |
206 | .exit_event = &event_exit__##sname, \ | 181 | .exit_event = &event_exit__##sname, \ |
182 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ | ||
183 | .exit_fields = LIST_HEAD_INIT(__syscall_meta__##sname.exit_fields), \ | ||
207 | }; \ | 184 | }; \ |
208 | asmlinkage long sys_##sname(void) | 185 | asmlinkage long sys_##sname(void) |
209 | #else | 186 | #else |
diff --git a/include/linux/threads.h b/include/linux/threads.h index 052b12bec8bd..383ab9592bec 100644 --- a/include/linux/threads.h +++ b/include/linux/threads.h | |||
@@ -33,4 +33,13 @@ | |||
33 | #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \ | 33 | #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \ |
34 | (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)) | 34 | (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)) |
35 | 35 | ||
36 | /* | ||
37 | * Define a minimum number of pids per cpu. Heuristically based | ||
38 | * on original pid max of 32k for 32 cpus. Also, increase the | ||
39 | * minimum settable value for pid_max on the running system based | ||
40 | * on similar defaults. See kernel/pid.c:pidmap_init() for details. | ||
41 | */ | ||
42 | #define PIDS_PER_CPU_DEFAULT 1024 | ||
43 | #define PIDS_PER_CPU_MIN 8 | ||
44 | |||
36 | #endif | 45 | #endif |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 5b81156780b1..c44df50a05ab 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/bitops.h> | 31 | #include <linux/bitops.h> |
32 | #include <linux/mmzone.h> | 32 | #include <linux/mmzone.h> |
33 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
34 | #include <linux/percpu.h> | ||
34 | #include <asm/topology.h> | 35 | #include <asm/topology.h> |
35 | 36 | ||
36 | #ifndef node_has_online_mem | 37 | #ifndef node_has_online_mem |
@@ -203,8 +204,114 @@ int arch_update_cpu_topology(void); | |||
203 | #ifndef SD_NODE_INIT | 204 | #ifndef SD_NODE_INIT |
204 | #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! | 205 | #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!! |
205 | #endif | 206 | #endif |
207 | |||
206 | #endif /* CONFIG_NUMA */ | 208 | #endif /* CONFIG_NUMA */ |
207 | 209 | ||
210 | #ifdef CONFIG_USE_PERCPU_NUMA_NODE_ID | ||
211 | DECLARE_PER_CPU(int, numa_node); | ||
212 | |||
213 | #ifndef numa_node_id | ||
214 | /* Returns the number of the current Node. */ | ||
215 | static inline int numa_node_id(void) | ||
216 | { | ||
217 | return __this_cpu_read(numa_node); | ||
218 | } | ||
219 | #endif | ||
220 | |||
221 | #ifndef cpu_to_node | ||
222 | static inline int cpu_to_node(int cpu) | ||
223 | { | ||
224 | return per_cpu(numa_node, cpu); | ||
225 | } | ||
226 | #endif | ||
227 | |||
228 | #ifndef set_numa_node | ||
229 | static inline void set_numa_node(int node) | ||
230 | { | ||
231 | percpu_write(numa_node, node); | ||
232 | } | ||
233 | #endif | ||
234 | |||
235 | #ifndef set_cpu_numa_node | ||
236 | static inline void set_cpu_numa_node(int cpu, int node) | ||
237 | { | ||
238 | per_cpu(numa_node, cpu) = node; | ||
239 | } | ||
240 | #endif | ||
241 | |||
242 | #else /* !CONFIG_USE_PERCPU_NUMA_NODE_ID */ | ||
243 | |||
244 | /* Returns the number of the current Node. */ | ||
245 | #ifndef numa_node_id | ||
246 | static inline int numa_node_id(void) | ||
247 | { | ||
248 | return cpu_to_node(raw_smp_processor_id()); | ||
249 | } | ||
250 | #endif | ||
251 | |||
252 | #endif /* [!]CONFIG_USE_PERCPU_NUMA_NODE_ID */ | ||
253 | |||
254 | #ifdef CONFIG_HAVE_MEMORYLESS_NODES | ||
255 | |||
256 | /* | ||
257 | * N.B., Do NOT reference the '_numa_mem_' per cpu variable directly. | ||
258 | * It will not be defined when CONFIG_HAVE_MEMORYLESS_NODES is not defined. | ||
259 | * Use the accessor functions set_numa_mem(), numa_mem_id() and cpu_to_mem(). | ||
260 | */ | ||
261 | DECLARE_PER_CPU(int, _numa_mem_); | ||
262 | |||
263 | #ifndef set_numa_mem | ||
264 | static inline void set_numa_mem(int node) | ||
265 | { | ||
266 | percpu_write(_numa_mem_, node); | ||
267 | } | ||
268 | #endif | ||
269 | |||
270 | #ifndef numa_mem_id | ||
271 | /* Returns the number of the nearest Node with memory */ | ||
272 | static inline int numa_mem_id(void) | ||
273 | { | ||
274 | return __this_cpu_read(_numa_mem_); | ||
275 | } | ||
276 | #endif | ||
277 | |||
278 | #ifndef cpu_to_mem | ||
279 | static inline int cpu_to_mem(int cpu) | ||
280 | { | ||
281 | return per_cpu(_numa_mem_, cpu); | ||
282 | } | ||
283 | #endif | ||
284 | |||
285 | #ifndef set_cpu_numa_mem | ||
286 | static inline void set_cpu_numa_mem(int cpu, int node) | ||
287 | { | ||
288 | per_cpu(_numa_mem_, cpu) = node; | ||
289 | } | ||
290 | #endif | ||
291 | |||
292 | #else /* !CONFIG_HAVE_MEMORYLESS_NODES */ | ||
293 | |||
294 | static inline void set_numa_mem(int node) {} | ||
295 | |||
296 | static inline void set_cpu_numa_mem(int cpu, int node) {} | ||
297 | |||
298 | #ifndef numa_mem_id | ||
299 | /* Returns the number of the nearest Node with memory */ | ||
300 | static inline int numa_mem_id(void) | ||
301 | { | ||
302 | return numa_node_id(); | ||
303 | } | ||
304 | #endif | ||
305 | |||
306 | #ifndef cpu_to_mem | ||
307 | static inline int cpu_to_mem(int cpu) | ||
308 | { | ||
309 | return cpu_to_node(cpu); | ||
310 | } | ||
311 | #endif | ||
312 | |||
313 | #endif /* [!]CONFIG_HAVE_MEMORYLESS_NODES */ | ||
314 | |||
208 | #ifndef topology_physical_package_id | 315 | #ifndef topology_physical_package_id |
209 | #define topology_physical_package_id(cpu) ((void)(cpu), -1) | 316 | #define topology_physical_package_id(cpu) ((void)(cpu), -1) |
210 | #endif | 317 | #endif |
@@ -218,9 +325,4 @@ int arch_update_cpu_topology(void); | |||
218 | #define topology_core_cpumask(cpu) cpumask_of(cpu) | 325 | #define topology_core_cpumask(cpu) cpumask_of(cpu) |
219 | #endif | 326 | #endif |
220 | 327 | ||
221 | /* Returns the number of the current Node. */ | ||
222 | #ifndef numa_node_id | ||
223 | #define numa_node_id() (cpu_to_node(raw_smp_processor_id())) | ||
224 | #endif | ||
225 | |||
226 | #endif /* _LINUX_TOPOLOGY_H */ | 328 | #endif /* _LINUX_TOPOLOGY_H */ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 1d85f9a6a199..9a59d1f98cd4 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -20,12 +20,17 @@ | |||
20 | struct module; | 20 | struct module; |
21 | struct tracepoint; | 21 | struct tracepoint; |
22 | 22 | ||
23 | struct tracepoint_func { | ||
24 | void *func; | ||
25 | void *data; | ||
26 | }; | ||
27 | |||
23 | struct tracepoint { | 28 | struct tracepoint { |
24 | const char *name; /* Tracepoint name */ | 29 | const char *name; /* Tracepoint name */ |
25 | int state; /* State. */ | 30 | int state; /* State. */ |
26 | void (*regfunc)(void); | 31 | void (*regfunc)(void); |
27 | void (*unregfunc)(void); | 32 | void (*unregfunc)(void); |
28 | void **funcs; | 33 | struct tracepoint_func *funcs; |
29 | } __attribute__((aligned(32))); /* | 34 | } __attribute__((aligned(32))); /* |
30 | * Aligned on 32 bytes because it is | 35 | * Aligned on 32 bytes because it is |
31 | * globally visible and gcc happily | 36 | * globally visible and gcc happily |
@@ -37,16 +42,19 @@ struct tracepoint { | |||
37 | * Connect a probe to a tracepoint. | 42 | * Connect a probe to a tracepoint. |
38 | * Internal API, should not be used directly. | 43 | * Internal API, should not be used directly. |
39 | */ | 44 | */ |
40 | extern int tracepoint_probe_register(const char *name, void *probe); | 45 | extern int tracepoint_probe_register(const char *name, void *probe, void *data); |
41 | 46 | ||
42 | /* | 47 | /* |
43 | * Disconnect a probe from a tracepoint. | 48 | * Disconnect a probe from a tracepoint. |
44 | * Internal API, should not be used directly. | 49 | * Internal API, should not be used directly. |
45 | */ | 50 | */ |
46 | extern int tracepoint_probe_unregister(const char *name, void *probe); | 51 | extern int |
52 | tracepoint_probe_unregister(const char *name, void *probe, void *data); | ||
47 | 53 | ||
48 | extern int tracepoint_probe_register_noupdate(const char *name, void *probe); | 54 | extern int tracepoint_probe_register_noupdate(const char *name, void *probe, |
49 | extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); | 55 | void *data); |
56 | extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe, | ||
57 | void *data); | ||
50 | extern void tracepoint_probe_update_all(void); | 58 | extern void tracepoint_probe_update_all(void); |
51 | 59 | ||
52 | struct tracepoint_iter { | 60 | struct tracepoint_iter { |
@@ -102,17 +110,27 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
102 | /* | 110 | /* |
103 | * it_func[0] is never NULL because there is at least one element in the array | 111 | * it_func[0] is never NULL because there is at least one element in the array |
104 | * when the array itself is non NULL. | 112 | * when the array itself is non NULL. |
113 | * | ||
114 | * Note, the proto and args passed in includes "__data" as the first parameter. | ||
115 | * The reason for this is to handle the "void" prototype. If a tracepoint | ||
116 | * has a "void" prototype, then it is invalid to declare a function | ||
117 | * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just | ||
118 | * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". | ||
105 | */ | 119 | */ |
106 | #define __DO_TRACE(tp, proto, args) \ | 120 | #define __DO_TRACE(tp, proto, args) \ |
107 | do { \ | 121 | do { \ |
108 | void **it_func; \ | 122 | struct tracepoint_func *it_func_ptr; \ |
123 | void *it_func; \ | ||
124 | void *__data; \ | ||
109 | \ | 125 | \ |
110 | rcu_read_lock_sched_notrace(); \ | 126 | rcu_read_lock_sched_notrace(); \ |
111 | it_func = rcu_dereference_sched((tp)->funcs); \ | 127 | it_func_ptr = rcu_dereference_sched((tp)->funcs); \ |
112 | if (it_func) { \ | 128 | if (it_func_ptr) { \ |
113 | do { \ | 129 | do { \ |
114 | ((void(*)(proto))(*it_func))(args); \ | 130 | it_func = (it_func_ptr)->func; \ |
115 | } while (*(++it_func)); \ | 131 | __data = (it_func_ptr)->data; \ |
132 | ((void(*)(proto))(it_func))(args); \ | ||
133 | } while ((++it_func_ptr)->func); \ | ||
116 | } \ | 134 | } \ |
117 | rcu_read_unlock_sched_notrace(); \ | 135 | rcu_read_unlock_sched_notrace(); \ |
118 | } while (0) | 136 | } while (0) |
@@ -122,24 +140,32 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
122 | * not add unwanted padding between the beginning of the section and the | 140 | * not add unwanted padding between the beginning of the section and the |
123 | * structure. Force alignment to the same alignment as the section start. | 141 | * structure. Force alignment to the same alignment as the section start. |
124 | */ | 142 | */ |
125 | #define DECLARE_TRACE(name, proto, args) \ | 143 | #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ |
126 | extern struct tracepoint __tracepoint_##name; \ | 144 | extern struct tracepoint __tracepoint_##name; \ |
127 | static inline void trace_##name(proto) \ | 145 | static inline void trace_##name(proto) \ |
128 | { \ | 146 | { \ |
129 | if (unlikely(__tracepoint_##name.state)) \ | 147 | if (unlikely(__tracepoint_##name.state)) \ |
130 | __DO_TRACE(&__tracepoint_##name, \ | 148 | __DO_TRACE(&__tracepoint_##name, \ |
131 | TP_PROTO(proto), TP_ARGS(args)); \ | 149 | TP_PROTO(data_proto), \ |
150 | TP_ARGS(data_args)); \ | ||
151 | } \ | ||
152 | static inline int \ | ||
153 | register_trace_##name(void (*probe)(data_proto), void *data) \ | ||
154 | { \ | ||
155 | return tracepoint_probe_register(#name, (void *)probe, \ | ||
156 | data); \ | ||
132 | } \ | 157 | } \ |
133 | static inline int register_trace_##name(void (*probe)(proto)) \ | 158 | static inline int \ |
159 | unregister_trace_##name(void (*probe)(data_proto), void *data) \ | ||
134 | { \ | 160 | { \ |
135 | return tracepoint_probe_register(#name, (void *)probe); \ | 161 | return tracepoint_probe_unregister(#name, (void *)probe, \ |
162 | data); \ | ||
136 | } \ | 163 | } \ |
137 | static inline int unregister_trace_##name(void (*probe)(proto)) \ | 164 | static inline void \ |
165 | check_trace_callback_type_##name(void (*cb)(data_proto)) \ | ||
138 | { \ | 166 | { \ |
139 | return tracepoint_probe_unregister(#name, (void *)probe);\ | ||
140 | } | 167 | } |
141 | 168 | ||
142 | |||
143 | #define DEFINE_TRACE_FN(name, reg, unreg) \ | 169 | #define DEFINE_TRACE_FN(name, reg, unreg) \ |
144 | static const char __tpstrtab_##name[] \ | 170 | static const char __tpstrtab_##name[] \ |
145 | __attribute__((section("__tracepoints_strings"))) = #name; \ | 171 | __attribute__((section("__tracepoints_strings"))) = #name; \ |
@@ -156,18 +182,23 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
156 | EXPORT_SYMBOL(__tracepoint_##name) | 182 | EXPORT_SYMBOL(__tracepoint_##name) |
157 | 183 | ||
158 | #else /* !CONFIG_TRACEPOINTS */ | 184 | #else /* !CONFIG_TRACEPOINTS */ |
159 | #define DECLARE_TRACE(name, proto, args) \ | 185 | #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ |
160 | static inline void _do_trace_##name(struct tracepoint *tp, proto) \ | ||
161 | { } \ | ||
162 | static inline void trace_##name(proto) \ | 186 | static inline void trace_##name(proto) \ |
163 | { } \ | 187 | { } \ |
164 | static inline int register_trace_##name(void (*probe)(proto)) \ | 188 | static inline int \ |
189 | register_trace_##name(void (*probe)(data_proto), \ | ||
190 | void *data) \ | ||
165 | { \ | 191 | { \ |
166 | return -ENOSYS; \ | 192 | return -ENOSYS; \ |
167 | } \ | 193 | } \ |
168 | static inline int unregister_trace_##name(void (*probe)(proto)) \ | 194 | static inline int \ |
195 | unregister_trace_##name(void (*probe)(data_proto), \ | ||
196 | void *data) \ | ||
169 | { \ | 197 | { \ |
170 | return -ENOSYS; \ | 198 | return -ENOSYS; \ |
199 | } \ | ||
200 | static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \ | ||
201 | { \ | ||
171 | } | 202 | } |
172 | 203 | ||
173 | #define DEFINE_TRACE_FN(name, reg, unreg) | 204 | #define DEFINE_TRACE_FN(name, reg, unreg) |
@@ -176,6 +207,29 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
176 | #define EXPORT_TRACEPOINT_SYMBOL(name) | 207 | #define EXPORT_TRACEPOINT_SYMBOL(name) |
177 | 208 | ||
178 | #endif /* CONFIG_TRACEPOINTS */ | 209 | #endif /* CONFIG_TRACEPOINTS */ |
210 | |||
211 | /* | ||
212 | * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype | ||
213 | * (void). "void" is a special value in a function prototype and can | ||
214 | * not be combined with other arguments. Since the DECLARE_TRACE() | ||
215 | * macro adds a data element at the beginning of the prototype, | ||
216 | * we need a way to differentiate "(void *data, proto)" from | ||
217 | * "(void *data, void)". The second prototype is invalid. | ||
218 | * | ||
219 | * DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype | ||
220 | * and "void *__data" as the callback prototype. | ||
221 | * | ||
222 | * DECLARE_TRACE() passes "proto" as the tracepoint protoype and | ||
223 | * "void *__data, proto" as the callback prototype. | ||
224 | */ | ||
225 | #define DECLARE_TRACE_NOARGS(name) \ | ||
226 | __DECLARE_TRACE(name, void, , void *__data, __data) | ||
227 | |||
228 | #define DECLARE_TRACE(name, proto, args) \ | ||
229 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ | ||
230 | PARAMS(void *__data, proto), \ | ||
231 | PARAMS(__data, args)) | ||
232 | |||
179 | #endif /* DECLARE_TRACE */ | 233 | #endif /* DECLARE_TRACE */ |
180 | 234 | ||
181 | #ifndef TRACE_EVENT | 235 | #ifndef TRACE_EVENT |
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 15ddd4483b09..60c81da77f0f 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
@@ -166,11 +166,11 @@ struct uinput_ff_erase { | |||
166 | struct uinput_user_dev { | 166 | struct uinput_user_dev { |
167 | char name[UINPUT_MAX_NAME_SIZE]; | 167 | char name[UINPUT_MAX_NAME_SIZE]; |
168 | struct input_id id; | 168 | struct input_id id; |
169 | int ff_effects_max; | 169 | int ff_effects_max; |
170 | int absmax[ABS_MAX + 1]; | 170 | int absmax[ABS_CNT]; |
171 | int absmin[ABS_MAX + 1]; | 171 | int absmin[ABS_CNT]; |
172 | int absfuzz[ABS_MAX + 1]; | 172 | int absfuzz[ABS_CNT]; |
173 | int absflat[ABS_MAX + 1]; | 173 | int absflat[ABS_CNT]; |
174 | }; | 174 | }; |
175 | #endif /* __UINPUT_H_ */ | 175 | #endif /* __UINPUT_H_ */ |
176 | 176 | ||