aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h1
-rw-r--r--include/linux/bio.h110
-rw-r--r--include/linux/bitops.h19
-rw-r--r--include/linux/blkdev.h3
-rw-r--r--include/linux/buffer_head.h3
-rw-r--r--include/linux/capability.h23
-rw-r--r--include/linux/clocksource.h37
-rw-r--r--include/linux/debug_locks.h8
-rw-r--r--include/linux/device-mapper.h1
-rw-r--r--include/linux/device.h1
-rw-r--r--include/linux/dynamic_debug.h2
-rw-r--r--include/linux/fb.h8
-rw-r--r--include/linux/fiemap.h2
-rw-r--r--include/linux/fs.h69
-rw-r--r--include/linux/fsl_devices.h8
-rw-r--r--include/linux/ftrace.h31
-rw-r--r--include/linux/genhd.h1
-rw-r--r--include/linux/i2c.h2
-rw-r--r--include/linux/ide.h151
-rw-r--r--include/linux/init.h13
-rw-r--r--include/linux/init_task.h13
-rw-r--r--include/linux/ipmi.h2
-rw-r--r--include/linux/ipmi_msgdefs.h8
-rw-r--r--include/linux/irq.h14
-rw-r--r--include/linux/jbd.h3
-rw-r--r--include/linux/jbd2.h3
-rw-r--r--include/linux/kernel.h9
-rw-r--r--include/linux/kmod.h2
-rw-r--r--include/linux/kvm.h2
-rw-r--r--include/linux/libata.h8
-rw-r--r--include/linux/memcontrol.h2
-rw-r--r--include/linux/mfd/pcf50633/core.h2
-rw-r--r--include/linux/mfd/pcf50633/mbc.h1
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/pci_regs.h1
-rw-r--r--include/linux/pda_power.h2
-rw-r--r--include/linux/percpu-defs.h84
-rw-r--r--include/linux/percpu.h96
-rw-r--r--include/linux/phy.h6
-rw-r--r--include/linux/pipe_fs_i.h5
-rw-r--r--include/linux/pktcdvd.h1
-rw-r--r--include/linux/platform_device.h42
-rw-r--r--include/linux/rcutree.h3
-rw-r--r--include/linux/regulator/driver.h1
-rw-r--r--include/linux/reiserfs_fs_sb.h2
-rw-r--r--include/linux/rotary_encoder.h13
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/seccomp.h2
-rw-r--r--include/linux/section-names.h6
-rw-r--r--include/linux/serial_max3100.h52
-rw-r--r--include/linux/sht15.h24
-rw-r--r--include/linux/slow-work.h2
-rw-r--r--include/linux/spi/ad7879.h35
-rw-r--r--include/linux/spi/ads7846.h1
-rw-r--r--include/linux/spi/spi.h7
-rw-r--r--include/linux/splice.h12
-rw-r--r--include/linux/stringify.h4
-rw-r--r--include/linux/suspend.h36
-rw-r--r--include/linux/syscalls.h4
-rw-r--r--include/linux/usb.h9
-rw-r--r--include/linux/usb/musb.h5
-rw-r--r--include/linux/usb/serial.h7
62 files changed, 780 insertions, 249 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);
111int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); 111int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
112void acpi_irq_stats_init(void); 112void acpi_irq_stats_init(void);
113extern u32 acpi_irq_handled; 113extern u32 acpi_irq_handled;
114extern u32 acpi_irq_not_handled;
114 115
115extern struct acpi_mcfg_allocation *pci_mmcfg_config; 116extern struct acpi_mcfg_allocation *pci_mmcfg_config;
116extern int pci_mmcfg_config_num; 117extern int pci_mmcfg_config_num;
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 */
515struct bio_list {
516 struct bio *head;
517 struct bio *tail;
518};
519
520static inline int bio_list_empty(const struct bio_list *bl)
521{
522 return bl->head == NULL;
523}
524
525static 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
533static 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
544static 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
556static 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
566static 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
579static 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
593static 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
608static 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 */
123static 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..2755d5c6da22 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,7 @@ 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)
601 604
602#define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) 605#define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq)))
603 606
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);
156void end_buffer_read_sync(struct buffer_head *bh, int uptodate); 156void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
157void end_buffer_write_sync(struct buffer_head *bh, int uptodate); 157void end_buffer_write_sync(struct buffer_head *bh, int uptodate);
158void 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 */
160void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); 161void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode);
@@ -197,6 +198,8 @@ extern int buffer_heads_over_limit;
197void block_invalidatepage(struct page *page, unsigned long offset); 198void block_invalidatepage(struct page *page, unsigned long offset);
198int block_write_full_page(struct page *page, get_block_t *get_block, 199int block_write_full_page(struct page *page, get_block_t *get_block,
199 struct writeback_control *wbc); 200 struct writeback_control *wbc);
201int block_write_full_page_endio(struct page *page, get_block_t *get_block,
202 struct writeback_control *wbc, bh_end_io_t *handler);
200int block_read_full_page(struct page*, get_block_t*); 203int block_read_full_page(struct page*, get_block_t*);
201int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, 204int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc,
202 unsigned long from); 205 unsigned long from);
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 4864a43b2b45..c3021105edc0 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -377,7 +377,21 @@ struct cpu_vfs_cap_data {
377#define CAP_FOR_EACH_U32(__capi) \ 377#define CAP_FOR_EACH_U32(__capi) \
378 for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) 378 for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi)
379 379
380/*
381 * CAP_FS_MASK and CAP_NFSD_MASKS:
382 *
383 * The fs mask is all the privileges that fsuid==0 historically meant.
384 * At one time in the past, that included CAP_MKNOD and CAP_LINUX_IMMUTABLE.
385 *
386 * It has never meant setting security.* and trusted.* xattrs.
387 *
388 * We could also define fsmask as follows:
389 * 1. CAP_FS_MASK is the privilege to bypass all fs-related DAC permissions
390 * 2. The security.* and trusted.* xattrs are fs-related MAC permissions
391 */
392
380# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ 393# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \
394 | CAP_TO_MASK(CAP_MKNOD) \
381 | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ 395 | CAP_TO_MASK(CAP_DAC_OVERRIDE) \
382 | CAP_TO_MASK(CAP_DAC_READ_SEARCH) \ 396 | CAP_TO_MASK(CAP_DAC_READ_SEARCH) \
383 | CAP_TO_MASK(CAP_FOWNER) \ 397 | CAP_TO_MASK(CAP_FOWNER) \
@@ -392,11 +406,12 @@ struct cpu_vfs_cap_data {
392# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }}) 406# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }})
393# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) 407# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})
394# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) 408# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }})
395# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) 409# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \
410 | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \
411 CAP_FS_MASK_B1 } })
396# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ 412# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \
397 | CAP_TO_MASK(CAP_SYS_RESOURCE) \ 413 | CAP_TO_MASK(CAP_SYS_RESOURCE), \
398 | CAP_TO_MASK(CAP_MKNOD), \ 414 CAP_FS_MASK_B1 } })
399 CAP_FS_MASK_B1 } })
400 415
401#endif /* _KERNEL_CAPABILITY_U32S != 2 */ 416#endif /* _KERNEL_CAPABILITY_U32S != 2 */
402 417
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 */
272static inline cycle_t clocksource_read(struct clocksource *cs) 276static 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 */
289static 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 */
302static 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 096476f1fb35..29b3ce3f2a1d 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -2,12 +2,20 @@
2#define __LINUX_DEBUG_LOCKING_H 2#define __LINUX_DEBUG_LOCKING_H
3 3
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <asm/atomic.h>
6#include <asm/system.h>
5 7
6struct task_struct; 8struct task_struct;
7 9
8extern int debug_locks; 10extern int debug_locks;
9extern int debug_locks_silent; 11extern int debug_locks_silent;
10 12
13
14static inline int __debug_locks_off(void)
15{
16 return xchg(&debug_locks, 0);
17}
18
11/* 19/*
12 * Generic 'turn off all lock debugging' function: 20 * Generic 'turn off all lock debugging' function:
13 */ 21 */
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 66ec05a57955..ded2d7c42668 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -116,7 +116,6 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d);
116/* 116/*
117 * Target features 117 * Target features
118 */ 118 */
119#define DM_TARGET_SUPPORTS_BARRIERS 0x00000001
120 119
121struct target_type { 120struct target_type {
122 uint64_t features; 121 uint64_t features;
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);
551extern struct device *get_device(struct device *dev); 551extern struct device *get_device(struct device *dev);
552extern void put_device(struct device *dev); 552extern void put_device(struct device *dev);
553 553
554extern void wait_for_device_probe(void);
554 555
555/* drivers/base/power/shutdown.c */ 556/* drivers/base/power/shutdown.c */
556extern void device_shutdown(void); 557extern 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 */
179struct fb_bitfield { 183struct 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
14struct fiemap_extent { 16struct 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
741extern void inode_double_lock(struct inode *inode1, struct inode *inode2);
742extern 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);
2151extern ssize_t generic_file_splice_write(struct pipe_inode_info *, 2207extern 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);
2153extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *,
2154 struct file *, loff_t *, size_t, unsigned int);
2155extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, 2209extern 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);
2157extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, 2211extern 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
2246extern int vfs_stat(char __user *, struct kstat *); 2300extern int vfs_stat(char __user *, struct kstat *);
2247extern int vfs_lstat(char __user *, struct kstat *); 2301extern int vfs_lstat(char __user *, struct kstat *);
2248extern int vfs_stat_fd(int dfd, char __user *, struct kstat *);
2249extern int vfs_lstat_fd(int dfd, char __user *, struct kstat *);
2250extern int vfs_fstat(unsigned int, struct kstat *); 2302extern int vfs_fstat(unsigned int, struct kstat *);
2303extern int vfs_fstatat(int , char __user *, struct kstat *, int);
2251 2304
2252extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, 2305extern 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;
2395int proc_nr_files(struct ctl_table *table, int write, struct file *filp, 2448int 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
2398int get_filesystem_list(char * buf); 2451int __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
50enum fsl_usb2_operating_modes { 46enum 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
88struct mpc8xx_pcmcia_ops { 88struct mpc8xx_pcmcia_ops {
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index da5405dce347..8a0c2f221e6b 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -357,7 +357,7 @@ struct ftrace_graph_ret {
357#ifdef CONFIG_FUNCTION_GRAPH_TRACER 357#ifdef CONFIG_FUNCTION_GRAPH_TRACER
358 358
359/* for init task */ 359/* for init task */
360#define INIT_FTRACE_GRAPH .ret_stack = NULL 360#define INIT_FTRACE_GRAPH .ret_stack = NULL,
361 361
362/* 362/*
363 * Stack of return addresses for functions 363 * Stack of return addresses for functions
@@ -511,33 +511,4 @@ static inline void trace_hw_branch_oops(void) {}
511 511
512#endif /* CONFIG_HW_BRANCH_TRACER */ 512#endif /* CONFIG_HW_BRANCH_TRACER */
513 513
514/*
515 * A syscall entry in the ftrace syscalls array.
516 *
517 * @name: name of the syscall
518 * @nb_args: number of parameters it takes
519 * @types: list of types as strings
520 * @args: list of args as strings (args[i] matches types[i])
521 */
522struct syscall_metadata {
523 const char *name;
524 int nb_args;
525 const char **types;
526 const char **args;
527};
528
529#ifdef CONFIG_FTRACE_SYSCALLS
530extern void arch_init_ftrace_syscalls(void);
531extern struct syscall_metadata *syscall_nr_to_meta(int nr);
532extern void start_ftrace_syscalls(void);
533extern void stop_ftrace_syscalls(void);
534extern void ftrace_syscall_enter(struct pt_regs *regs);
535extern void ftrace_syscall_exit(struct pt_regs *regs);
536#else
537static inline void start_ftrace_syscalls(void) { }
538static inline void stop_ftrace_syscalls(void) { }
539static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
540static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
541#endif
542
543#endif /* _LINUX_FTRACE_H */ 514#endif /* _LINUX_FTRACE_H */
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
218struct disk_part_iter { 219struct disk_part_iter {
219 struct gendisk *disk; 220 struct gendisk *disk;
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 00ee11eb9092..ad2580596033 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -274,7 +274,7 @@ struct i2c_board_info {
274 * are provided using conventional syntax. 274 * are provided using conventional syntax.
275 */ 275 */
276#define I2C_BOARD_INFO(dev_type, dev_addr) \ 276#define I2C_BOARD_INFO(dev_type, dev_addr) \
277 .type = (dev_type), .addr = (dev_addr) 277 .type = dev_type, .addr = (dev_addr)
278 278
279 279
280/* Add-on boards should register/unregister their devices; e.g. a board 280/* Add-on boards should register/unregister their devices; e.g. a board
diff --git a/include/linux/ide.h b/include/linux/ide.h
index a5d26f66ef78..ff65fffb078f 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -240,65 +240,38 @@ typedef enum {
240} ide_startstop_t; 240} ide_startstop_t;
241 241
242enum { 242enum {
243 IDE_VALID_ERROR = (1 << 1),
244 IDE_VALID_FEATURE = IDE_VALID_ERROR,
245 IDE_VALID_NSECT = (1 << 2),
246 IDE_VALID_LBAL = (1 << 3),
247 IDE_VALID_LBAM = (1 << 4),
248 IDE_VALID_LBAH = (1 << 5),
249 IDE_VALID_DEVICE = (1 << 6),
250 IDE_VALID_LBA = IDE_VALID_LBAL |
251 IDE_VALID_LBAM |
252 IDE_VALID_LBAH,
253 IDE_VALID_OUT_TF = IDE_VALID_FEATURE |
254 IDE_VALID_NSECT |
255 IDE_VALID_LBA,
256 IDE_VALID_IN_TF = IDE_VALID_NSECT |
257 IDE_VALID_LBA,
258 IDE_VALID_OUT_HOB = IDE_VALID_OUT_TF,
259 IDE_VALID_IN_HOB = IDE_VALID_ERROR |
260 IDE_VALID_NSECT |
261 IDE_VALID_LBA,
262};
263
264enum {
243 IDE_TFLAG_LBA48 = (1 << 0), 265 IDE_TFLAG_LBA48 = (1 << 0),
244 IDE_TFLAG_OUT_HOB_FEATURE = (1 << 1), 266 IDE_TFLAG_WRITE = (1 << 1),
245 IDE_TFLAG_OUT_HOB_NSECT = (1 << 2), 267 IDE_TFLAG_CUSTOM_HANDLER = (1 << 2),
246 IDE_TFLAG_OUT_HOB_LBAL = (1 << 3), 268 IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 3),
247 IDE_TFLAG_OUT_HOB_LBAM = (1 << 4),
248 IDE_TFLAG_OUT_HOB_LBAH = (1 << 5),
249 IDE_TFLAG_OUT_HOB = IDE_TFLAG_OUT_HOB_FEATURE |
250 IDE_TFLAG_OUT_HOB_NSECT |
251 IDE_TFLAG_OUT_HOB_LBAL |
252 IDE_TFLAG_OUT_HOB_LBAM |
253 IDE_TFLAG_OUT_HOB_LBAH,
254 IDE_TFLAG_OUT_FEATURE = (1 << 6),
255 IDE_TFLAG_OUT_NSECT = (1 << 7),
256 IDE_TFLAG_OUT_LBAL = (1 << 8),
257 IDE_TFLAG_OUT_LBAM = (1 << 9),
258 IDE_TFLAG_OUT_LBAH = (1 << 10),
259 IDE_TFLAG_OUT_TF = IDE_TFLAG_OUT_FEATURE |
260 IDE_TFLAG_OUT_NSECT |
261 IDE_TFLAG_OUT_LBAL |
262 IDE_TFLAG_OUT_LBAM |
263 IDE_TFLAG_OUT_LBAH,
264 IDE_TFLAG_OUT_DEVICE = (1 << 11),
265 IDE_TFLAG_WRITE = (1 << 12),
266 IDE_TFLAG_CUSTOM_HANDLER = (1 << 13),
267 IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14),
268 IDE_TFLAG_IN_HOB_ERROR = (1 << 15),
269 IDE_TFLAG_IN_HOB_NSECT = (1 << 16),
270 IDE_TFLAG_IN_HOB_LBAL = (1 << 17),
271 IDE_TFLAG_IN_HOB_LBAM = (1 << 18),
272 IDE_TFLAG_IN_HOB_LBAH = (1 << 19),
273 IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL |
274 IDE_TFLAG_IN_HOB_LBAM |
275 IDE_TFLAG_IN_HOB_LBAH,
276 IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_ERROR |
277 IDE_TFLAG_IN_HOB_NSECT |
278 IDE_TFLAG_IN_HOB_LBA,
279 IDE_TFLAG_IN_ERROR = (1 << 20),
280 IDE_TFLAG_IN_NSECT = (1 << 21),
281 IDE_TFLAG_IN_LBAL = (1 << 22),
282 IDE_TFLAG_IN_LBAM = (1 << 23),
283 IDE_TFLAG_IN_LBAH = (1 << 24),
284 IDE_TFLAG_IN_LBA = IDE_TFLAG_IN_LBAL |
285 IDE_TFLAG_IN_LBAM |
286 IDE_TFLAG_IN_LBAH,
287 IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT |
288 IDE_TFLAG_IN_LBA,
289 IDE_TFLAG_IN_DEVICE = (1 << 25),
290 IDE_TFLAG_HOB = IDE_TFLAG_OUT_HOB |
291 IDE_TFLAG_IN_HOB,
292 IDE_TFLAG_TF = IDE_TFLAG_OUT_TF |
293 IDE_TFLAG_IN_TF,
294 IDE_TFLAG_DEVICE = IDE_TFLAG_OUT_DEVICE |
295 IDE_TFLAG_IN_DEVICE,
296 /* force 16-bit I/O operations */ 269 /* force 16-bit I/O operations */
297 IDE_TFLAG_IO_16BIT = (1 << 26), 270 IDE_TFLAG_IO_16BIT = (1 << 4),
298 /* struct ide_cmd was allocated using kmalloc() */ 271 /* struct ide_cmd was allocated using kmalloc() */
299 IDE_TFLAG_DYN = (1 << 27), 272 IDE_TFLAG_DYN = (1 << 5),
300 IDE_TFLAG_FS = (1 << 28), 273 IDE_TFLAG_FS = (1 << 6),
301 IDE_TFLAG_MULTI_PIO = (1 << 29), 274 IDE_TFLAG_MULTI_PIO = (1 << 7),
302}; 275};
303 276
304enum { 277enum {
@@ -309,45 +282,34 @@ enum {
309}; 282};
310 283
311struct ide_taskfile { 284struct ide_taskfile {
312 u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ 285 u8 data; /* 0: data byte (for TASKFILE ioctl) */
313 /* 1-5: additional data to support LBA48 */ 286 union { /* 1: */
314 union { 287 u8 error; /* read: error */
315 u8 hob_error; /* read: error */ 288 u8 feature; /* write: feature */
316 u8 hob_feature; /* write: feature */
317 };
318
319 u8 hob_nsect;
320 u8 hob_lbal;
321 u8 hob_lbam;
322 u8 hob_lbah;
323
324 u8 data; /* 6: low data byte (for TASKFILE IOCTL) */
325
326 union { /*  7: */
327 u8 error; /* read: error */
328 u8 feature; /* write: feature */
329 }; 289 };
330 290 u8 nsect; /* 2: number of sectors */
331 u8 nsect; /* 8: number of sectors */ 291 u8 lbal; /* 3: LBA low */
332 u8 lbal; /* 9: LBA low */ 292 u8 lbam; /* 4: LBA mid */
333 u8 lbam; /* 10: LBA mid */ 293 u8 lbah; /* 5: LBA high */
334 u8 lbah; /* 11: LBA high */ 294 u8 device; /* 6: device select */
335 295 union { /* 7: */
336 u8 device; /* 12: device select */ 296 u8 status; /* read: status */
337
338 union { /* 13: */
339 u8 status; /*  read: status  */
340 u8 command; /* write: command */ 297 u8 command; /* write: command */
341 }; 298 };
342}; 299};
343 300
344struct ide_cmd { 301struct ide_cmd {
345 union { 302 struct ide_taskfile tf;
346 struct ide_taskfile tf; 303 struct ide_taskfile hob;
347 u8 tf_array[14]; 304 struct {
348 }; 305 struct {
306 u8 tf;
307 u8 hob;
308 } out, in;
309 } valid;
310
311 u8 tf_flags;
349 u8 ftf_flags; /* for TASKFILE ioctl */ 312 u8 ftf_flags; /* for TASKFILE ioctl */
350 u32 tf_flags;
351 int protocol; 313 int protocol;
352 314
353 int sg_nents; /* number of sg entries */ 315 int sg_nents; /* number of sg entries */
@@ -662,8 +624,8 @@ struct ide_tp_ops {
662 void (*write_devctl)(struct hwif_s *, u8); 624 void (*write_devctl)(struct hwif_s *, u8);
663 625
664 void (*dev_select)(ide_drive_t *); 626 void (*dev_select)(ide_drive_t *);
665 void (*tf_load)(ide_drive_t *, struct ide_cmd *); 627 void (*tf_load)(ide_drive_t *, struct ide_taskfile *, u8);
666 void (*tf_read)(ide_drive_t *, struct ide_cmd *); 628 void (*tf_read)(ide_drive_t *, struct ide_taskfile *, u8);
667 629
668 void (*input_data)(ide_drive_t *, struct ide_cmd *, 630 void (*input_data)(ide_drive_t *, struct ide_cmd *,
669 void *, unsigned int); 631 void *, unsigned int);
@@ -1162,7 +1124,8 @@ extern int ide_devset_execute(ide_drive_t *drive,
1162void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); 1124void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8);
1163int ide_complete_rq(ide_drive_t *, int, unsigned int); 1125int ide_complete_rq(ide_drive_t *, int, unsigned int);
1164 1126
1165void ide_tf_dump(const char *, struct ide_taskfile *); 1127void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd);
1128void ide_tf_dump(const char *, struct ide_cmd *);
1166 1129
1167void ide_exec_command(ide_hwif_t *, u8); 1130void ide_exec_command(ide_hwif_t *, u8);
1168u8 ide_read_status(ide_hwif_t *); 1131u8 ide_read_status(ide_hwif_t *);
@@ -1170,8 +1133,8 @@ u8 ide_read_altstatus(ide_hwif_t *);
1170void ide_write_devctl(ide_hwif_t *, u8); 1133void ide_write_devctl(ide_hwif_t *, u8);
1171 1134
1172void ide_dev_select(ide_drive_t *); 1135void ide_dev_select(ide_drive_t *);
1173void ide_tf_load(ide_drive_t *, struct ide_cmd *); 1136void ide_tf_load(ide_drive_t *, struct ide_taskfile *, u8);
1174void ide_tf_read(ide_drive_t *, struct ide_cmd *); 1137void ide_tf_read(ide_drive_t *, struct ide_taskfile *, u8);
1175 1138
1176void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); 1139void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
1177void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); 1140void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
@@ -1529,7 +1492,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
1529 1492
1530extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1493extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1531 1494
1532u64 ide_get_lba_addr(struct ide_taskfile *, int); 1495u64 ide_get_lba_addr(struct ide_cmd *, int);
1533u8 ide_dump_status(ide_drive_t *, const char *, u8); 1496u8 ide_dump_status(ide_drive_t *, const char *, u8);
1534 1497
1535struct ide_timing { 1498struct ide_timing {
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 */
249void __init parse_early_param(void); 243void __init parse_early_param(void);
244void __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 c98866102817..503afaa0afa7 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -15,19 +15,6 @@
15extern struct files_struct init_files; 15extern struct files_struct init_files;
16extern struct fs_struct init_fs; 16extern 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/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/irq.h b/include/linux/irq.h
index ca507c9426b0..b7cbeed972e4 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -487,6 +487,16 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
487#endif 487#endif
488} 488}
489 489
490static inline void free_desc_masks(struct irq_desc *old_desc,
491 struct irq_desc *new_desc)
492{
493 free_cpumask_var(old_desc->affinity);
494
495#ifdef CONFIG_GENERIC_PENDING_IRQ
496 free_cpumask_var(old_desc->pending_mask);
497#endif
498}
499
490#else /* !CONFIG_SMP */ 500#else /* !CONFIG_SMP */
491 501
492static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, 502static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
@@ -500,6 +510,10 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
500{ 510{
501} 511}
502 512
513static inline void free_desc_masks(struct irq_desc *old_desc,
514 struct irq_desc *new_desc)
515{
516}
503#endif /* CONFIG_SMP */ 517#endif /* CONFIG_SMP */
504 518
505#endif /* _LINUX_IRQ_H */ 519#endif /* _LINUX_IRQ_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 *);
978extern int journal_revoke (handle_t *, 978extern int journal_revoke (handle_t *,
979 unsigned long, struct buffer_head *); 979 unsigned long, struct buffer_head *);
980extern int journal_cancel_revoke(handle_t *, struct journal_head *); 980extern int journal_cancel_revoke(handle_t *, struct journal_head *);
981extern void journal_write_revoke_records(journal_t *, transaction_t *); 981extern void journal_write_revoke_records(journal_t *,
982 transaction_t *, int);
982 983
983/* Recovery revoke support */ 984/* Recovery revoke support */
984extern int journal_set_revoke(journal_t *, unsigned long, tid_t); 985extern 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);
1193extern void jbd2_journal_destroy_revoke(journal_t *); 1193extern void jbd2_journal_destroy_revoke(journal_t *);
1194extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); 1194extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *);
1195extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); 1195extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *);
1196extern void jbd2_journal_write_revoke_records(journal_t *, transaction_t *); 1196extern void jbd2_journal_write_revoke_records(journal_t *,
1197 transaction_t *, int);
1197 1198
1198/* Recovery revoke support */ 1199/* Recovery revoke support */
1199extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); 1200extern 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/kmod.h b/include/linux/kmod.h
index d5fa565086d1..384ca8bbf1ac 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -34,7 +34,7 @@ extern int __request_module(bool wait, const char *name, ...) \
34#define request_module(mod...) __request_module(true, mod) 34#define request_module(mod...) __request_module(true, mod)
35#define request_module_nowait(mod...) __request_module(false, mod) 35#define request_module_nowait(mod...) __request_module(false, mod)
36#define try_then_request_module(x, mod...) \ 36#define try_then_request_module(x, mod...) \
37 ((x) ?: (__request_module(false, mod), (x))) 37 ((x) ?: (__request_module(true, mod), (x)))
38#else 38#else
39static inline int request_module(const char *name, ...) { return -ENOSYS; } 39static inline int request_module(const char *name, ...) { return -ENOSYS; }
40static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; } 40static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; }
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);
1595extern void ata_sff_error_handler(struct ata_port *ap); 1602extern void ata_sff_error_handler(struct ata_port *ap);
1596extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); 1603extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc);
1597extern int ata_sff_port_start(struct ata_port *ap); 1604extern int ata_sff_port_start(struct ata_port *ap);
1605extern int ata_sff_port_start32(struct ata_port *ap);
1598extern void ata_sff_std_ports(struct ata_ioports *ioaddr); 1606extern void ata_sff_std_ports(struct ata_ioports *ioaddr);
1599extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, 1607extern 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..a9e3b76aa884 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -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}
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h
index 4455b212d75a..c8f51c3c0a72 100644
--- a/include/linux/mfd/pcf50633/core.h
+++ b/include/linux/mfd/pcf50633/core.h
@@ -29,6 +29,8 @@ struct pcf50633_platform_data {
29 char **batteries; 29 char **batteries;
30 int num_batteries; 30 int num_batteries;
31 31
32 int charging_restart_interval;
33
32 /* Callbacks */ 34 /* Callbacks */
33 void (*probe_done)(struct pcf50633 *); 35 void (*probe_done)(struct pcf50633 *);
34 void (*mbc_event_callback)(struct pcf50633 *, int); 36 void (*mbc_event_callback)(struct pcf50633 *, int);
diff --git a/include/linux/mfd/pcf50633/mbc.h b/include/linux/mfd/pcf50633/mbc.h
index 6e17619b773a..4119579acf2c 100644
--- a/include/linux/mfd/pcf50633/mbc.h
+++ b/include/linux/mfd/pcf50633/mbc.h
@@ -128,7 +128,6 @@ enum pcf50633_reg_mbcs3 {
128int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma); 128int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma);
129 129
130int pcf50633_mbc_get_status(struct pcf50633 *); 130int pcf50633_mbc_get_status(struct pcf50633 *);
131void pcf50633_mbc_set_status(struct pcf50633 *, int what, int status);
132 131
133#endif 132#endif
134 133
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/pda_power.h b/include/linux/pda_power.h
index cb7d10f30763..d4cf7a2ceb3e 100644
--- a/include/linux/pda_power.h
+++ b/include/linux/pda_power.h
@@ -31,6 +31,8 @@ struct pda_power_pdata {
31 unsigned int wait_for_status; /* msecs, default is 500 */ 31 unsigned int wait_for_status; /* msecs, default is 500 */
32 unsigned int wait_for_charger; /* msecs, default is 500 */ 32 unsigned int wait_for_charger; /* msecs, default is 500 */
33 unsigned int polling_interval; /* msecs, default is 2000 */ 33 unsigned int polling_interval; /* msecs, default is 2000 */
34
35 unsigned long ac_max_uA; /* current to draw when on AC */
34}; 36};
35 37
36#endif /* __PDA_POWER_H__ */ 38#endif /* __PDA_POWER_H__ */
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 ee5615d65211..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)
@@ -168,4 +124,56 @@ static inline void free_percpu(void *p)
168#define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \ 124#define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \
169 __alignof__(type)) 125 __alignof__(type))
170 126
127/*
128 * Optional methods for optimized non-lvalue per-cpu variable access.
129 *
130 * @var can be a percpu variable or a field of it and its size should
131 * equal char, int or long. percpu_read() evaluates to a lvalue and
132 * all others to void.
133 *
134 * These operations are guaranteed to be atomic w.r.t. preemption.
135 * The generic versions use plain get/put_cpu_var(). Archs are
136 * encouraged to implement single-instruction alternatives which don't
137 * require preemption protection.
138 */
139#ifndef percpu_read
140# define percpu_read(var) \
141 ({ \
142 typeof(per_cpu_var(var)) __tmp_var__; \
143 __tmp_var__ = get_cpu_var(var); \
144 put_cpu_var(var); \
145 __tmp_var__; \
146 })
147#endif
148
149#define __percpu_generic_to_op(var, val, op) \
150do { \
151 get_cpu_var(var) op val; \
152 put_cpu_var(var); \
153} while (0)
154
155#ifndef percpu_write
156# define percpu_write(var, val) __percpu_generic_to_op(var, (val), =)
157#endif
158
159#ifndef percpu_add
160# define percpu_add(var, val) __percpu_generic_to_op(var, (val), +=)
161#endif
162
163#ifndef percpu_sub
164# define percpu_sub(var, val) __percpu_generic_to_op(var, (val), -=)
165#endif
166
167#ifndef percpu_and
168# define percpu_and(var, val) __percpu_generic_to_op(var, (val), &=)
169#endif
170
171#ifndef percpu_or
172# define percpu_or(var, val) __percpu_generic_to_op(var, (val), |=)
173#endif
174
175#ifndef percpu_xor
176# define percpu_xor(var, val) __percpu_generic_to_op(var, (val), ^=)
177#endif
178
171#endif /* __LINUX_PERCPU_H */ 179#endif /* __LINUX_PERCPU_H */
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 */
138void pipe_lock(struct pipe_inode_info *);
139void pipe_unlock(struct pipe_inode_info *);
140void 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 */
138void pipe_wait(struct pipe_inode_info *pipe); 143void 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 */
81struct 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
91extern int early_platform_driver_register(struct early_platform_driver *epdrv,
92 char *buf);
93extern void early_platform_add_devices(struct platform_device **devs, int num);
94
95static inline int is_early_platform_device(struct platform_device *pdev)
96{
97 return !pdev->dev.driver;
98}
99
100extern void early_platform_driver_register_all(char *class_str);
101extern int early_platform_driver_probe(char *class_str,
102 int nr_probe, int user_only);
103extern void early_platform_cleanup(void);
104
105
106#ifndef MODULE
107#define early_platform_init(class_string, platform_driver) \
108static __initdata struct early_platform_driver early_driver = { \
109 .class_str = class_string, \
110 .pdrv = platform_driver, \
111 .requested_id = EARLY_PLATFORM_ID_UNSET, \
112}; \
113static int __init early_platform_driver_setup_func(char *buf) \
114{ \
115 return early_platform_driver_register(&early_driver, buf); \
116} \
117early_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/rotary_encoder.h b/include/linux/rotary_encoder.h
new file mode 100644
index 000000000000..12d63a30c347
--- /dev/null
+++ b/include/linux/rotary_encoder.h
@@ -0,0 +1,13 @@
1#ifndef __ROTARY_ENCODER_H__
2#define __ROTARY_ENCODER_H__
3
4struct rotary_encoder_platform_data {
5 unsigned int steps;
6 unsigned int axis;
7 unsigned int gpio_a;
8 unsigned int gpio_b;
9 unsigned int inverted_a;
10 unsigned int inverted_b;
11};
12
13#endif /* __ROTARY_ENCODER_H__ */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8a8b84390813..d1857580a132 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -207,7 +207,8 @@ extern unsigned long long time_sync_thresh;
207#define task_is_stopped_or_traced(task) \ 207#define task_is_stopped_or_traced(task) \
208 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) 208 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
209#define task_contributes_to_load(task) \ 209#define task_contributes_to_load(task) \
210 ((task->state & TASK_UNINTERRUPTIBLE) != 0) 210 ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
211 (task->flags & PF_FROZEN) == 0)
211 212
212#define __set_task_state(tsk, state_value) \ 213#define __set_task_state(tsk, state_value) \
213 do { (tsk)->state = (state_value); } while (0) 214 do { (tsk)->state = (state_value); } while (0)
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
24typedef struct { } seccomp_t; 26typedef 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/serial_max3100.h b/include/linux/serial_max3100.h
new file mode 100644
index 000000000000..4976befb6aeb
--- /dev/null
+++ b/include/linux/serial_max3100.h
@@ -0,0 +1,52 @@
1/*
2 *
3 * Copyright (C) 2007 Christian Pellegrin
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 */
10
11
12#ifndef _LINUX_SERIAL_MAX3100_H
13#define _LINUX_SERIAL_MAX3100_H 1
14
15
16/**
17 * struct plat_max3100 - MAX3100 SPI UART platform data
18 * @loopback: force MAX3100 in loopback
19 * @crystal: 1 for 3.6864 Mhz, 0 for 1.8432
20 * @max3100_hw_suspend: MAX3100 has a shutdown pin. This is a hook
21 * called on suspend and resume to activate it.
22 * @poll_time: poll time for CTS signal in ms, 0 disables (so no hw
23 * flow ctrl is possible but you have less CPU usage)
24 *
25 * You should use this structure in your machine description to specify
26 * how the MAX3100 is connected. Example:
27 *
28 * static struct plat_max3100 max3100_plat_data = {
29 * .loopback = 0,
30 * .crystal = 0,
31 * .poll_time = 100,
32 * };
33 *
34 * static struct spi_board_info spi_board_info[] = {
35 * {
36 * .modalias = "max3100",
37 * .platform_data = &max3100_plat_data,
38 * .irq = IRQ_EINT12,
39 * .max_speed_hz = 5*1000*1000,
40 * .chip_select = 0,
41 * },
42 * };
43 *
44 **/
45struct plat_max3100 {
46 int loopback;
47 int crystal;
48 void (*max3100_hw_suspend) (int suspend);
49 int poll_time;
50};
51
52#endif
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 **/
19struct 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/ad7879.h b/include/linux/spi/ad7879.h
new file mode 100644
index 000000000000..4231104c9afa
--- /dev/null
+++ b/include/linux/spi/ad7879.h
@@ -0,0 +1,35 @@
1/* linux/spi/ad7879.h */
2
3/* Touchscreen characteristics vary between boards and models. The
4 * platform_data for the device's "struct device" holds this information.
5 *
6 * It's OK if the min/max values are zero.
7 */
8struct ad7879_platform_data {
9 u16 model; /* 7879 */
10 u16 x_plate_ohms;
11 u16 x_min, x_max;
12 u16 y_min, y_max;
13 u16 pressure_min, pressure_max;
14
15 /* [0..255] 0=OFF Starts at 1=550us and goes
16 * all the way to 9.440ms in steps of 35us.
17 */
18 u8 pen_down_acc_interval;
19 /* [0..15] Starts at 0=128us and goes all the
20 * way to 4.096ms in steps of 128us.
21 */
22 u8 first_conversion_delay;
23 /* [0..3] 0 = 2us, 1 = 4us, 2 = 8us, 3 = 16us */
24 u8 acquisition_time;
25 /* [0..3] Average X middle samples 0 = 2, 1 = 4, 2 = 8, 3 = 16 */
26 u8 averaging;
27 /* [0..3] Perform X measurements 0 = OFF,
28 * 1 = 4, 2 = 8, 3 = 16 (median > averaging)
29 */
30 u8 median;
31 /* 1 = AUX/VBAT/GPIO set to GPIO Output */
32 u8 gpio_output;
33 /* Initial GPIO pin state (valid if gpio_output = 1) */
34 u8 gpio_default;
35};
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
41struct partial_page { 43struct partial_page {
@@ -66,6 +68,16 @@ extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *,
66 splice_actor *); 68 splice_actor *);
67extern ssize_t __splice_from_pipe(struct pipe_inode_info *, 69extern ssize_t __splice_from_pipe(struct pipe_inode_info *,
68 struct splice_desc *, splice_actor *); 70 struct splice_desc *, splice_actor *);
71extern int splice_from_pipe_feed(struct pipe_inode_info *, struct splice_desc *,
72 splice_actor *);
73extern int splice_from_pipe_next(struct pipe_inode_info *,
74 struct splice_desc *);
75extern void splice_from_pipe_begin(struct splice_desc *);
76extern void splice_from_pipe_end(struct pipe_inode_info *,
77 struct splice_desc *);
78extern int pipe_to_file(struct pipe_inode_info *, struct pipe_buffer *,
79 struct splice_desc *);
80
69extern ssize_t splice_to_pipe(struct pipe_inode_info *, 81extern ssize_t splice_to_pipe(struct pipe_inode_info *,
70 struct splice_pipe_desc *); 82 struct splice_pipe_desc *);
71extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, 83extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
diff --git a/include/linux/stringify.h b/include/linux/stringify.h
index 0b4388356c87..841cec8ed525 100644
--- a/include/linux/stringify.h
+++ b/include/linux/stringify.h
@@ -6,7 +6,7 @@
6 * converts to "bar". 6 * converts to "bar".
7 */ 7 */
8 8
9#define __stringify_1(x) #x 9#define __stringify_1(x...) #x
10#define __stringify(x) __stringify_1(x) 10#define __stringify(x...) __stringify_1(x)
11 11
12#endif /* !__LINUX_STRINGIFY_H */ 12#endif /* !__LINUX_STRINGIFY_H */
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 471143bf2aae..677d159fe5f4 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -66,7 +66,7 @@ struct perf_counter_hw_event;
66#include <asm/signal.h> 66#include <asm/signal.h>
67#include <linux/quota.h> 67#include <linux/quota.h>
68#include <linux/key.h> 68#include <linux/key.h>
69#include <linux/ftrace.h> 69#include <trace/syscall.h>
70 70
71#define __SC_DECL1(t1, a1) t1 a1 71#define __SC_DECL1(t1, a1) t1 a1
72#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) 72#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
@@ -149,7 +149,7 @@ struct perf_counter_hw_event;
149 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ 149 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
150 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) 150 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
151#else 151#else
152#ifdef CONFIG_ALPHA 152#if defined(CONFIG_ALPHA) || defined(CONFIG_MIPS)
153#define SYSCALL_ALIAS(alias, name) \ 153#define SYSCALL_ALIAS(alias, name) \
154 asm ( #alias " = " #name "\n\t.globl " #alias) 154 asm ( #alias " = " #name "\n\t.globl " #alias)
155#else 155#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,
1387extern int usb_clear_halt(struct usb_device *dev, int pipe); 1387extern int usb_clear_halt(struct usb_device *dev, int pipe);
1388extern int usb_reset_configuration(struct usb_device *dev); 1388extern int usb_reset_configuration(struct usb_device *dev);
1389extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); 1389extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate);
1390extern 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 */
1392extern int usb_driver_set_configuration(struct usb_device *udev, int config); 1393extern 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
1502static inline unsigned int __create_pipe(struct usb_device *dev, 1495static 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/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(
101extern int tusb6010_platform_retime(unsigned is_refclk); 104extern 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.