diff options
Diffstat (limited to 'include/linux')
46 files changed, 428 insertions, 103 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 6586cbd0d4af..88be890ee3c7 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -111,6 +111,7 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | |||
111 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 111 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
112 | void acpi_irq_stats_init(void); | 112 | void acpi_irq_stats_init(void); |
113 | extern u32 acpi_irq_handled; | 113 | extern u32 acpi_irq_handled; |
114 | extern u32 acpi_irq_not_handled; | ||
114 | 115 | ||
115 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | 116 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
116 | extern int pci_mmcfg_config_num; | 117 | extern int pci_mmcfg_config_num; |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 6638b8148de7..61ee18c1bdb4 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -82,7 +82,19 @@ struct linux_binfmt { | |||
82 | int hasvdso; | 82 | int hasvdso; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | extern int register_binfmt(struct linux_binfmt *); | 85 | extern int __register_binfmt(struct linux_binfmt *fmt, int insert); |
86 | |||
87 | /* Registration of default binfmt handlers */ | ||
88 | static inline int register_binfmt(struct linux_binfmt *fmt) | ||
89 | { | ||
90 | return __register_binfmt(fmt, 0); | ||
91 | } | ||
92 | /* Same as above, but adds a new binfmt at the top of the list */ | ||
93 | static inline int insert_binfmt(struct linux_binfmt *fmt) | ||
94 | { | ||
95 | return __register_binfmt(fmt, 1); | ||
96 | } | ||
97 | |||
86 | extern void unregister_binfmt(struct linux_binfmt *); | 98 | extern void unregister_binfmt(struct linux_binfmt *); |
87 | 99 | ||
88 | extern int prepare_binprm(struct linux_binprm *); | 100 | extern int prepare_binprm(struct linux_binprm *); |
diff --git a/include/linux/bio.h b/include/linux/bio.h index b89cf2d82898..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) |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 61829139795a..c05a29cb9bb2 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -112,6 +112,25 @@ static inline unsigned fls_long(unsigned long l) | |||
112 | return fls64(l); | 112 | return fls64(l); |
113 | } | 113 | } |
114 | 114 | ||
115 | /** | ||
116 | * __ffs64 - find first set bit in a 64 bit word | ||
117 | * @word: The 64 bit word | ||
118 | * | ||
119 | * On 64 bit arches this is a synomyn for __ffs | ||
120 | * The result is not defined if no bits are set, so check that @word | ||
121 | * is non-zero before calling this. | ||
122 | */ | ||
123 | static inline unsigned long __ffs64(u64 word) | ||
124 | { | ||
125 | #if BITS_PER_LONG == 32 | ||
126 | if (((u32)word) == 0UL) | ||
127 | return __ffs((u32)(word >> 32)) + 32; | ||
128 | #elif BITS_PER_LONG != 64 | ||
129 | #error BITS_PER_LONG not 32 or 64 | ||
130 | #endif | ||
131 | return __ffs((unsigned long)word); | ||
132 | } | ||
133 | |||
115 | #ifdef __KERNEL__ | 134 | #ifdef __KERNEL__ |
116 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT | 135 | #ifdef CONFIG_GENERIC_FIND_FIRST_BIT |
117 | 136 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ba54c834a590..b4f71f1a4af7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -118,6 +118,7 @@ enum rq_flag_bits { | |||
118 | __REQ_COPY_USER, /* contains copies of user pages */ | 118 | __REQ_COPY_USER, /* contains copies of user pages */ |
119 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ | 119 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ |
120 | __REQ_NOIDLE, /* Don't anticipate more IO after this one */ | 120 | __REQ_NOIDLE, /* Don't anticipate more IO after this one */ |
121 | __REQ_IO_STAT, /* account I/O stat */ | ||
121 | __REQ_NR_BITS, /* stops here */ | 122 | __REQ_NR_BITS, /* stops here */ |
122 | }; | 123 | }; |
123 | 124 | ||
@@ -145,6 +146,7 @@ enum rq_flag_bits { | |||
145 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 146 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
146 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) | 147 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) |
147 | #define REQ_NOIDLE (1 << __REQ_NOIDLE) | 148 | #define REQ_NOIDLE (1 << __REQ_NOIDLE) |
149 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) | ||
148 | 150 | ||
149 | #define BLK_MAX_CDB 16 | 151 | #define BLK_MAX_CDB 16 |
150 | 152 | ||
@@ -598,6 +600,8 @@ enum { | |||
598 | blk_failfast_transport(rq) || \ | 600 | blk_failfast_transport(rq) || \ |
599 | blk_failfast_driver(rq)) | 601 | blk_failfast_driver(rq)) |
600 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | 602 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) |
603 | #define blk_rq_io_stat(rq) ((rq)->cmd_flags & REQ_IO_STAT) | ||
604 | #define blk_rq_quiet(rq) ((rq)->cmd_flags & REQ_QUIET) | ||
601 | 605 | ||
602 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) | 606 | #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) |
603 | 607 | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 573819ef4cc0..5a40d14daa9f 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -143,7 +143,9 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
143 | * 400-499: Perfect | 143 | * 400-499: Perfect |
144 | * The ideal clocksource. A must-use where | 144 | * The ideal clocksource. A must-use where |
145 | * available. | 145 | * available. |
146 | * @read: returns a cycle value | 146 | * @read: returns a cycle value, passes clocksource as argument |
147 | * @enable: optional function to enable the clocksource | ||
148 | * @disable: optional function to disable the clocksource | ||
147 | * @mask: bitmask for two's complement | 149 | * @mask: bitmask for two's complement |
148 | * subtraction of non 64 bit counters | 150 | * subtraction of non 64 bit counters |
149 | * @mult: cycle to nanosecond multiplier (adjusted by NTP) | 151 | * @mult: cycle to nanosecond multiplier (adjusted by NTP) |
@@ -162,7 +164,9 @@ struct clocksource { | |||
162 | char *name; | 164 | char *name; |
163 | struct list_head list; | 165 | struct list_head list; |
164 | int rating; | 166 | int rating; |
165 | cycle_t (*read)(void); | 167 | cycle_t (*read)(struct clocksource *cs); |
168 | int (*enable)(struct clocksource *cs); | ||
169 | void (*disable)(struct clocksource *cs); | ||
166 | cycle_t mask; | 170 | cycle_t mask; |
167 | u32 mult; | 171 | u32 mult; |
168 | u32 mult_orig; | 172 | u32 mult_orig; |
@@ -271,7 +275,34 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) | |||
271 | */ | 275 | */ |
272 | static inline cycle_t clocksource_read(struct clocksource *cs) | 276 | static inline cycle_t clocksource_read(struct clocksource *cs) |
273 | { | 277 | { |
274 | return cs->read(); | 278 | return cs->read(cs); |
279 | } | ||
280 | |||
281 | /** | ||
282 | * clocksource_enable: - enable clocksource | ||
283 | * @cs: pointer to clocksource | ||
284 | * | ||
285 | * Enables the specified clocksource. The clocksource callback | ||
286 | * function should start up the hardware and setup mult and field | ||
287 | * members of struct clocksource to reflect hardware capabilities. | ||
288 | */ | ||
289 | static inline int clocksource_enable(struct clocksource *cs) | ||
290 | { | ||
291 | return cs->enable ? cs->enable(cs) : 0; | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * clocksource_disable: - disable clocksource | ||
296 | * @cs: pointer to clocksource | ||
297 | * | ||
298 | * Disables the specified clocksource. The clocksource callback | ||
299 | * function should power down the now unused hardware block to | ||
300 | * save power. | ||
301 | */ | ||
302 | static inline void clocksource_disable(struct clocksource *cs) | ||
303 | { | ||
304 | if (cs->disable) | ||
305 | cs->disable(cs); | ||
275 | } | 306 | } |
276 | 307 | ||
277 | /** | 308 | /** |
diff --git a/include/linux/device.h b/include/linux/device.h index 2918c0e8fdfd..6a69caaac18a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -551,6 +551,7 @@ extern int (*platform_notify_remove)(struct device *dev); | |||
551 | extern struct device *get_device(struct device *dev); | 551 | extern struct device *get_device(struct device *dev); |
552 | extern void put_device(struct device *dev); | 552 | extern void put_device(struct device *dev); |
553 | 553 | ||
554 | extern void wait_for_device_probe(void); | ||
554 | 555 | ||
555 | /* drivers/base/power/shutdown.c */ | 556 | /* drivers/base/power/shutdown.c */ |
556 | extern void device_shutdown(void); | 557 | extern void device_shutdown(void); |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index baabf33be244..a0d9422a1569 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -70,7 +70,7 @@ extern int ddebug_remove_module(char *mod_name); | |||
70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | 70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ |
71 | if (__dynamic_dbg_enabled(descriptor)) \ | 71 | if (__dynamic_dbg_enabled(descriptor)) \ |
72 | dev_printk(KERN_DEBUG, dev, \ | 72 | dev_printk(KERN_DEBUG, dev, \ |
73 | KBUILD_MODNAME ": " pr_fmt(fmt),\ | 73 | KBUILD_MODNAME ": " fmt, \ |
74 | ##__VA_ARGS__); \ | 74 | ##__VA_ARGS__); \ |
75 | } while (0) | 75 | } while (0) |
76 | 76 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index e766be0d4329..5bed436f4353 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2299,9 +2299,8 @@ extern int vfs_readdir(struct file *, filldir_t, void *); | |||
2299 | 2299 | ||
2300 | extern int vfs_stat(char __user *, struct kstat *); | 2300 | extern int vfs_stat(char __user *, struct kstat *); |
2301 | extern int vfs_lstat(char __user *, struct kstat *); | 2301 | extern int vfs_lstat(char __user *, struct kstat *); |
2302 | extern int vfs_stat_fd(int dfd, char __user *, struct kstat *); | ||
2303 | extern int vfs_lstat_fd(int dfd, char __user *, struct kstat *); | ||
2304 | extern int vfs_fstat(unsigned int, struct kstat *); | 2302 | extern int vfs_fstat(unsigned int, struct kstat *); |
2303 | extern int vfs_fstatat(int , char __user *, struct kstat *, int); | ||
2305 | 2304 | ||
2306 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2305 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
2307 | unsigned long arg); | 2306 | unsigned long arg); |
@@ -2449,7 +2448,7 @@ struct ctl_table; | |||
2449 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, | 2448 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, |
2450 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2449 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2451 | 2450 | ||
2452 | int get_filesystem_list(char * buf); | 2451 | int __init get_filesystem_list(char *buf); |
2453 | 2452 | ||
2454 | #endif /* __KERNEL__ */ | 2453 | #endif /* __KERNEL__ */ |
2455 | #endif /* _LINUX_FS_H */ | 2454 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 43fc95d822d5..244677cc082b 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -79,6 +79,10 @@ struct fsl_spi_platform_data { | |||
79 | u16 max_chipselect; | 79 | u16 max_chipselect; |
80 | void (*cs_control)(struct spi_device *spi, bool on); | 80 | void (*cs_control)(struct spi_device *spi, bool on); |
81 | 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); | ||
82 | }; | 86 | }; |
83 | 87 | ||
84 | struct mpc8xx_pcmcia_ops { | 88 | struct mpc8xx_pcmcia_ops { |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 634c53028fb8..a1a28caed23d 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -214,6 +214,7 @@ static inline void disk_put_part(struct hd_struct *part) | |||
214 | #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ | 214 | #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ |
215 | #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ | 215 | #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ |
216 | #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ | 216 | #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ |
217 | #define DISK_PITER_INCL_EMPTY_PART0 (1 << 3) /* include empty partition 0 */ | ||
217 | 218 | ||
218 | struct disk_part_iter { | 219 | struct disk_part_iter { |
219 | struct gendisk *disk; | 220 | struct gendisk *disk; |
diff --git a/include/linux/init.h b/include/linux/init.h index 68cb0265d009..0e06c176f185 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _LINUX_INIT_H | 2 | #define _LINUX_INIT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/section-names.h> | ||
6 | #include <linux/stringify.h> | ||
5 | 7 | ||
6 | /* These macros are used to mark some functions or | 8 | /* These macros are used to mark some functions or |
7 | * initialized data (doesn't apply to uninitialized data) | 9 | * initialized data (doesn't apply to uninitialized data) |
@@ -60,14 +62,6 @@ | |||
60 | #define __refdata __section(.ref.data) | 62 | #define __refdata __section(.ref.data) |
61 | #define __refconst __section(.ref.rodata) | 63 | #define __refconst __section(.ref.rodata) |
62 | 64 | ||
63 | /* backward compatibility note | ||
64 | * A few places hardcode the old section names: | ||
65 | * .text.init.refok | ||
66 | * .data.init.refok | ||
67 | * .exit.text.refok | ||
68 | * They should be converted to use the defines from this file | ||
69 | */ | ||
70 | |||
71 | /* compatibility defines */ | 65 | /* compatibility defines */ |
72 | #define __init_refok __ref | 66 | #define __init_refok __ref |
73 | #define __initdata_refok __refdata | 67 | #define __initdata_refok __refdata |
@@ -107,7 +101,7 @@ | |||
107 | #define __memexitconst __section(.memexit.rodata) | 101 | #define __memexitconst __section(.memexit.rodata) |
108 | 102 | ||
109 | /* For assembly routines */ | 103 | /* For assembly routines */ |
110 | #define __HEAD .section ".head.text","ax" | 104 | #define __HEAD .section __stringify(HEAD_TEXT_SECTION),"ax" |
111 | #define __INIT .section ".init.text","ax" | 105 | #define __INIT .section ".init.text","ax" |
112 | #define __FINIT .previous | 106 | #define __FINIT .previous |
113 | 107 | ||
@@ -247,6 +241,7 @@ struct obs_kernel_param { | |||
247 | 241 | ||
248 | /* Relies on boot_command_line being set */ | 242 | /* Relies on boot_command_line being set */ |
249 | void __init parse_early_param(void); | 243 | void __init parse_early_param(void); |
244 | void __init parse_early_options(char *cmdline); | ||
250 | #endif /* __ASSEMBLY__ */ | 245 | #endif /* __ASSEMBLY__ */ |
251 | 246 | ||
252 | /** | 247 | /** |
diff --git a/include/linux/input.h b/include/linux/input.h index 6b28048fc568..0e6ff5de3588 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -106,6 +106,7 @@ struct input_absinfo { | |||
106 | 106 | ||
107 | #define SYN_REPORT 0 | 107 | #define SYN_REPORT 0 |
108 | #define SYN_CONFIG 1 | 108 | #define SYN_CONFIG 1 |
109 | #define SYN_MT_REPORT 2 | ||
109 | 110 | ||
110 | /* | 111 | /* |
111 | * Keys and buttons | 112 | * Keys and buttons |
@@ -445,6 +446,7 @@ struct input_absinfo { | |||
445 | #define BTN_STYLUS2 0x14c | 446 | #define BTN_STYLUS2 0x14c |
446 | #define BTN_TOOL_DOUBLETAP 0x14d | 447 | #define BTN_TOOL_DOUBLETAP 0x14d |
447 | #define BTN_TOOL_TRIPLETAP 0x14e | 448 | #define BTN_TOOL_TRIPLETAP 0x14e |
449 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
448 | 450 | ||
449 | #define BTN_WHEEL 0x150 | 451 | #define BTN_WHEEL 0x150 |
450 | #define BTN_GEAR_DOWN 0x150 | 452 | #define BTN_GEAR_DOWN 0x150 |
@@ -644,6 +646,17 @@ struct input_absinfo { | |||
644 | #define ABS_TOOL_WIDTH 0x1c | 646 | #define ABS_TOOL_WIDTH 0x1c |
645 | #define ABS_VOLUME 0x20 | 647 | #define ABS_VOLUME 0x20 |
646 | #define ABS_MISC 0x28 | 648 | #define ABS_MISC 0x28 |
649 | |||
650 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
651 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
652 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
653 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
654 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
655 | #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ | ||
656 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ | ||
657 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
658 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
659 | |||
647 | #define ABS_MAX 0x3f | 660 | #define ABS_MAX 0x3f |
648 | #define ABS_CNT (ABS_MAX+1) | 661 | #define ABS_CNT (ABS_MAX+1) |
649 | 662 | ||
@@ -743,6 +756,12 @@ struct input_absinfo { | |||
743 | #define BUS_ATARI 0x1B | 756 | #define BUS_ATARI 0x1B |
744 | 757 | ||
745 | /* | 758 | /* |
759 | * MT_TOOL types | ||
760 | */ | ||
761 | #define MT_TOOL_FINGER 0 | ||
762 | #define MT_TOOL_PEN 1 | ||
763 | |||
764 | /* | ||
746 | * Values describing the status of a force-feedback effect | 765 | * Values describing the status of a force-feedback effect |
747 | */ | 766 | */ |
748 | #define FF_STATUS_STOPPED 0x00 | 767 | #define FF_STATUS_STOPPED 0x00 |
@@ -1311,6 +1330,11 @@ static inline void input_sync(struct input_dev *dev) | |||
1311 | input_event(dev, EV_SYN, SYN_REPORT, 0); | 1330 | input_event(dev, EV_SYN, SYN_REPORT, 0); |
1312 | } | 1331 | } |
1313 | 1332 | ||
1333 | static inline void input_mt_sync(struct input_dev *dev) | ||
1334 | { | ||
1335 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | ||
1336 | } | ||
1337 | |||
1314 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1338 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
1315 | 1339 | ||
1316 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) | 1340 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 7ebdb4fb4e54..65aae34759de 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -198,6 +198,8 @@ struct kernel_ipmi_msg { | |||
198 | response. When you send a | 198 | response. When you send a |
199 | response message, this will | 199 | response message, this will |
200 | be returned. */ | 200 | be returned. */ |
201 | #define IPMI_OEM_RECV_TYPE 5 /* The response for OEM Channels */ | ||
202 | |||
201 | /* Note that async events and received commands do not have a completion | 203 | /* Note that async events and received commands do not have a completion |
202 | code as the first byte of the incoming data, unlike a response. */ | 204 | code as the first byte of the incoming data, unlike a response. */ |
203 | 205 | ||
diff --git a/include/linux/ipmi_msgdefs.h b/include/linux/ipmi_msgdefs.h index b56a158d587a..df97e6e31e87 100644 --- a/include/linux/ipmi_msgdefs.h +++ b/include/linux/ipmi_msgdefs.h | |||
@@ -58,6 +58,12 @@ | |||
58 | #define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35 | 58 | #define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35 |
59 | #define IPMI_GET_CHANNEL_INFO_CMD 0x42 | 59 | #define IPMI_GET_CHANNEL_INFO_CMD 0x42 |
60 | 60 | ||
61 | /* Bit for BMC global enables. */ | ||
62 | #define IPMI_BMC_RCV_MSG_INTR 0x01 | ||
63 | #define IPMI_BMC_EVT_MSG_INTR 0x02 | ||
64 | #define IPMI_BMC_EVT_MSG_BUFF 0x04 | ||
65 | #define IPMI_BMC_SYS_LOG 0x08 | ||
66 | |||
61 | #define IPMI_NETFN_STORAGE_REQUEST 0x0a | 67 | #define IPMI_NETFN_STORAGE_REQUEST 0x0a |
62 | #define IPMI_NETFN_STORAGE_RESPONSE 0x0b | 68 | #define IPMI_NETFN_STORAGE_RESPONSE 0x0b |
63 | #define IPMI_ADD_SEL_ENTRY_CMD 0x44 | 69 | #define IPMI_ADD_SEL_ENTRY_CMD 0x44 |
@@ -109,5 +115,7 @@ | |||
109 | #define IPMI_CHANNEL_MEDIUM_USB1 10 | 115 | #define IPMI_CHANNEL_MEDIUM_USB1 10 |
110 | #define IPMI_CHANNEL_MEDIUM_USB2 11 | 116 | #define IPMI_CHANNEL_MEDIUM_USB2 11 |
111 | #define IPMI_CHANNEL_MEDIUM_SYSINTF 12 | 117 | #define IPMI_CHANNEL_MEDIUM_SYSINTF 12 |
118 | #define IPMI_CHANNEL_MEDIUM_OEM_MIN 0x60 | ||
119 | #define IPMI_CHANNEL_MEDIUM_OEM_MAX 0x7f | ||
112 | 120 | ||
113 | #endif /* __LINUX_IPMI_MSGDEFS_H */ | 121 | #endif /* __LINUX_IPMI_MSGDEFS_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 53ae4399da2d..c2049a04fa0b 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -978,7 +978,8 @@ extern void journal_destroy_revoke(journal_t *); | |||
978 | extern int journal_revoke (handle_t *, | 978 | extern int journal_revoke (handle_t *, |
979 | unsigned long, struct buffer_head *); | 979 | unsigned long, struct buffer_head *); |
980 | extern int journal_cancel_revoke(handle_t *, struct journal_head *); | 980 | extern int journal_cancel_revoke(handle_t *, struct journal_head *); |
981 | extern void journal_write_revoke_records(journal_t *, transaction_t *); | 981 | extern void journal_write_revoke_records(journal_t *, |
982 | transaction_t *, int); | ||
982 | 983 | ||
983 | /* Recovery revoke support */ | 984 | /* Recovery revoke support */ |
984 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); | 985 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 8815a3456b3b..cc02393bfce8 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1193,7 +1193,8 @@ extern int jbd2_journal_init_revoke_caches(void); | |||
1193 | extern void jbd2_journal_destroy_revoke(journal_t *); | 1193 | extern void jbd2_journal_destroy_revoke(journal_t *); |
1194 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); | 1194 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); |
1195 | extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); | 1195 | extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *); |
1196 | extern void jbd2_journal_write_revoke_records(journal_t *, transaction_t *); | 1196 | extern void jbd2_journal_write_revoke_records(journal_t *, |
1197 | transaction_t *, int); | ||
1197 | 1198 | ||
1198 | /* Recovery revoke support */ | 1199 | /* Recovery revoke support */ |
1199 | extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); | 1200 | extern int jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d9e75ec7def5..883cd44ff765 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -377,6 +377,15 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
377 | #define pr_cont(fmt, ...) \ | 377 | #define pr_cont(fmt, ...) \ |
378 | printk(KERN_CONT fmt, ##__VA_ARGS__) | 378 | printk(KERN_CONT fmt, ##__VA_ARGS__) |
379 | 379 | ||
380 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
381 | #ifdef DEBUG | ||
382 | #define pr_devel(fmt, ...) \ | ||
383 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
384 | #else | ||
385 | #define pr_devel(fmt, ...) \ | ||
386 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
387 | #endif | ||
388 | |||
380 | /* If you are writing a driver, please use dev_dbg instead */ | 389 | /* If you are writing a driver, please use dev_dbg instead */ |
381 | #if defined(DEBUG) | 390 | #if defined(DEBUG) |
382 | #define pr_debug(fmt, ...) \ | 391 | #define pr_debug(fmt, ...) \ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 311a073afe8a..8cc137911b34 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -409,6 +409,8 @@ struct kvm_trace_rec { | |||
409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT | 409 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT |
410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 | 410 | #define KVM_CAP_DEVICE_DEASSIGNMENT 27 |
411 | #endif | 411 | #endif |
412 | /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ | ||
413 | #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 | ||
412 | 414 | ||
413 | #ifdef KVM_CAP_IRQ_ROUTING | 415 | #ifdef KVM_CAP_IRQ_ROUTING |
414 | 416 | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 18146c980b68..25b9ca93d232 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -56,7 +56,7 @@ extern void mem_cgroup_move_lists(struct page *page, | |||
56 | enum lru_list from, enum lru_list to); | 56 | enum lru_list from, enum lru_list to); |
57 | extern void mem_cgroup_uncharge_page(struct page *page); | 57 | extern void mem_cgroup_uncharge_page(struct page *page); |
58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | 58 | extern void mem_cgroup_uncharge_cache_page(struct page *page); |
59 | extern int mem_cgroup_shrink_usage(struct page *page, | 59 | extern int mem_cgroup_shmem_charge_fallback(struct page *page, |
60 | struct mm_struct *mm, gfp_t gfp_mask); | 60 | struct mm_struct *mm, gfp_t gfp_mask); |
61 | 61 | ||
62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 62 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
@@ -75,7 +75,7 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup) | |||
75 | { | 75 | { |
76 | struct mem_cgroup *mem; | 76 | struct mem_cgroup *mem; |
77 | rcu_read_lock(); | 77 | rcu_read_lock(); |
78 | mem = mem_cgroup_from_task((mm)->owner); | 78 | mem = mem_cgroup_from_task(rcu_dereference((mm)->owner)); |
79 | rcu_read_unlock(); | 79 | rcu_read_unlock(); |
80 | return cgroup == mem; | 80 | return cgroup == mem; |
81 | } | 81 | } |
@@ -155,7 +155,7 @@ static inline void mem_cgroup_uncharge_cache_page(struct page *page) | |||
155 | { | 155 | { |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline int mem_cgroup_shrink_usage(struct page *page, | 158 | static inline int mem_cgroup_shmem_charge_fallback(struct page *page, |
159 | struct mm_struct *mm, gfp_t gfp_mask) | 159 | struct mm_struct *mm, gfp_t gfp_mask) |
160 | { | 160 | { |
161 | return 0; | 161 | return 0; |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 30d1073bac3b..9872d6ca58ae 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -12,21 +12,18 @@ | |||
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/percpu_counter.h> | ||
15 | 16 | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | 18 | ||
18 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
19 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
20 | extern atomic_long_t vm_committed_space; | 21 | extern struct percpu_counter vm_committed_as; |
21 | 22 | ||
22 | #ifdef CONFIG_SMP | ||
23 | extern void vm_acct_memory(long pages); | ||
24 | #else | ||
25 | static inline void vm_acct_memory(long pages) | 23 | static inline void vm_acct_memory(long pages) |
26 | { | 24 | { |
27 | atomic_long_add(pages, &vm_committed_space); | 25 | percpu_counter_add(&vm_committed_as, pages); |
28 | } | 26 | } |
29 | #endif | ||
30 | 27 | ||
31 | static inline void vm_unacct_memory(long pages) | 28 | static inline void vm_unacct_memory(long pages) |
32 | { | 29 | { |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2e7783f4a755..5a96a1a406e9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -104,7 +104,7 @@ struct wireless_dev; | |||
104 | # else | 104 | # else |
105 | # define LL_MAX_HEADER 96 | 105 | # define LL_MAX_HEADER 96 |
106 | # endif | 106 | # endif |
107 | #elif defined(CONFIG_TR) | 107 | #elif defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) |
108 | # define LL_MAX_HEADER 48 | 108 | # define LL_MAX_HEADER 48 |
109 | #else | 109 | #else |
110 | # define LL_MAX_HEADER 32 | 110 | # define LL_MAX_HEADER 32 |
@@ -500,7 +500,7 @@ struct netdev_queue { | |||
500 | * | 500 | * |
501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); | 501 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); |
502 | * This function is called when the Media Access Control address | 502 | * This function is called when the Media Access Control address |
503 | * needs to be changed. If not this interface is not defined, the | 503 | * needs to be changed. If this interface is not defined, the |
504 | * mac address can not be changed. | 504 | * mac address can not be changed. |
505 | * | 505 | * |
506 | * int (*ndo_validate_addr)(struct net_device *dev); | 506 | * int (*ndo_validate_addr)(struct net_device *dev); |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 29fe9ea1d346..1a865e48b8eb 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -100,6 +100,7 @@ enum ctattr_protoinfo_tcp { | |||
100 | enum ctattr_protoinfo_dccp { | 100 | enum ctattr_protoinfo_dccp { |
101 | CTA_PROTOINFO_DCCP_UNSPEC, | 101 | CTA_PROTOINFO_DCCP_UNSPEC, |
102 | CTA_PROTOINFO_DCCP_STATE, | 102 | CTA_PROTOINFO_DCCP_STATE, |
103 | CTA_PROTOINFO_DCCP_ROLE, | ||
103 | __CTA_PROTOINFO_DCCP_MAX, | 104 | __CTA_PROTOINFO_DCCP_MAX, |
104 | }; | 105 | }; |
105 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) | 106 | #define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 7b1a652066c0..c9efe039dc57 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -354,9 +354,6 @@ struct xt_table | |||
354 | /* What hooks you will enter on */ | 354 | /* What hooks you will enter on */ |
355 | unsigned int valid_hooks; | 355 | unsigned int valid_hooks; |
356 | 356 | ||
357 | /* Lock for the curtain */ | ||
358 | struct mutex lock; | ||
359 | |||
360 | /* Man behind the curtain... */ | 357 | /* Man behind the curtain... */ |
361 | struct xt_table_info *private; | 358 | struct xt_table_info *private; |
362 | 359 | ||
@@ -434,8 +431,74 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
434 | 431 | ||
435 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 432 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
436 | extern void xt_free_table_info(struct xt_table_info *info); | 433 | extern void xt_free_table_info(struct xt_table_info *info); |
437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | 434 | |
438 | struct xt_table_info *new); | 435 | /* |
436 | * Per-CPU spinlock associated with per-cpu table entries, and | ||
437 | * with a counter for the "reading" side that allows a recursive | ||
438 | * reader to avoid taking the lock and deadlocking. | ||
439 | * | ||
440 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | ||
441 | * It needs to ensure that the rules are not being changed while the packet | ||
442 | * is being processed. In some cases, the read lock will be acquired | ||
443 | * twice on the same CPU; this is okay because of the count. | ||
444 | * | ||
445 | * "writing" is used when reading counters. | ||
446 | * During replace any readers that are using the old tables have to complete | ||
447 | * before freeing the old table. This is handled by the write locking | ||
448 | * necessary for reading the counters. | ||
449 | */ | ||
450 | struct xt_info_lock { | ||
451 | spinlock_t lock; | ||
452 | unsigned char readers; | ||
453 | }; | ||
454 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
455 | |||
456 | /* | ||
457 | * Note: we need to ensure that preemption is disabled before acquiring | ||
458 | * the per-cpu-variable, so we do it as a two step process rather than | ||
459 | * using "spin_lock_bh()". | ||
460 | * | ||
461 | * We _also_ need to disable bottom half processing before updating our | ||
462 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
463 | * code being called by itself: since the count+lock is not an atomic | ||
464 | * operation, we can allow no races. | ||
465 | * | ||
466 | * _Only_ that special combination of being per-cpu and never getting | ||
467 | * re-entered asynchronously means that the count is safe. | ||
468 | */ | ||
469 | static inline void xt_info_rdlock_bh(void) | ||
470 | { | ||
471 | struct xt_info_lock *lock; | ||
472 | |||
473 | local_bh_disable(); | ||
474 | lock = &__get_cpu_var(xt_info_locks); | ||
475 | if (likely(!lock->readers++)) | ||
476 | spin_lock(&lock->lock); | ||
477 | } | ||
478 | |||
479 | static inline void xt_info_rdunlock_bh(void) | ||
480 | { | ||
481 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | ||
482 | |||
483 | if (likely(!--lock->readers)) | ||
484 | spin_unlock(&lock->lock); | ||
485 | local_bh_enable(); | ||
486 | } | ||
487 | |||
488 | /* | ||
489 | * The "writer" side needs to get exclusive access to the lock, | ||
490 | * regardless of readers. This must be called with bottom half | ||
491 | * processing (and thus also preemption) disabled. | ||
492 | */ | ||
493 | static inline void xt_info_wrlock(unsigned int cpu) | ||
494 | { | ||
495 | spin_lock(&per_cpu(xt_info_locks, cpu).lock); | ||
496 | } | ||
497 | |||
498 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
499 | { | ||
500 | spin_unlock(&per_cpu(xt_info_locks, cpu).lock); | ||
501 | } | ||
439 | 502 | ||
440 | /* | 503 | /* |
441 | * This helper is performance critical and must be inlined | 504 | * This helper is performance critical and must be inlined |
diff --git a/include/linux/nls.h b/include/linux/nls.h index 6a882208301a..52b1a76c1b43 100644 --- a/include/linux/nls.h +++ b/include/linux/nls.h | |||
@@ -58,6 +58,25 @@ static inline int nls_strnicmp(struct nls_table *t, const unsigned char *s1, | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | /* | ||
62 | * nls_nullsize - return length of null character for codepage | ||
63 | * @codepage - codepage for which to return length of NULL terminator | ||
64 | * | ||
65 | * Since we can't guarantee that the null terminator will be a particular | ||
66 | * length, we have to check against the codepage. If there's a problem | ||
67 | * determining it, assume a single-byte NULL terminator. | ||
68 | */ | ||
69 | static inline int | ||
70 | nls_nullsize(const struct nls_table *codepage) | ||
71 | { | ||
72 | int charlen; | ||
73 | char tmp[NLS_MAX_CHARSET_SIZE]; | ||
74 | |||
75 | charlen = codepage->uni2char(0, tmp, NLS_MAX_CHARSET_SIZE); | ||
76 | |||
77 | return charlen > 0 ? charlen : 1; | ||
78 | } | ||
79 | |||
61 | #define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name)) | 80 | #define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name)) |
62 | 81 | ||
63 | #endif /* _LINUX_NLS_H */ | 82 | #endif /* _LINUX_NLS_H */ |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 3d327b67d7e2..908406651330 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -51,6 +51,16 @@ extern int of_register_driver(struct of_platform_driver *drv, | |||
51 | struct bus_type *bus); | 51 | struct bus_type *bus); |
52 | extern void of_unregister_driver(struct of_platform_driver *drv); | 52 | extern void of_unregister_driver(struct of_platform_driver *drv); |
53 | 53 | ||
54 | /* Platform drivers register/unregister */ | ||
55 | static inline int of_register_platform_driver(struct of_platform_driver *drv) | ||
56 | { | ||
57 | return of_register_driver(drv, &of_platform_bus_type); | ||
58 | } | ||
59 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
60 | { | ||
61 | of_unregister_driver(drv); | ||
62 | } | ||
63 | |||
54 | #include <asm/of_platform.h> | 64 | #include <asm/of_platform.h> |
55 | 65 | ||
56 | extern struct of_device *of_find_device_by_node(struct device_node *np); | 66 | extern struct of_device *of_find_device_by_node(struct device_node *np); |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index e4d08c1b2e0b..616bf8b3c8b5 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -376,6 +376,7 @@ | |||
376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
379 | #define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ | ||
379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 380 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 381 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 382 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h new file mode 100644 index 000000000000..8f921d74f49f --- /dev/null +++ b/include/linux/percpu-defs.h | |||
@@ -0,0 +1,84 @@ | |||
1 | #ifndef _LINUX_PERCPU_DEFS_H | ||
2 | #define _LINUX_PERCPU_DEFS_H | ||
3 | |||
4 | /* | ||
5 | * Determine the real variable name from the name visible in the | ||
6 | * kernel sources. | ||
7 | */ | ||
8 | #define per_cpu_var(var) per_cpu__##var | ||
9 | |||
10 | /* | ||
11 | * Base implementations of per-CPU variable declarations and definitions, where | ||
12 | * the section in which the variable is to be placed is provided by the | ||
13 | * 'section' argument. This may be used to affect the parameters governing the | ||
14 | * variable's storage. | ||
15 | * | ||
16 | * NOTE! The sections for the DECLARE and for the DEFINE must match, lest | ||
17 | * linkage errors occur due the compiler generating the wrong code to access | ||
18 | * that section. | ||
19 | */ | ||
20 | #define DECLARE_PER_CPU_SECTION(type, name, section) \ | ||
21 | extern \ | ||
22 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
23 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
24 | |||
25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | ||
26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
27 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
28 | |||
29 | /* | ||
30 | * Variant on the per-CPU variable declaration/definition theme used for | ||
31 | * ordinary per-CPU variables. | ||
32 | */ | ||
33 | #define DECLARE_PER_CPU(type, name) \ | ||
34 | DECLARE_PER_CPU_SECTION(type, name, "") | ||
35 | |||
36 | #define DEFINE_PER_CPU(type, name) \ | ||
37 | DEFINE_PER_CPU_SECTION(type, name, "") | ||
38 | |||
39 | /* | ||
40 | * Declaration/definition used for per-CPU variables that must come first in | ||
41 | * the set of variables. | ||
42 | */ | ||
43 | #define DECLARE_PER_CPU_FIRST(type, name) \ | ||
44 | DECLARE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
45 | |||
46 | #define DEFINE_PER_CPU_FIRST(type, name) \ | ||
47 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
48 | |||
49 | /* | ||
50 | * Declaration/definition used for per-CPU variables that must be cacheline | ||
51 | * aligned under SMP conditions so that, whilst a particular instance of the | ||
52 | * data corresponds to a particular CPU, inefficiencies due to direct access by | ||
53 | * other CPUs are reduced by preventing the data from unnecessarily spanning | ||
54 | * cachelines. | ||
55 | * | ||
56 | * An example of this would be statistical data, where each CPU's set of data | ||
57 | * is updated by that CPU alone, but the data from across all CPUs is collated | ||
58 | * by a CPU processing a read from a proc file. | ||
59 | */ | ||
60 | #define DECLARE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
61 | DECLARE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ | ||
62 | ____cacheline_aligned_in_smp | ||
63 | |||
64 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
65 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ | ||
66 | ____cacheline_aligned_in_smp | ||
67 | |||
68 | /* | ||
69 | * Declaration/definition used for per-CPU variables that must be page aligned. | ||
70 | */ | ||
71 | #define DECLARE_PER_CPU_PAGE_ALIGNED(type, name) \ | ||
72 | DECLARE_PER_CPU_SECTION(type, name, ".page_aligned") | ||
73 | |||
74 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | ||
75 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") | ||
76 | |||
77 | /* | ||
78 | * Intermodule exports for per-CPU variables. | ||
79 | */ | ||
80 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | ||
81 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | ||
82 | |||
83 | |||
84 | #endif /* _LINUX_PERCPU_DEFS_H */ | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index cfda2d5ad319..1581ff235c7e 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -9,50 +9,6 @@ | |||
9 | 9 | ||
10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
11 | 11 | ||
12 | #ifndef PER_CPU_BASE_SECTION | ||
13 | #ifdef CONFIG_SMP | ||
14 | #define PER_CPU_BASE_SECTION ".data.percpu" | ||
15 | #else | ||
16 | #define PER_CPU_BASE_SECTION ".data" | ||
17 | #endif | ||
18 | #endif | ||
19 | |||
20 | #ifdef CONFIG_SMP | ||
21 | |||
22 | #ifdef MODULE | ||
23 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | ||
24 | #else | ||
25 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" | ||
26 | #endif | ||
27 | #define PER_CPU_FIRST_SECTION ".first" | ||
28 | |||
29 | #else | ||
30 | |||
31 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | ||
32 | #define PER_CPU_FIRST_SECTION "" | ||
33 | |||
34 | #endif | ||
35 | |||
36 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | ||
37 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | ||
38 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
39 | |||
40 | #define DEFINE_PER_CPU(type, name) \ | ||
41 | DEFINE_PER_CPU_SECTION(type, name, "") | ||
42 | |||
43 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
44 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ | ||
45 | ____cacheline_aligned_in_smp | ||
46 | |||
47 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | ||
48 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") | ||
49 | |||
50 | #define DEFINE_PER_CPU_FIRST(type, name) \ | ||
51 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
52 | |||
53 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | ||
54 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | ||
55 | |||
56 | /* enough to cover all DEFINE_PER_CPUs in modules */ | 12 | /* enough to cover all DEFINE_PER_CPUs in modules */ |
57 | #ifdef CONFIG_MODULES | 13 | #ifdef CONFIG_MODULES |
58 | #define PERCPU_MODULE_RESERVE (8 << 10) | 14 | #define PERCPU_MODULE_RESERVE (8 << 10) |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 04b4d7330e6d..d745f5b6c7b0 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -113,6 +113,7 @@ struct pkt_ctrl_command { | |||
113 | #include <linux/cdrom.h> | 113 | #include <linux/cdrom.h> |
114 | #include <linux/kobject.h> | 114 | #include <linux/kobject.h> |
115 | #include <linux/sysfs.h> | 115 | #include <linux/sysfs.h> |
116 | #include <linux/mempool.h> | ||
116 | 117 | ||
117 | /* default bio write queue congestion marks */ | 118 | /* default bio write queue congestion marks */ |
118 | #define PKT_WRITE_CONGESTION_ON 10000 | 119 | #define PKT_WRITE_CONGESTION_ON 10000 |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 76e470a299bf..72736fd8223c 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -77,4 +77,46 @@ extern int platform_driver_probe(struct platform_driver *driver, | |||
77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
79 | 79 | ||
80 | /* early platform driver interface */ | ||
81 | struct early_platform_driver { | ||
82 | const char *class_str; | ||
83 | struct platform_driver *pdrv; | ||
84 | struct list_head list; | ||
85 | int requested_id; | ||
86 | }; | ||
87 | |||
88 | #define EARLY_PLATFORM_ID_UNSET -2 | ||
89 | #define EARLY_PLATFORM_ID_ERROR -3 | ||
90 | |||
91 | extern int early_platform_driver_register(struct early_platform_driver *epdrv, | ||
92 | char *buf); | ||
93 | extern void early_platform_add_devices(struct platform_device **devs, int num); | ||
94 | |||
95 | static inline int is_early_platform_device(struct platform_device *pdev) | ||
96 | { | ||
97 | return !pdev->dev.driver; | ||
98 | } | ||
99 | |||
100 | extern void early_platform_driver_register_all(char *class_str); | ||
101 | extern int early_platform_driver_probe(char *class_str, | ||
102 | int nr_probe, int user_only); | ||
103 | extern void early_platform_cleanup(void); | ||
104 | |||
105 | |||
106 | #ifndef MODULE | ||
107 | #define early_platform_init(class_string, platform_driver) \ | ||
108 | static __initdata struct early_platform_driver early_driver = { \ | ||
109 | .class_str = class_string, \ | ||
110 | .pdrv = platform_driver, \ | ||
111 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ | ||
112 | }; \ | ||
113 | static int __init early_platform_driver_setup_func(char *buf) \ | ||
114 | { \ | ||
115 | return early_platform_driver_register(&early_driver, buf); \ | ||
116 | } \ | ||
117 | early_param(class_string, early_platform_driver_setup_func) | ||
118 | #else /* MODULE */ | ||
119 | #define early_platform_init(class_string, platform_driver) | ||
120 | #endif /* MODULE */ | ||
121 | |||
80 | #endif /* _PLATFORM_DEVICE_H_ */ | 122 | #endif /* _PLATFORM_DEVICE_H_ */ |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4848d8dacd90..225f733e7533 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -50,6 +50,7 @@ enum regulator_status { | |||
50 | * @set_current_limit: Configure a limit for a current-limited regulator. | 50 | * @set_current_limit: Configure a limit for a current-limited regulator. |
51 | * @get_current_limit: Get the configured limit for a current-limited regulator. | 51 | * @get_current_limit: Get the configured limit for a current-limited regulator. |
52 | * | 52 | * |
53 | * @set_mode: Set the configured operating mode for the regulator. | ||
53 | * @get_mode: Get the configured operating mode for the regulator. | 54 | * @get_mode: Get the configured operating mode for the regulator. |
54 | * @get_status: Return actual (not as-configured) status of regulator, as a | 55 | * @get_status: Return actual (not as-configured) status of regulator, as a |
55 | * REGULATOR_STATUS value (or negative errno) | 56 | * REGULATOR_STATUS value (or negative errno) |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 5621d87c4479..6b361d23a499 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -193,7 +193,7 @@ struct reiserfs_journal { | |||
193 | atomic_t j_wcount; /* count of writers for current commit */ | 193 | atomic_t j_wcount; /* count of writers for current commit */ |
194 | unsigned long j_bcount; /* batch count. allows turning X transactions into 1 */ | 194 | unsigned long j_bcount; /* batch count. allows turning X transactions into 1 */ |
195 | unsigned long j_first_unflushed_offset; /* first unflushed transactions offset */ | 195 | unsigned long j_first_unflushed_offset; /* first unflushed transactions offset */ |
196 | unsigned long j_last_flush_trans_id; /* last fully flushed journal timestamp */ | 196 | unsigned j_last_flush_trans_id; /* last fully flushed journal timestamp */ |
197 | struct buffer_head *j_header_bh; | 197 | struct buffer_head *j_header_bh; |
198 | 198 | ||
199 | time_t j_trans_start_time; /* time this transaction started */ | 199 | time_t j_trans_start_time; /* time this transaction started */ |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 262a8dccfa81..167c33361d9c 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -21,6 +21,8 @@ extern long prctl_set_seccomp(unsigned long); | |||
21 | 21 | ||
22 | #else /* CONFIG_SECCOMP */ | 22 | #else /* CONFIG_SECCOMP */ |
23 | 23 | ||
24 | #include <linux/errno.h> | ||
25 | |||
24 | typedef struct { } seccomp_t; | 26 | typedef struct { } seccomp_t; |
25 | 27 | ||
26 | #define secure_computing(x) do { } while (0) | 28 | #define secure_computing(x) do { } while (0) |
diff --git a/include/linux/section-names.h b/include/linux/section-names.h new file mode 100644 index 000000000000..c956f4eb2adf --- /dev/null +++ b/include/linux/section-names.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __LINUX_SECTION_NAMES_H | ||
2 | #define __LINUX_SECTION_NAMES_H | ||
3 | |||
4 | #define HEAD_TEXT_SECTION .head.text | ||
5 | |||
6 | #endif /* !__LINUX_SECTION_NAMES_H */ | ||
diff --git a/include/linux/slow-work.h b/include/linux/slow-work.h index 85958277f83d..b65c8881f07a 100644 --- a/include/linux/slow-work.h +++ b/include/linux/slow-work.h | |||
@@ -67,7 +67,7 @@ static inline void slow_work_init(struct slow_work *work, | |||
67 | } | 67 | } |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * slow_work_init - Initialise a very slow work item | 70 | * vslow_work_init - Initialise a very slow work item |
71 | * @work: The work item to initialise | 71 | * @work: The work item to initialise |
72 | * @ops: The operations to use to handle the slow work item | 72 | * @ops: The operations to use to handle the slow work item |
73 | * | 73 | * |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 05eab2f11e63..2ea20320c093 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -51,5 +51,6 @@ struct ads7846_platform_data { | |||
51 | void **filter_data); | 51 | void **filter_data); |
52 | int (*filter) (void *filter_data, int data_idx, int *val); | 52 | int (*filter) (void *filter_data, int data_idx, int *val); |
53 | void (*filter_cleanup)(void *filter_data); | 53 | void (*filter_cleanup)(void *filter_data); |
54 | void (*wait_for_sync)(void); | ||
54 | }; | 55 | }; |
55 | 56 | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 2cc43fa380cb..a0faa18f7b1b 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -245,7 +245,12 @@ struct spi_master { | |||
245 | */ | 245 | */ |
246 | u16 dma_alignment; | 246 | u16 dma_alignment; |
247 | 247 | ||
248 | /* setup mode and clock, etc (spi driver may call many times) */ | 248 | /* Setup mode and clock, etc (spi driver may call many times). |
249 | * | ||
250 | * IMPORTANT: this may be called when transfers to another | ||
251 | * device are active. DO NOT UPDATE SHARED REGISTERS in ways | ||
252 | * which could break those transfers. | ||
253 | */ | ||
249 | int (*setup)(struct spi_device *spi); | 254 | int (*setup)(struct spi_device *spi); |
250 | 255 | ||
251 | /* bidirectional bulk transfers | 256 | /* bidirectional bulk transfers |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 1758d9f5b5c3..08afe43118f4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -261,6 +261,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
261 | #define XPRT_BINDING (5) | 261 | #define XPRT_BINDING (5) |
262 | #define XPRT_CLOSING (6) | 262 | #define XPRT_CLOSING (6) |
263 | #define XPRT_CONNECTION_ABORT (7) | 263 | #define XPRT_CONNECTION_ABORT (7) |
264 | #define XPRT_CONNECTION_CLOSE (8) | ||
264 | 265 | ||
265 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 266 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
266 | { | 267 | { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 3e3a4364cbff..795032edfc46 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -58,10 +58,17 @@ typedef int __bitwise suspend_state_t; | |||
58 | * by @begin(). | 58 | * by @begin(). |
59 | * @prepare() is called right after devices have been suspended (ie. the | 59 | * @prepare() is called right after devices have been suspended (ie. the |
60 | * appropriate .suspend() method has been executed for each device) and | 60 | * appropriate .suspend() method has been executed for each device) and |
61 | * before the nonboot CPUs are disabled (it is executed with IRQs enabled). | 61 | * before device drivers' late suspend callbacks are executed. It returns |
62 | * This callback is optional. It returns 0 on success or a negative | 62 | * 0 on success or a negative error code otherwise, in which case the |
63 | * error code otherwise, in which case the system cannot enter the desired | 63 | * system cannot enter the desired sleep state (@prepare_late(), @enter(), |
64 | * sleep state (@enter() and @finish() will not be called in that case). | 64 | * @wake(), and @finish() will not be called in that case). |
65 | * | ||
66 | * @prepare_late: Finish preparing the platform for entering the system sleep | ||
67 | * state indicated by @begin(). | ||
68 | * @prepare_late is called before disabling nonboot CPUs and after | ||
69 | * device drivers' late suspend callbacks have been executed. It returns | ||
70 | * 0 on success or a negative error code otherwise, in which case the | ||
71 | * system cannot enter the desired sleep state (@enter() and @wake()). | ||
65 | * | 72 | * |
66 | * @enter: Enter the system sleep state indicated by @begin() or represented by | 73 | * @enter: Enter the system sleep state indicated by @begin() or represented by |
67 | * the argument if @begin() is not implemented. | 74 | * the argument if @begin() is not implemented. |
@@ -69,19 +76,26 @@ typedef int __bitwise suspend_state_t; | |||
69 | * error code otherwise, in which case the system cannot enter the desired | 76 | * error code otherwise, in which case the system cannot enter the desired |
70 | * sleep state. | 77 | * sleep state. |
71 | * | 78 | * |
72 | * @finish: Called when the system has just left a sleep state, right after | 79 | * @wake: Called when the system has just left a sleep state, right after |
73 | * the nonboot CPUs have been enabled and before devices are resumed (it is | 80 | * the nonboot CPUs have been enabled and before device drivers' early |
74 | * executed with IRQs enabled). | 81 | * resume callbacks are executed. |
82 | * This callback is optional, but should be implemented by the platforms | ||
83 | * that implement @prepare_late(). If implemented, it is always called | ||
84 | * after @enter(), even if @enter() fails. | ||
85 | * | ||
86 | * @finish: Finish wake-up of the platform. | ||
87 | * @finish is called right prior to calling device drivers' regular suspend | ||
88 | * callbacks. | ||
75 | * This callback is optional, but should be implemented by the platforms | 89 | * This callback is optional, but should be implemented by the platforms |
76 | * that implement @prepare(). If implemented, it is always called after | 90 | * that implement @prepare(). If implemented, it is always called after |
77 | * @enter() (even if @enter() fails). | 91 | * @enter() and @wake(), if implemented, even if any of them fails. |
78 | * | 92 | * |
79 | * @end: Called by the PM core right after resuming devices, to indicate to | 93 | * @end: Called by the PM core right after resuming devices, to indicate to |
80 | * the platform that the system has returned to the working state or | 94 | * the platform that the system has returned to the working state or |
81 | * the transition to the sleep state has been aborted. | 95 | * the transition to the sleep state has been aborted. |
82 | * This callback is optional, but should be implemented by the platforms | 96 | * This callback is optional, but should be implemented by the platforms |
83 | * that implement @begin(), but platforms implementing @begin() should | 97 | * that implement @begin(). Accordingly, platforms implementing @begin() |
84 | * also provide a @end() which cleans up transitions aborted before | 98 | * should also provide a @end() which cleans up transitions aborted before |
85 | * @enter(). | 99 | * @enter(). |
86 | * | 100 | * |
87 | * @recover: Recover the platform from a suspend failure. | 101 | * @recover: Recover the platform from a suspend failure. |
@@ -93,7 +107,9 @@ struct platform_suspend_ops { | |||
93 | int (*valid)(suspend_state_t state); | 107 | int (*valid)(suspend_state_t state); |
94 | int (*begin)(suspend_state_t state); | 108 | int (*begin)(suspend_state_t state); |
95 | int (*prepare)(void); | 109 | int (*prepare)(void); |
110 | int (*prepare_late)(void); | ||
96 | int (*enter)(suspend_state_t state); | 111 | int (*enter)(suspend_state_t state); |
112 | void (*wake)(void); | ||
97 | void (*finish)(void); | 113 | void (*finish)(void); |
98 | void (*end)(void); | 114 | void (*end)(void); |
99 | void (*recover)(void); | 115 | void (*recover)(void); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index dabe4ad89141..40617c1d8976 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -148,7 +148,7 @@ struct old_linux_dirent; | |||
148 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | 148 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ |
149 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | 149 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) |
150 | #else | 150 | #else |
151 | #ifdef CONFIG_ALPHA | 151 | #if defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) |
152 | #define SYSCALL_ALIAS(alias, name) \ | 152 | #define SYSCALL_ALIAS(alias, name) \ |
153 | asm ( #alias " = " #name "\n\t.globl " #alias) | 153 | asm ( #alias " = " #name "\n\t.globl " #alias) |
154 | #else | 154 | #else |
diff --git a/include/linux/usb.h b/include/linux/usb.h index c6b2ab41b908..3aa2cd1f8d08 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1387,6 +1387,7 @@ extern int usb_string(struct usb_device *dev, int index, | |||
1387 | extern int usb_clear_halt(struct usb_device *dev, int pipe); | 1387 | extern int usb_clear_halt(struct usb_device *dev, int pipe); |
1388 | extern int usb_reset_configuration(struct usb_device *dev); | 1388 | extern int usb_reset_configuration(struct usb_device *dev); |
1389 | extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); | 1389 | extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); |
1390 | extern void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr); | ||
1390 | 1391 | ||
1391 | /* this request isn't really synchronous, but it belongs with the others */ | 1392 | /* this request isn't really synchronous, but it belongs with the others */ |
1392 | extern int usb_driver_set_configuration(struct usb_device *udev, int config); | 1393 | extern int usb_driver_set_configuration(struct usb_device *udev, int config); |
@@ -1491,14 +1492,6 @@ void usb_sg_wait(struct usb_sg_request *io); | |||
1491 | #define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) | 1492 | #define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) |
1492 | #define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) | 1493 | #define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) |
1493 | 1494 | ||
1494 | /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ | ||
1495 | #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) | ||
1496 | #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) | ||
1497 | #define usb_settoggle(dev, ep, out, bit) \ | ||
1498 | ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | \ | ||
1499 | ((bit) << (ep))) | ||
1500 | |||
1501 | |||
1502 | static inline unsigned int __create_pipe(struct usb_device *dev, | 1495 | static inline unsigned int __create_pipe(struct usb_device *dev, |
1503 | unsigned int endpoint) | 1496 | unsigned int endpoint) |
1504 | { | 1497 | { |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 3c86ed25a04c..c24124a42ce5 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define USB_CDC_SUBCLASS_DMM 0x09 | 17 | #define USB_CDC_SUBCLASS_DMM 0x09 |
18 | #define USB_CDC_SUBCLASS_MDLM 0x0a | 18 | #define USB_CDC_SUBCLASS_MDLM 0x0a |
19 | #define USB_CDC_SUBCLASS_OBEX 0x0b | 19 | #define USB_CDC_SUBCLASS_OBEX 0x0b |
20 | #define USB_CDC_SUBCLASS_EEM 0x0c | ||
20 | 21 | ||
21 | #define USB_CDC_PROTO_NONE 0 | 22 | #define USB_CDC_PROTO_NONE 0 |
22 | 23 | ||
@@ -28,6 +29,8 @@ | |||
28 | #define USB_CDC_ACM_PROTO_AT_CDMA 6 | 29 | #define USB_CDC_ACM_PROTO_AT_CDMA 6 |
29 | #define USB_CDC_ACM_PROTO_VENDOR 0xff | 30 | #define USB_CDC_ACM_PROTO_VENDOR 0xff |
30 | 31 | ||
32 | #define USB_CDC_PROTO_EEM 7 | ||
33 | |||
31 | /*-------------------------------------------------------------------------*/ | 34 | /*-------------------------------------------------------------------------*/ |
32 | 35 | ||
33 | /* | 36 | /* |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index d6aad0ea6033..d43755669261 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -7,6 +7,9 @@ | |||
7 | * key configuration differences between boards. | 7 | * key configuration differences between boards. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __LINUX_USB_MUSB_H | ||
11 | #define __LINUX_USB_MUSB_H | ||
12 | |||
10 | /* The USB role is defined by the connector used on the board, so long as | 13 | /* The USB role is defined by the connector used on the board, so long as |
11 | * standards are being followed. (Developer boards sometimes won't.) | 14 | * standards are being followed. (Developer boards sometimes won't.) |
12 | */ | 15 | */ |
@@ -101,3 +104,5 @@ extern int __init tusb6010_setup_interface( | |||
101 | extern int tusb6010_platform_retime(unsigned is_refclk); | 104 | extern int tusb6010_platform_retime(unsigned is_refclk); |
102 | 105 | ||
103 | #endif /* OMAP2 */ | 106 | #endif /* OMAP2 */ |
107 | |||
108 | #endif /* __LINUX_USB_MUSB_H */ | ||
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 242348bb3766..cec79adbe3ea 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
7 | #include <linux/if_ether.h> | ||
7 | 8 | ||
8 | /* The ID for virtio_net */ | 9 | /* The ID for virtio_net */ |
9 | #define VIRTIO_ID_NET 1 | 10 | #define VIRTIO_ID_NET 1 |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 5d631c17eaee..bc024632f365 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -440,13 +440,15 @@ void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | |||
440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 440 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
442 | 442 | ||
443 | #define DEFINE_WAIT(name) \ | 443 | #define DEFINE_WAIT_FUNC(name, function) \ |
444 | wait_queue_t name = { \ | 444 | wait_queue_t name = { \ |
445 | .private = current, \ | 445 | .private = current, \ |
446 | .func = autoremove_wake_function, \ | 446 | .func = function, \ |
447 | .task_list = LIST_HEAD_INIT((name).task_list), \ | 447 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
448 | } | 448 | } |
449 | 449 | ||
450 | #define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, autoremove_wake_function) | ||
451 | |||
450 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 452 | #define DEFINE_WAIT_BIT(name, word, bit) \ |
451 | struct wait_bit_queue name = { \ | 453 | struct wait_bit_queue name = { \ |
452 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ | 454 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ |