diff options
Diffstat (limited to 'include/linux')
58 files changed, 652 insertions, 131 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 6586cbd0d4af..88be890ee3c7 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -111,6 +111,7 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | |||
111 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 111 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
112 | void acpi_irq_stats_init(void); | 112 | void acpi_irq_stats_init(void); |
113 | extern u32 acpi_irq_handled; | 113 | extern u32 acpi_irq_handled; |
114 | extern u32 acpi_irq_not_handled; | ||
114 | 115 | ||
115 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | 116 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
116 | extern int pci_mmcfg_config_num; | 117 | extern int pci_mmcfg_config_num; |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 6638b8148de7..61ee18c1bdb4 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -82,7 +82,19 @@ struct linux_binfmt { | |||
82 | int hasvdso; | 82 | int hasvdso; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | extern int register_binfmt(struct linux_binfmt *); | 85 | extern int __register_binfmt(struct linux_binfmt *fmt, int insert); |
86 | |||
87 | /* Registration of default binfmt handlers */ | ||
88 | static inline int register_binfmt(struct linux_binfmt *fmt) | ||
89 | { | ||
90 | return __register_binfmt(fmt, 0); | ||
91 | } | ||
92 | /* Same as above, but adds a new binfmt at the top of the list */ | ||
93 | static inline int insert_binfmt(struct linux_binfmt *fmt) | ||
94 | { | ||
95 | return __register_binfmt(fmt, 1); | ||
96 | } | ||
97 | |||
86 | extern void unregister_binfmt(struct linux_binfmt *); | 98 | extern void unregister_binfmt(struct linux_binfmt *); |
87 | 99 | ||
88 | extern int prepare_binprm(struct linux_binprm *); | 100 | extern int prepare_binprm(struct linux_binprm *); |
diff --git a/include/linux/bio.h b/include/linux/bio.h index b900d2c67d29..7b214fd672a2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -132,6 +132,7 @@ struct bio { | |||
132 | * top 4 bits of bio flags indicate the pool this bio came from | 132 | * top 4 bits of bio flags indicate the pool this bio came from |
133 | */ | 133 | */ |
134 | #define BIO_POOL_BITS (4) | 134 | #define BIO_POOL_BITS (4) |
135 | #define BIO_POOL_NONE ((1UL << BIO_POOL_BITS) - 1) | ||
135 | #define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS) | 136 | #define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS) |
136 | #define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET) | 137 | #define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET) |
137 | #define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET) | 138 | #define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET) |
@@ -504,6 +505,115 @@ static inline int bio_has_data(struct bio *bio) | |||
504 | return bio && bio->bi_io_vec != NULL; | 505 | return bio && bio->bi_io_vec != NULL; |
505 | } | 506 | } |
506 | 507 | ||
508 | /* | ||
509 | * BIO list managment for use by remapping drivers (e.g. DM or MD). | ||
510 | * | ||
511 | * A bio_list anchors a singly-linked list of bios chained through the bi_next | ||
512 | * member of the bio. The bio_list also caches the last list member to allow | ||
513 | * fast access to the tail. | ||
514 | */ | ||
515 | struct bio_list { | ||
516 | struct bio *head; | ||
517 | struct bio *tail; | ||
518 | }; | ||
519 | |||
520 | static inline int bio_list_empty(const struct bio_list *bl) | ||
521 | { | ||
522 | return bl->head == NULL; | ||
523 | } | ||
524 | |||
525 | static inline void bio_list_init(struct bio_list *bl) | ||
526 | { | ||
527 | bl->head = bl->tail = NULL; | ||
528 | } | ||
529 | |||
530 | #define bio_list_for_each(bio, bl) \ | ||
531 | for (bio = (bl)->head; bio; bio = bio->bi_next) | ||
532 | |||
533 | static inline unsigned bio_list_size(const struct bio_list *bl) | ||
534 | { | ||
535 | unsigned sz = 0; | ||
536 | struct bio *bio; | ||
537 | |||
538 | bio_list_for_each(bio, bl) | ||
539 | sz++; | ||
540 | |||
541 | return sz; | ||
542 | } | ||
543 | |||
544 | static inline void bio_list_add(struct bio_list *bl, struct bio *bio) | ||
545 | { | ||
546 | bio->bi_next = NULL; | ||
547 | |||
548 | if (bl->tail) | ||
549 | bl->tail->bi_next = bio; | ||
550 | else | ||
551 | bl->head = bio; | ||
552 | |||
553 | bl->tail = bio; | ||
554 | } | ||
555 | |||
556 | static inline void bio_list_add_head(struct bio_list *bl, struct bio *bio) | ||
557 | { | ||
558 | bio->bi_next = bl->head; | ||
559 | |||
560 | bl->head = bio; | ||
561 | |||
562 | if (!bl->tail) | ||
563 | bl->tail = bio; | ||
564 | } | ||
565 | |||
566 | static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) | ||
567 | { | ||
568 | if (!bl2->head) | ||
569 | return; | ||
570 | |||
571 | if (bl->tail) | ||
572 | bl->tail->bi_next = bl2->head; | ||
573 | else | ||
574 | bl->head = bl2->head; | ||
575 | |||
576 | bl->tail = bl2->tail; | ||
577 | } | ||
578 | |||
579 | static inline void bio_list_merge_head(struct bio_list *bl, | ||
580 | struct bio_list *bl2) | ||
581 | { | ||
582 | if (!bl2->head) | ||
583 | return; | ||
584 | |||
585 | if (bl->head) | ||
586 | bl2->tail->bi_next = bl->head; | ||
587 | else | ||
588 | bl->tail = bl2->tail; | ||
589 | |||
590 | bl->head = bl2->head; | ||
591 | } | ||
592 | |||
593 | static inline struct bio *bio_list_pop(struct bio_list *bl) | ||
594 | { | ||
595 | struct bio *bio = bl->head; | ||
596 | |||
597 | if (bio) { | ||
598 | bl->head = bl->head->bi_next; | ||
599 | if (!bl->head) | ||
600 | bl->tail = NULL; | ||
601 | |||
602 | bio->bi_next = NULL; | ||
603 | } | ||
604 | |||
605 | return bio; | ||
606 | } | ||
607 | |||
608 | static inline struct bio *bio_list_get(struct bio_list *bl) | ||
609 | { | ||
610 | struct bio *bio = bl->head; | ||
611 | |||
612 | bl->head = bl->tail = NULL; | ||
613 | |||
614 | return bio; | ||
615 | } | ||
616 | |||
507 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 617 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
508 | 618 | ||
509 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) | 619 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 61829139795a..c05a29cb9bb2 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -112,6 +112,25 @@ static inline unsigned fls_long(unsigned long l) | |||
112 | return fls64(l); | 112 | return fls64(l); |
113 | } | 113 | } |
114 | 114 | ||
115 | /** | ||
116 | * __ffs64 - find first set bit in a 64 bit word | ||
117 | * @word: The 64 bit word | ||
118 | * | ||
119 | * On 64 bit arches this is a synomyn for __ffs | ||
120 | * The result is not defined if no bits are set, so check that @word | ||
121 | * is non-zero before calling this. | ||
122 | */ | ||
123 | static inline unsigned long __ffs64(u64 word) | ||
124 | { | ||
125 | #if BITS_PER_LONG == 32 | ||
126 | if (((u32)word) == 0UL) | ||
127 | return __ffs((u32)(word >> 32)) + 32; | ||
128 | #elif BITS_PER_LONG != 64 | ||
129 | #error BITS_PER_LONG not 32 or 64 | ||
130 | #endif | ||
131 | return __ffs((unsigned long)word); | ||
132 | } | ||
133 | |||
115 | #ifdef __KERNEL__ | 134 | #ifdef __KERNEL__ |
116 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT | 135 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT |
117 | 136 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ba54c834a590..b4f71f1a4af7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -118,6 +118,7 @@ enum rq_flag_bits { | |||
118 | __REQ_COPY_USER, /* contains copies of user pages */ | 118 | __REQ_COPY_USER, /* contains copies of user pages */ |
119 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ | 119 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ |
120 | __REQ_NOIDLE, /* Don't anticipate more IO after this one */ | 120 | __REQ_NOIDLE, /* Don't anticipate more IO after this one */ |
121 | __REQ_IO_STAT, /* account I/O stat */ | ||
121 | __REQ_NR_BITS, /* stops here */ | 122 | __REQ_NR_BITS, /* stops here */ |
122 | }; | 123 | }; |
123 | 124 | ||
@@ -145,6 +146,7 @@ enum rq_flag_bits { | |||
145 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 146 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
146 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) | 147 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) |
147 | #define REQ_NOIDLE (1 << __REQ_NOIDLE) | 148 | #define REQ_NOIDLE (1 << __REQ_NOIDLE) |
149 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) | ||
148 | 150 | ||
149 | #define BLK_MAX_CDB 16 | 151 | #define BLK_MAX_CDB 16 |
150 | 152 | ||
@@ -598,6 +600,8 @@ enum { | |||
598 | blk_failfast_transport(rq) || \ | 600 | blk_failfast_transport(rq) || \ |
599 | blk_failfast_driver(rq)) | 601 | blk_failfast_driver(rq)) |
600 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 602 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
603 | #define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT) | ||
604 | #define blk_rq_quiet(rq) ((rq)->cmd_flags & REQ_QUIET) | ||
601 | 605 | ||
602 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) | 606 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |
603 | 607 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 7b73bb8f1970..16ed0284d780 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -155,6 +155,7 @@ void create_empty_buffers(struct page *, unsigned long, | |||
155 | unsigned long b_state); | 155 | unsigned long b_state); |
156 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); | 156 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); |
157 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); | 157 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); |
158 | void end_buffer_async_write(struct buffer_head *bh, int uptodate); | ||
158 | 159 | ||
159 | /* Things to do with buffers at mapping->private_list */ | 160 | /* Things to do with buffers at mapping->private_list */ |
160 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); | 161 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); |
@@ -197,6 +198,8 @@ extern int buffer_heads_over_limit; | |||
197 | void block_invalidatepage(struct page *page, unsigned long offset); | 198 | void block_invalidatepage(struct page *page, unsigned long offset); |
198 | int block_write_full_page(struct page *page, get_block_t *get_block, | 199 | int block_write_full_page(struct page *page, get_block_t *get_block, |
199 | struct writeback_control *wbc); | 200 | struct writeback_control *wbc); |
201 | int block_write_full_page_endio(struct page *page, get_block_t *get_block, | ||
202 | struct writeback_control *wbc, bh_end_io_t *handler); | ||
200 | int block_read_full_page(struct page*, get_block_t*); | 203 | int block_read_full_page(struct page*, get_block_t*); |
201 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, | 204 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, |
202 | unsigned long from); | 205 | unsigned long from); |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 573819ef4cc0..5a40d14daa9f 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -143,7 +143,9 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
143 | * 400-499: Perfect | 143 | * 400-499: Perfect |
144 | * The ideal clocksource. A must-use where | 144 | * The ideal clocksource. A must-use where |
145 | * available. | 145 | * available. |
146 | * @read: returns a cycle value | 146 | * @read: returns a cycle value, passes clocksource as argument |
147 | * @enable: optional function to enable the clocksource | ||
148 | * @disable: optional function to disable the clocksource | ||
147 | * @mask: bitmask for two's complement | 149 | * @mask: bitmask for two's complement |
148 | * subtraction of non 64 bit counters | 150 | * subtraction of non 64 bit counters |
149 | * @mult: cycle to nanosecond multiplier (adjusted by NTP) | 151 | * @mult: cycle to nanosecond multiplier (adjusted by NTP) |
@@ -162,7 +164,9 @@ struct clocksource { | |||
162 | char *name; | 164 | char *name; |
163 | struct list_head list; | 165 | struct list_head list; |
164 | int rating; | 166 | int rating; |
165 | cycle_t (*read)(void); | 167 | cycle_t (*read)(struct clocksource *cs); |
168 | int (*enable)(struct clocksource *cs); | ||
169 | void (*disable)(struct clocksource *cs); | ||
166 | cycle_t mask; | 170 | cycle_t mask; |
167 | u32 mult; | 171 | u32 mult; |
168 | u32 mult_orig; | 172 | u32 mult_orig; |
@@ -271,7 +275,34 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) | |||
271 | */ | 275 | */ |
272 | static inline cycle_t clocksource_read(struct clocksource *cs) | 276 | static inline cycle_t clocksource_read(struct clocksource *cs) |
273 | { | 277 | { |
274 | return cs->read(); | 278 | return cs->read(cs); |
279 | } | ||
280 | |||
281 | /** | ||
282 | * clocksource_enable: - enable clocksource | ||
283 | * @cs: pointer to clocksource | ||
284 | * | ||
285 | * Enables the specified clocksource. The clocksource callback | ||
286 | * function should start up the hardware and setup mult and field | ||
287 | * members of struct clocksource to reflect hardware capabilities. | ||
288 | */ | ||
289 | static inline int clocksource_enable(struct clocksource *cs) | ||
290 | { | ||
291 | return cs->enable ? cs->enable(cs) : 0; | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * clocksource_disable: - disable clocksource | ||
296 | * @cs: pointer to clocksource | ||
297 | * | ||
298 | * Disables the specified clocksource. The clocksource callback | ||
299 | * function should power down the now unused hardware block to | ||
300 | * save power. | ||
301 | */ | ||
302 | static inline void clocksource_disable(struct clocksource *cs) | ||
303 | { | ||
304 | if (cs->disable) | ||
305 | cs->disable(cs); | ||
275 | } | 306 | } |
276 | 307 | ||
277 | /** | 308 | /** |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 493dedb7a67b..29b3ce3f2a1d 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
6 | #include <asm/system.h> | ||
6 | 7 | ||
7 | struct task_struct; | 8 | struct task_struct; |
8 | 9 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 2918c0e8fdfd..6a69caaac18a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -551,6 +551,7 @@ extern int (*platform_notify_remove)(struct device *dev); | |||
551 | extern struct device *get_device(struct device *dev); | 551 | extern struct device *get_device(struct device *dev); |
552 | extern void put_device(struct device *dev); | 552 | extern void put_device(struct device *dev); |
553 | 553 | ||
554 | extern void wait_for_device_probe(void); | ||
554 | 555 | ||
555 | /* drivers/base/power/shutdown.c */ | 556 | /* drivers/base/power/shutdown.c */ |
556 | extern void device_shutdown(void); | 557 | extern void device_shutdown(void); |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index baabf33be244..a0d9422a1569 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -70,7 +70,7 @@ extern int ddebug_remove_module(char *mod_name); | |||
70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | 70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ |
71 | if (__dynamic_dbg_enabled(descriptor)) \ | 71 | if (__dynamic_dbg_enabled(descriptor)) \ |
72 | dev_printk(KERN_DEBUG, dev, \ | 72 | dev_printk(KERN_DEBUG, dev, \ |
73 | KBUILD_MODNAME ": " pr_fmt(fmt),\ | 73 | KBUILD_MODNAME ": " fmt, \ |
74 | ##__VA_ARGS__); \ | 74 | ##__VA_ARGS__); \ |
75 | } while (0) | 75 | } while (0) |
76 | 76 | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index f563c5013932..330c4b1bfcaa 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -173,8 +173,12 @@ struct fb_fix_screeninfo { | |||
173 | /* Interpretation of offset for color fields: All offsets are from the right, | 173 | /* Interpretation of offset for color fields: All offsets are from the right, |
174 | * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you | 174 | * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you |
175 | * can use the offset as right argument to <<). A pixel afterwards is a bit | 175 | * can use the offset as right argument to <<). A pixel afterwards is a bit |
176 | * stream and is written to video memory as that unmodified. This implies | 176 | * stream and is written to video memory as that unmodified. |
177 | * big-endian byte order if bits_per_pixel is greater than 8. | 177 | * |
178 | * For pseudocolor: offset and length should be the same for all color | ||
179 | * components. Offset specifies the position of the least significant bit | ||
180 | * of the pallette index in a pixel value. Length indicates the number | ||
181 | * of available palette entries (i.e. # of entries = 1 << length). | ||
178 | */ | 182 | */ |
179 | struct fb_bitfield { | 183 | struct fb_bitfield { |
180 | __u32 offset; /* beginning of bitfield */ | 184 | __u32 offset; /* beginning of bitfield */ |
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h index 671decbd2aeb..934e22d65801 100644 --- a/include/linux/fiemap.h +++ b/include/linux/fiemap.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef _LINUX_FIEMAP_H | 11 | #ifndef _LINUX_FIEMAP_H |
12 | #define _LINUX_FIEMAP_H | 12 | #define _LINUX_FIEMAP_H |
13 | 13 | ||
14 | #include <linux/types.h> | ||
15 | |||
14 | struct fiemap_extent { | 16 | struct fiemap_extent { |
15 | __u64 fe_logical; /* logical offset in bytes for the start of | 17 | __u64 fe_logical; /* logical offset in bytes for the start of |
16 | * the extent from the beginning of the file */ | 18 | * the extent from the beginning of the file */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 562d2855cf30..5bed436f4353 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -87,6 +87,60 @@ struct inodes_stat_t { | |||
87 | */ | 87 | */ |
88 | #define FMODE_NOCMTIME ((__force fmode_t)2048) | 88 | #define FMODE_NOCMTIME ((__force fmode_t)2048) |
89 | 89 | ||
90 | /* | ||
91 | * The below are the various read and write types that we support. Some of | ||
92 | * them include behavioral modifiers that send information down to the | ||
93 | * block layer and IO scheduler. Terminology: | ||
94 | * | ||
95 | * The block layer uses device plugging to defer IO a little bit, in | ||
96 | * the hope that we will see more IO very shortly. This increases | ||
97 | * coalescing of adjacent IO and thus reduces the number of IOs we | ||
98 | * have to send to the device. It also allows for better queuing, | ||
99 | * if the IO isn't mergeable. If the caller is going to be waiting | ||
100 | * for the IO, then he must ensure that the device is unplugged so | ||
101 | * that the IO is dispatched to the driver. | ||
102 | * | ||
103 | * All IO is handled async in Linux. This is fine for background | ||
104 | * writes, but for reads or writes that someone waits for completion | ||
105 | * on, we want to notify the block layer and IO scheduler so that they | ||
106 | * know about it. That allows them to make better scheduling | ||
107 | * decisions. So when the below references 'sync' and 'async', it | ||
108 | * is referencing this priority hint. | ||
109 | * | ||
110 | * With that in mind, the available types are: | ||
111 | * | ||
112 | * READ A normal read operation. Device will be plugged. | ||
113 | * READ_SYNC A synchronous read. Device is not plugged, caller can | ||
114 | * immediately wait on this read without caring about | ||
115 | * unplugging. | ||
116 | * READA Used for read-ahead operations. Lower priority, and the | ||
117 | * block layer could (in theory) choose to ignore this | ||
118 | * request if it runs into resource problems. | ||
119 | * WRITE A normal async write. Device will be plugged. | ||
120 | * SWRITE Like WRITE, but a special case for ll_rw_block() that | ||
121 | * tells it to lock the buffer first. Normally a buffer | ||
122 | * must be locked before doing IO. | ||
123 | * WRITE_SYNC_PLUG Synchronous write. Identical to WRITE, but passes down | ||
124 | * the hint that someone will be waiting on this IO | ||
125 | * shortly. The device must still be unplugged explicitly, | ||
126 | * WRITE_SYNC_PLUG does not do this as we could be | ||
127 | * submitting more writes before we actually wait on any | ||
128 | * of them. | ||
129 | * WRITE_SYNC Like WRITE_SYNC_PLUG, but also unplugs the device | ||
130 | * immediately after submission. The write equivalent | ||
131 | * of READ_SYNC. | ||
132 | * WRITE_ODIRECT Special case write for O_DIRECT only. | ||
133 | * SWRITE_SYNC | ||
134 | * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer. | ||
135 | * See SWRITE. | ||
136 | * WRITE_BARRIER Like WRITE, but tells the block layer that all | ||
137 | * previously submitted writes must be safely on storage | ||
138 | * before this one is started. Also guarantees that when | ||
139 | * this write is complete, it itself is also safely on | ||
140 | * storage. Prevents reordering of writes on both sides | ||
141 | * of this IO. | ||
142 | * | ||
143 | */ | ||
90 | #define RW_MASK 1 | 144 | #define RW_MASK 1 |
91 | #define RWA_MASK 2 | 145 | #define RWA_MASK 2 |
92 | #define READ 0 | 146 | #define READ 0 |
@@ -102,6 +156,11 @@ struct inodes_stat_t { | |||
102 | (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) | 156 | (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) |
103 | #define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) | 157 | #define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) |
104 | #define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) | 158 | #define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) |
159 | |||
160 | /* | ||
161 | * These aren't really reads or writes, they pass down information about | ||
162 | * parts of device that are now unused by the file system. | ||
163 | */ | ||
105 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) | 164 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) |
106 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) | 165 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) |
107 | 166 | ||
@@ -738,9 +797,6 @@ enum inode_i_mutex_lock_class | |||
738 | I_MUTEX_QUOTA | 797 | I_MUTEX_QUOTA |
739 | }; | 798 | }; |
740 | 799 | ||
741 | extern void inode_double_lock(struct inode *inode1, struct inode *inode2); | ||
742 | extern void inode_double_unlock(struct inode *inode1, struct inode *inode2); | ||
743 | |||
744 | /* | 800 | /* |
745 | * NOTE: in a 32bit arch with a preemptable kernel and | 801 | * NOTE: in a 32bit arch with a preemptable kernel and |
746 | * an UP compile the i_size_read/write must be atomic | 802 | * an UP compile the i_size_read/write must be atomic |
@@ -2150,8 +2206,6 @@ extern ssize_t generic_file_splice_read(struct file *, loff_t *, | |||
2150 | struct pipe_inode_info *, size_t, unsigned int); | 2206 | struct pipe_inode_info *, size_t, unsigned int); |
2151 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | 2207 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, |
2152 | struct file *, loff_t *, size_t, unsigned int); | 2208 | struct file *, loff_t *, size_t, unsigned int); |
2153 | extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *, | ||
2154 | struct file *, loff_t *, size_t, unsigned int); | ||
2155 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | 2209 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, |
2156 | struct file *out, loff_t *, size_t len, unsigned int flags); | 2210 | struct file *out, loff_t *, size_t len, unsigned int flags); |
2157 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | 2211 | extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, |
@@ -2245,9 +2299,8 @@ extern int vfs_readdir(struct file *, filldir_t, void *); | |||
2245 | 2299 | ||
2246 | extern int vfs_stat(char __user *, struct kstat *); | 2300 | extern int vfs_stat(char __user *, struct kstat *); |
2247 | extern int vfs_lstat(char __user *, struct kstat *); | 2301 | extern int vfs_lstat(char __user *, struct kstat *); |
2248 | extern int vfs_stat_fd(int dfd, char __user *, struct kstat *); | ||
2249 | extern int vfs_lstat_fd(int dfd, char __user *, struct kstat *); | ||
2250 | extern int vfs_fstat(unsigned int, struct kstat *); | 2302 | extern int vfs_fstat(unsigned int, struct kstat *); |
2303 | extern int vfs_fstatat(int , char __user *, struct kstat *, int); | ||
2251 | 2304 | ||
2252 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2305 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
2253 | unsigned long arg); | 2306 | unsigned long arg); |
@@ -2395,7 +2448,7 @@ struct ctl_table; | |||
2395 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, | 2448 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, |
2396 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2449 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2397 | 2450 | ||
2398 | int get_filesystem_list(char * buf); | 2451 | int __init get_filesystem_list(char *buf); |
2399 | 2452 | ||
2400 | #endif /* __KERNEL__ */ | 2453 | #endif /* __KERNEL__ */ |
2401 | #endif /* _LINUX_FS_H */ | 2454 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index f2a78b5e8b55..244677cc082b 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -43,10 +43,6 @@ | |||
43 | * | 43 | * |
44 | */ | 44 | */ |
45 | 45 | ||
46 | /* Flags related to I2C device features */ | ||
47 | #define FSL_I2C_DEV_SEPARATE_DFSRR 0x00000001 | ||
48 | #define FSL_I2C_DEV_CLOCK_5200 0x00000002 | ||
49 | |||
50 | enum fsl_usb2_operating_modes { | 46 | enum fsl_usb2_operating_modes { |
51 | FSL_USB2_MPH_HOST, | 47 | FSL_USB2_MPH_HOST, |
52 | FSL_USB2_DR_HOST, | 48 | FSL_USB2_DR_HOST, |
@@ -83,6 +79,10 @@ struct fsl_spi_platform_data { | |||
83 | u16 max_chipselect; | 79 | u16 max_chipselect; |
84 | void (*cs_control)(struct spi_device *spi, bool on); | 80 | void (*cs_control)(struct spi_device *spi, bool on); |
85 | u32 sysclk; | 81 | u32 sysclk; |
82 | |||
83 | /* Legacy hooks, used by mpc52xx_psc_spi driver. */ | ||
84 | void (*activate_cs)(u8 cs, u8 polarity); | ||
85 | void (*deactivate_cs)(u8 cs, u8 polarity); | ||
86 | }; | 86 | }; |
87 | 87 | ||
88 | struct mpc8xx_pcmcia_ops { | 88 | struct mpc8xx_pcmcia_ops { |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 634c53028fb8..a1a28caed23d 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -214,6 +214,7 @@ static inline void disk_put_part(struct hd_struct *part) | |||
214 | #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ | 214 | #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ |
215 | #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ | 215 | #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ |
216 | #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ | 216 | #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ |
217 | #define DISK_PITER_INCL_EMPTY_PART0 (1 << 3) /* include empty partition 0 */ | ||
217 | 218 | ||
218 | struct disk_part_iter { | 219 | struct disk_part_iter { |
219 | struct gendisk *disk; | 220 | struct gendisk *disk; |
diff --git a/include/linux/init.h b/include/linux/init.h index 68cb0265d009..0e06c176f185 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/section-names.h> | ||
6 | #include <linux/stringify.h> | ||
5 | 7 | ||
6 | /* These macros are used to mark some functions or | 8 | /* These macros are used to mark some functions or |
7 | * initialized data (doesn't apply to uninitialized data) | 9 | * initialized data (doesn't apply to uninitialized data) |
@@ -60,14 +62,6 @@ | |||
60 | #define __refdata __section(.ref.data) | 62 | #define __refdata __section(.ref.data) |
61 | #define __refconst __section(.ref.rodata) | 63 | #define __refconst __section(.ref.rodata) |
62 | 64 | ||
63 | /* backward compatibility note | ||
64 | * A few places hardcode the old section names: | ||
65 | * .text.init.refok | ||
66 | * .data.init.refok | ||
67 | * .exit.text.refok | ||
68 | * They should be converted to use the defines from this file | ||
69 | */ | ||
70 | |||
71 | /* compatibility defines */ | 65 | /* compatibility defines */ |
72 | #define __init_refok __ref | 66 | #define __init_refok __ref |
73 | #define __initdata_refok __refdata | 67 | #define __initdata_refok __refdata |
@@ -107,7 +101,7 @@ | |||
107 | #define __memexitconst __section(.memexit.rodata) | 101 | #define __memexitconst __section(.memexit.rodata) |
108 | 102 | ||
109 | /* For assembly routines */ | 103 | /* For assembly routines */ |
110 | #define __HEAD .section ".head.text","ax" | 104 | #define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax" |
111 | #define __INIT .section ".init.text","ax" | 105 | #define __INIT .section ".init.text","ax" |
112 | #define __FINIT .previous | 106 | #define __FINIT .previous |
113 | 107 | ||
@@ -247,6 +241,7 @@ struct obs_kernel_param { | |||
247 | 241 | ||
248 | /* Relies on boot_command_line being set */ | 242 | /* Relies on boot_command_line being set */ |
249 | void __init parse_early_param(void); | 243 | void __init parse_early_param(void); |
244 | void __init parse_early_options(char *cmdline); | ||
250 | #endif /* __ASSEMBLY__ */ | 245 | #endif /* __ASSEMBLY__ */ |
251 | 246 | ||
252 | /** | 247 | /** |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6fc218529863..889bf99eca6d 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -15,19 +15,6 @@ | |||
15 | extern struct files_struct init_files; | 15 | extern struct files_struct init_files; |
16 | extern struct fs_struct init_fs; | 16 | extern struct fs_struct init_fs; |
17 | 17 | ||
18 | #define INIT_KIOCTX(name, which_mm) \ | ||
19 | { \ | ||
20 | .users = ATOMIC_INIT(1), \ | ||
21 | .dead = 0, \ | ||
22 | .mm = &which_mm, \ | ||
23 | .user_id = 0, \ | ||
24 | .next = NULL, \ | ||
25 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait), \ | ||
26 | .ctx_lock = __SPIN_LOCK_UNLOCKED(name.ctx_lock), \ | ||
27 | .reqs_active = 0U, \ | ||
28 | .max_reqs = ~0U, \ | ||
29 | } | ||
30 | |||
31 | #define INIT_MM(name) \ | 18 | #define INIT_MM(name) \ |
32 | { \ | 19 | { \ |
33 | .mm_rb = RB_ROOT, \ | 20 | .mm_rb = RB_ROOT, \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 6b28048fc568..0e6ff5de3588 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -106,6 +106,7 @@ struct input_absinfo { | |||
106 | 106 | ||
107 | #define SYN_REPORT 0 | 107 | #define SYN_REPORT 0 |
108 | #define SYN_CONFIG 1 | 108 | #define SYN_CONFIG 1 |
109 | #define SYN_MT_REPORT 2 | ||
109 | 110 | ||
110 | /* | 111 | /* |
111 | * Keys and buttons | 112 | * Keys and buttons |
@@ -445,6 +446,7 @@ struct input_absinfo { | |||
445 | #define BTN_STYLUS2 0x14c | 446 | #define BTN_STYLUS2 0x14c |
446 | #define BTN_TOOL_DOUBLETAP 0x14d | 447 | #define BTN_TOOL_DOUBLETAP 0x14d |
447 | #define BTN_TOOL_TRIPLETAP 0x14e | 448 | #define BTN_TOOL_TRIPLETAP 0x14e |
449 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
448 | 450 | ||
449 | #define BTN_WHEEL 0x150 | 451 | #define BTN_WHEEL 0x150 |
450 | #define BTN_GEAR_DOWN 0x150 | 452 | #define BTN_GEAR_DOWN 0x150 |
@@ -644,6 +646,17 @@ struct input_absinfo { | |||
644 | #define ABS_TOOL_WIDTH 0x1c | 646 | #define ABS_TOOL_WIDTH 0x1c |
645 | #define ABS_VOLUME 0x20 | 647 | #define ABS_VOLUME 0x20 |
646 | #define ABS_MISC 0x28 | 648 | #define ABS_MISC 0x28 |
649 | |||
650 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
651 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
652 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
653 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
654 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
655 | #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ | ||
656 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ | ||
657 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
658 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
659 | |||
647 | #define ABS_MAX 0x3f | 660 | #define ABS_MAX 0x3f |
648 | #define ABS_CNT (ABS_MAX+1) | 661 | #define ABS_CNT (ABS_MAX+1) |
649 | 662 | ||
@@ -743,6 +756,12 @@ struct input_absinfo { | |||
743 | #define BUS_ATARI 0x1B | 756 | #define BUS_ATARI 0x1B |
744 | 757 | ||
745 | /* | 758 | /* |
759 | * MT_TOOL types | ||
760 | */ | ||
761 | #define MT_TOOL_FINGER 0 | ||
762 | #define MT_TOOL_PEN 1 | ||
763 | |||
764 | /* | ||
746 | * Values describing the status of a force-feedback effect | 765 | * Values describing the status of a force-feedback effect |
747 | */ | 766 | */ |
748 | #define FF_STATUS_STOPPED 0x00 | 767 | #define FF_STATUS_STOPPED 0x00 |
@@ -1311,6 +1330,11 @@ static inline void input_sync(struct input_dev *dev) | |||
1311 | input_event(dev, EV_SYN, SYN_REPORT, 0); | 1330 | input_event(dev, EV_SYN, SYN_REPORT, 0); |
1312 | } | 1331 | } |
1313 | 1332 | ||
1333 | static inline void input_mt_sync(struct input_dev *dev) | ||
1334 | { | ||
1335 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | ||
1336 | } | ||
1337 | |||
1314 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1338 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
1315 | 1339 | ||
1316 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) | 1340 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 7ebdb4fb4e54..65aae34759de 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -198,6 +198,8 @@ struct kernel_ipmi_msg { | |||
198 | response. When you send a | 198 | response. When you send a |
199 | response message, this will | 199 | response message, this will |
200 | be returned. */ | 200 | be returned. */ |
201 | #define IPMI_OEM_RECV_TYPE 5 /* The response for OEM Channels */ | ||
202 | |||
201 | /* Note that async events and received commands do not have a completion | 203 | /* Note that async events and received commands do not have a completion |
202 | code as the first byte of the incoming data, unlike a response. */ | 204 | code as the first byte of the incoming data, unlike a response. */ |
203 | 205 | ||
diff --git a/include/linux/ipmi_msgdefs.h b/include/linux/ipmi_msgdefs.h index b56a158d587a..df97e6e31e87 100644 --- a/include/linux/ipmi_msgdefs.h +++ b/include/linux/ipmi_msgdefs.h | |||
@@ -58,6 +58,12 @@ | |||
58 | #define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35 | 58 | #define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35 |
59 | #define IPMI_GET_CHANNEL_INFO_CMD 0x42 | 59 | #define IPMI_GET_CHANNEL_INFO_CMD 0x42 |
60 | 60 | ||
61 | /* Bit for BMC global enables. */ | ||
62 | #define IPMI_BMC_RCV_MSG_INTR 0x01 | ||
63 | #define IPMI_BMC_EVT_MSG_INTR 0x02 | ||
64 | #define IPMI_BMC_EVT_MSG_BUFF 0x04 | ||
65 | #define IPMI_BMC_SYS_LOG 0x08 | ||
66 | |||
61 | #define IPMI_NETFN_STORAGE_REQUEST 0x0a | 67 | #define IPMI_NETFN_STORAGE_REQUEST 0x0a |
62 | #define IPMI_NETFN_STORAGE_RESPONSE 0x0b | 68 | #define IPMI_NETFN_STORAGE_RESPONSE 0x0b |
63 | #define IPMI_ADD_SEL_ENTRY_CMD 0x44 | 69 | #define IPMI_ADD_SEL_ENTRY_CMD 0x44 |
@@ -109,5 +115,7 @@ | |||
109 | #define IPMI_CHANNEL_MEDIUM_USB1 10 | 115 | #define IPMI_CHANNEL_MEDIUM_USB1 10 |
110 | #define IPMI_CHANNEL_MEDIUM_USB2 11 | 116 | #define IPMI_CHANNEL_MEDIUM_USB2 11 |
111 | #define IPMI_CHANNEL_MEDIUM_SYSINTF 12 | 117 | #define IPMI_CHANNEL_MEDIUM_SYSINTF 12 |
118 | #define IPMI_CHANNEL_MEDIUM_OEM_MIN 0x60 | ||
119 | #define IPMI_CHANNEL_MEDIUM_OEM_MAX 0x7f | ||
112 | 120 | ||
113 | #endif /* __LINUX_IPMI_MSGDEFS_H */ | 121 | #endif /* __LINUX_IPMI_MSGDEFS_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 53ae4399da2d..c2049a04fa0b 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -978,7 +978,8 @@ extern void journal_destroy_revoke(journal_t *); | |||
978 | extern int journal_revoke (handle_t *, | 978 | extern int journal_revoke (handle_t *, |
979 | unsigned long, struct buffer_head *); | 979 | unsigned long, struct buffer_head *); |
980 | extern int journal_cancel_revoke(handle_t *, struct journal_head *); | 980 | extern int journal_cancel_revoke(handle_t *, struct journal_head *); |
981 | extern void journal_write_revoke_records(journal_t *, transaction_t *); | 981 | extern void journal_write_revoke_records(journal_t *, |
982 | transaction_t *, int); | ||
982 | 983 | ||
983 | /* Recovery revoke support */ | 984 | /* Recovery revoke support */ |
984 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); | 985 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 8815a3456b3b..cc02393bfce8 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1193,7 +1193,8 @@ extern int jbd2_journal_init_revoke_caches(void); | |||
1193 | extern void jbd2_journal_destroy_revoke(journal_t *); | 1193 | extern void jbd2_journal_destroy_revoke(journal_t *); |
1194 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); | 1194 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); |
1195 | extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); | 1195 | extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); |
1196 | extern void jbd2_journal_write_revoke_records(journal_t *, transaction_t *); | 1196 | extern void jbd2_journal_write_revoke_records(journal_t *, |
1197 | transaction_t *, int); | ||
1197 | 1198 | ||
1198 | /* Recovery revoke support */ | 1199 | /* Recovery revoke support */ |
1199 | extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); | 1200 | extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d9e75ec7def5..883cd44ff765 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -377,6 +377,15 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
377 | #define pr_cont(fmt, ...) \ | 377 | #define pr_cont(fmt, ...) \ |
378 | printk(KERN_CONT fmt, ##__VA_ARGS__) | 378 | printk(KERN_CONT fmt, ##__VA_ARGS__) |
379 | 379 | ||
380 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
381 | #ifdef DEBUG | ||
382 | #define pr_devel(fmt, ...) \ | ||
383 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
384 | #else | ||
385 | #define pr_devel(fmt, ...) \ | ||
386 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
387 | #endif | ||
388 | |||
380 | /* If you are writing a driver, please use dev_dbg instead */ | 389 | /* If you are writing a driver, please use dev_dbg instead */ |
381 | #if defined(DEBUG) | 390 | #if defined(DEBUG) |
382 | #define pr_debug(fmt, ...) \ | 391 | #define pr_debug(fmt, ...) \ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 311a073afe8a..8cc137911b34 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -409,6 +409,8 @@ struct kvm_trace_rec { | |||
409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT | 409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT |
410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 | 410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 |
411 | #endif | 411 | #endif |
412 | /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ | ||
413 | #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 | ||
412 | 414 | ||
413 | #ifdef KVM_CAP_IRQ_ROUTING | 415 | #ifdef KVM_CAP_IRQ_ROUTING |
414 | 416 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index b450a2628855..3d501db36a26 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -209,6 +209,7 @@ enum { | |||
209 | 209 | ||
210 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ | 210 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
211 | 211 | ||
212 | |||
212 | /* struct ata_port pflags */ | 213 | /* struct ata_port pflags */ |
213 | ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */ | 214 | ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */ |
214 | ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */ | 215 | ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */ |
@@ -225,6 +226,9 @@ enum { | |||
225 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 226 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
226 | ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */ | 227 | ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */ |
227 | 228 | ||
229 | ATA_PFLAG_PIO32 = (1 << 20), /* 32bit PIO */ | ||
230 | ATA_PFLAG_PIO32CHANGE = (1 << 21), /* 32bit PIO can be turned on/off */ | ||
231 | |||
228 | /* struct ata_queued_cmd flags */ | 232 | /* struct ata_queued_cmd flags */ |
229 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ | 233 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
230 | ATA_QCFLAG_DMAMAP = (1 << 1), /* SG table is DMA mapped */ | 234 | ATA_QCFLAG_DMAMAP = (1 << 1), /* SG table is DMA mapped */ |
@@ -689,7 +693,10 @@ struct ata_port { | |||
689 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ | 693 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
690 | struct ata_port_operations *ops; | 694 | struct ata_port_operations *ops; |
691 | spinlock_t *lock; | 695 | spinlock_t *lock; |
696 | /* Flags owned by the EH context. Only EH should touch these once the | ||
697 | port is active */ | ||
692 | unsigned long flags; /* ATA_FLAG_xxx */ | 698 | unsigned long flags; /* ATA_FLAG_xxx */ |
699 | /* Flags that change dynamically, protected by ap->lock */ | ||
693 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 700 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
694 | unsigned int print_id; /* user visible unique port ID */ | 701 | unsigned int print_id; /* user visible unique port ID */ |
695 | unsigned int port_no; /* 0 based port no. inside the host */ | 702 | unsigned int port_no; /* 0 based port no. inside the host */ |
@@ -1595,6 +1602,7 @@ extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); | |||
1595 | extern void ata_sff_error_handler(struct ata_port *ap); | 1602 | extern void ata_sff_error_handler(struct ata_port *ap); |
1596 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); | 1603 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); |
1597 | extern int ata_sff_port_start(struct ata_port *ap); | 1604 | extern int ata_sff_port_start(struct ata_port *ap); |
1605 | extern int ata_sff_port_start32(struct ata_port *ap); | ||
1598 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); | 1606 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); |
1599 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, | 1607 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, |
1600 | unsigned long xfer_mask); | 1608 | unsigned long xfer_mask); |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 18146c980b68..25b9ca93d232 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -56,7 +56,7 @@ extern void mem_cgroup_move_lists(struct page *page, | |||
56 | enum lru_list from, enum lru_list to); | 56 | enum lru_list from, enum lru_list to); |
57 | extern void mem_cgroup_uncharge_page(struct page *page); | 57 | extern void mem_cgroup_uncharge_page(struct page *page); |
58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
59 | extern int mem_cgroup_shrink_usage(struct page *page, | 59 | extern int mem_cgroup_shmem_charge_fallback(struct page *page, |
60 | struct mm_struct *mm, gfp_t gfp_mask); | 60 | struct mm_struct *mm, gfp_t gfp_mask); |
61 | 61 | ||
62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
@@ -75,7 +75,7 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | |||
75 | { | 75 | { |
76 | struct mem_cgroup *mem; | 76 | struct mem_cgroup *mem; |
77 | rcu_read_lock(); | 77 | rcu_read_lock(); |
78 | mem = mem_cgroup_from_task((mm)->owner); | 78 | mem = mem_cgroup_from_task(rcu_dereference((mm)->owner)); |
79 | rcu_read_unlock(); | 79 | rcu_read_unlock(); |
80 | return cgroup == mem; | 80 | return cgroup == mem; |
81 | } | 81 | } |
@@ -155,7 +155,7 @@ static inline void mem_cgroup_uncharge_cache_page(struct page *page) | |||
155 | { | 155 | { |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline int mem_cgroup_shrink_usage(struct page *page, | 158 | static inline int mem_cgroup_shmem_charge_fallback(struct page *page, |
159 | struct mm_struct *mm, gfp_t gfp_mask) | 159 | struct mm_struct *mm, gfp_t gfp_mask) |
160 | { | 160 | { |
161 | return 0; | 161 | return 0; |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 30d1073bac3b..9872d6ca58ae 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -12,21 +12,18 @@ | |||
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/percpu_counter.h> | ||
15 | 16 | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | 18 | ||
18 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
19 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
20 | extern atomic_long_t vm_committed_space; | 21 | extern struct percpu_counter vm_committed_as; |
21 | 22 | ||
22 | #ifdef CONFIG_SMP | ||
23 | extern void vm_acct_memory(long pages); | ||
24 | #else | ||
25 | static inline void vm_acct_memory(long pages) | 23 | static inline void vm_acct_memory(long pages) |
26 | { | 24 | { |
27 | atomic_long_add(pages, &vm_committed_space); | 25 | percpu_counter_add(&vm_committed_as, pages); |
28 | } | 26 | } |
29 | #endif | ||
30 | 27 | ||
31 | static inline void vm_unacct_memory(long pages) | 28 | static inline void vm_unacct_memory(long pages) |
32 | { | 29 | { |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2e7783f4a755..5a96a1a406e9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -104,7 +104,7 @@ struct wireless_dev; | |||
104 | # else | 104 | # else |
105 | # define LL_MAX_HEADER 96 | 105 | # define LL_MAX_HEADER 96 |
106 | # endif | 106 | # endif |
107 | #elif defined(CONFIG_TR) | 107 | #elif defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) |
108 | # define LL_MAX_HEADER 48 | 108 | # define LL_MAX_HEADER 48 |
109 | #else | 109 | #else |
110 | # define LL_MAX_HEADER 32 | 110 | # define LL_MAX_HEADER 32 |
@@ -500,7 +500,7 @@ struct netdev_queue { | |||
500 | * | 500 | * |
501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); | 501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); |
502 | * This function is called when the Media Access Control address | 502 | * This function is called when the Media Access Control address |
503 | * needs to be changed. If not this interface is not defined, the | 503 | * needs to be changed. If this interface is not defined, the |
504 | * mac address can not be changed. | 504 | * mac address can not be changed. |
505 | * | 505 | * |
506 | * int (*ndo_validate_addr)(struct net_device *dev); | 506 | * int (*ndo_validate_addr)(struct net_device *dev); |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 29fe9ea1d346..1a865e48b8eb 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -100,6 +100,7 @@ enum ctattr_protoinfo_tcp { | |||
100 | enum ctattr_protoinfo_dccp { | 100 | enum ctattr_protoinfo_dccp { |
101 | CTA_PROTOINFO_DCCP_UNSPEC, | 101 | CTA_PROTOINFO_DCCP_UNSPEC, |
102 | CTA_PROTOINFO_DCCP_STATE, | 102 | CTA_PROTOINFO_DCCP_STATE, |
103 | CTA_PROTOINFO_DCCP_ROLE, | ||
103 | __CTA_PROTOINFO_DCCP_MAX, | 104 | __CTA_PROTOINFO_DCCP_MAX, |
104 | }; | 105 | }; |
105 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) | 106 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7b1a652066c0..c9efe039dc57 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -354,9 +354,6 @@ struct xt_table | |||
354 | /* What hooks you will enter on */ | 354 | /* What hooks you will enter on */ |
355 | unsigned int valid_hooks; | 355 | unsigned int valid_hooks; |
356 | 356 | ||
357 | /* Lock for the curtain */ | ||
358 | struct mutex lock; | ||
359 | |||
360 | /* Man behind the curtain... */ | 357 | /* Man behind the curtain... */ |
361 | struct xt_table_info *private; | 358 | struct xt_table_info *private; |
362 | 359 | ||
@@ -434,8 +431,74 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
434 | 431 | ||
435 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 432 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
436 | extern void xt_free_table_info(struct xt_table_info *info); | 433 | extern void xt_free_table_info(struct xt_table_info *info); |
437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | 434 | |
438 | struct xt_table_info *new); | 435 | /* |
436 | * Per-CPU spinlock associated with per-cpu table entries, and | ||
437 | * with a counter for the "reading" side that allows a recursive | ||
438 | * reader to avoid taking the lock and deadlocking. | ||
439 | * | ||
440 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | ||
441 | * It needs to ensure that the rules are not being changed while the packet | ||
442 | * is being processed. In some cases, the read lock will be acquired | ||
443 | * twice on the same CPU; this is okay because of the count. | ||
444 | * | ||
445 | * "writing" is used when reading counters. | ||
446 | * During replace any readers that are using the old tables have to complete | ||
447 | * before freeing the old table. This is handled by the write locking | ||
448 | * necessary for reading the counters. | ||
449 | */ | ||
450 | struct xt_info_lock { | ||
451 | spinlock_t lock; | ||
452 | unsigned char readers; | ||
453 | }; | ||
454 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
455 | |||
456 | /* | ||
457 | * Note: we need to ensure that preemption is disabled before acquiring | ||
458 | * the per-cpu-variable, so we do it as a two step process rather than | ||
459 | * using "spin_lock_bh()". | ||
460 | * | ||
461 | * We _also_ need to disable bottom half processing before updating our | ||
462 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
463 | * code being called by itself: since the count+lock is not an atomic | ||
464 | * operation, we can allow no races. | ||
465 | * | ||
466 | * _Only_ that special combination of being per-cpu and never getting | ||
467 | * re-entered asynchronously means that the count is safe. | ||
468 | */ | ||
469 | static inline void xt_info_rdlock_bh(void) | ||
470 | { | ||
471 | struct xt_info_lock *lock; | ||
472 | |||
473 | local_bh_disable(); | ||
474 | lock = &__get_cpu_var(xt_info_locks); | ||
475 | if (likely(!lock->readers++)) | ||
476 | spin_lock(&lock->lock); | ||
477 | } | ||
478 | |||
479 | static inline void xt_info_rdunlock_bh(void) | ||
480 | { | ||
481 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | ||
482 | |||
483 | if (likely(!--lock->readers)) | ||
484 | spin_unlock(&lock->lock); | ||
485 | local_bh_enable(); | ||
486 | } | ||
487 | |||
488 | /* | ||
489 | * The "writer" side needs to get exclusive access to the lock, | ||
490 | * regardless of readers. This must be called with bottom half | ||
491 | * processing (and thus also preemption) disabled. | ||
492 | */ | ||
493 | static inline void xt_info_wrlock(unsigned int cpu) | ||
494 | { | ||
495 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | ||
496 | } | ||
497 | |||
498 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
499 | { | ||
500 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | ||
501 | } | ||
439 | 502 | ||
440 | /* | 503 | /* |
441 | * This helper is performance critical and must be inlined | 504 | * This helper is performance critical and must be inlined |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 3d327b67d7e2..908406651330 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -51,6 +51,16 @@ extern int of_register_driver(struct of_platform_driver *drv, | |||
51 | struct bus_type *bus); | 51 | struct bus_type *bus); |
52 | extern void of_unregister_driver(struct of_platform_driver *drv); | 52 | extern void of_unregister_driver(struct of_platform_driver *drv); |
53 | 53 | ||
54 | /* Platform drivers register/unregister */ | ||
55 | static inline int of_register_platform_driver(struct of_platform_driver *drv) | ||
56 | { | ||
57 | return of_register_driver(drv, &of_platform_bus_type); | ||
58 | } | ||
59 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
60 | { | ||
61 | of_unregister_driver(drv); | ||
62 | } | ||
63 | |||
54 | #include <asm/of_platform.h> | 64 | #include <asm/of_platform.h> |
55 | 65 | ||
56 | extern struct of_device *of_find_device_by_node(struct device_node *np); | 66 | extern struct of_device *of_find_device_by_node(struct device_node *np); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ee98cd570885..06ba90c211a5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2514,6 +2514,8 @@ | |||
2514 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG3 0x3433 | 2514 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG3 0x3433 |
2515 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2515 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2516 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2516 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
2517 | #define PCI_DEVICE_ID_INTEL_82854_HB 0x358c | ||
2518 | #define PCI_DEVICE_ID_INTEL_82854_IG 0x358e | ||
2517 | #define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580 | 2519 | #define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580 |
2518 | #define PCI_DEVICE_ID_INTEL_82855GM_IG 0x3582 | 2520 | #define PCI_DEVICE_ID_INTEL_82855GM_IG 0x3582 |
2519 | #define PCI_DEVICE_ID_INTEL_E7520_MCH 0x3590 | 2521 | #define PCI_DEVICE_ID_INTEL_E7520_MCH 0x3590 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index e4d08c1b2e0b..616bf8b3c8b5 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -376,6 +376,7 @@ | |||
376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
379 | #define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ | ||
379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 380 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 381 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 382 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h new file mode 100644 index 000000000000..8f921d74f49f --- /dev/null +++ b/include/linux/percpu-defs.h | |||
@@ -0,0 +1,84 @@ | |||
1 | #ifndef _LINUX_PERCPU_DEFS_H | ||
2 | #define _LINUX_PERCPU_DEFS_H | ||
3 | |||
4 | /* | ||
5 | * Determine the real variable name from the name visible in the | ||
6 | * kernel sources. | ||
7 | */ | ||
8 | #define per_cpu_var(var) per_cpu__##var | ||
9 | |||
10 | /* | ||
11 | * Base implementations of per-CPU variable declarations and definitions, where | ||
12 | * the section in which the variable is to be placed is provided by the | ||
13 | * 'section' argument. This may be used to affect the parameters governing the | ||
14 | * variable's storage. | ||
15 | * | ||
16 | * NOTE! The sections for the DECLARE and for the DEFINE must match, lest | ||
17 | * linkage errors occur due the compiler generating the wrong code to access | ||
18 | * that section. | ||
19 | */ | ||
20 | #define DECLARE_PER_CPU_SECTION(type, name, section) \ | ||
21 | extern \ | ||
22 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
23 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
24 | |||
25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | ||
26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
27 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
28 | |||
29 | /* | ||
30 | * Variant on the per-CPU variable declaration/definition theme used for | ||
31 | * ordinary per-CPU variables. | ||
32 | */ | ||
33 | #define DECLARE_PER_CPU(type, name) \ | ||
34 | DECLARE_PER_CPU_SECTION(type, name, "") | ||
35 | |||
36 | #define DEFINE_PER_CPU(type, name) \ | ||
37 | DEFINE_PER_CPU_SECTION(type, name, "") | ||
38 | |||
39 | /* | ||
40 | * Declaration/definition used for per-CPU variables that must come first in | ||
41 | * the set of variables. | ||
42 | */ | ||
43 | #define DECLARE_PER_CPU_FIRST(type, name) \ | ||
44 | DECLARE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
45 | |||
46 | #define DEFINE_PER_CPU_FIRST(type, name) \ | ||
47 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
48 | |||
49 | /* | ||
50 | * Declaration/definition used for per-CPU variables that must be cacheline | ||
51 | * aligned under SMP conditions so that, whilst a particular instance of the | ||
52 | * data corresponds to a particular CPU, inefficiencies due to direct access by | ||
53 | * other CPUs are reduced by preventing the data from unnecessarily spanning | ||
54 | * cachelines. | ||
55 | * | ||
56 | * An example of this would be statistical data, where each CPU's set of data | ||
57 | * is updated by that CPU alone, but the data from across all CPUs is collated | ||
58 | * by a CPU processing a read from a proc file. | ||
59 | */ | ||
60 | #define DECLARE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
61 | DECLARE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ | ||
62 | ____cacheline_aligned_in_smp | ||
63 | |||
64 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
65 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ | ||
66 | ____cacheline_aligned_in_smp | ||
67 | |||
68 | /* | ||
69 | * Declaration/definition used for per-CPU variables that must be page aligned. | ||
70 | */ | ||
71 | #define DECLARE_PER_CPU_PAGE_ALIGNED(type, name) \ | ||
72 | DECLARE_PER_CPU_SECTION(type, name, ".page_aligned") | ||
73 | |||
74 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | ||
75 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") | ||
76 | |||
77 | /* | ||
78 | * Intermodule exports for per-CPU variables. | ||
79 | */ | ||
80 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | ||
81 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | ||
82 | |||
83 | |||
84 | #endif /* _LINUX_PERCPU_DEFS_H */ | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index cfda2d5ad319..1581ff235c7e 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -9,50 +9,6 @@ | |||
9 | 9 | ||
10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
11 | 11 | ||
12 | #ifndef PER_CPU_BASE_SECTION | ||
13 | #ifdef CONFIG_SMP | ||
14 | #define PER_CPU_BASE_SECTION ".data.percpu" | ||
15 | #else | ||
16 | #define PER_CPU_BASE_SECTION ".data" | ||
17 | #endif | ||
18 | #endif | ||
19 | |||
20 | #ifdef CONFIG_SMP | ||
21 | |||
22 | #ifdef MODULE | ||
23 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | ||
24 | #else | ||
25 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" | ||
26 | #endif | ||
27 | #define PER_CPU_FIRST_SECTION ".first" | ||
28 | |||
29 | #else | ||
30 | |||
31 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | ||
32 | #define PER_CPU_FIRST_SECTION "" | ||
33 | |||
34 | #endif | ||
35 | |||
36 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | ||
37 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
38 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
39 | |||
40 | #define DEFINE_PER_CPU(type, name) \ | ||
41 | DEFINE_PER_CPU_SECTION(type, name, "") | ||
42 | |||
43 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
44 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ | ||
45 | ____cacheline_aligned_in_smp | ||
46 | |||
47 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | ||
48 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") | ||
49 | |||
50 | #define DEFINE_PER_CPU_FIRST(type, name) \ | ||
51 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
52 | |||
53 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | ||
54 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | ||
55 | |||
56 | /* enough to cover all DEFINE_PER_CPUs in modules */ | 12 | /* enough to cover all DEFINE_PER_CPUs in modules */ |
57 | #ifdef CONFIG_MODULES | 13 | #ifdef CONFIG_MODULES |
58 | #define PERCPU_MODULE_RESERVE (8 << 10) | 14 | #define PERCPU_MODULE_RESERVE (8 << 10) |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 32cf14a4b034..97e40cb6b588 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -388,6 +388,12 @@ struct phy_driver { | |||
388 | /* Enables or disables interrupts */ | 388 | /* Enables or disables interrupts */ |
389 | int (*config_intr)(struct phy_device *phydev); | 389 | int (*config_intr)(struct phy_device *phydev); |
390 | 390 | ||
391 | /* | ||
392 | * Checks if the PHY generated an interrupt. | ||
393 | * For multi-PHY devices with shared PHY interrupt pin | ||
394 | */ | ||
395 | int (*did_interrupt)(struct phy_device *phydev); | ||
396 | |||
391 | /* Clears up any memory if needed */ | 397 | /* Clears up any memory if needed */ |
392 | void (*remove)(struct phy_device *phydev); | 398 | void (*remove)(struct phy_device *phydev); |
393 | 399 | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 8e4120285f72..c8f038554e80 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -134,6 +134,11 @@ struct pipe_buf_operations { | |||
134 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ | 134 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ |
135 | #define PIPE_SIZE PAGE_SIZE | 135 | #define PIPE_SIZE PAGE_SIZE |
136 | 136 | ||
137 | /* Pipe lock and unlock operations */ | ||
138 | void pipe_lock(struct pipe_inode_info *); | ||
139 | void pipe_unlock(struct pipe_inode_info *); | ||
140 | void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *); | ||
141 | |||
137 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 142 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
138 | void pipe_wait(struct pipe_inode_info *pipe); | 143 | void pipe_wait(struct pipe_inode_info *pipe); |
139 | 144 | ||
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 04b4d7330e6d..d745f5b6c7b0 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -113,6 +113,7 @@ struct pkt_ctrl_command { | |||
113 | #include <linux/cdrom.h> | 113 | #include <linux/cdrom.h> |
114 | #include <linux/kobject.h> | 114 | #include <linux/kobject.h> |
115 | #include <linux/sysfs.h> | 115 | #include <linux/sysfs.h> |
116 | #include <linux/mempool.h> | ||
116 | 117 | ||
117 | /* default bio write queue congestion marks */ | 118 | /* default bio write queue congestion marks */ |
118 | #define PKT_WRITE_CONGESTION_ON 10000 | 119 | #define PKT_WRITE_CONGESTION_ON 10000 |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 76e470a299bf..72736fd8223c 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -77,4 +77,46 @@ extern int platform_driver_probe(struct platform_driver *driver, | |||
77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
79 | 79 | ||
80 | /* early platform driver interface */ | ||
81 | struct early_platform_driver { | ||
82 | const char *class_str; | ||
83 | struct platform_driver *pdrv; | ||
84 | struct list_head list; | ||
85 | int requested_id; | ||
86 | }; | ||
87 | |||
88 | #define EARLY_PLATFORM_ID_UNSET -2 | ||
89 | #define EARLY_PLATFORM_ID_ERROR -3 | ||
90 | |||
91 | extern int early_platform_driver_register(struct early_platform_driver *epdrv, | ||
92 | char *buf); | ||
93 | extern void early_platform_add_devices(struct platform_device **devs, int num); | ||
94 | |||
95 | static inline int is_early_platform_device(struct platform_device *pdev) | ||
96 | { | ||
97 | return !pdev->dev.driver; | ||
98 | } | ||
99 | |||
100 | extern void early_platform_driver_register_all(char *class_str); | ||
101 | extern int early_platform_driver_probe(char *class_str, | ||
102 | int nr_probe, int user_only); | ||
103 | extern void early_platform_cleanup(void); | ||
104 | |||
105 | |||
106 | #ifndef MODULE | ||
107 | #define early_platform_init(class_string, platform_driver) \ | ||
108 | static __initdata struct early_platform_driver early_driver = { \ | ||
109 | .class_str = class_string, \ | ||
110 | .pdrv = platform_driver, \ | ||
111 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ | ||
112 | }; \ | ||
113 | static int __init early_platform_driver_setup_func(char *buf) \ | ||
114 | { \ | ||
115 | return early_platform_driver_register(&early_driver, buf); \ | ||
116 | } \ | ||
117 | early_param(class_string, early_platform_driver_setup_func) | ||
118 | #else /* MODULE */ | ||
119 | #define early_platform_init(class_string, platform_driver) | ||
120 | #endif /* MODULE */ | ||
121 | |||
80 | #endif /* _PLATFORM_DEVICE_H_ */ | 122 | #endif /* _PLATFORM_DEVICE_H_ */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 0cdda00f2b2a..58b2aa5312b9 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -161,9 +161,8 @@ struct rcu_data { | |||
161 | unsigned long offline_fqs; /* Kicked due to being offline. */ | 161 | unsigned long offline_fqs; /* Kicked due to being offline. */ |
162 | unsigned long resched_ipi; /* Sent a resched IPI. */ | 162 | unsigned long resched_ipi; /* Sent a resched IPI. */ |
163 | 163 | ||
164 | /* 5) state to allow this CPU to force_quiescent_state on others */ | 164 | /* 5) For future __rcu_pending statistics. */ |
165 | long n_rcu_pending; /* rcu_pending() calls since boot. */ | 165 | long n_rcu_pending; /* rcu_pending() calls since boot. */ |
166 | long n_rcu_pending_force_qs; /* when to force quiescent states. */ | ||
167 | 166 | ||
168 | int cpu; | 167 | int cpu; |
169 | }; | 168 | }; |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4848d8dacd90..225f733e7533 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -50,6 +50,7 @@ enum regulator_status { | |||
50 | * @set_current_limit: Configure a limit for a current-limited regulator. | 50 | * @set_current_limit: Configure a limit for a current-limited regulator. |
51 | * @get_current_limit: Get the configured limit for a current-limited regulator. | 51 | * @get_current_limit: Get the configured limit for a current-limited regulator. |
52 | * | 52 | * |
53 | * @set_mode: Set the configured operating mode for the regulator. | ||
53 | * @get_mode: Get the configured operating mode for the regulator. | 54 | * @get_mode: Get the configured operating mode for the regulator. |
54 | * @get_status: Return actual (not as-configured) status of regulator, as a | 55 | * @get_status: Return actual (not as-configured) status of regulator, as a |
55 | * REGULATOR_STATUS value (or negative errno) | 56 | * REGULATOR_STATUS value (or negative errno) |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 5621d87c4479..6b361d23a499 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -193,7 +193,7 @@ struct reiserfs_journal { | |||
193 | atomic_t j_wcount; /* count of writers for current commit */ | 193 | atomic_t j_wcount; /* count of writers for current commit */ |
194 | unsigned long j_bcount; /* batch count. allows turning X transactions into 1 */ | 194 | unsigned long j_bcount; /* batch count. allows turning X transactions into 1 */ |
195 | unsigned long j_first_unflushed_offset; /* first unflushed transactions offset */ | 195 | unsigned long j_first_unflushed_offset; /* first unflushed transactions offset */ |
196 | unsigned long j_last_flush_trans_id; /* last fully flushed journal timestamp */ | 196 | unsigned j_last_flush_trans_id; /* last fully flushed journal timestamp */ |
197 | struct buffer_head *j_header_bh; | 197 | struct buffer_head *j_header_bh; |
198 | 198 | ||
199 | time_t j_trans_start_time; /* time this transaction started */ | 199 | time_t j_trans_start_time; /* time this transaction started */ |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 262a8dccfa81..167c33361d9c 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -21,6 +21,8 @@ extern long prctl_set_seccomp(unsigned long); | |||
21 | 21 | ||
22 | #else /* CONFIG_SECCOMP */ | 22 | #else /* CONFIG_SECCOMP */ |
23 | 23 | ||
24 | #include <linux/errno.h> | ||
25 | |||
24 | typedef struct { } seccomp_t; | 26 | typedef struct { } seccomp_t; |
25 | 27 | ||
26 | #define secure_computing(x) do { } while (0) | 28 | #define secure_computing(x) do { } while (0) |
diff --git a/include/linux/section-names.h b/include/linux/section-names.h new file mode 100644 index 000000000000..c956f4eb2adf --- /dev/null +++ b/include/linux/section-names.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __LINUX_SECTION_NAMES_H | ||
2 | #define __LINUX_SECTION_NAMES_H | ||
3 | |||
4 | #define HEAD_TEXT_SECTION .head.text | ||
5 | |||
6 | #endif /* !__LINUX_SECTION_NAMES_H */ | ||
diff --git a/include/linux/sht15.h b/include/linux/sht15.h new file mode 100644 index 000000000000..046bce05ecab --- /dev/null +++ b/include/linux/sht15.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * sht15.h - support for the SHT15 Temperature and Humidity Sensor | ||
3 | * | ||
4 | * Copyright (c) 2009 Jonathan Cameron | ||
5 | * | ||
6 | * Copyright (c) 2007 Wouter Horre | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | /** | ||
14 | * struct sht15_platform_data - sht15 connectivity info | ||
15 | * @gpio_data: no. of gpio to which bidirectional data line is connected | ||
16 | * @gpio_sck: no. of gpio to which the data clock is connected. | ||
17 | * @supply_mv: supply voltage in mv. Overridden by regulator if available. | ||
18 | **/ | ||
19 | struct sht15_platform_data { | ||
20 | int gpio_data; | ||
21 | int gpio_sck; | ||
22 | int supply_mv; | ||
23 | }; | ||
24 | |||
diff --git a/include/linux/slow-work.h b/include/linux/slow-work.h index 85958277f83d..b65c8881f07a 100644 --- a/include/linux/slow-work.h +++ b/include/linux/slow-work.h | |||
@@ -67,7 +67,7 @@ static inline void slow_work_init(struct slow_work *work, | |||
67 | } | 67 | } |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * slow_work_init - Initialise a very slow work item | 70 | * vslow_work_init - Initialise a very slow work item |
71 | * @work: The work item to initialise | 71 | * @work: The work item to initialise |
72 | * @ops: The operations to use to handle the slow work item | 72 | * @ops: The operations to use to handle the slow work item |
73 | * | 73 | * |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 05eab2f11e63..2ea20320c093 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -51,5 +51,6 @@ struct ads7846_platform_data { | |||
51 | void **filter_data); | 51 | void **filter_data); |
52 | int (*filter) (void *filter_data, int data_idx, int *val); | 52 | int (*filter) (void *filter_data, int data_idx, int *val); |
53 | void (*filter_cleanup)(void *filter_data); | 53 | void (*filter_cleanup)(void *filter_data); |
54 | void (*wait_for_sync)(void); | ||
54 | }; | 55 | }; |
55 | 56 | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 2cc43fa380cb..a0faa18f7b1b 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -245,7 +245,12 @@ struct spi_master { | |||
245 | */ | 245 | */ |
246 | u16 dma_alignment; | 246 | u16 dma_alignment; |
247 | 247 | ||
248 | /* setup mode and clock, etc (spi driver may call many times) */ | 248 | /* Setup mode and clock, etc (spi driver may call many times). |
249 | * | ||
250 | * IMPORTANT: this may be called when transfers to another | ||
251 | * device are active. DO NOT UPDATE SHARED REGISTERS in ways | ||
252 | * which could break those transfers. | ||
253 | */ | ||
249 | int (*setup)(struct spi_device *spi); | 254 | int (*setup)(struct spi_device *spi); |
250 | 255 | ||
251 | /* bidirectional bulk transfers | 256 | /* bidirectional bulk transfers |
diff --git a/include/linux/splice.h b/include/linux/splice.h index 528dcb93c2f2..5f3faa9d15ae 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h | |||
@@ -36,6 +36,8 @@ struct splice_desc { | |||
36 | void *data; /* cookie */ | 36 | void *data; /* cookie */ |
37 | } u; | 37 | } u; |
38 | loff_t pos; /* file position */ | 38 | loff_t pos; /* file position */ |
39 | size_t num_spliced; /* number of bytes already spliced */ | ||
40 | bool need_wakeup; /* need to wake up writer */ | ||
39 | }; | 41 | }; |
40 | 42 | ||
41 | struct partial_page { | 43 | struct partial_page { |
@@ -66,6 +68,16 @@ extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | |||
66 | splice_actor *); | 68 | splice_actor *); |
67 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, | 69 | extern ssize_t __splice_from_pipe(struct pipe_inode_info *, |
68 | struct splice_desc *, splice_actor *); | 70 | struct splice_desc *, splice_actor *); |
71 | extern int splice_from_pipe_feed(struct pipe_inode_info *, struct splice_desc *, | ||
72 | splice_actor *); | ||
73 | extern int splice_from_pipe_next(struct pipe_inode_info *, | ||
74 | struct splice_desc *); | ||
75 | extern void splice_from_pipe_begin(struct splice_desc *); | ||
76 | extern void splice_from_pipe_end(struct pipe_inode_info *, | ||
77 | struct splice_desc *); | ||
78 | extern int pipe_to_file(struct pipe_inode_info *, struct pipe_buffer *, | ||
79 | struct splice_desc *); | ||
80 | |||
69 | extern ssize_t splice_to_pipe(struct pipe_inode_info *, | 81 | extern ssize_t splice_to_pipe(struct pipe_inode_info *, |
70 | struct splice_pipe_desc *); | 82 | struct splice_pipe_desc *); |
71 | extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, | 83 | extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 1758d9f5b5c3..08afe43118f4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -261,6 +261,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
261 | #define XPRT_BINDING (5) | 261 | #define XPRT_BINDING (5) |
262 | #define XPRT_CLOSING (6) | 262 | #define XPRT_CLOSING (6) |
263 | #define XPRT_CONNECTION_ABORT (7) | 263 | #define XPRT_CONNECTION_ABORT (7) |
264 | #define XPRT_CONNECTION_CLOSE (8) | ||
264 | 265 | ||
265 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 266 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
266 | { | 267 | { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 3e3a4364cbff..795032edfc46 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -58,10 +58,17 @@ typedef int __bitwise suspend_state_t; | |||
58 | * by @begin(). | 58 | * by @begin(). |
59 | * @prepare() is called right after devices have been suspended (ie. the | 59 | * @prepare() is called right after devices have been suspended (ie. the |
60 | * appropriate .suspend() method has been executed for each device) and | 60 | * appropriate .suspend() method has been executed for each device) and |
61 | * before the nonboot CPUs are disabled (it is executed with IRQs enabled). | 61 | * before device drivers' late suspend callbacks are executed. It returns |
62 | * This callback is optional. It returns 0 on success or a negative | 62 | * 0 on success or a negative error code otherwise, in which case the |
63 | * error code otherwise, in which case the system cannot enter the desired | 63 | * system cannot enter the desired sleep state (@prepare_late(), @enter(), |
64 | * sleep state (@enter() and @finish() will not be called in that case). | 64 | * @wake(), and @finish() will not be called in that case). |
65 | * | ||
66 | * @prepare_late: Finish preparing the platform for entering the system sleep | ||
67 | * state indicated by @begin(). | ||
68 | * @prepare_late is called before disabling nonboot CPUs and after | ||
69 | * device drivers' late suspend callbacks have been executed. It returns | ||
70 | * 0 on success or a negative error code otherwise, in which case the | ||
71 | * system cannot enter the desired sleep state (@enter() and @wake()). | ||
65 | * | 72 | * |
66 | * @enter: Enter the system sleep state indicated by @begin() or represented by | 73 | * @enter: Enter the system sleep state indicated by @begin() or represented by |
67 | * the argument if @begin() is not implemented. | 74 | * the argument if @begin() is not implemented. |
@@ -69,19 +76,26 @@ typedef int __bitwise suspend_state_t; | |||
69 | * error code otherwise, in which case the system cannot enter the desired | 76 | * error code otherwise, in which case the system cannot enter the desired |
70 | * sleep state. | 77 | * sleep state. |
71 | * | 78 | * |
72 | * @finish: Called when the system has just left a sleep state, right after | 79 | * @wake: Called when the system has just left a sleep state, right after |
73 | * the nonboot CPUs have been enabled and before devices are resumed (it is | 80 | * the nonboot CPUs have been enabled and before device drivers' early |
74 | * executed with IRQs enabled). | 81 | * resume callbacks are executed. |
82 | * This callback is optional, but should be implemented by the platforms | ||
83 | * that implement @prepare_late(). If implemented, it is always called | ||
84 | * after @enter(), even if @enter() fails. | ||
85 | * | ||
86 | * @finish: Finish wake-up of the platform. | ||
87 | * @finish is called right prior to calling device drivers' regular suspend | ||
88 | * callbacks. | ||
75 | * This callback is optional, but should be implemented by the platforms | 89 | * This callback is optional, but should be implemented by the platforms |
76 | * that implement @prepare(). If implemented, it is always called after | 90 | * that implement @prepare(). If implemented, it is always called after |
77 | * @enter() (even if @enter() fails). | 91 | * @enter() and @wake(), if implemented, even if any of them fails. |
78 | * | 92 | * |
79 | * @end: Called by the PM core right after resuming devices, to indicate to | 93 | * @end: Called by the PM core right after resuming devices, to indicate to |
80 | * the platform that the system has returned to the working state or | 94 | * the platform that the system has returned to the working state or |
81 | * the transition to the sleep state has been aborted. | 95 | * the transition to the sleep state has been aborted. |
82 | * This callback is optional, but should be implemented by the platforms | 96 | * This callback is optional, but should be implemented by the platforms |
83 | * that implement @begin(), but platforms implementing @begin() should | 97 | * that implement @begin(). Accordingly, platforms implementing @begin() |
84 | * also provide a @end() which cleans up transitions aborted before | 98 | * should also provide a @end() which cleans up transitions aborted before |
85 | * @enter(). | 99 | * @enter(). |
86 | * | 100 | * |
87 | * @recover: Recover the platform from a suspend failure. | 101 | * @recover: Recover the platform from a suspend failure. |
@@ -93,7 +107,9 @@ struct platform_suspend_ops { | |||
93 | int (*valid)(suspend_state_t state); | 107 | int (*valid)(suspend_state_t state); |
94 | int (*begin)(suspend_state_t state); | 108 | int (*begin)(suspend_state_t state); |
95 | int (*prepare)(void); | 109 | int (*prepare)(void); |
110 | int (*prepare_late)(void); | ||
96 | int (*enter)(suspend_state_t state); | 111 | int (*enter)(suspend_state_t state); |
112 | void (*wake)(void); | ||
97 | void (*finish)(void); | 113 | void (*finish)(void); |
98 | void (*end)(void); | 114 | void (*end)(void); |
99 | void (*recover)(void); | 115 | void (*recover)(void); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index dabe4ad89141..40617c1d8976 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -148,7 +148,7 @@ struct old_linux_dirent; | |||
148 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | 148 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ |
149 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | 149 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) |
150 | #else | 150 | #else |
151 | #ifdef CONFIG_ALPHA | 151 | #if defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) |
152 | #define SYSCALL_ALIAS(alias, name) \ | 152 | #define SYSCALL_ALIAS(alias, name) \ |
153 | asm ( #alias " = " #name "\n\t.globl " #alias) | 153 | asm ( #alias " = " #name "\n\t.globl " #alias) |
154 | #else | 154 | #else |
diff --git a/include/linux/usb.h b/include/linux/usb.h index c6b2ab41b908..3aa2cd1f8d08 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1387,6 +1387,7 @@ extern int usb_string(struct usb_device *dev, int index, | |||
1387 | extern int usb_clear_halt(struct usb_device *dev, int pipe); | 1387 | extern int usb_clear_halt(struct usb_device *dev, int pipe); |
1388 | extern int usb_reset_configuration(struct usb_device *dev); | 1388 | extern int usb_reset_configuration(struct usb_device *dev); |
1389 | extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); | 1389 | extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); |
1390 | extern void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr); | ||
1390 | 1391 | ||
1391 | /* this request isn't really synchronous, but it belongs with the others */ | 1392 | /* this request isn't really synchronous, but it belongs with the others */ |
1392 | extern int usb_driver_set_configuration(struct usb_device *udev, int config); | 1393 | extern int usb_driver_set_configuration(struct usb_device *udev, int config); |
@@ -1491,14 +1492,6 @@ void usb_sg_wait(struct usb_sg_request *io); | |||
1491 | #define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) | 1492 | #define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) |
1492 | #define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) | 1493 | #define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) |
1493 | 1494 | ||
1494 | /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ | ||
1495 | #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) | ||
1496 | #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) | ||
1497 | #define usb_settoggle(dev, ep, out, bit) \ | ||
1498 | ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | \ | ||
1499 | ((bit) << (ep))) | ||
1500 | |||
1501 | |||
1502 | static inline unsigned int __create_pipe(struct usb_device *dev, | 1495 | static inline unsigned int __create_pipe(struct usb_device *dev, |
1503 | unsigned int endpoint) | 1496 | unsigned int endpoint) |
1504 | { | 1497 | { |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 3c86ed25a04c..c24124a42ce5 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define USB_CDC_SUBCLASS_DMM 0x09 | 17 | #define USB_CDC_SUBCLASS_DMM 0x09 |
18 | #define USB_CDC_SUBCLASS_MDLM 0x0a | 18 | #define USB_CDC_SUBCLASS_MDLM 0x0a |
19 | #define USB_CDC_SUBCLASS_OBEX 0x0b | 19 | #define USB_CDC_SUBCLASS_OBEX 0x0b |
20 | #define USB_CDC_SUBCLASS_EEM 0x0c | ||
20 | 21 | ||
21 | #define USB_CDC_PROTO_NONE 0 | 22 | #define USB_CDC_PROTO_NONE 0 |
22 | 23 | ||
@@ -28,6 +29,8 @@ | |||
28 | #define USB_CDC_ACM_PROTO_AT_CDMA 6 | 29 | #define USB_CDC_ACM_PROTO_AT_CDMA 6 |
29 | #define USB_CDC_ACM_PROTO_VENDOR 0xff | 30 | #define USB_CDC_ACM_PROTO_VENDOR 0xff |
30 | 31 | ||
32 | #define USB_CDC_PROTO_EEM 7 | ||
33 | |||
31 | /*-------------------------------------------------------------------------*/ | 34 | /*-------------------------------------------------------------------------*/ |
32 | 35 | ||
33 | /* | 36 | /* |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index d6aad0ea6033..d43755669261 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -7,6 +7,9 @@ | |||
7 | * key configuration differences between boards. | 7 | * key configuration differences between boards. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __LINUX_USB_MUSB_H | ||
11 | #define __LINUX_USB_MUSB_H | ||
12 | |||
10 | /* The USB role is defined by the connector used on the board, so long as | 13 | /* The USB role is defined by the connector used on the board, so long as |
11 | * standards are being followed. (Developer boards sometimes won't.) | 14 | * standards are being followed. (Developer boards sometimes won't.) |
12 | */ | 15 | */ |
@@ -101,3 +104,5 @@ extern int __init tusb6010_setup_interface( | |||
101 | extern int tusb6010_platform_retime(unsigned is_refclk); | 104 | extern int tusb6010_platform_retime(unsigned is_refclk); |
102 | 105 | ||
103 | #endif /* OMAP2 */ | 106 | #endif /* OMAP2 */ |
107 | |||
108 | #endif /* __LINUX_USB_MUSB_H */ | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index b95842542590..625e9e4639c6 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -29,7 +29,7 @@ | |||
29 | /** | 29 | /** |
30 | * usb_serial_port: structure for the specific ports of a device. | 30 | * usb_serial_port: structure for the specific ports of a device. |
31 | * @serial: pointer back to the struct usb_serial owner of this port. | 31 | * @serial: pointer back to the struct usb_serial owner of this port. |
32 | * @tty: pointer to the corresponding tty for this port. | 32 | * @port: pointer to the corresponding tty_port for this port. |
33 | * @lock: spinlock to grab when updating portions of this structure. | 33 | * @lock: spinlock to grab when updating portions of this structure. |
34 | * @mutex: mutex used to synchronize serial_open() and serial_close() | 34 | * @mutex: mutex used to synchronize serial_open() and serial_close() |
35 | * access for this port. | 35 | * access for this port. |
@@ -44,19 +44,22 @@ | |||
44 | * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe | 44 | * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe |
45 | * for this port. | 45 | * for this port. |
46 | * @bulk_in_buffer: pointer to the bulk in buffer for this port. | 46 | * @bulk_in_buffer: pointer to the bulk in buffer for this port. |
47 | * @bulk_in_size: the size of the bulk_in_buffer, in bytes. | ||
47 | * @read_urb: pointer to the bulk in struct urb for this port. | 48 | * @read_urb: pointer to the bulk in struct urb for this port. |
48 | * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this | 49 | * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this |
49 | * port. | 50 | * port. |
50 | * @bulk_out_buffer: pointer to the bulk out buffer for this port. | 51 | * @bulk_out_buffer: pointer to the bulk out buffer for this port. |
51 | * @bulk_out_size: the size of the bulk_out_buffer, in bytes. | 52 | * @bulk_out_size: the size of the bulk_out_buffer, in bytes. |
52 | * @write_urb: pointer to the bulk out struct urb for this port. | 53 | * @write_urb: pointer to the bulk out struct urb for this port. |
54 | * @write_urb_busy: port`s writing status | ||
53 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this | 55 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this |
54 | * port. | 56 | * port. |
55 | * @write_wait: a wait_queue_head_t used by the port. | 57 | * @write_wait: a wait_queue_head_t used by the port. |
56 | * @work: work queue entry for the line discipline waking up. | 58 | * @work: work queue entry for the line discipline waking up. |
57 | * @open_count: number of times this port has been opened. | ||
58 | * @throttled: nonzero if the read urb is inactive to throttle the device | 59 | * @throttled: nonzero if the read urb is inactive to throttle the device |
59 | * @throttle_req: nonzero if the tty wants to throttle us | 60 | * @throttle_req: nonzero if the tty wants to throttle us |
61 | * @console: attached usb serial console | ||
62 | * @dev: pointer to the serial device | ||
60 | * | 63 | * |
61 | * This structure is used by the usb-serial core and drivers for the specific | 64 | * This structure is used by the usb-serial core and drivers for the specific |
62 | * ports of a device. | 65 | * ports of a device. |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 242348bb3766..cec79adbe3ea 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
7 | #include <linux/if_ether.h> | ||
7 | 8 | ||
8 | /* The ID for virtio_net */ | 9 | /* The ID for virtio_net */ |
9 | #define VIRTIO_ID_NET 1 | 10 | #define VIRTIO_ID_NET 1 |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 5d631c17eaee..bc024632f365 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -440,13 +440,15 @@ void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | |||
440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
442 | 442 | ||
443 | #define DEFINE_WAIT(name) \ | 443 | #define DEFINE_WAIT_FUNC(name, function) \ |
444 | wait_queue_t name = { \ | 444 | wait_queue_t name = { \ |
445 | .private = current, \ | 445 | .private = current, \ |
446 | .func = autoremove_wake_function, \ | 446 | .func = function, \ |
447 | .task_list = LIST_HEAD_INIT((name).task_list), \ | 447 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
448 | } | 448 | } |
449 | 449 | ||
450 | #define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, autoremove_wake_function) | ||
451 | |||
450 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 452 | #define DEFINE_WAIT_BIT(name, word, bit) \ |
451 | struct wait_bit_queue name = { \ | 453 | struct wait_bit_queue name = { \ |
452 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ | 454 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ |