diff options
author | Michal Marek <mmarek@suse.cz> | 2010-12-01 07:13:56 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-12-01 07:13:56 -0500 |
commit | 307991055b0ce65d53dc1eb501c456c10eb36360 (patch) | |
tree | 71bb9263dc71344e5d7b97ca6d5cf223f1f1a856 /include | |
parent | 1198c6d45a1ef5f4f7fdfbf33ef7d270493ec575 (diff) | |
parent | 9b4320b77bab4031649c484da1c595f39c2e43cd (diff) |
Merge branch 'kconfig_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next into kbuild/rc-fixes
Diffstat (limited to 'include')
47 files changed, 755 insertions, 354 deletions
diff --git a/include/asm-generic/stat.h b/include/asm-generic/stat.h index 47e64170305d..bd8cad21998e 100644 --- a/include/asm-generic/stat.h +++ b/include/asm-generic/stat.h | |||
@@ -33,18 +33,18 @@ struct stat { | |||
33 | int st_blksize; /* Optimal block size for I/O. */ | 33 | int st_blksize; /* Optimal block size for I/O. */ |
34 | int __pad2; | 34 | int __pad2; |
35 | long st_blocks; /* Number 512-byte blocks allocated. */ | 35 | long st_blocks; /* Number 512-byte blocks allocated. */ |
36 | int st_atime; /* Time of last access. */ | 36 | long st_atime; /* Time of last access. */ |
37 | unsigned int st_atime_nsec; | 37 | unsigned long st_atime_nsec; |
38 | int st_mtime; /* Time of last modification. */ | 38 | long st_mtime; /* Time of last modification. */ |
39 | unsigned int st_mtime_nsec; | 39 | unsigned long st_mtime_nsec; |
40 | int st_ctime; /* Time of last status change. */ | 40 | long st_ctime; /* Time of last status change. */ |
41 | unsigned int st_ctime_nsec; | 41 | unsigned long st_ctime_nsec; |
42 | unsigned int __unused4; | 42 | unsigned int __unused4; |
43 | unsigned int __unused5; | 43 | unsigned int __unused5; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #if __BITS_PER_LONG != 64 | ||
47 | /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ | 46 | /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ |
47 | #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) | ||
48 | struct stat64 { | 48 | struct stat64 { |
49 | unsigned long long st_dev; /* Device. */ | 49 | unsigned long long st_dev; /* Device. */ |
50 | unsigned long long st_ino; /* File serial number. */ | 50 | unsigned long long st_ino; /* File serial number. */ |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 5afa5b52063e..beafc156a535 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -432,6 +432,10 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo); | |||
432 | * together with the @destroy function, | 432 | * together with the @destroy function, |
433 | * enables driver-specific objects derived from a ttm_buffer_object. | 433 | * enables driver-specific objects derived from a ttm_buffer_object. |
434 | * On successful return, the object kref and list_kref are set to 1. | 434 | * On successful return, the object kref and list_kref are set to 1. |
435 | * If a failure occurs, the function will call the @destroy function, or | ||
436 | * kfree() if @destroy is NULL. Thus, after a failure, dereferencing @bo is | ||
437 | * illegal and will likely cause memory corruption. | ||
438 | * | ||
435 | * Returns | 439 | * Returns |
436 | * -ENOMEM: Out of memory. | 440 | * -ENOMEM: Out of memory. |
437 | * -EINVAL: Invalid placement flags. | 441 | * -EINVAL: Invalid placement flags. |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index d01b4ddbdc56..8e0c848326b6 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -206,14 +206,84 @@ struct ttm_tt { | |||
206 | struct ttm_mem_type_manager; | 206 | struct ttm_mem_type_manager; |
207 | 207 | ||
208 | struct ttm_mem_type_manager_func { | 208 | struct ttm_mem_type_manager_func { |
209 | /** | ||
210 | * struct ttm_mem_type_manager member init | ||
211 | * | ||
212 | * @man: Pointer to a memory type manager. | ||
213 | * @p_size: Implementation dependent, but typically the size of the | ||
214 | * range to be managed in pages. | ||
215 | * | ||
216 | * Called to initialize a private range manager. The function is | ||
217 | * expected to initialize the man::priv member. | ||
218 | * Returns 0 on success, negative error code on failure. | ||
219 | */ | ||
209 | int (*init)(struct ttm_mem_type_manager *man, unsigned long p_size); | 220 | int (*init)(struct ttm_mem_type_manager *man, unsigned long p_size); |
221 | |||
222 | /** | ||
223 | * struct ttm_mem_type_manager member takedown | ||
224 | * | ||
225 | * @man: Pointer to a memory type manager. | ||
226 | * | ||
227 | * Called to undo the setup done in init. All allocated resources | ||
228 | * should be freed. | ||
229 | */ | ||
210 | int (*takedown)(struct ttm_mem_type_manager *man); | 230 | int (*takedown)(struct ttm_mem_type_manager *man); |
231 | |||
232 | /** | ||
233 | * struct ttm_mem_type_manager member get_node | ||
234 | * | ||
235 | * @man: Pointer to a memory type manager. | ||
236 | * @bo: Pointer to the buffer object we're allocating space for. | ||
237 | * @placement: Placement details. | ||
238 | * @mem: Pointer to a struct ttm_mem_reg to be filled in. | ||
239 | * | ||
240 | * This function should allocate space in the memory type managed | ||
241 | * by @man. Placement details if | ||
242 | * applicable are given by @placement. If successful, | ||
243 | * @mem::mm_node should be set to a non-null value, and | ||
244 | * @mem::start should be set to a value identifying the beginning | ||
245 | * of the range allocated, and the function should return zero. | ||
246 | * If the memory region accomodate the buffer object, @mem::mm_node | ||
247 | * should be set to NULL, and the function should return 0. | ||
248 | * If a system error occured, preventing the request to be fulfilled, | ||
249 | * the function should return a negative error code. | ||
250 | * | ||
251 | * Note that @mem::mm_node will only be dereferenced by | ||
252 | * struct ttm_mem_type_manager functions and optionally by the driver, | ||
253 | * which has knowledge of the underlying type. | ||
254 | * | ||
255 | * This function may not be called from within atomic context, so | ||
256 | * an implementation can and must use either a mutex or a spinlock to | ||
257 | * protect any data structures managing the space. | ||
258 | */ | ||
211 | int (*get_node)(struct ttm_mem_type_manager *man, | 259 | int (*get_node)(struct ttm_mem_type_manager *man, |
212 | struct ttm_buffer_object *bo, | 260 | struct ttm_buffer_object *bo, |
213 | struct ttm_placement *placement, | 261 | struct ttm_placement *placement, |
214 | struct ttm_mem_reg *mem); | 262 | struct ttm_mem_reg *mem); |
263 | |||
264 | /** | ||
265 | * struct ttm_mem_type_manager member put_node | ||
266 | * | ||
267 | * @man: Pointer to a memory type manager. | ||
268 | * @mem: Pointer to a struct ttm_mem_reg to be filled in. | ||
269 | * | ||
270 | * This function frees memory type resources previously allocated | ||
271 | * and that are identified by @mem::mm_node and @mem::start. May not | ||
272 | * be called from within atomic context. | ||
273 | */ | ||
215 | void (*put_node)(struct ttm_mem_type_manager *man, | 274 | void (*put_node)(struct ttm_mem_type_manager *man, |
216 | struct ttm_mem_reg *mem); | 275 | struct ttm_mem_reg *mem); |
276 | |||
277 | /** | ||
278 | * struct ttm_mem_type_manager member debug | ||
279 | * | ||
280 | * @man: Pointer to a memory type manager. | ||
281 | * @prefix: Prefix to be used in printout to identify the caller. | ||
282 | * | ||
283 | * This function is called to print out the state of the memory | ||
284 | * type manager to aid debugging of out-of-memory conditions. | ||
285 | * It may not be called from within atomic context. | ||
286 | */ | ||
217 | void (*debug)(struct ttm_mem_type_manager *man, const char *prefix); | 287 | void (*debug)(struct ttm_mem_type_manager *man, const char *prefix); |
218 | }; | 288 | }; |
219 | 289 | ||
@@ -231,14 +301,13 @@ struct ttm_mem_type_manager { | |||
231 | uint64_t size; | 301 | uint64_t size; |
232 | uint32_t available_caching; | 302 | uint32_t available_caching; |
233 | uint32_t default_caching; | 303 | uint32_t default_caching; |
304 | const struct ttm_mem_type_manager_func *func; | ||
305 | void *priv; | ||
234 | 306 | ||
235 | /* | 307 | /* |
236 | * Protected by the bdev->lru_lock. | 308 | * Protected by the global->lru_lock. |
237 | * TODO: Consider one lru_lock per ttm_mem_type_manager. | ||
238 | * Plays ill with list removal, though. | ||
239 | */ | 309 | */ |
240 | const struct ttm_mem_type_manager_func *func; | 310 | |
241 | void *priv; | ||
242 | struct list_head lru; | 311 | struct list_head lru; |
243 | }; | 312 | }; |
244 | 313 | ||
diff --git a/include/linux/atomic.h b/include/linux/atomic.h new file mode 100644 index 000000000000..96c038e43d66 --- /dev/null +++ b/include/linux/atomic.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef _LINUX_ATOMIC_H | ||
2 | #define _LINUX_ATOMIC_H | ||
3 | #include <asm/atomic.h> | ||
4 | |||
5 | /** | ||
6 | * atomic_inc_not_zero_hint - increment if not null | ||
7 | * @v: pointer of type atomic_t | ||
8 | * @hint: probable value of the atomic before the increment | ||
9 | * | ||
10 | * This version of atomic_inc_not_zero() gives a hint of probable | ||
11 | * value of the atomic. This helps processor to not read the memory | ||
12 | * before doing the atomic read/modify/write cycle, lowering | ||
13 | * number of bus transactions on some arches. | ||
14 | * | ||
15 | * Returns: 0 if increment was not done, 1 otherwise. | ||
16 | */ | ||
17 | #ifndef atomic_inc_not_zero_hint | ||
18 | static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint) | ||
19 | { | ||
20 | int val, c = hint; | ||
21 | |||
22 | /* sanity test, should be removed by compiler if hint is a constant */ | ||
23 | if (!hint) | ||
24 | return atomic_inc_not_zero(v); | ||
25 | |||
26 | do { | ||
27 | val = atomic_cmpxchg(v, c, c + 1); | ||
28 | if (val == c) | ||
29 | return 1; | ||
30 | c = val; | ||
31 | } while (c); | ||
32 | |||
33 | return 0; | ||
34 | } | ||
35 | #endif | ||
36 | |||
37 | #endif /* _LINUX_ATOMIC_H */ | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index ba679992d39b..35dcdb3589bc 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -66,10 +66,6 @@ | |||
66 | #define bio_offset(bio) bio_iovec((bio))->bv_offset | 66 | #define bio_offset(bio) bio_iovec((bio))->bv_offset |
67 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) | 67 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) |
68 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 68 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
69 | #define bio_empty_barrier(bio) \ | ||
70 | ((bio->bi_rw & REQ_HARDBARRIER) && \ | ||
71 | !bio_has_data(bio) && \ | ||
72 | !(bio->bi_rw & REQ_DISCARD)) | ||
73 | 69 | ||
74 | static inline unsigned int bio_cur_bytes(struct bio *bio) | 70 | static inline unsigned int bio_cur_bytes(struct bio *bio) |
75 | { | 71 | { |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 0437ab6bb54c..46ad5197537a 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
@@ -122,7 +122,6 @@ enum rq_flag_bits { | |||
122 | __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ | 122 | __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ |
123 | __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ | 123 | __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ |
124 | 124 | ||
125 | __REQ_HARDBARRIER, /* may not be passed by drive either */ | ||
126 | __REQ_SYNC, /* request is sync (sync write or read) */ | 125 | __REQ_SYNC, /* request is sync (sync write or read) */ |
127 | __REQ_META, /* metadata io request */ | 126 | __REQ_META, /* metadata io request */ |
128 | __REQ_DISCARD, /* request to discard sectors */ | 127 | __REQ_DISCARD, /* request to discard sectors */ |
@@ -159,7 +158,6 @@ enum rq_flag_bits { | |||
159 | #define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV) | 158 | #define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV) |
160 | #define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT) | 159 | #define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT) |
161 | #define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER) | 160 | #define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER) |
162 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) | ||
163 | #define REQ_SYNC (1 << __REQ_SYNC) | 161 | #define REQ_SYNC (1 << __REQ_SYNC) |
164 | #define REQ_META (1 << __REQ_META) | 162 | #define REQ_META (1 << __REQ_META) |
165 | #define REQ_DISCARD (1 << __REQ_DISCARD) | 163 | #define REQ_DISCARD (1 << __REQ_DISCARD) |
@@ -168,8 +166,8 @@ enum rq_flag_bits { | |||
168 | #define REQ_FAILFAST_MASK \ | 166 | #define REQ_FAILFAST_MASK \ |
169 | (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER) | 167 | (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER) |
170 | #define REQ_COMMON_MASK \ | 168 | #define REQ_COMMON_MASK \ |
171 | (REQ_WRITE | REQ_FAILFAST_MASK | REQ_HARDBARRIER | REQ_SYNC | \ | 169 | (REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \ |
172 | REQ_META | REQ_DISCARD | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) | 170 | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) |
173 | #define REQ_CLONE_MASK REQ_COMMON_MASK | 171 | #define REQ_CLONE_MASK REQ_COMMON_MASK |
174 | 172 | ||
175 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) | 173 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5027a599077d..aae86fd10c4f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -552,8 +552,7 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync) | |||
552 | * it already be started by driver. | 552 | * it already be started by driver. |
553 | */ | 553 | */ |
554 | #define RQ_NOMERGE_FLAGS \ | 554 | #define RQ_NOMERGE_FLAGS \ |
555 | (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER | \ | 555 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) |
556 | REQ_FLUSH | REQ_FUA) | ||
557 | #define rq_mergeable(rq) \ | 556 | #define rq_mergeable(rq) \ |
558 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | 557 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
559 | (((rq)->cmd_flags & REQ_DISCARD) || \ | 558 | (((rq)->cmd_flags & REQ_DISCARD) || \ |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 9b2a0158f399..ef44c7a0638c 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.9rc2" | 56 | #define REL_VERSION "8.3.9" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 95 | 59 | #define PRO_VERSION_MAX 95 |
diff --git a/include/linux/fsl-diu-fb.h b/include/linux/fsl-diu-fb.h index fc295d7ea463..781d4671415f 100644 --- a/include/linux/fsl-diu-fb.h +++ b/include/linux/fsl-diu-fb.h | |||
@@ -54,7 +54,6 @@ struct aoi_display_offset { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) | 56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) |
57 | #define MFB_WAIT_FOR_VSYNC _IOW('F', 0x20, u_int32_t) | ||
58 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) | 57 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) |
59 | 58 | ||
60 | #define MFB_SET_ALPHA 0x80014d00 | 59 | #define MFB_SET_ALPHA 0x80014d00 |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 8a389b608ce3..41cb31f14ee3 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -96,11 +96,15 @@ | |||
96 | */ | 96 | */ |
97 | #define in_nmi() (preempt_count() & NMI_MASK) | 97 | #define in_nmi() (preempt_count() & NMI_MASK) |
98 | 98 | ||
99 | #if defined(CONFIG_PREEMPT) | 99 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL) |
100 | # define PREEMPT_INATOMIC_BASE kernel_locked() | 100 | # define PREEMPT_INATOMIC_BASE kernel_locked() |
101 | # define PREEMPT_CHECK_OFFSET 1 | ||
102 | #else | 101 | #else |
103 | # define PREEMPT_INATOMIC_BASE 0 | 102 | # define PREEMPT_INATOMIC_BASE 0 |
103 | #endif | ||
104 | |||
105 | #if defined(CONFIG_PREEMPT) | ||
106 | # define PREEMPT_CHECK_OFFSET 1 | ||
107 | #else | ||
104 | # define PREEMPT_CHECK_OFFSET 0 | 108 | # define PREEMPT_CHECK_OFFSET 0 |
105 | #endif | 109 | #endif |
106 | 110 | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index e9138198e823..b676c585574e 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/uaccess.h> | 7 | #include <linux/uaccess.h> |
8 | #include <linux/hardirq.h> | ||
8 | 9 | ||
9 | #include <asm/cacheflush.h> | 10 | #include <asm/cacheflush.h> |
10 | 11 | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index e844a0b18695..4bef5c557160 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -32,28 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | /* --- Bit algorithm adapters */ | 34 | /* --- Bit algorithm adapters */ |
35 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | ||
36 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ | ||
37 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ | ||
38 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ | 35 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ |
39 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | ||
40 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | ||
41 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | ||
42 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ | ||
43 | #define I2C_HW_B_CX231XX 0x010024 /* Conexant CX231XX USB based cards */ | ||
44 | #define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */ | ||
45 | |||
46 | /* --- SGI adapters */ | ||
47 | #define I2C_HW_SGI_VINO 0x160000 | ||
48 | |||
49 | /* --- SMBus only adapters */ | ||
50 | #define I2C_HW_SMBUS_W9968CF 0x04000d | ||
51 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ | ||
52 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | ||
53 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | ||
54 | |||
55 | /* --- Miscellaneous adapters */ | ||
56 | #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ | ||
57 | #define I2C_HW_SAA7134 0x090000 /* SAA7134 video decoder bus */ | ||
58 | 36 | ||
59 | #endif /* LINUX_I2C_ID_H */ | 37 | #endif /* LINUX_I2C_ID_H */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 889b35abaeda..56cfe23ffb39 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -353,7 +353,7 @@ struct i2c_algorithm { | |||
353 | */ | 353 | */ |
354 | struct i2c_adapter { | 354 | struct i2c_adapter { |
355 | struct module *owner; | 355 | struct module *owner; |
356 | unsigned int id; | 356 | unsigned int id __deprecated; |
357 | unsigned int class; /* classes to allow probing for */ | 357 | unsigned int class; /* classes to allow probing for */ |
358 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ | 358 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
359 | void *algo_data; | 359 | void *algo_data; |
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index 3c5d6b6e765c..cec17cf6cac2 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller | 2 | * Analog Devices ADP5588 I/O Expander and QWERTY Keypad Controller |
3 | * | 3 | * |
4 | * Copyright 2009 Analog Devices Inc. | 4 | * Copyright 2009-2010 Analog Devices Inc. |
5 | * | 5 | * |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
@@ -77,13 +77,26 @@ | |||
77 | /* Configuration Register1 */ | 77 | /* Configuration Register1 */ |
78 | #define ADP5588_AUTO_INC (1 << 7) | 78 | #define ADP5588_AUTO_INC (1 << 7) |
79 | #define ADP5588_GPIEM_CFG (1 << 6) | 79 | #define ADP5588_GPIEM_CFG (1 << 6) |
80 | #define ADP5588_OVR_FLOW_M (1 << 5) | ||
80 | #define ADP5588_INT_CFG (1 << 4) | 81 | #define ADP5588_INT_CFG (1 << 4) |
82 | #define ADP5588_OVR_FLOW_IEN (1 << 3) | ||
83 | #define ADP5588_K_LCK_IM (1 << 2) | ||
81 | #define ADP5588_GPI_IEN (1 << 1) | 84 | #define ADP5588_GPI_IEN (1 << 1) |
85 | #define ADP5588_KE_IEN (1 << 0) | ||
82 | 86 | ||
83 | /* Interrupt Status Register */ | 87 | /* Interrupt Status Register */ |
88 | #define ADP5588_CMP2_INT (1 << 5) | ||
89 | #define ADP5588_CMP1_INT (1 << 4) | ||
90 | #define ADP5588_OVR_FLOW_INT (1 << 3) | ||
91 | #define ADP5588_K_LCK_INT (1 << 2) | ||
84 | #define ADP5588_GPI_INT (1 << 1) | 92 | #define ADP5588_GPI_INT (1 << 1) |
85 | #define ADP5588_KE_INT (1 << 0) | 93 | #define ADP5588_KE_INT (1 << 0) |
86 | 94 | ||
95 | /* Key Lock and Event Counter Register */ | ||
96 | #define ADP5588_K_LCK_EN (1 << 6) | ||
97 | #define ADP5588_LCK21 0x30 | ||
98 | #define ADP5588_KEC 0xF | ||
99 | |||
87 | #define ADP5588_MAXGPIO 18 | 100 | #define ADP5588_MAXGPIO 18 |
88 | #define ADP5588_BANK(offs) ((offs) >> 3) | 101 | #define ADP5588_BANK(offs) ((offs) >> 3) |
89 | #define ADP5588_BIT(offs) (1u << ((offs) & 0x7)) | 102 | #define ADP5588_BIT(offs) (1u << ((offs) & 0x7)) |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index c2f3a72712ce..635e1faec412 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -339,6 +339,31 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci) | |||
339 | } | 339 | } |
340 | } | 340 | } |
341 | 341 | ||
342 | /** | ||
343 | * vlan_get_protocol - get protocol EtherType. | ||
344 | * @skb: skbuff to query | ||
345 | * | ||
346 | * Returns the EtherType of the packet, regardless of whether it is | ||
347 | * vlan encapsulated (normal or hardware accelerated) or not. | ||
348 | */ | ||
349 | static inline __be16 vlan_get_protocol(const struct sk_buff *skb) | ||
350 | { | ||
351 | __be16 protocol = 0; | ||
352 | |||
353 | if (vlan_tx_tag_present(skb) || | ||
354 | skb->protocol != cpu_to_be16(ETH_P_8021Q)) | ||
355 | protocol = skb->protocol; | ||
356 | else { | ||
357 | __be16 proto, *protop; | ||
358 | protop = skb_header_pointer(skb, offsetof(struct vlan_ethhdr, | ||
359 | h_vlan_encapsulated_proto), | ||
360 | sizeof(proto), &proto); | ||
361 | if (likely(protop)) | ||
362 | protocol = *protop; | ||
363 | } | ||
364 | |||
365 | return protocol; | ||
366 | } | ||
342 | #endif /* __KERNEL__ */ | 367 | #endif /* __KERNEL__ */ |
343 | 368 | ||
344 | /* VLAN IOCTLs are found in sockios.h */ | 369 | /* VLAN IOCTLs are found in sockios.h */ |
diff --git a/include/linux/input.h b/include/linux/input.h index 51af441f3a21..6ef44465db8d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1406,6 +1406,8 @@ static inline void input_set_drvdata(struct input_dev *dev, void *data) | |||
1406 | int __must_check input_register_device(struct input_dev *); | 1406 | int __must_check input_register_device(struct input_dev *); |
1407 | void input_unregister_device(struct input_dev *); | 1407 | void input_unregister_device(struct input_dev *); |
1408 | 1408 | ||
1409 | void input_reset_device(struct input_dev *); | ||
1410 | |||
1409 | int __must_check input_register_handler(struct input_handler *); | 1411 | int __must_check input_register_handler(struct input_handler *); |
1410 | void input_unregister_handler(struct input_handler *); | 1412 | void input_unregister_handler(struct input_handler *); |
1411 | 1413 | ||
@@ -1421,7 +1423,7 @@ void input_release_device(struct input_handle *); | |||
1421 | int input_open_device(struct input_handle *); | 1423 | int input_open_device(struct input_handle *); |
1422 | void input_close_device(struct input_handle *); | 1424 | void input_close_device(struct input_handle *); |
1423 | 1425 | ||
1424 | int input_flush_device(struct input_handle* handle, struct file* file); | 1426 | int input_flush_device(struct input_handle *handle, struct file *file); |
1425 | 1427 | ||
1426 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 1428 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
1427 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 1429 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 3e70b21884a9..b2eee896dcbc 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -76,7 +76,6 @@ int put_io_context(struct io_context *ioc); | |||
76 | void exit_io_context(struct task_struct *task); | 76 | void exit_io_context(struct task_struct *task); |
77 | struct io_context *get_io_context(gfp_t gfp_flags, int node); | 77 | struct io_context *get_io_context(gfp_t gfp_flags, int node); |
78 | struct io_context *alloc_io_context(gfp_t gfp_flags, int node); | 78 | struct io_context *alloc_io_context(gfp_t gfp_flags, int node); |
79 | void copy_io_context(struct io_context **pdst, struct io_context **psrc); | ||
80 | #else | 79 | #else |
81 | static inline void exit_io_context(struct task_struct *task) | 80 | static inline void exit_io_context(struct task_struct *task) |
82 | { | 81 | { |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 450092c1e35f..b6de9a6f7018 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -17,13 +17,11 @@ | |||
17 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
18 | #include <linux/log2.h> | 18 | #include <linux/log2.h> |
19 | #include <linux/typecheck.h> | 19 | #include <linux/typecheck.h> |
20 | #include <linux/printk.h> | ||
20 | #include <linux/dynamic_debug.h> | 21 | #include <linux/dynamic_debug.h> |
21 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
22 | #include <asm/bug.h> | 23 | #include <asm/bug.h> |
23 | 24 | ||
24 | extern const char linux_banner[]; | ||
25 | extern const char linux_proc_banner[]; | ||
26 | |||
27 | #define USHRT_MAX ((u16)(~0U)) | 25 | #define USHRT_MAX ((u16)(~0U)) |
28 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | 26 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) |
29 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) | 27 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) |
@@ -60,7 +58,7 @@ extern const char linux_proc_banner[]; | |||
60 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
61 | #define roundup(x, y) ( \ | 59 | #define roundup(x, y) ( \ |
62 | { \ | 60 | { \ |
63 | typeof(y) __y = y; \ | 61 | const typeof(y) __y = y; \ |
64 | (((x) + (__y - 1)) / __y) * __y; \ | 62 | (((x) + (__y - 1)) / __y) * __y; \ |
65 | } \ | 63 | } \ |
66 | ) | 64 | ) |
@@ -110,31 +108,6 @@ extern const char linux_proc_banner[]; | |||
110 | */ | 108 | */ |
111 | #define lower_32_bits(n) ((u32)(n)) | 109 | #define lower_32_bits(n) ((u32)(n)) |
112 | 110 | ||
113 | #define KERN_EMERG "<0>" /* system is unusable */ | ||
114 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | ||
115 | #define KERN_CRIT "<2>" /* critical conditions */ | ||
116 | #define KERN_ERR "<3>" /* error conditions */ | ||
117 | #define KERN_WARNING "<4>" /* warning conditions */ | ||
118 | #define KERN_NOTICE "<5>" /* normal but significant condition */ | ||
119 | #define KERN_INFO "<6>" /* informational */ | ||
120 | #define KERN_DEBUG "<7>" /* debug-level messages */ | ||
121 | |||
122 | /* Use the default kernel loglevel */ | ||
123 | #define KERN_DEFAULT "<d>" | ||
124 | /* | ||
125 | * Annotation for a "continued" line of log printout (only done after a | ||
126 | * line that had no enclosing \n). Only to be used by core/arch code | ||
127 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
128 | */ | ||
129 | #define KERN_CONT "<c>" | ||
130 | |||
131 | extern int console_printk[]; | ||
132 | |||
133 | #define console_loglevel (console_printk[0]) | ||
134 | #define default_message_loglevel (console_printk[1]) | ||
135 | #define minimum_console_loglevel (console_printk[2]) | ||
136 | #define default_console_loglevel (console_printk[3]) | ||
137 | |||
138 | struct completion; | 111 | struct completion; |
139 | struct pt_regs; | 112 | struct pt_regs; |
140 | struct user; | 113 | struct user; |
@@ -187,11 +160,6 @@ static inline void might_fault(void) | |||
187 | } | 160 | } |
188 | #endif | 161 | #endif |
189 | 162 | ||
190 | struct va_format { | ||
191 | const char *fmt; | ||
192 | va_list *va; | ||
193 | }; | ||
194 | |||
195 | extern struct atomic_notifier_head panic_notifier_list; | 163 | extern struct atomic_notifier_head panic_notifier_list; |
196 | extern long (*panic_blink)(int state); | 164 | extern long (*panic_blink)(int state); |
197 | NORET_TYPE void panic(const char * fmt, ...) | 165 | NORET_TYPE void panic(const char * fmt, ...) |
@@ -245,114 +213,8 @@ extern int func_ptr_is_kernel_text(void *ptr); | |||
245 | struct pid; | 213 | struct pid; |
246 | extern struct pid *session_of_pgrp(struct pid *pgrp); | 214 | extern struct pid *session_of_pgrp(struct pid *pgrp); |
247 | 215 | ||
248 | /* | ||
249 | * FW_BUG | ||
250 | * Add this to a message where you are sure the firmware is buggy or behaves | ||
251 | * really stupid or out of spec. Be aware that the responsible BIOS developer | ||
252 | * should be able to fix this issue or at least get a concrete idea of the | ||
253 | * problem by reading your message without the need of looking at the kernel | ||
254 | * code. | ||
255 | * | ||
256 | * Use it for definite and high priority BIOS bugs. | ||
257 | * | ||
258 | * FW_WARN | ||
259 | * Use it for not that clear (e.g. could the kernel messed up things already?) | ||
260 | * and medium priority BIOS bugs. | ||
261 | * | ||
262 | * FW_INFO | ||
263 | * Use this one if you want to tell the user or vendor about something | ||
264 | * suspicious, but generally harmless related to the firmware. | ||
265 | * | ||
266 | * Use it for information or very low priority BIOS bugs. | ||
267 | */ | ||
268 | #define FW_BUG "[Firmware Bug]: " | ||
269 | #define FW_WARN "[Firmware Warn]: " | ||
270 | #define FW_INFO "[Firmware Info]: " | ||
271 | |||
272 | /* | ||
273 | * HW_ERR | ||
274 | * Add this to a message for hardware errors, so that user can report | ||
275 | * it to hardware vendor instead of LKML or software vendor. | ||
276 | */ | ||
277 | #define HW_ERR "[Hardware Error]: " | ||
278 | |||
279 | #ifdef CONFIG_PRINTK | ||
280 | asmlinkage int vprintk(const char *fmt, va_list args) | ||
281 | __attribute__ ((format (printf, 1, 0))); | ||
282 | asmlinkage int printk(const char * fmt, ...) | ||
283 | __attribute__ ((format (printf, 1, 2))) __cold; | ||
284 | |||
285 | /* | ||
286 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
287 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
288 | * printk_ratelimited() or plain old __ratelimit(). | ||
289 | */ | ||
290 | extern int __printk_ratelimit(const char *func); | ||
291 | #define printk_ratelimit() __printk_ratelimit(__func__) | ||
292 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
293 | unsigned int interval_msec); | ||
294 | |||
295 | extern int printk_delay_msec; | ||
296 | |||
297 | /* | ||
298 | * Print a one-time message (analogous to WARN_ONCE() et al): | ||
299 | */ | ||
300 | #define printk_once(x...) ({ \ | ||
301 | static bool __print_once; \ | ||
302 | \ | ||
303 | if (!__print_once) { \ | ||
304 | __print_once = true; \ | ||
305 | printk(x); \ | ||
306 | } \ | ||
307 | }) | ||
308 | |||
309 | void log_buf_kexec_setup(void); | ||
310 | #else | ||
311 | static inline int vprintk(const char *s, va_list args) | ||
312 | __attribute__ ((format (printf, 1, 0))); | ||
313 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
314 | static inline int printk(const char *s, ...) | ||
315 | __attribute__ ((format (printf, 1, 2))); | ||
316 | static inline int __cold printk(const char *s, ...) { return 0; } | ||
317 | static inline int printk_ratelimit(void) { return 0; } | ||
318 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
319 | unsigned int interval_msec) \ | ||
320 | { return false; } | ||
321 | |||
322 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
323 | #define printk_once(x...) printk(x) | ||
324 | |||
325 | static inline void log_buf_kexec_setup(void) | ||
326 | { | ||
327 | } | ||
328 | #endif | ||
329 | |||
330 | /* | ||
331 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
332 | * gcc's format and side-effect checking. | ||
333 | */ | ||
334 | static inline __attribute__ ((format (printf, 1, 2))) | ||
335 | int no_printk(const char *s, ...) { return 0; } | ||
336 | |||
337 | extern int printk_needs_cpu(int cpu); | ||
338 | extern void printk_tick(void); | ||
339 | |||
340 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | ||
341 | early_printk(const char *fmt, ...); | ||
342 | |||
343 | unsigned long int_sqrt(unsigned long); | 216 | unsigned long int_sqrt(unsigned long); |
344 | 217 | ||
345 | static inline void console_silent(void) | ||
346 | { | ||
347 | console_loglevel = 0; | ||
348 | } | ||
349 | |||
350 | static inline void console_verbose(void) | ||
351 | { | ||
352 | if (console_loglevel) | ||
353 | console_loglevel = 15; | ||
354 | } | ||
355 | |||
356 | extern void bust_spinlocks(int yes); | 218 | extern void bust_spinlocks(int yes); |
357 | extern void wake_up_klogd(void); | 219 | extern void wake_up_klogd(void); |
358 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 220 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
@@ -389,22 +251,6 @@ extern enum system_states { | |||
389 | #define TAINT_CRAP 10 | 251 | #define TAINT_CRAP 10 |
390 | #define TAINT_FIRMWARE_WORKAROUND 11 | 252 | #define TAINT_FIRMWARE_WORKAROUND 11 |
391 | 253 | ||
392 | extern void dump_stack(void) __cold; | ||
393 | |||
394 | enum { | ||
395 | DUMP_PREFIX_NONE, | ||
396 | DUMP_PREFIX_ADDRESS, | ||
397 | DUMP_PREFIX_OFFSET | ||
398 | }; | ||
399 | extern void hex_dump_to_buffer(const void *buf, size_t len, | ||
400 | int rowsize, int groupsize, | ||
401 | char *linebuf, size_t linebuflen, bool ascii); | ||
402 | extern void print_hex_dump(const char *level, const char *prefix_str, | ||
403 | int prefix_type, int rowsize, int groupsize, | ||
404 | const void *buf, size_t len, bool ascii); | ||
405 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
406 | const void *buf, size_t len); | ||
407 | |||
408 | extern const char hex_asc[]; | 254 | extern const char hex_asc[]; |
409 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | 255 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] |
410 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] | 256 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] |
@@ -418,94 +264,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
418 | 264 | ||
419 | extern int hex_to_bin(char ch); | 265 | extern int hex_to_bin(char ch); |
420 | 266 | ||
421 | #ifndef pr_fmt | ||
422 | #define pr_fmt(fmt) fmt | ||
423 | #endif | ||
424 | |||
425 | #define pr_emerg(fmt, ...) \ | ||
426 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
427 | #define pr_alert(fmt, ...) \ | ||
428 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
429 | #define pr_crit(fmt, ...) \ | ||
430 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
431 | #define pr_err(fmt, ...) \ | ||
432 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
433 | #define pr_warning(fmt, ...) \ | ||
434 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
435 | #define pr_warn pr_warning | ||
436 | #define pr_notice(fmt, ...) \ | ||
437 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
438 | #define pr_info(fmt, ...) \ | ||
439 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
440 | #define pr_cont(fmt, ...) \ | ||
441 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
442 | |||
443 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
444 | #ifdef DEBUG | ||
445 | #define pr_devel(fmt, ...) \ | ||
446 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
447 | #else | ||
448 | #define pr_devel(fmt, ...) \ | ||
449 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
450 | #endif | ||
451 | |||
452 | /* If you are writing a driver, please use dev_dbg instead */ | ||
453 | #if defined(DEBUG) | ||
454 | #define pr_debug(fmt, ...) \ | ||
455 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
456 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
457 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
458 | #define pr_debug(fmt, ...) \ | ||
459 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ||
460 | #else | ||
461 | #define pr_debug(fmt, ...) \ | ||
462 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
463 | #endif | ||
464 | |||
465 | /* | ||
466 | * ratelimited messages with local ratelimit_state, | ||
467 | * no local ratelimit_state used in the !PRINTK case | ||
468 | */ | ||
469 | #ifdef CONFIG_PRINTK | ||
470 | #define printk_ratelimited(fmt, ...) ({ \ | ||
471 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
472 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
473 | DEFAULT_RATELIMIT_BURST); \ | ||
474 | \ | ||
475 | if (__ratelimit(&_rs)) \ | ||
476 | printk(fmt, ##__VA_ARGS__); \ | ||
477 | }) | ||
478 | #else | ||
479 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
480 | #define printk_ratelimited printk | ||
481 | #endif | ||
482 | |||
483 | #define pr_emerg_ratelimited(fmt, ...) \ | ||
484 | printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
485 | #define pr_alert_ratelimited(fmt, ...) \ | ||
486 | printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
487 | #define pr_crit_ratelimited(fmt, ...) \ | ||
488 | printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
489 | #define pr_err_ratelimited(fmt, ...) \ | ||
490 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
491 | #define pr_warning_ratelimited(fmt, ...) \ | ||
492 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
493 | #define pr_warn_ratelimited pr_warning_ratelimited | ||
494 | #define pr_notice_ratelimited(fmt, ...) \ | ||
495 | printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
496 | #define pr_info_ratelimited(fmt, ...) \ | ||
497 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
498 | /* no pr_cont_ratelimited, don't do that... */ | ||
499 | /* If you are writing a driver, please use dev_dbg instead */ | ||
500 | #if defined(DEBUG) | ||
501 | #define pr_debug_ratelimited(fmt, ...) \ | ||
502 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
503 | #else | ||
504 | #define pr_debug_ratelimited(fmt, ...) \ | ||
505 | ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ | ||
506 | ##__VA_ARGS__); 0; }) | ||
507 | #endif | ||
508 | |||
509 | /* | 267 | /* |
510 | * General tracing related utility functions - trace_printk(), | 268 | * General tracing related utility functions - trace_printk(), |
511 | * tracing_on/tracing_off and tracing_start()/tracing_stop | 269 | * tracing_on/tracing_off and tracing_start()/tracing_stop |
diff --git a/include/linux/leds-lp5521.h b/include/linux/leds-lp5521.h new file mode 100644 index 000000000000..38368d785f08 --- /dev/null +++ b/include/linux/leds-lp5521.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * LP5521 LED chip driver. | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
20 | * 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef __LINUX_LP5521_H | ||
24 | #define __LINUX_LP5521_H | ||
25 | |||
26 | /* See Documentation/leds/leds-lp5521.txt */ | ||
27 | |||
28 | struct lp5521_led_config { | ||
29 | u8 chan_nr; | ||
30 | u8 led_current; /* mA x10, 0 if led is not connected */ | ||
31 | u8 max_current; | ||
32 | }; | ||
33 | |||
34 | #define LP5521_CLOCK_AUTO 0 | ||
35 | #define LP5521_CLOCK_INT 1 | ||
36 | #define LP5521_CLOCK_EXT 2 | ||
37 | |||
38 | struct lp5521_platform_data { | ||
39 | struct lp5521_led_config *led_config; | ||
40 | u8 num_channels; | ||
41 | u8 clock_mode; | ||
42 | int (*setup_resources)(void); | ||
43 | void (*release_resources)(void); | ||
44 | void (*enable)(bool state); | ||
45 | }; | ||
46 | |||
47 | #endif /* __LINUX_LP5521_H */ | ||
diff --git a/include/linux/leds-lp5523.h b/include/linux/leds-lp5523.h new file mode 100644 index 000000000000..796747637b80 --- /dev/null +++ b/include/linux/leds-lp5523.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * LP5523 LED Driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
20 | * 02110-1301 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef __LINUX_LP5523_H | ||
24 | #define __LINUX_LP5523_H | ||
25 | |||
26 | /* See Documentation/leds/leds-lp5523.txt */ | ||
27 | |||
28 | struct lp5523_led_config { | ||
29 | u8 chan_nr; | ||
30 | u8 led_current; /* mA x10, 0 if led is not connected */ | ||
31 | u8 max_current; | ||
32 | }; | ||
33 | |||
34 | #define LP5523_CLOCK_AUTO 0 | ||
35 | #define LP5523_CLOCK_INT 1 | ||
36 | #define LP5523_CLOCK_EXT 2 | ||
37 | |||
38 | struct lp5523_platform_data { | ||
39 | struct lp5523_led_config *led_config; | ||
40 | u8 num_channels; | ||
41 | u8 clock_mode; | ||
42 | int (*setup_resources)(void); | ||
43 | void (*release_resources)(void); | ||
44 | void (*enable)(bool state); | ||
45 | }; | ||
46 | |||
47 | #endif /* __LINUX_LP5523_H */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index ba6986a11663..0f19df9e37b0 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/rwsem.h> | 17 | #include <linux/rwsem.h> |
18 | #include <linux/timer.h> | ||
18 | 19 | ||
19 | struct device; | 20 | struct device; |
20 | /* | 21 | /* |
@@ -45,10 +46,14 @@ struct led_classdev { | |||
45 | /* Get LED brightness level */ | 46 | /* Get LED brightness level */ |
46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | 47 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); |
47 | 48 | ||
48 | /* Activate hardware accelerated blink, delays are in | 49 | /* |
49 | * miliseconds and if none is provided then a sensible default | 50 | * Activate hardware accelerated blink, delays are in milliseconds |
50 | * should be chosen. The call can adjust the timings if it can't | 51 | * and if both are zero then a sensible default should be chosen. |
51 | * match the values specified exactly. */ | 52 | * The call should adjust the timings in that case and if it can't |
53 | * match the values specified exactly. | ||
54 | * Deactivate blinking again when the brightness is set to a fixed | ||
55 | * value via the brightness_set() callback. | ||
56 | */ | ||
52 | int (*blink_set)(struct led_classdev *led_cdev, | 57 | int (*blink_set)(struct led_classdev *led_cdev, |
53 | unsigned long *delay_on, | 58 | unsigned long *delay_on, |
54 | unsigned long *delay_off); | 59 | unsigned long *delay_off); |
@@ -57,6 +62,10 @@ struct led_classdev { | |||
57 | struct list_head node; /* LED Device list */ | 62 | struct list_head node; /* LED Device list */ |
58 | const char *default_trigger; /* Trigger to use */ | 63 | const char *default_trigger; /* Trigger to use */ |
59 | 64 | ||
65 | unsigned long blink_delay_on, blink_delay_off; | ||
66 | struct timer_list blink_timer; | ||
67 | int blink_brightness; | ||
68 | |||
60 | #ifdef CONFIG_LEDS_TRIGGERS | 69 | #ifdef CONFIG_LEDS_TRIGGERS |
61 | /* Protects the trigger data below */ | 70 | /* Protects the trigger data below */ |
62 | struct rw_semaphore trigger_lock; | 71 | struct rw_semaphore trigger_lock; |
@@ -73,6 +82,36 @@ extern void led_classdev_unregister(struct led_classdev *led_cdev); | |||
73 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | 82 | extern void led_classdev_suspend(struct led_classdev *led_cdev); |
74 | extern void led_classdev_resume(struct led_classdev *led_cdev); | 83 | extern void led_classdev_resume(struct led_classdev *led_cdev); |
75 | 84 | ||
85 | /** | ||
86 | * led_blink_set - set blinking with software fallback | ||
87 | * @led_cdev: the LED to start blinking | ||
88 | * @delay_on: the time it should be on (in ms) | ||
89 | * @delay_off: the time it should ble off (in ms) | ||
90 | * | ||
91 | * This function makes the LED blink, attempting to use the | ||
92 | * hardware acceleration if possible, but falling back to | ||
93 | * software blinking if there is no hardware blinking or if | ||
94 | * the LED refuses the passed values. | ||
95 | * | ||
96 | * Note that if software blinking is active, simply calling | ||
97 | * led_cdev->brightness_set() will not stop the blinking, | ||
98 | * use led_classdev_brightness_set() instead. | ||
99 | */ | ||
100 | extern void led_blink_set(struct led_classdev *led_cdev, | ||
101 | unsigned long *delay_on, | ||
102 | unsigned long *delay_off); | ||
103 | /** | ||
104 | * led_brightness_set - set LED brightness | ||
105 | * @led_cdev: the LED to set | ||
106 | * @brightness: the brightness to set it to | ||
107 | * | ||
108 | * Set an LED's brightness, and, if necessary, cancel the | ||
109 | * software blink timer that implements blinking when the | ||
110 | * hardware doesn't. | ||
111 | */ | ||
112 | extern void led_brightness_set(struct led_classdev *led_cdev, | ||
113 | enum led_brightness brightness); | ||
114 | |||
76 | /* | 115 | /* |
77 | * LED Triggers | 116 | * LED Triggers |
78 | */ | 117 | */ |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index d19e2114fd86..5c99da1078aa 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -59,19 +59,19 @@ struct sh_mmcif_plat_data { | |||
59 | #define MMCIF_CE_HOST_STS2 0x0000004C | 59 | #define MMCIF_CE_HOST_STS2 0x0000004C |
60 | #define MMCIF_CE_VERSION 0x0000007C | 60 | #define MMCIF_CE_VERSION 0x0000007C |
61 | 61 | ||
62 | extern inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 62 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
63 | { | 63 | { |
64 | return readl(addr + reg); | 64 | return readl(addr + reg); |
65 | } | 65 | } |
66 | 66 | ||
67 | extern inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | 67 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) |
68 | { | 68 | { |
69 | writel(val, addr + reg); | 69 | writel(val, addr + reg); |
70 | } | 70 | } |
71 | 71 | ||
72 | #define SH_MMCIF_BBS 512 /* boot block size */ | 72 | #define SH_MMCIF_BBS 512 /* boot block size */ |
73 | 73 | ||
74 | extern inline void sh_mmcif_boot_cmd_send(void __iomem *base, | 74 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, |
75 | unsigned long cmd, unsigned long arg) | 75 | unsigned long cmd, unsigned long arg) |
76 | { | 76 | { |
77 | sh_mmcif_writel(base, MMCIF_CE_INT, 0); | 77 | sh_mmcif_writel(base, MMCIF_CE_INT, 0); |
@@ -79,7 +79,7 @@ extern inline void sh_mmcif_boot_cmd_send(void __iomem *base, | |||
79 | sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd); | 79 | sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd); |
80 | } | 80 | } |
81 | 81 | ||
82 | extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) | 82 | static inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) |
83 | { | 83 | { |
84 | unsigned long tmp; | 84 | unsigned long tmp; |
85 | int cnt; | 85 | int cnt; |
@@ -95,14 +95,14 @@ extern inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) | |||
95 | return -1; | 95 | return -1; |
96 | } | 96 | } |
97 | 97 | ||
98 | extern inline int sh_mmcif_boot_cmd(void __iomem *base, | 98 | static inline int sh_mmcif_boot_cmd(void __iomem *base, |
99 | unsigned long cmd, unsigned long arg) | 99 | unsigned long cmd, unsigned long arg) |
100 | { | 100 | { |
101 | sh_mmcif_boot_cmd_send(base, cmd, arg); | 101 | sh_mmcif_boot_cmd_send(base, cmd, arg); |
102 | return sh_mmcif_boot_cmd_poll(base, 0x00010000); | 102 | return sh_mmcif_boot_cmd_poll(base, 0x00010000); |
103 | } | 103 | } |
104 | 104 | ||
105 | extern inline int sh_mmcif_boot_do_read_single(void __iomem *base, | 105 | static inline int sh_mmcif_boot_do_read_single(void __iomem *base, |
106 | unsigned int block_nr, | 106 | unsigned int block_nr, |
107 | unsigned long *buf) | 107 | unsigned long *buf) |
108 | { | 108 | { |
@@ -125,7 +125,7 @@ extern inline int sh_mmcif_boot_do_read_single(void __iomem *base, | |||
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | extern inline int sh_mmcif_boot_do_read(void __iomem *base, | 128 | static inline int sh_mmcif_boot_do_read(void __iomem *base, |
129 | unsigned long first_block, | 129 | unsigned long first_block, |
130 | unsigned long nr_blocks, | 130 | unsigned long nr_blocks, |
131 | void *buf) | 131 | void *buf) |
@@ -143,7 +143,7 @@ extern inline int sh_mmcif_boot_do_read(void __iomem *base, | |||
143 | return ret; | 143 | return ret; |
144 | } | 144 | } |
145 | 145 | ||
146 | extern inline void sh_mmcif_boot_init(void __iomem *base) | 146 | static inline void sh_mmcif_boot_init(void __iomem *base) |
147 | { | 147 | { |
148 | unsigned long tmp; | 148 | unsigned long tmp; |
149 | 149 | ||
@@ -177,7 +177,7 @@ extern inline void sh_mmcif_boot_init(void __iomem *base) | |||
177 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); | 177 | sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); |
178 | } | 178 | } |
179 | 179 | ||
180 | extern inline void sh_mmcif_boot_slurp(void __iomem *base, | 180 | static inline void sh_mmcif_boot_slurp(void __iomem *base, |
181 | unsigned char *buf, | 181 | unsigned char *buf, |
182 | unsigned long no_bytes) | 182 | unsigned long no_bytes) |
183 | { | 183 | { |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 072652d94d9f..d8fd2c23a1b9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1554,6 +1554,11 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev) | |||
1554 | 1554 | ||
1555 | static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue) | 1555 | static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue) |
1556 | { | 1556 | { |
1557 | if (WARN_ON(!dev_queue)) { | ||
1558 | printk(KERN_INFO "netif_stop_queue() cannot be called before " | ||
1559 | "register_netdev()"); | ||
1560 | return; | ||
1561 | } | ||
1557 | set_bit(__QUEUE_STATE_XOFF, &dev_queue->state); | 1562 | set_bit(__QUEUE_STATE_XOFF, &dev_queue->state); |
1558 | } | 1563 | } |
1559 | 1564 | ||
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 89341c32631a..03317c8d4077 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -215,7 +215,7 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb, | |||
215 | int ret; | 215 | int ret; |
216 | 216 | ||
217 | if (!cond || | 217 | if (!cond || |
218 | (ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1)) | 218 | ((ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN)) == 1)) |
219 | ret = okfn(skb); | 219 | ret = okfn(skb); |
220 | return ret; | 220 | return ret; |
221 | } | 221 | } |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 057bf22a8323..40150f345982 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -747,6 +747,16 @@ struct perf_event { | |||
747 | u64 tstamp_running; | 747 | u64 tstamp_running; |
748 | u64 tstamp_stopped; | 748 | u64 tstamp_stopped; |
749 | 749 | ||
750 | /* | ||
751 | * timestamp shadows the actual context timing but it can | ||
752 | * be safely used in NMI interrupt context. It reflects the | ||
753 | * context time as it was when the event was last scheduled in. | ||
754 | * | ||
755 | * ctx_time already accounts for ctx->timestamp. Therefore to | ||
756 | * compute ctx_time for a sample, simply add perf_clock(). | ||
757 | */ | ||
758 | u64 shadow_ctx_time; | ||
759 | |||
750 | struct perf_event_attr attr; | 760 | struct perf_event_attr attr; |
751 | struct hw_perf_event hw; | 761 | struct hw_perf_event hw; |
752 | 762 | ||
diff --git a/include/linux/printk.h b/include/linux/printk.h new file mode 100644 index 000000000000..b772ca5fbdf0 --- /dev/null +++ b/include/linux/printk.h | |||
@@ -0,0 +1,248 @@ | |||
1 | #ifndef __KERNEL_PRINTK__ | ||
2 | #define __KERNEL_PRINTK__ | ||
3 | |||
4 | extern const char linux_banner[]; | ||
5 | extern const char linux_proc_banner[]; | ||
6 | |||
7 | #define KERN_EMERG "<0>" /* system is unusable */ | ||
8 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | ||
9 | #define KERN_CRIT "<2>" /* critical conditions */ | ||
10 | #define KERN_ERR "<3>" /* error conditions */ | ||
11 | #define KERN_WARNING "<4>" /* warning conditions */ | ||
12 | #define KERN_NOTICE "<5>" /* normal but significant condition */ | ||
13 | #define KERN_INFO "<6>" /* informational */ | ||
14 | #define KERN_DEBUG "<7>" /* debug-level messages */ | ||
15 | |||
16 | /* Use the default kernel loglevel */ | ||
17 | #define KERN_DEFAULT "<d>" | ||
18 | /* | ||
19 | * Annotation for a "continued" line of log printout (only done after a | ||
20 | * line that had no enclosing \n). Only to be used by core/arch code | ||
21 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
22 | */ | ||
23 | #define KERN_CONT "<c>" | ||
24 | |||
25 | extern int console_printk[]; | ||
26 | |||
27 | #define console_loglevel (console_printk[0]) | ||
28 | #define default_message_loglevel (console_printk[1]) | ||
29 | #define minimum_console_loglevel (console_printk[2]) | ||
30 | #define default_console_loglevel (console_printk[3]) | ||
31 | |||
32 | struct va_format { | ||
33 | const char *fmt; | ||
34 | va_list *va; | ||
35 | }; | ||
36 | |||
37 | /* | ||
38 | * FW_BUG | ||
39 | * Add this to a message where you are sure the firmware is buggy or behaves | ||
40 | * really stupid or out of spec. Be aware that the responsible BIOS developer | ||
41 | * should be able to fix this issue or at least get a concrete idea of the | ||
42 | * problem by reading your message without the need of looking at the kernel | ||
43 | * code. | ||
44 | * | ||
45 | * Use it for definite and high priority BIOS bugs. | ||
46 | * | ||
47 | * FW_WARN | ||
48 | * Use it for not that clear (e.g. could the kernel messed up things already?) | ||
49 | * and medium priority BIOS bugs. | ||
50 | * | ||
51 | * FW_INFO | ||
52 | * Use this one if you want to tell the user or vendor about something | ||
53 | * suspicious, but generally harmless related to the firmware. | ||
54 | * | ||
55 | * Use it for information or very low priority BIOS bugs. | ||
56 | */ | ||
57 | #define FW_BUG "[Firmware Bug]: " | ||
58 | #define FW_WARN "[Firmware Warn]: " | ||
59 | #define FW_INFO "[Firmware Info]: " | ||
60 | |||
61 | /* | ||
62 | * HW_ERR | ||
63 | * Add this to a message for hardware errors, so that user can report | ||
64 | * it to hardware vendor instead of LKML or software vendor. | ||
65 | */ | ||
66 | #define HW_ERR "[Hardware Error]: " | ||
67 | |||
68 | #ifdef CONFIG_PRINTK | ||
69 | asmlinkage int vprintk(const char *fmt, va_list args) | ||
70 | __attribute__ ((format (printf, 1, 0))); | ||
71 | asmlinkage int printk(const char * fmt, ...) | ||
72 | __attribute__ ((format (printf, 1, 2))) __cold; | ||
73 | |||
74 | /* | ||
75 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
76 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
77 | * printk_ratelimited() or plain old __ratelimit(). | ||
78 | */ | ||
79 | extern int __printk_ratelimit(const char *func); | ||
80 | #define printk_ratelimit() __printk_ratelimit(__func__) | ||
81 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
82 | unsigned int interval_msec); | ||
83 | |||
84 | extern int printk_delay_msec; | ||
85 | extern int dmesg_restrict; | ||
86 | |||
87 | /* | ||
88 | * Print a one-time message (analogous to WARN_ONCE() et al): | ||
89 | */ | ||
90 | #define printk_once(x...) ({ \ | ||
91 | static bool __print_once; \ | ||
92 | \ | ||
93 | if (!__print_once) { \ | ||
94 | __print_once = true; \ | ||
95 | printk(x); \ | ||
96 | } \ | ||
97 | }) | ||
98 | |||
99 | void log_buf_kexec_setup(void); | ||
100 | #else | ||
101 | static inline int vprintk(const char *s, va_list args) | ||
102 | __attribute__ ((format (printf, 1, 0))); | ||
103 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
104 | static inline int printk(const char *s, ...) | ||
105 | __attribute__ ((format (printf, 1, 2))); | ||
106 | static inline int __cold printk(const char *s, ...) { return 0; } | ||
107 | static inline int printk_ratelimit(void) { return 0; } | ||
108 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
109 | unsigned int interval_msec) \ | ||
110 | { return false; } | ||
111 | |||
112 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
113 | #define printk_once(x...) printk(x) | ||
114 | |||
115 | static inline void log_buf_kexec_setup(void) | ||
116 | { | ||
117 | } | ||
118 | #endif | ||
119 | |||
120 | /* | ||
121 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
122 | * gcc's format and side-effect checking. | ||
123 | */ | ||
124 | static inline __attribute__ ((format (printf, 1, 2))) | ||
125 | int no_printk(const char *s, ...) { return 0; } | ||
126 | |||
127 | extern int printk_needs_cpu(int cpu); | ||
128 | extern void printk_tick(void); | ||
129 | |||
130 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | ||
131 | early_printk(const char *fmt, ...); | ||
132 | |||
133 | static inline void console_silent(void) | ||
134 | { | ||
135 | console_loglevel = 0; | ||
136 | } | ||
137 | |||
138 | static inline void console_verbose(void) | ||
139 | { | ||
140 | if (console_loglevel) | ||
141 | console_loglevel = 15; | ||
142 | } | ||
143 | |||
144 | extern void dump_stack(void) __cold; | ||
145 | |||
146 | enum { | ||
147 | DUMP_PREFIX_NONE, | ||
148 | DUMP_PREFIX_ADDRESS, | ||
149 | DUMP_PREFIX_OFFSET | ||
150 | }; | ||
151 | extern void hex_dump_to_buffer(const void *buf, size_t len, | ||
152 | int rowsize, int groupsize, | ||
153 | char *linebuf, size_t linebuflen, bool ascii); | ||
154 | extern void print_hex_dump(const char *level, const char *prefix_str, | ||
155 | int prefix_type, int rowsize, int groupsize, | ||
156 | const void *buf, size_t len, bool ascii); | ||
157 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
158 | const void *buf, size_t len); | ||
159 | |||
160 | #ifndef pr_fmt | ||
161 | #define pr_fmt(fmt) fmt | ||
162 | #endif | ||
163 | |||
164 | #define pr_emerg(fmt, ...) \ | ||
165 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
166 | #define pr_alert(fmt, ...) \ | ||
167 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
168 | #define pr_crit(fmt, ...) \ | ||
169 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
170 | #define pr_err(fmt, ...) \ | ||
171 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
172 | #define pr_warning(fmt, ...) \ | ||
173 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
174 | #define pr_warn pr_warning | ||
175 | #define pr_notice(fmt, ...) \ | ||
176 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
177 | #define pr_info(fmt, ...) \ | ||
178 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
179 | #define pr_cont(fmt, ...) \ | ||
180 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
181 | |||
182 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
183 | #ifdef DEBUG | ||
184 | #define pr_devel(fmt, ...) \ | ||
185 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
186 | #else | ||
187 | #define pr_devel(fmt, ...) \ | ||
188 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
189 | #endif | ||
190 | |||
191 | /* If you are writing a driver, please use dev_dbg instead */ | ||
192 | #if defined(DEBUG) | ||
193 | #define pr_debug(fmt, ...) \ | ||
194 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
195 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
196 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
197 | #define pr_debug(fmt, ...) \ | ||
198 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ||
199 | #else | ||
200 | #define pr_debug(fmt, ...) \ | ||
201 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
202 | #endif | ||
203 | |||
204 | /* | ||
205 | * ratelimited messages with local ratelimit_state, | ||
206 | * no local ratelimit_state used in the !PRINTK case | ||
207 | */ | ||
208 | #ifdef CONFIG_PRINTK | ||
209 | #define printk_ratelimited(fmt, ...) ({ \ | ||
210 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
211 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
212 | DEFAULT_RATELIMIT_BURST); \ | ||
213 | \ | ||
214 | if (__ratelimit(&_rs)) \ | ||
215 | printk(fmt, ##__VA_ARGS__); \ | ||
216 | }) | ||
217 | #else | ||
218 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
219 | #define printk_ratelimited printk | ||
220 | #endif | ||
221 | |||
222 | #define pr_emerg_ratelimited(fmt, ...) \ | ||
223 | printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
224 | #define pr_alert_ratelimited(fmt, ...) \ | ||
225 | printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
226 | #define pr_crit_ratelimited(fmt, ...) \ | ||
227 | printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
228 | #define pr_err_ratelimited(fmt, ...) \ | ||
229 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
230 | #define pr_warning_ratelimited(fmt, ...) \ | ||
231 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
232 | #define pr_warn_ratelimited pr_warning_ratelimited | ||
233 | #define pr_notice_ratelimited(fmt, ...) \ | ||
234 | printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
235 | #define pr_info_ratelimited(fmt, ...) \ | ||
236 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
237 | /* no pr_cont_ratelimited, don't do that... */ | ||
238 | /* If you are writing a driver, please use dev_dbg instead */ | ||
239 | #if defined(DEBUG) | ||
240 | #define pr_debug_ratelimited(fmt, ...) \ | ||
241 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
242 | #else | ||
243 | #define pr_debug_ratelimited(fmt, ...) \ | ||
244 | ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ | ||
245 | ##__VA_ARGS__); 0; }) | ||
246 | #endif | ||
247 | |||
248 | #endif | ||
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index 01b3d759f1fc..e031e1a486d9 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h | |||
@@ -8,6 +8,7 @@ struct platform_pwm_backlight_data { | |||
8 | int pwm_id; | 8 | int pwm_id; |
9 | unsigned int max_brightness; | 9 | unsigned int max_brightness; |
10 | unsigned int dft_brightness; | 10 | unsigned int dft_brightness; |
11 | unsigned int lth_brightness; | ||
11 | unsigned int pwm_period_ns; | 12 | unsigned int pwm_period_ns; |
12 | int (*init)(struct device *dev); | 13 | int (*init)(struct device *dev); |
13 | int (*notify)(struct device *dev, int brightness); | 14 | int (*notify)(struct device *dev, int brightness); |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index a39cbed9ee17..ab2baa5c4884 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -34,19 +34,13 @@ | |||
34 | * needed for RCU lookups (because root->height is unreliable). The only | 34 | * needed for RCU lookups (because root->height is unreliable). The only |
35 | * time callers need worry about this is when doing a lookup_slot under | 35 | * time callers need worry about this is when doing a lookup_slot under |
36 | * RCU. | 36 | * RCU. |
37 | * | ||
38 | * Indirect pointer in fact is also used to tag the last pointer of a node | ||
39 | * when it is shrunk, before we rcu free the node. See shrink code for | ||
40 | * details. | ||
37 | */ | 41 | */ |
38 | #define RADIX_TREE_INDIRECT_PTR 1 | 42 | #define RADIX_TREE_INDIRECT_PTR 1 |
39 | #define RADIX_TREE_RETRY ((void *)-1UL) | ||
40 | |||
41 | static inline void *radix_tree_ptr_to_indirect(void *ptr) | ||
42 | { | ||
43 | return (void *)((unsigned long)ptr | RADIX_TREE_INDIRECT_PTR); | ||
44 | } | ||
45 | 43 | ||
46 | static inline void *radix_tree_indirect_to_ptr(void *ptr) | ||
47 | { | ||
48 | return (void *)((unsigned long)ptr & ~RADIX_TREE_INDIRECT_PTR); | ||
49 | } | ||
50 | #define radix_tree_indirect_to_ptr(ptr) \ | 44 | #define radix_tree_indirect_to_ptr(ptr) \ |
51 | radix_tree_indirect_to_ptr((void __force *)(ptr)) | 45 | radix_tree_indirect_to_ptr((void __force *)(ptr)) |
52 | 46 | ||
@@ -140,16 +134,29 @@ do { \ | |||
140 | * removed. | 134 | * removed. |
141 | * | 135 | * |
142 | * For use with radix_tree_lookup_slot(). Caller must hold tree at least read | 136 | * For use with radix_tree_lookup_slot(). Caller must hold tree at least read |
143 | * locked across slot lookup and dereference. More likely, will be used with | 137 | * locked across slot lookup and dereference. Not required if write lock is |
144 | * radix_tree_replace_slot(), as well, so caller will hold tree write locked. | 138 | * held (ie. items cannot be concurrently inserted). |
139 | * | ||
140 | * radix_tree_deref_retry must be used to confirm validity of the pointer if | ||
141 | * only the read lock is held. | ||
145 | */ | 142 | */ |
146 | static inline void *radix_tree_deref_slot(void **pslot) | 143 | static inline void *radix_tree_deref_slot(void **pslot) |
147 | { | 144 | { |
148 | void *ret = rcu_dereference(*pslot); | 145 | return rcu_dereference(*pslot); |
149 | if (unlikely(radix_tree_is_indirect_ptr(ret))) | ||
150 | ret = RADIX_TREE_RETRY; | ||
151 | return ret; | ||
152 | } | 146 | } |
147 | |||
148 | /** | ||
149 | * radix_tree_deref_retry - check radix_tree_deref_slot | ||
150 | * @arg: pointer returned by radix_tree_deref_slot | ||
151 | * Returns: 0 if retry is not required, otherwise retry is required | ||
152 | * | ||
153 | * radix_tree_deref_retry must be used with radix_tree_deref_slot. | ||
154 | */ | ||
155 | static inline int radix_tree_deref_retry(void *arg) | ||
156 | { | ||
157 | return unlikely((unsigned long)arg & RADIX_TREE_INDIRECT_PTR); | ||
158 | } | ||
159 | |||
153 | /** | 160 | /** |
154 | * radix_tree_replace_slot - replace item in a slot | 161 | * radix_tree_replace_slot - replace item in a slot |
155 | * @pslot: pointer to slot, returned by radix_tree_lookup_slot | 162 | * @pslot: pointer to slot, returned by radix_tree_lookup_slot |
diff --git a/include/linux/resource.h b/include/linux/resource.h index 88d36f9145ba..d01c96c1966e 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_RESOURCE_H | 2 | #define _LINUX_RESOURCE_H |
3 | 3 | ||
4 | #include <linux/time.h> | 4 | #include <linux/time.h> |
5 | #include <linux/types.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * Resource control/accounting header file for linux | 8 | * Resource control/accounting header file for linux |
diff --git a/include/linux/security.h b/include/linux/security.h index b8246a8df7d2..fd4d55fb8845 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -77,7 +77,6 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
77 | extern int cap_task_setscheduler(struct task_struct *p); | 77 | extern int cap_task_setscheduler(struct task_struct *p); |
78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
79 | extern int cap_task_setnice(struct task_struct *p, int nice); | 79 | extern int cap_task_setnice(struct task_struct *p, int nice); |
80 | extern int cap_syslog(int type, bool from_file); | ||
81 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); | 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); |
82 | 81 | ||
83 | struct msghdr; | 82 | struct msghdr; |
@@ -1388,7 +1387,7 @@ struct security_operations { | |||
1388 | int (*sysctl) (struct ctl_table *table, int op); | 1387 | int (*sysctl) (struct ctl_table *table, int op); |
1389 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1388 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
1390 | int (*quota_on) (struct dentry *dentry); | 1389 | int (*quota_on) (struct dentry *dentry); |
1391 | int (*syslog) (int type, bool from_file); | 1390 | int (*syslog) (int type); |
1392 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1391 | int (*settime) (struct timespec *ts, struct timezone *tz); |
1393 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); | 1392 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
1394 | 1393 | ||
@@ -1671,7 +1670,7 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap); | |||
1671 | int security_sysctl(struct ctl_table *table, int op); | 1670 | int security_sysctl(struct ctl_table *table, int op); |
1672 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1671 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
1673 | int security_quota_on(struct dentry *dentry); | 1672 | int security_quota_on(struct dentry *dentry); |
1674 | int security_syslog(int type, bool from_file); | 1673 | int security_syslog(int type); |
1675 | int security_settime(struct timespec *ts, struct timezone *tz); | 1674 | int security_settime(struct timespec *ts, struct timezone *tz); |
1676 | int security_vm_enough_memory(long pages); | 1675 | int security_vm_enough_memory(long pages); |
1677 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1676 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
@@ -1901,9 +1900,9 @@ static inline int security_quota_on(struct dentry *dentry) | |||
1901 | return 0; | 1900 | return 0; |
1902 | } | 1901 | } |
1903 | 1902 | ||
1904 | static inline int security_syslog(int type, bool from_file) | 1903 | static inline int security_syslog(int type) |
1905 | { | 1904 | { |
1906 | return cap_syslog(type, from_file); | 1905 | return 0; |
1907 | } | 1906 | } |
1908 | 1907 | ||
1909 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 1908 | static inline int security_settime(struct timespec *ts, struct timezone *tz) |
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index 4dca992f3093..cea0c38e7a63 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
@@ -122,6 +122,10 @@ int clk_rate_table_find(struct clk *clk, | |||
122 | long clk_rate_div_range_round(struct clk *clk, unsigned int div_min, | 122 | long clk_rate_div_range_round(struct clk *clk, unsigned int div_min, |
123 | unsigned int div_max, unsigned long rate); | 123 | unsigned int div_max, unsigned long rate); |
124 | 124 | ||
125 | long clk_round_parent(struct clk *clk, unsigned long target, | ||
126 | unsigned long *best_freq, unsigned long *parent_freq, | ||
127 | unsigned int div_min, unsigned int div_max); | ||
128 | |||
125 | #define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ | 129 | #define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ |
126 | { \ | 130 | { \ |
127 | .parent = _parent, \ | 131 | .parent = _parent, \ |
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index f656d1a43dc0..5812fefbcedf 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -79,7 +79,7 @@ struct intc_hw_desc { | |||
79 | unsigned int nr_subgroups; | 79 | unsigned int nr_subgroups; |
80 | }; | 80 | }; |
81 | 81 | ||
82 | #define _INTC_ARRAY(a) a, a == NULL ? 0 : sizeof(a)/sizeof(*a) | 82 | #define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a) |
83 | 83 | ||
84 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ | 84 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ |
85 | prio_regs, sense_regs, ack_regs) \ | 85 | prio_regs, sense_regs, ack_regs) \ |
diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h index 864bd56bd3b0..4d9dcd138315 100644 --- a/include/linux/sh_timer.h +++ b/include/linux/sh_timer.h | |||
@@ -5,7 +5,6 @@ struct sh_timer_config { | |||
5 | char *name; | 5 | char *name; |
6 | long channel_offset; | 6 | long channel_offset; |
7 | int timer_bit; | 7 | int timer_bit; |
8 | char *clk; | ||
9 | unsigned long clockevent_rating; | 8 | unsigned long clockevent_rating; |
10 | unsigned long clocksource_rating; | 9 | unsigned long clocksource_rating; |
11 | }; | 10 | }; |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index bbdb680ffbe9..aea0d438e3c7 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -82,18 +82,28 @@ struct svc_xprt { | |||
82 | struct net *xpt_net; | 82 | struct net *xpt_net; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static inline void register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 85 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
86 | { | 86 | { |
87 | spin_lock(&xpt->xpt_lock); | 87 | spin_lock(&xpt->xpt_lock); |
88 | list_add(&u->list, &xpt->xpt_users); | 88 | list_del_init(&u->list); |
89 | spin_unlock(&xpt->xpt_lock); | 89 | spin_unlock(&xpt->xpt_lock); |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | 92 | static inline int register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) |
93 | { | 93 | { |
94 | spin_lock(&xpt->xpt_lock); | 94 | spin_lock(&xpt->xpt_lock); |
95 | list_del_init(&u->list); | 95 | if (test_bit(XPT_CLOSE, &xpt->xpt_flags)) { |
96 | /* | ||
97 | * The connection is about to be deleted soon (or, | ||
98 | * worse, may already be deleted--in which case we've | ||
99 | * already notified the xpt_users). | ||
100 | */ | ||
101 | spin_unlock(&xpt->xpt_lock); | ||
102 | return -ENOTCONN; | ||
103 | } | ||
104 | list_add(&u->list, &xpt->xpt_users); | ||
96 | spin_unlock(&xpt->xpt_lock); | 105 | spin_unlock(&xpt->xpt_lock); |
106 | return 0; | ||
97 | } | 107 | } |
98 | 108 | ||
99 | int svc_reg_xprt_class(struct svc_xprt_class *); | 109 | int svc_reg_xprt_class(struct svc_xprt_class *); |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 2a754748dd5f..c7ea9bc8897c 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -50,7 +50,7 @@ | |||
50 | #define N_V253 19 /* Codec control over voice modem */ | 50 | #define N_V253 19 /* Codec control over voice modem */ |
51 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ | 51 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ |
52 | #define N_GSM0710 21 /* GSM 0710 Mux */ | 52 | #define N_GSM0710 21 /* GSM 0710 Mux */ |
53 | #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ | 53 | #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 56 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 35fe6ab222bb..24300d8a1bc1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -797,7 +797,7 @@ struct usbdrv_wrap { | |||
797 | * @disconnect: Called when the interface is no longer accessible, usually | 797 | * @disconnect: Called when the interface is no longer accessible, usually |
798 | * because its device has been (or is being) disconnected or the | 798 | * because its device has been (or is being) disconnected or the |
799 | * driver module is being unloaded. | 799 | * driver module is being unloaded. |
800 | * @ioctl: Used for drivers that want to talk to userspace through | 800 | * @unlocked_ioctl: Used for drivers that want to talk to userspace through |
801 | * the "usbfs" filesystem. This lets devices provide ways to | 801 | * the "usbfs" filesystem. This lets devices provide ways to |
802 | * expose information to user space regardless of where they | 802 | * expose information to user space regardless of where they |
803 | * do (or don't) show up otherwise in the filesystem. | 803 | * do (or don't) show up otherwise in the filesystem. |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index ee2dd1d506ed..2387f9fc8138 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -89,6 +89,8 @@ struct musb_hdrc_config { | |||
89 | /* A GPIO controlling VRSEL in Blackfin */ | 89 | /* A GPIO controlling VRSEL in Blackfin */ |
90 | unsigned int gpio_vrsel; | 90 | unsigned int gpio_vrsel; |
91 | unsigned int gpio_vrsel_active; | 91 | unsigned int gpio_vrsel_active; |
92 | /* musb CLKIN in Blackfin in MHZ */ | ||
93 | unsigned char clkin; | ||
92 | #endif | 94 | #endif |
93 | 95 | ||
94 | }; | 96 | }; |
diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h index 6da573c75d54..8eff83b95366 100644 --- a/include/net/caif/caif_dev.h +++ b/include/net/caif/caif_dev.h | |||
@@ -28,7 +28,7 @@ struct caif_param { | |||
28 | * @sockaddr: Socket address to connect. | 28 | * @sockaddr: Socket address to connect. |
29 | * @priority: Priority of the connection. | 29 | * @priority: Priority of the connection. |
30 | * @link_selector: Link selector (high bandwidth or low latency) | 30 | * @link_selector: Link selector (high bandwidth or low latency) |
31 | * @link_name: Name of the CAIF Link Layer to use. | 31 | * @ifindex: kernel index of the interface. |
32 | * @param: Connect Request parameters (CAIF_SO_REQ_PARAM). | 32 | * @param: Connect Request parameters (CAIF_SO_REQ_PARAM). |
33 | * | 33 | * |
34 | * This struct is used when connecting a CAIF channel. | 34 | * This struct is used when connecting a CAIF channel. |
@@ -39,7 +39,7 @@ struct caif_connect_request { | |||
39 | struct sockaddr_caif sockaddr; | 39 | struct sockaddr_caif sockaddr; |
40 | enum caif_channel_priority priority; | 40 | enum caif_channel_priority priority; |
41 | enum caif_link_selector link_selector; | 41 | enum caif_link_selector link_selector; |
42 | char link_name[16]; | 42 | int ifindex; |
43 | struct caif_param param; | 43 | struct caif_param param; |
44 | }; | 44 | }; |
45 | 45 | ||
diff --git a/include/net/caif/caif_spi.h b/include/net/caif/caif_spi.h index ce4570dff020..87c3d11b8e55 100644 --- a/include/net/caif/caif_spi.h +++ b/include/net/caif/caif_spi.h | |||
@@ -121,6 +121,8 @@ struct cfspi { | |||
121 | wait_queue_head_t wait; | 121 | wait_queue_head_t wait; |
122 | spinlock_t lock; | 122 | spinlock_t lock; |
123 | bool flow_stop; | 123 | bool flow_stop; |
124 | bool slave; | ||
125 | bool slave_talked; | ||
124 | #ifdef CONFIG_DEBUG_FS | 126 | #ifdef CONFIG_DEBUG_FS |
125 | enum cfspi_state dbg_state; | 127 | enum cfspi_state dbg_state; |
126 | u16 pcmd; | 128 | u16 pcmd; |
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index bd646faffa47..f688478bfb84 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h | |||
@@ -139,10 +139,10 @@ struct dev_info *cfcnfg_get_phyid(struct cfcnfg *cnfg, | |||
139 | enum cfcnfg_phy_preference phy_pref); | 139 | enum cfcnfg_phy_preference phy_pref); |
140 | 140 | ||
141 | /** | 141 | /** |
142 | * cfcnfg_get_named() - Get the Physical Identifier of CAIF Link Layer | 142 | * cfcnfg_get_id_from_ifi() - Get the Physical Identifier of ifindex, |
143 | * it matches caif physical id with the kernel interface id. | ||
143 | * @cnfg: Configuration object | 144 | * @cnfg: Configuration object |
144 | * @name: Name of the Physical Layer (Caif Link Layer) | 145 | * @ifi: ifindex obtained from socket.c bindtodevice. |
145 | */ | 146 | */ |
146 | int cfcnfg_get_named(struct cfcnfg *cnfg, char *name); | 147 | int cfcnfg_get_id_from_ifi(struct cfcnfg *cnfg, int ifi); |
147 | |||
148 | #endif /* CFCNFG_H_ */ | 148 | #endif /* CFCNFG_H_ */ |
diff --git a/include/net/dn.h b/include/net/dn.h index e5469f7b67a3..a514a3cf4573 100644 --- a/include/net/dn.h +++ b/include/net/dn.h | |||
@@ -225,7 +225,7 @@ extern int decnet_di_count; | |||
225 | extern int decnet_dr_count; | 225 | extern int decnet_dr_count; |
226 | extern int decnet_no_fc_max_cwnd; | 226 | extern int decnet_no_fc_max_cwnd; |
227 | 227 | ||
228 | extern int sysctl_decnet_mem[3]; | 228 | extern long sysctl_decnet_mem[3]; |
229 | extern int sysctl_decnet_wmem[3]; | 229 | extern int sysctl_decnet_wmem[3]; |
230 | extern int sysctl_decnet_rmem[3]; | 230 | extern int sysctl_decnet_rmem[3]; |
231 | 231 | ||
diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 1fa5306e3e23..51665b3461b8 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _NET_DST_OPS_H | 2 | #define _NET_DST_OPS_H |
3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
4 | #include <linux/percpu_counter.h> | 4 | #include <linux/percpu_counter.h> |
5 | #include <linux/cache.h> | ||
5 | 6 | ||
6 | struct dst_entry; | 7 | struct dst_entry; |
7 | struct kmem_cachep; | 8 | struct kmem_cachep; |
diff --git a/include/net/netlink.h b/include/net/netlink.h index f3b201d335b3..9801c55de5d6 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, | |||
384 | * | 384 | * |
385 | * Returns the first attribute which matches the specified type. | 385 | * Returns the first attribute which matches the specified type. |
386 | */ | 386 | */ |
387 | static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh, | 387 | static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh, |
388 | int hdrlen, int attrtype) | 388 | int hdrlen, int attrtype) |
389 | { | 389 | { |
390 | return nla_find(nlmsg_attrdata(nlh, hdrlen), | 390 | return nla_find(nlmsg_attrdata(nlh, hdrlen), |
diff --git a/include/net/sock.h b/include/net/sock.h index c7a736228ca2..a6338d039857 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -762,7 +762,7 @@ struct proto { | |||
762 | 762 | ||
763 | /* Memory pressure */ | 763 | /* Memory pressure */ |
764 | void (*enter_memory_pressure)(struct sock *sk); | 764 | void (*enter_memory_pressure)(struct sock *sk); |
765 | atomic_t *memory_allocated; /* Current allocated memory. */ | 765 | atomic_long_t *memory_allocated; /* Current allocated memory. */ |
766 | struct percpu_counter *sockets_allocated; /* Current number of sockets. */ | 766 | struct percpu_counter *sockets_allocated; /* Current number of sockets. */ |
767 | /* | 767 | /* |
768 | * Pressure flag: try to collapse. | 768 | * Pressure flag: try to collapse. |
@@ -771,7 +771,7 @@ struct proto { | |||
771 | * is strict, actions are advisory and have some latency. | 771 | * is strict, actions are advisory and have some latency. |
772 | */ | 772 | */ |
773 | int *memory_pressure; | 773 | int *memory_pressure; |
774 | int *sysctl_mem; | 774 | long *sysctl_mem; |
775 | int *sysctl_wmem; | 775 | int *sysctl_wmem; |
776 | int *sysctl_rmem; | 776 | int *sysctl_rmem; |
777 | int max_header; | 777 | int max_header; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 4fee0424af7e..e36c874c7fb1 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -224,7 +224,7 @@ extern int sysctl_tcp_fack; | |||
224 | extern int sysctl_tcp_reordering; | 224 | extern int sysctl_tcp_reordering; |
225 | extern int sysctl_tcp_ecn; | 225 | extern int sysctl_tcp_ecn; |
226 | extern int sysctl_tcp_dsack; | 226 | extern int sysctl_tcp_dsack; |
227 | extern int sysctl_tcp_mem[3]; | 227 | extern long sysctl_tcp_mem[3]; |
228 | extern int sysctl_tcp_wmem[3]; | 228 | extern int sysctl_tcp_wmem[3]; |
229 | extern int sysctl_tcp_rmem[3]; | 229 | extern int sysctl_tcp_rmem[3]; |
230 | extern int sysctl_tcp_app_win; | 230 | extern int sysctl_tcp_app_win; |
@@ -247,7 +247,7 @@ extern int sysctl_tcp_cookie_size; | |||
247 | extern int sysctl_tcp_thin_linear_timeouts; | 247 | extern int sysctl_tcp_thin_linear_timeouts; |
248 | extern int sysctl_tcp_thin_dupack; | 248 | extern int sysctl_tcp_thin_dupack; |
249 | 249 | ||
250 | extern atomic_t tcp_memory_allocated; | 250 | extern atomic_long_t tcp_memory_allocated; |
251 | extern struct percpu_counter tcp_sockets_allocated; | 251 | extern struct percpu_counter tcp_sockets_allocated; |
252 | extern int tcp_memory_pressure; | 252 | extern int tcp_memory_pressure; |
253 | 253 | ||
@@ -280,7 +280,7 @@ static inline bool tcp_too_many_orphans(struct sock *sk, int shift) | |||
280 | } | 280 | } |
281 | 281 | ||
282 | if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | 282 | if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && |
283 | atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]) | 283 | atomic_long_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]) |
284 | return true; | 284 | return true; |
285 | return false; | 285 | return false; |
286 | } | 286 | } |
diff --git a/include/net/udp.h b/include/net/udp.h index 200b82848c9a..bb967dd59bf7 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -105,10 +105,10 @@ static inline struct udp_hslot *udp_hashslot2(struct udp_table *table, | |||
105 | 105 | ||
106 | extern struct proto udp_prot; | 106 | extern struct proto udp_prot; |
107 | 107 | ||
108 | extern atomic_t udp_memory_allocated; | 108 | extern atomic_long_t udp_memory_allocated; |
109 | 109 | ||
110 | /* sysctl variables for udp */ | 110 | /* sysctl variables for udp */ |
111 | extern int sysctl_udp_mem[3]; | 111 | extern long sysctl_udp_mem[3]; |
112 | extern int sysctl_udp_rmem_min; | 112 | extern int sysctl_udp_rmem_min; |
113 | extern int sysctl_udp_wmem_min; | 113 | extern int sysctl_udp_wmem_min; |
114 | 114 | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 289010d3270b..e5e345fb2a5c 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -98,6 +98,103 @@ TRACE_EVENT(ext4_allocate_inode, | |||
98 | (unsigned long) __entry->dir, __entry->mode) | 98 | (unsigned long) __entry->dir, __entry->mode) |
99 | ); | 99 | ); |
100 | 100 | ||
101 | TRACE_EVENT(ext4_evict_inode, | ||
102 | TP_PROTO(struct inode *inode), | ||
103 | |||
104 | TP_ARGS(inode), | ||
105 | |||
106 | TP_STRUCT__entry( | ||
107 | __field( int, dev_major ) | ||
108 | __field( int, dev_minor ) | ||
109 | __field( ino_t, ino ) | ||
110 | __field( int, nlink ) | ||
111 | ), | ||
112 | |||
113 | TP_fast_assign( | ||
114 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | ||
115 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
116 | __entry->ino = inode->i_ino; | ||
117 | __entry->nlink = inode->i_nlink; | ||
118 | ), | ||
119 | |||
120 | TP_printk("dev %d,%d ino %lu nlink %d", | ||
121 | __entry->dev_major, __entry->dev_minor, | ||
122 | (unsigned long) __entry->ino, __entry->nlink) | ||
123 | ); | ||
124 | |||
125 | TRACE_EVENT(ext4_drop_inode, | ||
126 | TP_PROTO(struct inode *inode, int drop), | ||
127 | |||
128 | TP_ARGS(inode, drop), | ||
129 | |||
130 | TP_STRUCT__entry( | ||
131 | __field( int, dev_major ) | ||
132 | __field( int, dev_minor ) | ||
133 | __field( ino_t, ino ) | ||
134 | __field( int, drop ) | ||
135 | ), | ||
136 | |||
137 | TP_fast_assign( | ||
138 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | ||
139 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
140 | __entry->ino = inode->i_ino; | ||
141 | __entry->drop = drop; | ||
142 | ), | ||
143 | |||
144 | TP_printk("dev %d,%d ino %lu drop %d", | ||
145 | __entry->dev_major, __entry->dev_minor, | ||
146 | (unsigned long) __entry->ino, __entry->drop) | ||
147 | ); | ||
148 | |||
149 | TRACE_EVENT(ext4_mark_inode_dirty, | ||
150 | TP_PROTO(struct inode *inode, unsigned long IP), | ||
151 | |||
152 | TP_ARGS(inode, IP), | ||
153 | |||
154 | TP_STRUCT__entry( | ||
155 | __field( int, dev_major ) | ||
156 | __field( int, dev_minor ) | ||
157 | __field( ino_t, ino ) | ||
158 | __field(unsigned long, ip ) | ||
159 | ), | ||
160 | |||
161 | TP_fast_assign( | ||
162 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | ||
163 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
164 | __entry->ino = inode->i_ino; | ||
165 | __entry->ip = IP; | ||
166 | ), | ||
167 | |||
168 | TP_printk("dev %d,%d ino %lu caller %pF", | ||
169 | __entry->dev_major, __entry->dev_minor, | ||
170 | (unsigned long) __entry->ino, (void *)__entry->ip) | ||
171 | ); | ||
172 | |||
173 | TRACE_EVENT(ext4_begin_ordered_truncate, | ||
174 | TP_PROTO(struct inode *inode, loff_t new_size), | ||
175 | |||
176 | TP_ARGS(inode, new_size), | ||
177 | |||
178 | TP_STRUCT__entry( | ||
179 | __field( int, dev_major ) | ||
180 | __field( int, dev_minor ) | ||
181 | __field( ino_t, ino ) | ||
182 | __field( loff_t, new_size ) | ||
183 | ), | ||
184 | |||
185 | TP_fast_assign( | ||
186 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | ||
187 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
188 | __entry->ino = inode->i_ino; | ||
189 | __entry->new_size = new_size; | ||
190 | ), | ||
191 | |||
192 | TP_printk("dev %d,%d ino %lu new_size %lld", | ||
193 | __entry->dev_major, __entry->dev_minor, | ||
194 | (unsigned long) __entry->ino, | ||
195 | (long long) __entry->new_size) | ||
196 | ); | ||
197 | |||
101 | DECLARE_EVENT_CLASS(ext4__write_begin, | 198 | DECLARE_EVENT_CLASS(ext4__write_begin, |
102 | 199 | ||
103 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | 200 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |