diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bio.h | 33 | ||||
-rw-r--r-- | include/linux/blkdev.h | 16 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 32 | ||||
-rw-r--r-- | include/linux/clocksource.h | 14 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 2 | ||||
-rw-r--r-- | include/linux/hrtimer.h | 10 | ||||
-rw-r--r-- | include/linux/i2c-id.h | 2 | ||||
-rw-r--r-- | include/linux/interrupt.h | 21 | ||||
-rw-r--r-- | include/linux/jbd2.h | 9 | ||||
-rw-r--r-- | include/linux/kernel.h | 1 | ||||
-rw-r--r-- | include/linux/kernel_stat.h | 1 | ||||
-rw-r--r-- | include/linux/posix-timers.h | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 84 | ||||
-rw-r--r-- | include/linux/smp.h | 4 | ||||
-rw-r--r-- | include/linux/time.h | 5 | ||||
-rw-r--r-- | include/linux/timex.h | 11 | ||||
-rw-r--r-- | include/linux/usb.h | 7 | ||||
-rw-r--r-- | include/linux/usb/Kbuild | 3 | ||||
-rw-r--r-- | include/linux/usb/cdc.h | 9 | ||||
-rw-r--r-- | include/linux/usb/composite.h | 11 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 2 | ||||
-rw-r--r-- | include/linux/usb/tmc.h | 43 | ||||
-rw-r--r-- | include/linux/usb/vstusb.h | 71 | ||||
-rw-r--r-- | include/linux/writeback.h | 10 |
24 files changed, 356 insertions, 49 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index ff5b4cf9e2da..1c91a176b9ae 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -79,6 +79,13 @@ struct bio { | |||
79 | 79 | ||
80 | unsigned int bi_size; /* residual I/O count */ | 80 | unsigned int bi_size; /* residual I/O count */ |
81 | 81 | ||
82 | /* | ||
83 | * To keep track of the max segment size, we account for the | ||
84 | * sizes of the first and last mergeable segments in this bio. | ||
85 | */ | ||
86 | unsigned int bi_seg_front_size; | ||
87 | unsigned int bi_seg_back_size; | ||
88 | |||
82 | unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ | 89 | unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ |
83 | 90 | ||
84 | unsigned int bi_comp_cpu; /* completion CPU */ | 91 | unsigned int bi_comp_cpu; /* completion CPU */ |
@@ -129,25 +136,30 @@ struct bio { | |||
129 | * bit 2 -- barrier | 136 | * bit 2 -- barrier |
130 | * Insert a serialization point in the IO queue, forcing previously | 137 | * Insert a serialization point in the IO queue, forcing previously |
131 | * submitted IO to be completed before this oen is issued. | 138 | * submitted IO to be completed before this oen is issued. |
132 | * bit 3 -- fail fast, don't want low level driver retries | 139 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately |
133 | * bit 4 -- synchronous I/O hint: the block layer will unplug immediately | ||
134 | * Note that this does NOT indicate that the IO itself is sync, just | 140 | * Note that this does NOT indicate that the IO itself is sync, just |
135 | * that the block layer will not postpone issue of this IO by plugging. | 141 | * that the block layer will not postpone issue of this IO by plugging. |
136 | * bit 5 -- metadata request | 142 | * bit 4 -- metadata request |
137 | * Used for tracing to differentiate metadata and data IO. May also | 143 | * Used for tracing to differentiate metadata and data IO. May also |
138 | * get some preferential treatment in the IO scheduler | 144 | * get some preferential treatment in the IO scheduler |
139 | * bit 6 -- discard sectors | 145 | * bit 5 -- discard sectors |
140 | * Informs the lower level device that this range of sectors is no longer | 146 | * Informs the lower level device that this range of sectors is no longer |
141 | * used by the file system and may thus be freed by the device. Used | 147 | * used by the file system and may thus be freed by the device. Used |
142 | * for flash based storage. | 148 | * for flash based storage. |
149 | * bit 6 -- fail fast device errors | ||
150 | * bit 7 -- fail fast transport errors | ||
151 | * bit 8 -- fail fast driver errors | ||
152 | * Don't want driver retries for any fast fail whatever the reason. | ||
143 | */ | 153 | */ |
144 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ | 154 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ |
145 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ | 155 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ |
146 | #define BIO_RW_BARRIER 2 | 156 | #define BIO_RW_BARRIER 2 |
147 | #define BIO_RW_FAILFAST 3 | 157 | #define BIO_RW_SYNC 3 |
148 | #define BIO_RW_SYNC 4 | 158 | #define BIO_RW_META 4 |
149 | #define BIO_RW_META 5 | 159 | #define BIO_RW_DISCARD 5 |
150 | #define BIO_RW_DISCARD 6 | 160 | #define BIO_RW_FAILFAST_DEV 6 |
161 | #define BIO_RW_FAILFAST_TRANSPORT 7 | ||
162 | #define BIO_RW_FAILFAST_DRIVER 8 | ||
151 | 163 | ||
152 | /* | 164 | /* |
153 | * upper 16 bits of bi_rw define the io priority of this bio | 165 | * upper 16 bits of bi_rw define the io priority of this bio |
@@ -174,7 +186,10 @@ struct bio { | |||
174 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 186 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
175 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) | 187 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) |
176 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) | 188 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) |
177 | #define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) | 189 | #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV)) |
190 | #define bio_failfast_transport(bio) \ | ||
191 | ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT)) | ||
192 | #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER)) | ||
178 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) | 193 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) |
179 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) | 194 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) |
180 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) | 195 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a92d9e4ea96e..b4fe68fe3a57 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -87,7 +87,9 @@ enum { | |||
87 | */ | 87 | */ |
88 | enum rq_flag_bits { | 88 | enum rq_flag_bits { |
89 | __REQ_RW, /* not set, read. set, write */ | 89 | __REQ_RW, /* not set, read. set, write */ |
90 | __REQ_FAILFAST, /* no low level driver retries */ | 90 | __REQ_FAILFAST_DEV, /* no driver retries of device errors */ |
91 | __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */ | ||
92 | __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */ | ||
91 | __REQ_DISCARD, /* request to discard sectors */ | 93 | __REQ_DISCARD, /* request to discard sectors */ |
92 | __REQ_SORTED, /* elevator knows about this request */ | 94 | __REQ_SORTED, /* elevator knows about this request */ |
93 | __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ | 95 | __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ |
@@ -111,8 +113,10 @@ enum rq_flag_bits { | |||
111 | }; | 113 | }; |
112 | 114 | ||
113 | #define REQ_RW (1 << __REQ_RW) | 115 | #define REQ_RW (1 << __REQ_RW) |
116 | #define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV) | ||
117 | #define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT) | ||
118 | #define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER) | ||
114 | #define REQ_DISCARD (1 << __REQ_DISCARD) | 119 | #define REQ_DISCARD (1 << __REQ_DISCARD) |
115 | #define REQ_FAILFAST (1 << __REQ_FAILFAST) | ||
116 | #define REQ_SORTED (1 << __REQ_SORTED) | 120 | #define REQ_SORTED (1 << __REQ_SORTED) |
117 | #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) | 121 | #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) |
118 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) | 122 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) |
@@ -560,7 +564,12 @@ enum { | |||
560 | #define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL) | 564 | #define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL) |
561 | #define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE) | 565 | #define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE) |
562 | 566 | ||
563 | #define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST) | 567 | #define blk_failfast_dev(rq) ((rq)->cmd_flags & REQ_FAILFAST_DEV) |
568 | #define blk_failfast_transport(rq) ((rq)->cmd_flags & REQ_FAILFAST_TRANSPORT) | ||
569 | #define blk_failfast_driver(rq) ((rq)->cmd_flags & REQ_FAILFAST_DRIVER) | ||
570 | #define blk_noretry_request(rq) (blk_failfast_dev(rq) || \ | ||
571 | blk_failfast_transport(rq) || \ | ||
572 | blk_failfast_driver(rq)) | ||
564 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 573 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
565 | 574 | ||
566 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) | 575 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |
@@ -856,7 +865,6 @@ extern void blk_ordered_complete_seq(struct request_queue *, unsigned, int); | |||
856 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); | 865 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
857 | extern void blk_dump_rq_flags(struct request *, char *); | 866 | extern void blk_dump_rq_flags(struct request *, char *); |
858 | extern void generic_unplug_device(struct request_queue *); | 867 | extern void generic_unplug_device(struct request_queue *); |
859 | extern void __generic_unplug_device(struct request_queue *); | ||
860 | extern long nr_blockdev_pages(void); | 868 | extern long nr_blockdev_pages(void); |
861 | 869 | ||
862 | int blk_get_queue(struct request_queue *); | 870 | int blk_get_queue(struct request_queue *); |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 3a31eb506164..bdf505d33e77 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -24,6 +24,7 @@ enum blktrace_cat { | |||
24 | BLK_TC_AHEAD = 1 << 11, /* readahead */ | 24 | BLK_TC_AHEAD = 1 << 11, /* readahead */ |
25 | BLK_TC_META = 1 << 12, /* metadata */ | 25 | BLK_TC_META = 1 << 12, /* metadata */ |
26 | BLK_TC_DISCARD = 1 << 13, /* discard requests */ | 26 | BLK_TC_DISCARD = 1 << 13, /* discard requests */ |
27 | BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */ | ||
27 | 28 | ||
28 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ | 29 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ |
29 | }; | 30 | }; |
@@ -51,6 +52,7 @@ enum blktrace_act { | |||
51 | __BLK_TA_BOUNCE, /* bio was bounced */ | 52 | __BLK_TA_BOUNCE, /* bio was bounced */ |
52 | __BLK_TA_REMAP, /* bio was remapped */ | 53 | __BLK_TA_REMAP, /* bio was remapped */ |
53 | __BLK_TA_ABORT, /* request aborted */ | 54 | __BLK_TA_ABORT, /* request aborted */ |
55 | __BLK_TA_DRV_DATA, /* driver-specific binary data */ | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | /* | 58 | /* |
@@ -82,6 +84,7 @@ enum blktrace_notify { | |||
82 | #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) | 84 | #define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) |
83 | #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) | 85 | #define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) |
84 | #define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE)) | 86 | #define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE)) |
87 | #define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA)) | ||
85 | 88 | ||
86 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) | 89 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) |
87 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) | 90 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) |
@@ -317,6 +320,34 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio, | |||
317 | __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); | 320 | __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); |
318 | } | 321 | } |
319 | 322 | ||
323 | /** | ||
324 | * blk_add_driver_data - Add binary message with driver-specific data | ||
325 | * @q: queue the io is for | ||
326 | * @rq: io request | ||
327 | * @data: driver-specific data | ||
328 | * @len: length of driver-specific data | ||
329 | * | ||
330 | * Description: | ||
331 | * Some drivers might want to write driver-specific data per request. | ||
332 | * | ||
333 | **/ | ||
334 | static inline void blk_add_driver_data(struct request_queue *q, | ||
335 | struct request *rq, | ||
336 | void *data, size_t len) | ||
337 | { | ||
338 | struct blk_trace *bt = q->blk_trace; | ||
339 | |||
340 | if (likely(!bt)) | ||
341 | return; | ||
342 | |||
343 | if (blk_pc_request(rq)) | ||
344 | __blk_add_trace(bt, 0, rq->data_len, 0, BLK_TA_DRV_DATA, | ||
345 | rq->errors, len, data); | ||
346 | else | ||
347 | __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, | ||
348 | 0, BLK_TA_DRV_DATA, rq->errors, len, data); | ||
349 | } | ||
350 | |||
320 | extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | 351 | extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, |
321 | char __user *arg); | 352 | char __user *arg); |
322 | extern int blk_trace_startstop(struct request_queue *q, int start); | 353 | extern int blk_trace_startstop(struct request_queue *q, int start); |
@@ -330,6 +361,7 @@ extern int blk_trace_remove(struct request_queue *q); | |||
330 | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) | 361 | #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) |
331 | #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) | 362 | #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) |
332 | #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) | 363 | #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) |
364 | #define blk_add_driver_data(q, rq, data, len) do {} while (0) | ||
333 | #define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY) | 365 | #define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY) |
334 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) | 366 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) |
335 | #define blk_trace_startstop(q, start) (-ENOTTY) | 367 | #define blk_trace_startstop(q, start) (-ENOTTY) |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 55e434feec99..f88d32f8ff7c 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -45,7 +45,8 @@ struct clocksource; | |||
45 | * @read: returns a cycle value | 45 | * @read: returns a cycle value |
46 | * @mask: bitmask for two's complement | 46 | * @mask: bitmask for two's complement |
47 | * subtraction of non 64 bit counters | 47 | * subtraction of non 64 bit counters |
48 | * @mult: cycle to nanosecond multiplier | 48 | * @mult: cycle to nanosecond multiplier (adjusted by NTP) |
49 | * @mult_orig: cycle to nanosecond multiplier (unadjusted by NTP) | ||
49 | * @shift: cycle to nanosecond divisor (power of two) | 50 | * @shift: cycle to nanosecond divisor (power of two) |
50 | * @flags: flags describing special properties | 51 | * @flags: flags describing special properties |
51 | * @vread: vsyscall based read | 52 | * @vread: vsyscall based read |
@@ -63,6 +64,7 @@ struct clocksource { | |||
63 | cycle_t (*read)(void); | 64 | cycle_t (*read)(void); |
64 | cycle_t mask; | 65 | cycle_t mask; |
65 | u32 mult; | 66 | u32 mult; |
67 | u32 mult_orig; | ||
66 | u32 shift; | 68 | u32 shift; |
67 | unsigned long flags; | 69 | unsigned long flags; |
68 | cycle_t (*vread)(void); | 70 | cycle_t (*vread)(void); |
@@ -77,6 +79,7 @@ struct clocksource { | |||
77 | /* timekeeping specific data, ignore */ | 79 | /* timekeeping specific data, ignore */ |
78 | cycle_t cycle_interval; | 80 | cycle_t cycle_interval; |
79 | u64 xtime_interval; | 81 | u64 xtime_interval; |
82 | u32 raw_interval; | ||
80 | /* | 83 | /* |
81 | * Second part is written at each timer interrupt | 84 | * Second part is written at each timer interrupt |
82 | * Keep it in a different cache line to dirty no | 85 | * Keep it in a different cache line to dirty no |
@@ -85,6 +88,7 @@ struct clocksource { | |||
85 | cycle_t cycle_last ____cacheline_aligned_in_smp; | 88 | cycle_t cycle_last ____cacheline_aligned_in_smp; |
86 | u64 xtime_nsec; | 89 | u64 xtime_nsec; |
87 | s64 error; | 90 | s64 error; |
91 | struct timespec raw_time; | ||
88 | 92 | ||
89 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 93 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
90 | /* Watchdog related data, used by the framework */ | 94 | /* Watchdog related data, used by the framework */ |
@@ -201,17 +205,19 @@ static inline void clocksource_calculate_interval(struct clocksource *c, | |||
201 | { | 205 | { |
202 | u64 tmp; | 206 | u64 tmp; |
203 | 207 | ||
204 | /* XXX - All of this could use a whole lot of optimization */ | 208 | /* Do the ns -> cycle conversion first, using original mult */ |
205 | tmp = length_nsec; | 209 | tmp = length_nsec; |
206 | tmp <<= c->shift; | 210 | tmp <<= c->shift; |
207 | tmp += c->mult/2; | 211 | tmp += c->mult_orig/2; |
208 | do_div(tmp, c->mult); | 212 | do_div(tmp, c->mult_orig); |
209 | 213 | ||
210 | c->cycle_interval = (cycle_t)tmp; | 214 | c->cycle_interval = (cycle_t)tmp; |
211 | if (c->cycle_interval == 0) | 215 | if (c->cycle_interval == 0) |
212 | c->cycle_interval = 1; | 216 | c->cycle_interval = 1; |
213 | 217 | ||
218 | /* Go back from cycles -> shifted ns, this time use ntp adjused mult */ | ||
214 | c->xtime_interval = (u64)c->cycle_interval * c->mult; | 219 | c->xtime_interval = (u64)c->cycle_interval * c->mult; |
220 | c->raw_interval = ((u64)c->cycle_interval * c->mult_orig) >> c->shift; | ||
215 | } | 221 | } |
216 | 222 | ||
217 | 223 | ||
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 6e4ace270276..79a8ed8e6a7d 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -166,6 +166,7 @@ typedef enum fe_modulation { | |||
166 | VSB_16, | 166 | VSB_16, |
167 | PSK_8, | 167 | PSK_8, |
168 | APSK_16, | 168 | APSK_16, |
169 | APSK_32, | ||
169 | DQPSK, | 170 | DQPSK, |
170 | } fe_modulation_t; | 171 | } fe_modulation_t; |
171 | 172 | ||
@@ -295,6 +296,7 @@ typedef enum fe_delivery_system { | |||
295 | SYS_DVBC_ANNEX_AC, | 296 | SYS_DVBC_ANNEX_AC, |
296 | SYS_DVBC_ANNEX_B, | 297 | SYS_DVBC_ANNEX_B, |
297 | SYS_DVBT, | 298 | SYS_DVBT, |
299 | SYS_DSS, | ||
298 | SYS_DVBS, | 300 | SYS_DVBS, |
299 | SYS_DVBS2, | 301 | SYS_DVBS2, |
300 | SYS_DVBH, | 302 | SYS_DVBH, |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 2f245fe63bda..9a4e35cd5f79 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -125,12 +125,12 @@ struct hrtimer { | |||
125 | enum hrtimer_restart (*function)(struct hrtimer *); | 125 | enum hrtimer_restart (*function)(struct hrtimer *); |
126 | struct hrtimer_clock_base *base; | 126 | struct hrtimer_clock_base *base; |
127 | unsigned long state; | 127 | unsigned long state; |
128 | enum hrtimer_cb_mode cb_mode; | ||
129 | struct list_head cb_entry; | 128 | struct list_head cb_entry; |
129 | enum hrtimer_cb_mode cb_mode; | ||
130 | #ifdef CONFIG_TIMER_STATS | 130 | #ifdef CONFIG_TIMER_STATS |
131 | int start_pid; | ||
131 | void *start_site; | 132 | void *start_site; |
132 | char start_comm[16]; | 133 | char start_comm[16]; |
133 | int start_pid; | ||
134 | #endif | 134 | #endif |
135 | }; | 135 | }; |
136 | 136 | ||
@@ -155,10 +155,8 @@ struct hrtimer_sleeper { | |||
155 | * @first: pointer to the timer node which expires first | 155 | * @first: pointer to the timer node which expires first |
156 | * @resolution: the resolution of the clock, in nanoseconds | 156 | * @resolution: the resolution of the clock, in nanoseconds |
157 | * @get_time: function to retrieve the current time of the clock | 157 | * @get_time: function to retrieve the current time of the clock |
158 | * @get_softirq_time: function to retrieve the current time from the softirq | ||
159 | * @softirq_time: the time when running the hrtimer queue in the softirq | 158 | * @softirq_time: the time when running the hrtimer queue in the softirq |
160 | * @offset: offset of this clock to the monotonic base | 159 | * @offset: offset of this clock to the monotonic base |
161 | * @reprogram: function to reprogram the timer event | ||
162 | */ | 160 | */ |
163 | struct hrtimer_clock_base { | 161 | struct hrtimer_clock_base { |
164 | struct hrtimer_cpu_base *cpu_base; | 162 | struct hrtimer_cpu_base *cpu_base; |
@@ -167,13 +165,9 @@ struct hrtimer_clock_base { | |||
167 | struct rb_node *first; | 165 | struct rb_node *first; |
168 | ktime_t resolution; | 166 | ktime_t resolution; |
169 | ktime_t (*get_time)(void); | 167 | ktime_t (*get_time)(void); |
170 | ktime_t (*get_softirq_time)(void); | ||
171 | ktime_t softirq_time; | 168 | ktime_t softirq_time; |
172 | #ifdef CONFIG_HIGH_RES_TIMERS | 169 | #ifdef CONFIG_HIGH_RES_TIMERS |
173 | ktime_t offset; | 170 | ktime_t offset; |
174 | int (*reprogram)(struct hrtimer *t, | ||
175 | struct hrtimer_clock_base *b, | ||
176 | ktime_t n); | ||
177 | #endif | 171 | #endif |
178 | }; | 172 | }; |
179 | 173 | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 493435bcdbe5..01d67ba9e985 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -60,7 +60,7 @@ | |||
60 | #define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ | 60 | #define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ |
61 | #define I2C_DRIVERID_CS53L32A 70 /* cs53l32a audio processor */ | 61 | #define I2C_DRIVERID_CS53L32A 70 /* cs53l32a audio processor */ |
62 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ | 62 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ |
63 | #define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ | 63 | #define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */ |
64 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ | 64 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ |
65 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ | 65 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ |
66 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ | 66 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 54b3623434ec..35a61dc60d51 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
14 | #include <linux/smp.h> | ||
15 | #include <linux/percpu.h> | ||
14 | #include <asm/atomic.h> | 16 | #include <asm/atomic.h> |
15 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
16 | #include <asm/system.h> | 18 | #include <asm/system.h> |
@@ -273,6 +275,25 @@ extern void softirq_init(void); | |||
273 | extern void raise_softirq_irqoff(unsigned int nr); | 275 | extern void raise_softirq_irqoff(unsigned int nr); |
274 | extern void raise_softirq(unsigned int nr); | 276 | extern void raise_softirq(unsigned int nr); |
275 | 277 | ||
278 | /* This is the worklist that queues up per-cpu softirq work. | ||
279 | * | ||
280 | * send_remote_sendirq() adds work to these lists, and | ||
281 | * the softirq handler itself dequeues from them. The queues | ||
282 | * are protected by disabling local cpu interrupts and they must | ||
283 | * only be accessed by the local cpu that they are for. | ||
284 | */ | ||
285 | DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list); | ||
286 | |||
287 | /* Try to send a softirq to a remote cpu. If this cannot be done, the | ||
288 | * work will be queued to the local cpu. | ||
289 | */ | ||
290 | extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq); | ||
291 | |||
292 | /* Like send_remote_softirq(), but the caller must disable local cpu interrupts | ||
293 | * and compute the current cpu, passed in as 'this_cpu'. | ||
294 | */ | ||
295 | extern void __send_remote_softirq(struct call_single_data *cp, int cpu, | ||
296 | int this_cpu, int softirq); | ||
276 | 297 | ||
277 | /* Tasklets --- multithreaded analogue of BHs. | 298 | /* Tasklets --- multithreaded analogue of BHs. |
278 | 299 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 463d6f10b64f..c7d106ef22e2 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -641,6 +641,11 @@ struct transaction_s | |||
641 | */ | 641 | */ |
642 | int t_handle_count; | 642 | int t_handle_count; |
643 | 643 | ||
644 | /* | ||
645 | * For use by the filesystem to store fs-specific data | ||
646 | * structures associated with the transaction | ||
647 | */ | ||
648 | struct list_head t_private_list; | ||
644 | }; | 649 | }; |
645 | 650 | ||
646 | struct transaction_run_stats_s { | 651 | struct transaction_run_stats_s { |
@@ -935,6 +940,10 @@ struct journal_s | |||
935 | 940 | ||
936 | pid_t j_last_sync_writer; | 941 | pid_t j_last_sync_writer; |
937 | 942 | ||
943 | /* This function is called when a transaction is closed */ | ||
944 | void (*j_commit_callback)(journal_t *, | ||
945 | transaction_t *); | ||
946 | |||
938 | /* | 947 | /* |
939 | * Journal statistics | 948 | * Journal statistics |
940 | */ | 949 | */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 6803318fa2ea..5a566b705ca9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -265,6 +265,7 @@ extern enum system_states { | |||
265 | #define TAINT_DIE 7 | 265 | #define TAINT_DIE 7 |
266 | #define TAINT_OVERRIDDEN_ACPI_TABLE 8 | 266 | #define TAINT_OVERRIDDEN_ACPI_TABLE 8 |
267 | #define TAINT_WARN 9 | 267 | #define TAINT_WARN 9 |
268 | #define TAINT_CRAP 10 | ||
268 | 269 | ||
269 | extern void dump_stack(void) __cold; | 270 | extern void dump_stack(void) __cold; |
270 | 271 | ||
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index cf9f40a91c9c..cac3750cd65e 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -52,6 +52,7 @@ static inline int kstat_irqs(int irq) | |||
52 | return sum; | 52 | return sum; |
53 | } | 53 | } |
54 | 54 | ||
55 | extern unsigned long long task_delta_exec(struct task_struct *); | ||
55 | extern void account_user_time(struct task_struct *, cputime_t); | 56 | extern void account_user_time(struct task_struct *, cputime_t); |
56 | extern void account_user_time_scaled(struct task_struct *, cputime_t); | 57 | extern void account_user_time_scaled(struct task_struct *, cputime_t); |
57 | extern void account_system_time(struct task_struct *, int, cputime_t); | 58 | extern void account_system_time(struct task_struct *, int, cputime_t); |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index a7dd38f30ade..a7c721355549 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -45,8 +45,6 @@ struct k_itimer { | |||
45 | int it_requeue_pending; /* waiting to requeue this timer */ | 45 | int it_requeue_pending; /* waiting to requeue this timer */ |
46 | #define REQUEUE_PENDING 1 | 46 | #define REQUEUE_PENDING 1 |
47 | int it_sigev_notify; /* notify word of sigevent struct */ | 47 | int it_sigev_notify; /* notify word of sigevent struct */ |
48 | int it_sigev_signo; /* signo word of sigevent struct */ | ||
49 | sigval_t it_sigev_value; /* value word of sigevent struct */ | ||
50 | struct task_struct *it_process; /* process to send signal to */ | 48 | struct task_struct *it_process; /* process to send signal to */ |
51 | struct sigqueue *sigq; /* signal queue entry. */ | 49 | struct sigqueue *sigq; /* signal queue entry. */ |
52 | union { | 50 | union { |
@@ -115,4 +113,6 @@ void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx, | |||
115 | 113 | ||
116 | long clock_nanosleep_restart(struct restart_block *restart_block); | 114 | long clock_nanosleep_restart(struct restart_block *restart_block); |
117 | 115 | ||
116 | void update_rlimit_cpu(unsigned long rlim_new); | ||
117 | |||
118 | #endif | 118 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index c226c7b82946..81c68fef4431 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -425,6 +425,39 @@ struct pacct_struct { | |||
425 | unsigned long ac_minflt, ac_majflt; | 425 | unsigned long ac_minflt, ac_majflt; |
426 | }; | 426 | }; |
427 | 427 | ||
428 | /** | ||
429 | * struct task_cputime - collected CPU time counts | ||
430 | * @utime: time spent in user mode, in &cputime_t units | ||
431 | * @stime: time spent in kernel mode, in &cputime_t units | ||
432 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds | ||
433 | * | ||
434 | * This structure groups together three kinds of CPU time that are | ||
435 | * tracked for threads and thread groups. Most things considering | ||
436 | * CPU time want to group these counts together and treat all three | ||
437 | * of them in parallel. | ||
438 | */ | ||
439 | struct task_cputime { | ||
440 | cputime_t utime; | ||
441 | cputime_t stime; | ||
442 | unsigned long long sum_exec_runtime; | ||
443 | }; | ||
444 | /* Alternate field names when used to cache expirations. */ | ||
445 | #define prof_exp stime | ||
446 | #define virt_exp utime | ||
447 | #define sched_exp sum_exec_runtime | ||
448 | |||
449 | /** | ||
450 | * struct thread_group_cputime - thread group interval timer counts | ||
451 | * @totals: thread group interval timers; substructure for | ||
452 | * uniprocessor kernel, per-cpu for SMP kernel. | ||
453 | * | ||
454 | * This structure contains the version of task_cputime, above, that is | ||
455 | * used for thread group CPU clock calculations. | ||
456 | */ | ||
457 | struct thread_group_cputime { | ||
458 | struct task_cputime *totals; | ||
459 | }; | ||
460 | |||
428 | /* | 461 | /* |
429 | * NOTE! "signal_struct" does not have it's own | 462 | * NOTE! "signal_struct" does not have it's own |
430 | * locking, because a shared signal_struct always | 463 | * locking, because a shared signal_struct always |
@@ -470,6 +503,17 @@ struct signal_struct { | |||
470 | cputime_t it_prof_expires, it_virt_expires; | 503 | cputime_t it_prof_expires, it_virt_expires; |
471 | cputime_t it_prof_incr, it_virt_incr; | 504 | cputime_t it_prof_incr, it_virt_incr; |
472 | 505 | ||
506 | /* | ||
507 | * Thread group totals for process CPU clocks. | ||
508 | * See thread_group_cputime(), et al, for details. | ||
509 | */ | ||
510 | struct thread_group_cputime cputime; | ||
511 | |||
512 | /* Earliest-expiration cache. */ | ||
513 | struct task_cputime cputime_expires; | ||
514 | |||
515 | struct list_head cpu_timers[3]; | ||
516 | |||
473 | /* job control IDs */ | 517 | /* job control IDs */ |
474 | 518 | ||
475 | /* | 519 | /* |
@@ -500,7 +544,7 @@ struct signal_struct { | |||
500 | * Live threads maintain their own counters and add to these | 544 | * Live threads maintain their own counters and add to these |
501 | * in __exit_signal, except for the group leader. | 545 | * in __exit_signal, except for the group leader. |
502 | */ | 546 | */ |
503 | cputime_t utime, stime, cutime, cstime; | 547 | cputime_t cutime, cstime; |
504 | cputime_t gtime; | 548 | cputime_t gtime; |
505 | cputime_t cgtime; | 549 | cputime_t cgtime; |
506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 550 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
@@ -509,14 +553,6 @@ struct signal_struct { | |||
509 | struct task_io_accounting ioac; | 553 | struct task_io_accounting ioac; |
510 | 554 | ||
511 | /* | 555 | /* |
512 | * Cumulative ns of scheduled CPU time for dead threads in the | ||
513 | * group, not including a zombie group leader. (This only differs | ||
514 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
515 | * other than jiffies.) | ||
516 | */ | ||
517 | unsigned long long sum_sched_runtime; | ||
518 | |||
519 | /* | ||
520 | * We don't bother to synchronize most readers of this at all, | 556 | * We don't bother to synchronize most readers of this at all, |
521 | * because there is no reader checking a limit that actually needs | 557 | * because there is no reader checking a limit that actually needs |
522 | * to get both rlim_cur and rlim_max atomically, and either one | 558 | * to get both rlim_cur and rlim_max atomically, and either one |
@@ -527,8 +563,6 @@ struct signal_struct { | |||
527 | */ | 563 | */ |
528 | struct rlimit rlim[RLIM_NLIMITS]; | 564 | struct rlimit rlim[RLIM_NLIMITS]; |
529 | 565 | ||
530 | struct list_head cpu_timers[3]; | ||
531 | |||
532 | /* keep the process-shared keyrings here so that they do the right | 566 | /* keep the process-shared keyrings here so that they do the right |
533 | * thing in threads created with CLONE_THREAD */ | 567 | * thing in threads created with CLONE_THREAD */ |
534 | #ifdef CONFIG_KEYS | 568 | #ifdef CONFIG_KEYS |
@@ -1137,8 +1171,7 @@ struct task_struct { | |||
1137 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ | 1171 | /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ |
1138 | unsigned long min_flt, maj_flt; | 1172 | unsigned long min_flt, maj_flt; |
1139 | 1173 | ||
1140 | cputime_t it_prof_expires, it_virt_expires; | 1174 | struct task_cputime cputime_expires; |
1141 | unsigned long long it_sched_expires; | ||
1142 | struct list_head cpu_timers[3]; | 1175 | struct list_head cpu_timers[3]; |
1143 | 1176 | ||
1144 | /* process credentials */ | 1177 | /* process credentials */ |
@@ -1588,6 +1621,7 @@ extern unsigned long long cpu_clock(int cpu); | |||
1588 | 1621 | ||
1589 | extern unsigned long long | 1622 | extern unsigned long long |
1590 | task_sched_runtime(struct task_struct *task); | 1623 | task_sched_runtime(struct task_struct *task); |
1624 | extern unsigned long long thread_group_sched_runtime(struct task_struct *task); | ||
1591 | 1625 | ||
1592 | /* sched_exec is called by processes performing an exec */ | 1626 | /* sched_exec is called by processes performing an exec */ |
1593 | #ifdef CONFIG_SMP | 1627 | #ifdef CONFIG_SMP |
@@ -2085,6 +2119,30 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2085 | } | 2119 | } |
2086 | 2120 | ||
2087 | /* | 2121 | /* |
2122 | * Thread group CPU time accounting. | ||
2123 | */ | ||
2124 | |||
2125 | extern int thread_group_cputime_alloc(struct task_struct *); | ||
2126 | extern void thread_group_cputime(struct task_struct *, struct task_cputime *); | ||
2127 | |||
2128 | static inline void thread_group_cputime_init(struct signal_struct *sig) | ||
2129 | { | ||
2130 | sig->cputime.totals = NULL; | ||
2131 | } | ||
2132 | |||
2133 | static inline int thread_group_cputime_clone_thread(struct task_struct *curr) | ||
2134 | { | ||
2135 | if (curr->signal->cputime.totals) | ||
2136 | return 0; | ||
2137 | return thread_group_cputime_alloc(curr); | ||
2138 | } | ||
2139 | |||
2140 | static inline void thread_group_cputime_free(struct signal_struct *sig) | ||
2141 | { | ||
2142 | free_percpu(sig->cputime.totals); | ||
2143 | } | ||
2144 | |||
2145 | /* | ||
2088 | * Reevaluate whether the task has signals pending delivery. | 2146 | * Reevaluate whether the task has signals pending delivery. |
2089 | * Wake the task if so. | 2147 | * Wake the task if so. |
2090 | * This is required every time the blocked sigset_t changes. | 2148 | * This is required every time the blocked sigset_t changes. |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 66484d4a8459..2e4d58b26c06 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/types.h> | ||
10 | #include <linux/list.h> | 11 | #include <linux/list.h> |
11 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
12 | 13 | ||
@@ -16,7 +17,8 @@ struct call_single_data { | |||
16 | struct list_head list; | 17 | struct list_head list; |
17 | void (*func) (void *info); | 18 | void (*func) (void *info); |
18 | void *info; | 19 | void *info; |
19 | unsigned int flags; | 20 | u16 flags; |
21 | u16 priv; | ||
20 | }; | 22 | }; |
21 | 23 | ||
22 | #ifdef CONFIG_SMP | 24 | #ifdef CONFIG_SMP |
diff --git a/include/linux/time.h b/include/linux/time.h index 51e883df0fa5..4f1c9db57707 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -119,6 +119,7 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
119 | extern unsigned int alarm_setitimer(unsigned int seconds); | 119 | extern unsigned int alarm_setitimer(unsigned int seconds); |
120 | extern int do_getitimer(int which, struct itimerval *value); | 120 | extern int do_getitimer(int which, struct itimerval *value); |
121 | extern void getnstimeofday(struct timespec *tv); | 121 | extern void getnstimeofday(struct timespec *tv); |
122 | extern void getrawmonotonic(struct timespec *ts); | ||
122 | extern void getboottime(struct timespec *ts); | 123 | extern void getboottime(struct timespec *ts); |
123 | extern void monotonic_to_bootbased(struct timespec *ts); | 124 | extern void monotonic_to_bootbased(struct timespec *ts); |
124 | 125 | ||
@@ -127,6 +128,9 @@ extern int timekeeping_valid_for_hres(void); | |||
127 | extern void update_wall_time(void); | 128 | extern void update_wall_time(void); |
128 | extern void update_xtime_cache(u64 nsec); | 129 | extern void update_xtime_cache(u64 nsec); |
129 | 130 | ||
131 | struct tms; | ||
132 | extern void do_sys_times(struct tms *); | ||
133 | |||
130 | /** | 134 | /** |
131 | * timespec_to_ns - Convert timespec to nanoseconds | 135 | * timespec_to_ns - Convert timespec to nanoseconds |
132 | * @ts: pointer to the timespec variable to be converted | 136 | * @ts: pointer to the timespec variable to be converted |
@@ -216,6 +220,7 @@ struct itimerval { | |||
216 | #define CLOCK_MONOTONIC 1 | 220 | #define CLOCK_MONOTONIC 1 |
217 | #define CLOCK_PROCESS_CPUTIME_ID 2 | 221 | #define CLOCK_PROCESS_CPUTIME_ID 2 |
218 | #define CLOCK_THREAD_CPUTIME_ID 3 | 222 | #define CLOCK_THREAD_CPUTIME_ID 3 |
223 | #define CLOCK_MONOTONIC_RAW 4 | ||
219 | 224 | ||
220 | /* | 225 | /* |
221 | * The IDs of various hardware clocks: | 226 | * The IDs of various hardware clocks: |
diff --git a/include/linux/timex.h b/include/linux/timex.h index fc6035d29d56..9007313b5b71 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -82,7 +82,7 @@ | |||
82 | */ | 82 | */ |
83 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ | 83 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ |
84 | #define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) | 84 | #define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) |
85 | #define PPM_SCALE_INV_SHIFT 20 | 85 | #define PPM_SCALE_INV_SHIFT 19 |
86 | #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ | 86 | #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ |
87 | PPM_SCALE + 1) | 87 | PPM_SCALE + 1) |
88 | 88 | ||
@@ -141,8 +141,15 @@ struct timex { | |||
141 | #define ADJ_MICRO 0x1000 /* select microsecond resolution */ | 141 | #define ADJ_MICRO 0x1000 /* select microsecond resolution */ |
142 | #define ADJ_NANO 0x2000 /* select nanosecond resolution */ | 142 | #define ADJ_NANO 0x2000 /* select nanosecond resolution */ |
143 | #define ADJ_TICK 0x4000 /* tick value */ | 143 | #define ADJ_TICK 0x4000 /* tick value */ |
144 | |||
145 | #ifdef __KERNEL__ | ||
146 | #define ADJ_ADJTIME 0x8000 /* switch between adjtime/adjtimex modes */ | ||
147 | #define ADJ_OFFSET_SINGLESHOT 0x0001 /* old-fashioned adjtime */ | ||
148 | #define ADJ_OFFSET_READONLY 0x2000 /* read-only adjtime */ | ||
149 | #else | ||
144 | #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ | 150 | #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ |
145 | #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ | 151 | #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ |
152 | #endif | ||
146 | 153 | ||
147 | /* xntp 3.4 compatibility names */ | 154 | /* xntp 3.4 compatibility names */ |
148 | #define MOD_OFFSET ADJ_OFFSET | 155 | #define MOD_OFFSET ADJ_OFFSET |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 94ac74aba6b6..8fa973bede5e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1135,6 +1135,7 @@ struct usb_anchor { | |||
1135 | struct list_head urb_list; | 1135 | struct list_head urb_list; |
1136 | wait_queue_head_t wait; | 1136 | wait_queue_head_t wait; |
1137 | spinlock_t lock; | 1137 | spinlock_t lock; |
1138 | unsigned int poisoned:1; | ||
1138 | }; | 1139 | }; |
1139 | 1140 | ||
1140 | static inline void init_usb_anchor(struct usb_anchor *anchor) | 1141 | static inline void init_usb_anchor(struct usb_anchor *anchor) |
@@ -1459,12 +1460,18 @@ extern struct urb *usb_get_urb(struct urb *urb); | |||
1459 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | 1460 | extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); |
1460 | extern int usb_unlink_urb(struct urb *urb); | 1461 | extern int usb_unlink_urb(struct urb *urb); |
1461 | extern void usb_kill_urb(struct urb *urb); | 1462 | extern void usb_kill_urb(struct urb *urb); |
1463 | extern void usb_poison_urb(struct urb *urb); | ||
1464 | extern void usb_unpoison_urb(struct urb *urb); | ||
1462 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); | 1465 | extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); |
1466 | extern void usb_poison_anchored_urbs(struct usb_anchor *anchor); | ||
1463 | extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); | 1467 | extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); |
1464 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); | 1468 | extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); |
1465 | extern void usb_unanchor_urb(struct urb *urb); | 1469 | extern void usb_unanchor_urb(struct urb *urb); |
1466 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | 1470 | extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, |
1467 | unsigned int timeout); | 1471 | unsigned int timeout); |
1472 | extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor); | ||
1473 | extern void usb_scuttle_anchored_urbs(struct usb_anchor *anchor); | ||
1474 | extern int usb_anchor_empty(struct usb_anchor *anchor); | ||
1468 | 1475 | ||
1469 | /** | 1476 | /** |
1470 | * usb_urb_dir_in - check if an URB describes an IN transfer | 1477 | * usb_urb_dir_in - check if an URB describes an IN transfer |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 42e84fc315e3..54c446309a2a 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -4,4 +4,5 @@ header-y += ch9.h | |||
4 | header-y += gadgetfs.h | 4 | header-y += gadgetfs.h |
5 | header-y += midi.h | 5 | header-y += midi.h |
6 | header-y += g_printer.h | 6 | header-y += g_printer.h |
7 | 7 | header-y += tmc.h | |
8 | header-y += vstusb.h | ||
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index ca228bb94218..18a729343ffa 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -160,6 +160,15 @@ struct usb_cdc_mdlm_detail_desc { | |||
160 | __u8 bDetailData[0]; | 160 | __u8 bDetailData[0]; |
161 | } __attribute__ ((packed)); | 161 | } __attribute__ ((packed)); |
162 | 162 | ||
163 | /* "OBEX Control Model Functional Descriptor" */ | ||
164 | struct usb_cdc_obex_desc { | ||
165 | __u8 bLength; | ||
166 | __u8 bDescriptorType; | ||
167 | __u8 bDescriptorSubType; | ||
168 | |||
169 | __le16 bcdVersion; | ||
170 | } __attribute__ ((packed)); | ||
171 | |||
163 | /*-------------------------------------------------------------------------*/ | 172 | /*-------------------------------------------------------------------------*/ |
164 | 173 | ||
165 | /* | 174 | /* |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index c932390c6da0..935c380ffe47 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -130,6 +130,9 @@ struct usb_function { | |||
130 | 130 | ||
131 | int usb_add_function(struct usb_configuration *, struct usb_function *); | 131 | int usb_add_function(struct usb_configuration *, struct usb_function *); |
132 | 132 | ||
133 | int usb_function_deactivate(struct usb_function *); | ||
134 | int usb_function_activate(struct usb_function *); | ||
135 | |||
133 | int usb_interface_id(struct usb_configuration *, struct usb_function *); | 136 | int usb_interface_id(struct usb_configuration *, struct usb_function *); |
134 | 137 | ||
135 | /** | 138 | /** |
@@ -316,9 +319,13 @@ struct usb_composite_dev { | |||
316 | struct usb_composite_driver *driver; | 319 | struct usb_composite_driver *driver; |
317 | u8 next_string_id; | 320 | u8 next_string_id; |
318 | 321 | ||
319 | spinlock_t lock; | 322 | /* the gadget driver won't enable the data pullup |
323 | * while the deactivation count is nonzero. | ||
324 | */ | ||
325 | unsigned deactivations; | ||
320 | 326 | ||
321 | /* REVISIT use and existence of lock ... */ | 327 | /* protects at least deactivation count */ |
328 | spinlock_t lock; | ||
322 | }; | 329 | }; |
323 | 330 | ||
324 | extern int usb_string_id(struct usb_composite_dev *c); | 331 | extern int usb_string_id(struct usb_composite_dev *c); |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 655341d0f534..0b8617a9176d 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -192,7 +192,7 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
192 | * The driver.owner field should be set to the module owner of this driver. | 192 | * The driver.owner field should be set to the module owner of this driver. |
193 | * The driver.name field should be set to the name of this driver (remember | 193 | * The driver.name field should be set to the name of this driver (remember |
194 | * it will show up in sysfs, so it needs to be short and to the point. | 194 | * it will show up in sysfs, so it needs to be short and to the point. |
195 | * Useing the module name is a good idea.) | 195 | * Using the module name is a good idea.) |
196 | */ | 196 | */ |
197 | struct usb_serial_driver { | 197 | struct usb_serial_driver { |
198 | const char *description; | 198 | const char *description; |
diff --git a/include/linux/usb/tmc.h b/include/linux/usb/tmc.h new file mode 100644 index 000000000000..c045ae12556c --- /dev/null +++ b/include/linux/usb/tmc.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany | ||
3 | * Copyright (C) 2008 Novell, Inc. | ||
4 | * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de> | ||
5 | * | ||
6 | * This file holds USB constants defined by the USB Device Class | ||
7 | * Definition for Test and Measurement devices published by the USB-IF. | ||
8 | * | ||
9 | * It also has the ioctl definitions for the usbtmc kernel driver that | ||
10 | * userspace needs to know about. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_USB_TMC_H | ||
14 | #define __LINUX_USB_TMC_H | ||
15 | |||
16 | /* USB TMC status values */ | ||
17 | #define USBTMC_STATUS_SUCCESS 0x01 | ||
18 | #define USBTMC_STATUS_PENDING 0x02 | ||
19 | #define USBTMC_STATUS_FAILED 0x80 | ||
20 | #define USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS 0x81 | ||
21 | #define USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS 0x82 | ||
22 | #define USBTMC_STATUS_SPLIT_IN_PROGRESS 0x83 | ||
23 | |||
24 | /* USB TMC requests values */ | ||
25 | #define USBTMC_REQUEST_INITIATE_ABORT_BULK_OUT 1 | ||
26 | #define USBTMC_REQUEST_CHECK_ABORT_BULK_OUT_STATUS 2 | ||
27 | #define USBTMC_REQUEST_INITIATE_ABORT_BULK_IN 3 | ||
28 | #define USBTMC_REQUEST_CHECK_ABORT_BULK_IN_STATUS 4 | ||
29 | #define USBTMC_REQUEST_INITIATE_CLEAR 5 | ||
30 | #define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6 | ||
31 | #define USBTMC_REQUEST_GET_CAPABILITIES 7 | ||
32 | #define USBTMC_REQUEST_INDICATOR_PULSE 64 | ||
33 | |||
34 | /* Request values for USBTMC driver's ioctl entry point */ | ||
35 | #define USBTMC_IOC_NR 91 | ||
36 | #define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1) | ||
37 | #define USBTMC_IOCTL_CLEAR _IO(USBTMC_IOC_NR, 2) | ||
38 | #define USBTMC_IOCTL_ABORT_BULK_OUT _IO(USBTMC_IOC_NR, 3) | ||
39 | #define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4) | ||
40 | #define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6) | ||
41 | #define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7) | ||
42 | |||
43 | #endif | ||
diff --git a/include/linux/usb/vstusb.h b/include/linux/usb/vstusb.h new file mode 100644 index 000000000000..1cfac67191ff --- /dev/null +++ b/include/linux/usb/vstusb.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /***************************************************************************** | ||
2 | * File: drivers/usb/misc/vstusb.h | ||
3 | * | ||
4 | * Purpose: Support for the bulk USB Vernier Spectrophotometers | ||
5 | * | ||
6 | * Author: EQware Engineering, Inc. | ||
7 | * Oregon City, OR, USA 97045 | ||
8 | * | ||
9 | * Copyright: 2007, 2008 | ||
10 | * Vernier Software & Technology | ||
11 | * Beaverton, OR, USA 97005 | ||
12 | * | ||
13 | * Web: www.vernier.com | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | * | ||
19 | *****************************************************************************/ | ||
20 | /***************************************************************************** | ||
21 | * | ||
22 | * The vstusb module is a standard usb 'client' driver running on top of the | ||
23 | * standard usb host controller stack. | ||
24 | * | ||
25 | * In general, vstusb supports standard bulk usb pipes. It supports multiple | ||
26 | * devices and multiple pipes per device. | ||
27 | * | ||
28 | * The vstusb driver supports two interfaces: | ||
29 | * 1 - ioctl SEND_PIPE/RECV_PIPE - a general bulk write/read msg | ||
30 | * interface to any pipe with timeout support; | ||
31 | * 2 - standard read/write with ioctl config - offers standard read/write | ||
32 | * interface with ioctl configured pipes and timeouts. | ||
33 | * | ||
34 | * Both interfaces can be signal from other process and will abort its i/o | ||
35 | * operation. | ||
36 | * | ||
37 | * A timeout of 0 means NO timeout. The user can still terminate the read via | ||
38 | * signal. | ||
39 | * | ||
40 | * If using multiple threads with this driver, the user should ensure that | ||
41 | * any reads, writes, or ioctls are complete before closing the device. | ||
42 | * Changing read/write timeouts or pipes takes effect on next read/write. | ||
43 | * | ||
44 | *****************************************************************************/ | ||
45 | |||
46 | struct vstusb_args { | ||
47 | union { | ||
48 | /* this struct is used for IOCTL_VSTUSB_SEND_PIPE, * | ||
49 | * IOCTL_VSTUSB_RECV_PIPE, and read()/write() fops */ | ||
50 | struct { | ||
51 | void __user *buffer; | ||
52 | size_t count; | ||
53 | unsigned int timeout_ms; | ||
54 | int pipe; | ||
55 | }; | ||
56 | |||
57 | /* this one is used for IOCTL_VSTUSB_CONFIG_RW */ | ||
58 | struct { | ||
59 | int rd_pipe; | ||
60 | int rd_timeout_ms; | ||
61 | int wr_pipe; | ||
62 | int wr_timeout_ms; | ||
63 | }; | ||
64 | }; | ||
65 | }; | ||
66 | |||
67 | #define VST_IOC_MAGIC 'L' | ||
68 | #define VST_IOC_FIRST 0x20 | ||
69 | #define IOCTL_VSTUSB_SEND_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST) | ||
70 | #define IOCTL_VSTUSB_RECV_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 1) | ||
71 | #define IOCTL_VSTUSB_CONFIG_RW _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 2) | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 12b15c561a1f..e585657e9831 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -63,7 +63,15 @@ struct writeback_control { | |||
63 | unsigned for_writepages:1; /* This is a writepages() call */ | 63 | unsigned for_writepages:1; /* This is a writepages() call */ |
64 | unsigned range_cyclic:1; /* range_start is cyclic */ | 64 | unsigned range_cyclic:1; /* range_start is cyclic */ |
65 | unsigned more_io:1; /* more io to be dispatched */ | 65 | unsigned more_io:1; /* more io to be dispatched */ |
66 | unsigned range_cont:1; | 66 | /* |
67 | * write_cache_pages() won't update wbc->nr_to_write and | ||
68 | * mapping->writeback_index if no_nrwrite_index_update | ||
69 | * is set. write_cache_pages() may write more than we | ||
70 | * requested and we want to make sure nr_to_write and | ||
71 | * writeback_index are updated in a consistent manner | ||
72 | * so we use a single control to update them | ||
73 | */ | ||
74 | unsigned no_nrwrite_index_update:1; | ||
67 | }; | 75 | }; |
68 | 76 | ||
69 | /* | 77 | /* |