diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-12-14 03:16:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-14 03:16:49 -0500 |
commit | cc0104e877fff32865a67b256d3a9ce52ff15790 (patch) | |
tree | 18779442274e81607822ecb0905c55ac4ce6a163 /include/linux | |
parent | 16620e0f1990fa6d896a639449c4b3d678458464 (diff) | |
parent | f40542532e96dda5506eb76badea322f2ae4731c (diff) |
Merge branch 'linus' into tracing/urgent
Conflicts:
kernel/trace/trace_kprobe.c
Merge reason: resolve the conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
68 files changed, 1007 insertions, 341 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 5a5385749e16..f72914db2a11 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -214,7 +214,6 @@ unifdef-y += futex.h | |||
214 | unifdef-y += fs.h | 214 | unifdef-y += fs.h |
215 | unifdef-y += gameport.h | 215 | unifdef-y += gameport.h |
216 | unifdef-y += generic_serial.h | 216 | unifdef-y += generic_serial.h |
217 | unifdef-y += hayesesp.h | ||
218 | unifdef-y += hdlcdrv.h | 217 | unifdef-y += hdlcdrv.h |
219 | unifdef-y += hdlc.h | 218 | unifdef-y += hdlc.h |
220 | unifdef-y += hdreg.h | 219 | unifdef-y += hdreg.h |
diff --git a/include/linux/cciss_ioctl.h b/include/linux/cciss_ioctl.h index cb57c30081a8..eb130b4d8e72 100644 --- a/include/linux/cciss_ioctl.h +++ b/include/linux/cciss_ioctl.h | |||
@@ -39,7 +39,7 @@ typedef __u32 DriverVer_type; | |||
39 | #ifndef CCISS_CMD_H | 39 | #ifndef CCISS_CMD_H |
40 | // This defines are duplicated in cciss_cmd.h in the driver directory | 40 | // This defines are duplicated in cciss_cmd.h in the driver directory |
41 | 41 | ||
42 | //general boundary defintions | 42 | //general boundary definitions |
43 | #define SENSEINFOBYTES 32//note that this value may vary between host implementations | 43 | #define SENSEINFOBYTES 32//note that this value may vary between host implementations |
44 | 44 | ||
45 | //Command Status value | 45 | //Command Status value |
diff --git a/include/linux/chio.h b/include/linux/chio.h index 519248d8b2b6..d9bac7f97282 100644 --- a/include/linux/chio.h +++ b/include/linux/chio.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * query vendor-specific element types | 21 | * query vendor-specific element types |
22 | * | 22 | * |
23 | * accessing elements works by specifing type and unit of the element. | 23 | * accessing elements works by specifing type and unit of the element. |
24 | * for eample, storage elements are addressed with type = CHET_ST and | 24 | * for example, storage elements are addressed with type = CHET_ST and |
25 | * unit = 0 .. cp_nslots-1 | 25 | * unit = 0 .. cp_nslots-1 |
26 | * | 26 | * |
27 | */ | 27 | */ |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 47536197ffdd..e287863ac053 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -43,6 +43,8 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | |||
43 | 43 | ||
44 | #ifdef CONFIG_HOTPLUG_CPU | 44 | #ifdef CONFIG_HOTPLUG_CPU |
45 | extern void unregister_cpu(struct cpu *cpu); | 45 | extern void unregister_cpu(struct cpu *cpu); |
46 | extern ssize_t arch_cpu_probe(const char *, size_t); | ||
47 | extern ssize_t arch_cpu_release(const char *, size_t); | ||
46 | #endif | 48 | #endif |
47 | struct notifier_block; | 49 | struct notifier_block; |
48 | 50 | ||
@@ -115,6 +117,19 @@ extern void put_online_cpus(void); | |||
115 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | 117 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) |
116 | int cpu_down(unsigned int cpu); | 118 | int cpu_down(unsigned int cpu); |
117 | 119 | ||
120 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | ||
121 | extern void cpu_hotplug_driver_lock(void); | ||
122 | extern void cpu_hotplug_driver_unlock(void); | ||
123 | #else | ||
124 | static inline void cpu_hotplug_driver_lock(void) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | static inline void cpu_hotplug_driver_unlock(void) | ||
129 | { | ||
130 | } | ||
131 | #endif | ||
132 | |||
118 | #else /* CONFIG_HOTPLUG_CPU */ | 133 | #else /* CONFIG_HOTPLUG_CPU */ |
119 | 134 | ||
120 | #define get_online_cpus() do { } while (0) | 135 | #define get_online_cpus() do { } while (0) |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 79a2340d83cd..4de02b10007f 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -232,6 +232,7 @@ struct cpufreq_driver { | |||
232 | /* optional */ | 232 | /* optional */ |
233 | unsigned int (*getavg) (struct cpufreq_policy *policy, | 233 | unsigned int (*getavg) (struct cpufreq_policy *policy, |
234 | unsigned int cpu); | 234 | unsigned int cpu); |
235 | int (*bios_limit) (int cpu, unsigned int *limit); | ||
235 | 236 | ||
236 | int (*exit) (struct cpufreq_policy *policy); | 237 | int (*exit) (struct cpufreq_policy *policy); |
237 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); | 238 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 789cf5f920ce..d77b54733c5b 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -84,6 +84,7 @@ extern const struct cpumask *const cpu_active_mask; | |||
84 | #define num_online_cpus() cpumask_weight(cpu_online_mask) | 84 | #define num_online_cpus() cpumask_weight(cpu_online_mask) |
85 | #define num_possible_cpus() cpumask_weight(cpu_possible_mask) | 85 | #define num_possible_cpus() cpumask_weight(cpu_possible_mask) |
86 | #define num_present_cpus() cpumask_weight(cpu_present_mask) | 86 | #define num_present_cpus() cpumask_weight(cpu_present_mask) |
87 | #define num_active_cpus() cpumask_weight(cpu_active_mask) | ||
87 | #define cpu_online(cpu) cpumask_test_cpu((cpu), cpu_online_mask) | 88 | #define cpu_online(cpu) cpumask_test_cpu((cpu), cpu_online_mask) |
88 | #define cpu_possible(cpu) cpumask_test_cpu((cpu), cpu_possible_mask) | 89 | #define cpu_possible(cpu) cpumask_test_cpu((cpu), cpu_possible_mask) |
89 | #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) | 90 | #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) |
@@ -92,6 +93,7 @@ extern const struct cpumask *const cpu_active_mask; | |||
92 | #define num_online_cpus() 1 | 93 | #define num_online_cpus() 1 |
93 | #define num_possible_cpus() 1 | 94 | #define num_possible_cpus() 1 |
94 | #define num_present_cpus() 1 | 95 | #define num_present_cpus() 1 |
96 | #define num_active_cpus() 1 | ||
95 | #define cpu_online(cpu) ((cpu) == 0) | 97 | #define cpu_online(cpu) ((cpu) == 0) |
96 | #define cpu_possible(cpu) ((cpu) == 0) | 98 | #define cpu_possible(cpu) ((cpu) == 0) |
97 | #define cpu_present(cpu) ((cpu) == 0) | 99 | #define cpu_present(cpu) ((cpu) == 0) |
diff --git a/include/linux/device.h b/include/linux/device.h index 2ea3e4921812..2a73d9bcbc9c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -558,7 +558,7 @@ extern void wait_for_device_probe(void); | |||
558 | #ifdef CONFIG_DEVTMPFS | 558 | #ifdef CONFIG_DEVTMPFS |
559 | extern int devtmpfs_create_node(struct device *dev); | 559 | extern int devtmpfs_create_node(struct device *dev); |
560 | extern int devtmpfs_delete_node(struct device *dev); | 560 | extern int devtmpfs_delete_node(struct device *dev); |
561 | extern int devtmpfs_mount(const char *mountpoint); | 561 | extern int devtmpfs_mount(const char *mntdir); |
562 | #else | 562 | #else |
563 | static inline int devtmpfs_create_node(struct device *dev) { return 0; } | 563 | static inline int devtmpfs_create_node(struct device *dev) { return 0; } |
564 | static inline int devtmpfs_delete_node(struct device *dev) { return 0; } | 564 | static inline int devtmpfs_delete_node(struct device *dev) { return 0; } |
diff --git a/include/linux/dm-log-userspace.h b/include/linux/dm-log-userspace.h index 8a1f972c0fe9..0c3c3a2110c4 100644 --- a/include/linux/dm-log-userspace.h +++ b/include/linux/dm-log-userspace.h | |||
@@ -363,7 +363,7 @@ | |||
363 | * various request types above. The remaining 24-bits are currently | 363 | * various request types above. The remaining 24-bits are currently |
364 | * set to zero and are reserved for future use and compatibility concerns. | 364 | * set to zero and are reserved for future use and compatibility concerns. |
365 | * | 365 | * |
366 | * User-space should always use DM_ULOG_REQUEST_TYPE to aquire the | 366 | * User-space should always use DM_ULOG_REQUEST_TYPE to acquire the |
367 | * request type from the 'request_type' field to maintain forward compatibility. | 367 | * request type from the 'request_type' field to maintain forward compatibility. |
368 | */ | 368 | */ |
369 | #define DM_ULOG_REQUEST_MASK 0xFF | 369 | #define DM_ULOG_REQUEST_MASK 0xFF |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 121720d74e15..2dfa7076e8b6 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -565,14 +565,14 @@ struct ext2_dir_entry_2 { | |||
565 | * other bits are reserved for now. | 565 | * other bits are reserved for now. |
566 | */ | 566 | */ |
567 | enum { | 567 | enum { |
568 | EXT2_FT_UNKNOWN, | 568 | EXT2_FT_UNKNOWN = 0, |
569 | EXT2_FT_REG_FILE, | 569 | EXT2_FT_REG_FILE = 1, |
570 | EXT2_FT_DIR, | 570 | EXT2_FT_DIR = 2, |
571 | EXT2_FT_CHRDEV, | 571 | EXT2_FT_CHRDEV = 3, |
572 | EXT2_FT_BLKDEV, | 572 | EXT2_FT_BLKDEV = 4, |
573 | EXT2_FT_FIFO, | 573 | EXT2_FT_FIFO = 5, |
574 | EXT2_FT_SOCK, | 574 | EXT2_FT_SOCK = 6, |
575 | EXT2_FT_SYMLINK, | 575 | EXT2_FT_SYMLINK = 7, |
576 | EXT2_FT_MAX | 576 | EXT2_FT_MAX |
577 | }; | 577 | }; |
578 | 578 | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 7499b3667798..6b049030fbe6 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -918,6 +918,8 @@ extern void ext3_abort (struct super_block *, const char *, const char *, ...) | |||
918 | __attribute__ ((format (printf, 3, 4))); | 918 | __attribute__ ((format (printf, 3, 4))); |
919 | extern void ext3_warning (struct super_block *, const char *, const char *, ...) | 919 | extern void ext3_warning (struct super_block *, const char *, const char *, ...) |
920 | __attribute__ ((format (printf, 3, 4))); | 920 | __attribute__ ((format (printf, 3, 4))); |
921 | extern void ext3_msg(struct super_block *, const char *, const char *, ...) | ||
922 | __attribute__ ((format (printf, 3, 4))); | ||
921 | extern void ext3_update_dynamic_rev (struct super_block *sb); | 923 | extern void ext3_update_dynamic_rev (struct super_block *sb); |
922 | 924 | ||
923 | #define ext3_std_error(sb, errno) \ | 925 | #define ext3_std_error(sb, errno) \ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index de9c722e7b90..369767bd873e 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -763,6 +763,7 @@ struct fb_tile_ops { | |||
763 | * takes over; acceleration engine should be in a quiescent state */ | 763 | * takes over; acceleration engine should be in a quiescent state */ |
764 | 764 | ||
765 | /* hints */ | 765 | /* hints */ |
766 | #define FBINFO_VIRTFB 0x0004 /* FB is System RAM, not device. */ | ||
766 | #define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */ | 767 | #define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */ |
767 | #define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */ | 768 | #define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */ |
768 | 769 | ||
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index d31544628436..043811f0d277 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
7 | #include <linux/gfp.h> | ||
7 | 8 | ||
8 | #define FW_ACTION_NOHOTPLUG 0 | 9 | #define FW_ACTION_NOHOTPLUG 0 |
9 | #define FW_ACTION_HOTPLUG 1 | 10 | #define FW_ACTION_HOTPLUG 1 |
@@ -38,7 +39,7 @@ int request_firmware(const struct firmware **fw, const char *name, | |||
38 | struct device *device); | 39 | struct device *device); |
39 | int request_firmware_nowait( | 40 | int request_firmware_nowait( |
40 | struct module *module, int uevent, | 41 | struct module *module, int uevent, |
41 | const char *name, struct device *device, void *context, | 42 | const char *name, struct device *device, gfp_t gfp, void *context, |
42 | void (*cont)(const struct firmware *fw, void *context)); | 43 | void (*cont)(const struct firmware *fw, void *context)); |
43 | 44 | ||
44 | void release_firmware(const struct firmware *fw); | 45 | void release_firmware(const struct firmware *fw); |
@@ -51,7 +52,7 @@ static inline int request_firmware(const struct firmware **fw, | |||
51 | } | 52 | } |
52 | static inline int request_firmware_nowait( | 53 | static inline int request_firmware_nowait( |
53 | struct module *module, int uevent, | 54 | struct module *module, int uevent, |
54 | const char *name, struct device *device, void *context, | 55 | const char *name, struct device *device, gfp_t gfp, void *context, |
55 | void (*cont)(const struct firmware *fw, void *context)) | 56 | void (*cont)(const struct firmware *fw, void *context)) |
56 | { | 57 | { |
57 | return -EINVAL; | 58 | return -EINVAL; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 891f7d642e5c..a057f48eb156 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2091,8 +2091,6 @@ extern int filemap_fdatawait_range(struct address_space *, loff_t lstart, | |||
2091 | extern int filemap_write_and_wait(struct address_space *mapping); | 2091 | extern int filemap_write_and_wait(struct address_space *mapping); |
2092 | extern int filemap_write_and_wait_range(struct address_space *mapping, | 2092 | extern int filemap_write_and_wait_range(struct address_space *mapping, |
2093 | loff_t lstart, loff_t lend); | 2093 | loff_t lstart, loff_t lend); |
2094 | extern int wait_on_page_writeback_range(struct address_space *mapping, | ||
2095 | pgoff_t start, pgoff_t end); | ||
2096 | extern int __filemap_fdatawrite_range(struct address_space *mapping, | 2094 | extern int __filemap_fdatawrite_range(struct address_space *mapping, |
2097 | loff_t start, loff_t end, int sync_mode); | 2095 | loff_t start, loff_t end, int sync_mode); |
2098 | extern int filemap_fdatawrite_range(struct address_space *mapping, | 2096 | extern int filemap_fdatawrite_range(struct address_space *mapping, |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 43fc95d822d5..28e33fea5107 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -74,7 +74,12 @@ struct spi_device; | |||
74 | struct fsl_spi_platform_data { | 74 | struct fsl_spi_platform_data { |
75 | u32 initial_spmode; /* initial SPMODE value */ | 75 | u32 initial_spmode; /* initial SPMODE value */ |
76 | s16 bus_num; | 76 | s16 bus_num; |
77 | bool qe_mode; | 77 | unsigned int flags; |
78 | #define SPI_QE_CPU_MODE (1 << 0) /* QE CPU ("PIO") mode */ | ||
79 | #define SPI_CPM_MODE (1 << 1) /* CPM/QE ("DMA") mode */ | ||
80 | #define SPI_CPM1 (1 << 2) /* SPI unit is in CPM1 block */ | ||
81 | #define SPI_CPM2 (1 << 3) /* SPI unit is in CPM2 block */ | ||
82 | #define SPI_QE (1 << 4) /* SPI unit is in QE block */ | ||
78 | /* board specific information */ | 83 | /* board specific information */ |
79 | u16 max_chipselect; | 84 | u16 max_chipselect; |
80 | void (*cs_control)(struct spi_device *spi, bool on); | 85 | void (*cs_control)(struct spi_device *spi, bool on); |
@@ -90,6 +95,10 @@ struct mpc8xx_pcmcia_ops { | |||
90 | * lead to a deep sleep (i.e. power removed from the core, | 95 | * lead to a deep sleep (i.e. power removed from the core, |
91 | * instead of just the clock). | 96 | * instead of just the clock). |
92 | */ | 97 | */ |
98 | #if defined(CONFIG_PPC_83xx) && defined(CONFIG_SUSPEND) | ||
93 | int fsl_deep_sleep(void); | 99 | int fsl_deep_sleep(void); |
100 | #else | ||
101 | static inline int fsl_deep_sleep(void) { return 0; } | ||
102 | #endif | ||
94 | 103 | ||
95 | #endif /* _FSL_DEVICE_H_ */ | 104 | #endif /* _FSL_DEVICE_H_ */ |
diff --git a/include/linux/gigaset_dev.h b/include/linux/gigaset_dev.h index 5dc4a316ca37..258ba82937e7 100644 --- a/include/linux/gigaset_dev.h +++ b/include/linux/gigaset_dev.h | |||
@@ -16,15 +16,23 @@ | |||
16 | 16 | ||
17 | #include <linux/ioctl.h> | 17 | #include <linux/ioctl.h> |
18 | 18 | ||
19 | /* The magic IOCTL value for this interface. */ | ||
19 | #define GIGASET_IOCTL 0x47 | 20 | #define GIGASET_IOCTL 0x47 |
20 | 21 | ||
21 | #define GIGVER_DRIVER 0 | 22 | /* enable/disable device control via character device (lock out ISDN subsys) */ |
22 | #define GIGVER_COMPAT 1 | 23 | #define GIGASET_REDIR _IOWR(GIGASET_IOCTL, 0, int) |
23 | #define GIGVER_FWBASE 2 | ||
24 | 24 | ||
25 | #define GIGASET_REDIR _IOWR (GIGASET_IOCTL, 0, int) | 25 | /* enable adapter configuration mode (M10x only) */ |
26 | #define GIGASET_CONFIG _IOWR (GIGASET_IOCTL, 1, int) | 26 | #define GIGASET_CONFIG _IOWR(GIGASET_IOCTL, 1, int) |
27 | #define GIGASET_BRKCHARS _IOW (GIGASET_IOCTL, 2, unsigned char[6]) //FIXME [6] okay? | 27 | |
28 | #define GIGASET_VERSION _IOWR (GIGASET_IOCTL, 3, unsigned[4]) | 28 | /* set break characters (M105 only) */ |
29 | #define GIGASET_BRKCHARS _IOW(GIGASET_IOCTL, 2, unsigned char[6]) | ||
30 | |||
31 | /* get version information selected by arg[0] */ | ||
32 | #define GIGASET_VERSION _IOWR(GIGASET_IOCTL, 3, unsigned[4]) | ||
33 | /* values for GIGASET_VERSION arg[0] */ | ||
34 | #define GIGVER_DRIVER 0 /* get driver version */ | ||
35 | #define GIGVER_COMPAT 1 /* get interface compatibility version */ | ||
36 | #define GIGVER_FWBASE 2 /* get base station firmware version */ | ||
29 | 37 | ||
30 | #endif | 38 | #endif |
diff --git a/include/linux/hayesesp.h b/include/linux/hayesesp.h deleted file mode 100644 index 92b08cfe4a75..000000000000 --- a/include/linux/hayesesp.h +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | #ifndef HAYESESP_H | ||
2 | #define HAYESESP_H | ||
3 | |||
4 | struct hayes_esp_config { | ||
5 | short flow_on; | ||
6 | short flow_off; | ||
7 | short rx_trigger; | ||
8 | short tx_trigger; | ||
9 | short pio_threshold; | ||
10 | unsigned char rx_timeout; | ||
11 | char dma_channel; | ||
12 | }; | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #define ESP_DMA_CHANNEL 0 | ||
17 | #define ESP_RX_TRIGGER 768 | ||
18 | #define ESP_TX_TRIGGER 768 | ||
19 | #define ESP_FLOW_OFF 1016 | ||
20 | #define ESP_FLOW_ON 944 | ||
21 | #define ESP_RX_TMOUT 128 | ||
22 | #define ESP_PIO_THRESHOLD 32 | ||
23 | |||
24 | #define ESP_IN_MAJOR 57 /* major dev # for dial in */ | ||
25 | #define ESP_OUT_MAJOR 58 /* major dev # for dial out */ | ||
26 | #define ESPC_SCALE 3 | ||
27 | #define UART_ESI_BASE 0x00 | ||
28 | #define UART_ESI_SID 0x01 | ||
29 | #define UART_ESI_RX 0x02 | ||
30 | #define UART_ESI_TX 0x02 | ||
31 | #define UART_ESI_CMD1 0x04 | ||
32 | #define UART_ESI_CMD2 0x05 | ||
33 | #define UART_ESI_STAT1 0x04 | ||
34 | #define UART_ESI_STAT2 0x05 | ||
35 | #define UART_ESI_RWS 0x07 | ||
36 | |||
37 | #define UART_IER_DMA_TMOUT 0x80 | ||
38 | #define UART_IER_DMA_TC 0x08 | ||
39 | |||
40 | #define ESI_SET_IRQ 0x04 | ||
41 | #define ESI_SET_DMA_TMOUT 0x05 | ||
42 | #define ESI_SET_SRV_MASK 0x06 | ||
43 | #define ESI_SET_ERR_MASK 0x07 | ||
44 | #define ESI_SET_FLOW_CNTL 0x08 | ||
45 | #define ESI_SET_FLOW_CHARS 0x09 | ||
46 | #define ESI_SET_FLOW_LVL 0x0a | ||
47 | #define ESI_SET_TRIGGER 0x0b | ||
48 | #define ESI_SET_RX_TIMEOUT 0x0c | ||
49 | #define ESI_SET_FLOW_TMOUT 0x0d | ||
50 | #define ESI_WRITE_UART 0x0e | ||
51 | #define ESI_READ_UART 0x0f | ||
52 | #define ESI_SET_MODE 0x10 | ||
53 | #define ESI_GET_ERR_STAT 0x12 | ||
54 | #define ESI_GET_UART_STAT 0x13 | ||
55 | #define ESI_GET_RX_AVAIL 0x14 | ||
56 | #define ESI_GET_TX_AVAIL 0x15 | ||
57 | #define ESI_START_DMA_RX 0x16 | ||
58 | #define ESI_START_DMA_TX 0x17 | ||
59 | #define ESI_ISSUE_BREAK 0x1a | ||
60 | #define ESI_FLUSH_RX 0x1b | ||
61 | #define ESI_FLUSH_TX 0x1c | ||
62 | #define ESI_SET_BAUD 0x1d | ||
63 | #define ESI_SET_ENH_IRQ 0x1f | ||
64 | #define ESI_SET_REINTR 0x20 | ||
65 | #define ESI_SET_PRESCALAR 0x23 | ||
66 | #define ESI_NO_COMMAND 0xff | ||
67 | |||
68 | #define ESP_STAT_RX_TIMEOUT 0x01 | ||
69 | #define ESP_STAT_DMA_RX 0x02 | ||
70 | #define ESP_STAT_DMA_TX 0x04 | ||
71 | #define ESP_STAT_NEVER_DMA 0x08 | ||
72 | #define ESP_STAT_USE_PIO 0x10 | ||
73 | |||
74 | #define ESP_MAGIC 0x53ee | ||
75 | #define ESP_XMIT_SIZE 4096 | ||
76 | |||
77 | struct esp_struct { | ||
78 | int magic; | ||
79 | struct tty_port port; | ||
80 | spinlock_t lock; | ||
81 | int io_port; | ||
82 | int irq; | ||
83 | int read_status_mask; | ||
84 | int ignore_status_mask; | ||
85 | int timeout; | ||
86 | int stat_flags; | ||
87 | int custom_divisor; | ||
88 | int close_delay; | ||
89 | unsigned short closing_wait; | ||
90 | unsigned short closing_wait2; | ||
91 | int IER; /* Interrupt Enable Register */ | ||
92 | int MCR; /* Modem control register */ | ||
93 | unsigned long last_active; | ||
94 | int line; | ||
95 | unsigned char *xmit_buf; | ||
96 | int xmit_head; | ||
97 | int xmit_tail; | ||
98 | int xmit_cnt; | ||
99 | wait_queue_head_t break_wait; | ||
100 | struct async_icount icount; /* kernel counters for the 4 input interrupts */ | ||
101 | struct hayes_esp_config config; /* port configuration */ | ||
102 | struct esp_struct *next_port; /* For the linked list */ | ||
103 | }; | ||
104 | |||
105 | struct esp_pio_buffer { | ||
106 | unsigned char data[1024]; | ||
107 | struct esp_pio_buffer *next; | ||
108 | }; | ||
109 | |||
110 | #endif /* __KERNEL__ */ | ||
111 | |||
112 | |||
113 | #endif /* ESP_H */ | ||
114 | |||
diff --git a/include/linux/hid.h b/include/linux/hid.h index 10f628416740..87093652dda8 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -312,6 +312,7 @@ struct hid_item { | |||
312 | #define HID_QUIRK_MULTI_INPUT 0x00000040 | 312 | #define HID_QUIRK_MULTI_INPUT 0x00000040 |
313 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 313 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
314 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 | 314 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 |
315 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 | ||
315 | 316 | ||
316 | /* | 317 | /* |
317 | * This is the global environment of the parser. This information is | 318 | * This is the global environment of the parser. This information is |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 9bace4b9f4fe..af634e95871d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -162,10 +162,11 @@ struct hrtimer_clock_base { | |||
162 | * @expires_next: absolute time of the next event which was scheduled | 162 | * @expires_next: absolute time of the next event which was scheduled |
163 | * via clock_set_next_event() | 163 | * via clock_set_next_event() |
164 | * @hres_active: State of high resolution mode | 164 | * @hres_active: State of high resolution mode |
165 | * @check_clocks: Indictator, when set evaluate time source and clock | 165 | * @hang_detected: The last hrtimer interrupt detected a hang |
166 | * event devices whether high resolution mode can be | 166 | * @nr_events: Total number of hrtimer interrupt events |
167 | * activated. | 167 | * @nr_retries: Total number of hrtimer interrupt retries |
168 | * @nr_events: Total number of timer interrupt events | 168 | * @nr_hangs: Total number of hrtimer interrupt hangs |
169 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | ||
169 | */ | 170 | */ |
170 | struct hrtimer_cpu_base { | 171 | struct hrtimer_cpu_base { |
171 | spinlock_t lock; | 172 | spinlock_t lock; |
@@ -173,7 +174,11 @@ struct hrtimer_cpu_base { | |||
173 | #ifdef CONFIG_HIGH_RES_TIMERS | 174 | #ifdef CONFIG_HIGH_RES_TIMERS |
174 | ktime_t expires_next; | 175 | ktime_t expires_next; |
175 | int hres_active; | 176 | int hres_active; |
177 | int hang_detected; | ||
176 | unsigned long nr_events; | 178 | unsigned long nr_events; |
179 | unsigned long nr_retries; | ||
180 | unsigned long nr_hangs; | ||
181 | ktime_t max_hang_time; | ||
177 | #endif | 182 | #endif |
178 | }; | 183 | }; |
179 | 184 | ||
@@ -435,47 +440,4 @@ extern u64 ktime_divns(const ktime_t kt, s64 div); | |||
435 | /* Show pending timers: */ | 440 | /* Show pending timers: */ |
436 | extern void sysrq_timer_list_show(void); | 441 | extern void sysrq_timer_list_show(void); |
437 | 442 | ||
438 | /* | ||
439 | * Timer-statistics info: | ||
440 | */ | ||
441 | #ifdef CONFIG_TIMER_STATS | ||
442 | |||
443 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
444 | void *timerf, char *comm, | ||
445 | unsigned int timer_flag); | ||
446 | |||
447 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
448 | { | ||
449 | if (likely(!timer_stats_active)) | ||
450 | return; | ||
451 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
452 | timer->function, timer->start_comm, 0); | ||
453 | } | ||
454 | |||
455 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | ||
456 | void *addr); | ||
457 | |||
458 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
459 | { | ||
460 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | ||
461 | } | ||
462 | |||
463 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
464 | { | ||
465 | timer->start_site = NULL; | ||
466 | } | ||
467 | #else | ||
468 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
469 | { | ||
470 | } | ||
471 | |||
472 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
473 | { | ||
474 | } | ||
475 | |||
476 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
477 | { | ||
478 | } | ||
479 | #endif | ||
480 | |||
481 | #endif | 443 | #endif |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index a03daed08c59..69f07a9f1277 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
@@ -20,19 +20,18 @@ enum { | |||
20 | 20 | ||
21 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 21 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
22 | 22 | ||
23 | /* As it's for in-kernel or ptrace use, we want it to be pinned */ | ||
24 | #define DEFINE_BREAKPOINT_ATTR(name) \ | ||
25 | struct perf_event_attr name = { \ | ||
26 | .type = PERF_TYPE_BREAKPOINT, \ | ||
27 | .size = sizeof(name), \ | ||
28 | .pinned = 1, \ | ||
29 | }; | ||
30 | |||
31 | static inline void hw_breakpoint_init(struct perf_event_attr *attr) | 23 | static inline void hw_breakpoint_init(struct perf_event_attr *attr) |
32 | { | 24 | { |
25 | memset(attr, 0, sizeof(*attr)); | ||
26 | |||
33 | attr->type = PERF_TYPE_BREAKPOINT; | 27 | attr->type = PERF_TYPE_BREAKPOINT; |
34 | attr->size = sizeof(*attr); | 28 | attr->size = sizeof(*attr); |
29 | /* | ||
30 | * As it's for in-kernel or ptrace use, we want it to be pinned | ||
31 | * and to call its callback every hits. | ||
32 | */ | ||
35 | attr->pinned = 1; | 33 | attr->pinned = 1; |
34 | attr->sample_period = 1; | ||
36 | } | 35 | } |
37 | 36 | ||
38 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) | 37 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) |
@@ -52,27 +51,24 @@ static inline int hw_breakpoint_len(struct perf_event *bp) | |||
52 | 51 | ||
53 | extern struct perf_event * | 52 | extern struct perf_event * |
54 | register_user_hw_breakpoint(struct perf_event_attr *attr, | 53 | register_user_hw_breakpoint(struct perf_event_attr *attr, |
55 | perf_callback_t triggered, | 54 | perf_overflow_handler_t triggered, |
56 | struct task_struct *tsk); | 55 | struct task_struct *tsk); |
57 | 56 | ||
58 | /* FIXME: only change from the attr, and don't unregister */ | 57 | /* FIXME: only change from the attr, and don't unregister */ |
59 | extern struct perf_event * | 58 | extern int |
60 | modify_user_hw_breakpoint(struct perf_event *bp, | 59 | modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr); |
61 | struct perf_event_attr *attr, | ||
62 | perf_callback_t triggered, | ||
63 | struct task_struct *tsk); | ||
64 | 60 | ||
65 | /* | 61 | /* |
66 | * Kernel breakpoints are not associated with any particular thread. | 62 | * Kernel breakpoints are not associated with any particular thread. |
67 | */ | 63 | */ |
68 | extern struct perf_event * | 64 | extern struct perf_event * |
69 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 65 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
70 | perf_callback_t triggered, | 66 | perf_overflow_handler_t triggered, |
71 | int cpu); | 67 | int cpu); |
72 | 68 | ||
73 | extern struct perf_event ** | 69 | extern struct perf_event ** |
74 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
75 | perf_callback_t triggered); | 71 | perf_overflow_handler_t triggered); |
76 | 72 | ||
77 | extern int register_perf_hw_breakpoint(struct perf_event *bp); | 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); |
78 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); | 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); |
@@ -93,20 +89,18 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) | |||
93 | 89 | ||
94 | static inline struct perf_event * | 90 | static inline struct perf_event * |
95 | register_user_hw_breakpoint(struct perf_event_attr *attr, | 91 | register_user_hw_breakpoint(struct perf_event_attr *attr, |
96 | perf_callback_t triggered, | 92 | perf_overflow_handler_t triggered, |
97 | struct task_struct *tsk) { return NULL; } | 93 | struct task_struct *tsk) { return NULL; } |
98 | static inline struct perf_event * | 94 | static inline int |
99 | modify_user_hw_breakpoint(struct perf_event *bp, | 95 | modify_user_hw_breakpoint(struct perf_event *bp, |
100 | struct perf_event_attr *attr, | 96 | struct perf_event_attr *attr) { return NULL; } |
101 | perf_callback_t triggered, | ||
102 | struct task_struct *tsk) { return NULL; } | ||
103 | static inline struct perf_event * | 97 | static inline struct perf_event * |
104 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 98 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
105 | perf_callback_t triggered, | 99 | perf_overflow_handler_t triggered, |
106 | int cpu) { return NULL; } | 100 | int cpu) { return NULL; } |
107 | static inline struct perf_event ** | 101 | static inline struct perf_event ** |
108 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 102 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
109 | perf_callback_t triggered) { return NULL; } | 103 | perf_overflow_handler_t triggered) { return NULL; } |
110 | static inline int | 104 | static inline int |
111 | register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } | 105 | register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } |
112 | static inline int | 106 | static inline int |
diff --git a/include/linux/ide.h b/include/linux/ide.h index e4135d6e0556..0ec612959042 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -125,8 +125,8 @@ struct ide_io_ports { | |||
125 | * Timeouts for various operations: | 125 | * Timeouts for various operations: |
126 | */ | 126 | */ |
127 | enum { | 127 | enum { |
128 | /* spec allows up to 20ms */ | 128 | /* spec allows up to 20ms, but CF cards and SSD drives need more */ |
129 | WAIT_DRQ = HZ / 10, /* 100ms */ | 129 | WAIT_DRQ = 1 * HZ, /* 1s */ |
130 | /* some laptops are very slow */ | 130 | /* some laptops are very slow */ |
131 | WAIT_READY = 5 * HZ, /* 5s */ | 131 | WAIT_READY = 5 * HZ, /* 5s */ |
132 | /* should be less than 3ms (?), if all ATAPI CD is closed at boot */ | 132 | /* should be less than 3ms (?), if all ATAPI CD is closed at boot */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 005e1525ab86..299b4121f914 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -137,8 +137,6 @@ extern struct ctl_table ether_table[]; | |||
137 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 137 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
138 | 138 | ||
139 | #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" | 139 | #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" |
140 | #define MAC_BUF_SIZE 18 | ||
141 | #define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] | ||
142 | 140 | ||
143 | #endif | 141 | #endif |
144 | 142 | ||
diff --git a/include/linux/in6.h b/include/linux/in6.h index dfa29168e6ab..bd55c6e46b2e 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -110,7 +110,7 @@ struct in6_flowlabel_req { | |||
110 | #define IPV6_FLOWINFO_FLOWLABEL 0x000fffff | 110 | #define IPV6_FLOWINFO_FLOWLABEL 0x000fffff |
111 | #define IPV6_FLOWINFO_PRIORITY 0x0ff00000 | 111 | #define IPV6_FLOWINFO_PRIORITY 0x0ff00000 |
112 | 112 | ||
113 | /* These defintions are obsolete */ | 113 | /* These definitions are obsolete */ |
114 | #define IPV6_PRIORITY_UNCHARACTERIZED 0x0000 | 114 | #define IPV6_PRIORITY_UNCHARACTERIZED 0x0000 |
115 | #define IPV6_PRIORITY_FILLER 0x0100 | 115 | #define IPV6_PRIORITY_FILLER 0x0100 |
116 | #define IPV6_PRIORITY_UNATTENDED 0x0200 | 116 | #define IPV6_PRIORITY_UNATTENDED 0x0200 |
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 597a0077b3c5..5e3dddf8f562 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h | |||
@@ -14,12 +14,19 @@ | |||
14 | 14 | ||
15 | /** | 15 | /** |
16 | * struct input_polled_dev - simple polled input device | 16 | * struct input_polled_dev - simple polled input device |
17 | * @private: private driver data | 17 | * @private: private driver data. |
18 | * @flush: driver-supplied method that flushes device's state upon | 18 | * @open: driver-supplied method that prepares device for polling |
19 | * opening (optional) | 19 | * (enabled the device and maybe flushes device state). |
20 | * @close: driver-supplied method that is called when device is no | ||
21 | * longer being polled. Used to put device into low power mode. | ||
20 | * @poll: driver-supplied method that polls the device and posts | 22 | * @poll: driver-supplied method that polls the device and posts |
21 | * input events (mandatory). | 23 | * input events (mandatory). |
22 | * @poll_interval: specifies how often the poll() method shoudl be called. | 24 | * @poll_interval: specifies how often the poll() method should be called. |
25 | * Defaults to 500 msec unless overriden when registering the device. | ||
26 | * @poll_interval_max: specifies upper bound for the poll interval. | ||
27 | * Defaults to the initial value of @poll_interval. | ||
28 | * @poll_interval_min: specifies lower bound for the poll interval. | ||
29 | * Defaults to 0. | ||
23 | * @input: input device structire associated with the polled device. | 30 | * @input: input device structire associated with the polled device. |
24 | * Must be properly initialized by the driver (id, name, phys, bits). | 31 | * Must be properly initialized by the driver (id, name, phys, bits). |
25 | * | 32 | * |
@@ -30,11 +37,16 @@ | |||
30 | struct input_polled_dev { | 37 | struct input_polled_dev { |
31 | void *private; | 38 | void *private; |
32 | 39 | ||
33 | void (*flush)(struct input_polled_dev *dev); | 40 | void (*open)(struct input_polled_dev *dev); |
41 | void (*close)(struct input_polled_dev *dev); | ||
34 | void (*poll)(struct input_polled_dev *dev); | 42 | void (*poll)(struct input_polled_dev *dev); |
35 | unsigned int poll_interval; /* msec */ | 43 | unsigned int poll_interval; /* msec */ |
44 | unsigned int poll_interval_max; /* msec */ | ||
45 | unsigned int poll_interval_min; /* msec */ | ||
36 | 46 | ||
37 | struct input_dev *input; | 47 | struct input_dev *input; |
48 | |||
49 | /* private: */ | ||
38 | struct delayed_work work; | 50 | struct delayed_work work; |
39 | }; | 51 | }; |
40 | 52 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 84b501ab0d8f..7be8a6537b57 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -895,7 +895,7 @@ struct ff_periodic_effect { | |||
895 | struct ff_envelope envelope; | 895 | struct ff_envelope envelope; |
896 | 896 | ||
897 | __u32 custom_len; | 897 | __u32 custom_len; |
898 | __s16 *custom_data; | 898 | __s16 __user *custom_data; |
899 | }; | 899 | }; |
900 | 900 | ||
901 | /** | 901 | /** |
@@ -1021,9 +1021,12 @@ struct ff_effect { | |||
1021 | * @keycodesize: size of elements in keycode table | 1021 | * @keycodesize: size of elements in keycode table |
1022 | * @keycode: map of scancodes to keycodes for this device | 1022 | * @keycode: map of scancodes to keycodes for this device |
1023 | * @setkeycode: optional method to alter current keymap, used to implement | 1023 | * @setkeycode: optional method to alter current keymap, used to implement |
1024 | * sparse keymaps. If not supplied default mechanism will be used | 1024 | * sparse keymaps. If not supplied default mechanism will be used. |
1025 | * The method is being called while holding event_lock and thus must | ||
1026 | * not sleep | ||
1025 | * @getkeycode: optional method to retrieve current keymap. If not supplied | 1027 | * @getkeycode: optional method to retrieve current keymap. If not supplied |
1026 | * default mechanism will be used | 1028 | * default mechanism will be used. The method is being called while |
1029 | * holding event_lock and thus must not sleep | ||
1027 | * @ff: force feedback structure associated with the device if device | 1030 | * @ff: force feedback structure associated with the device if device |
1028 | * supports force feedback effects | 1031 | * supports force feedback effects |
1029 | * @repeat_key: stores key code of the last key pressed; used to implement | 1032 | * @repeat_key: stores key code of the last key pressed; used to implement |
@@ -1040,6 +1043,7 @@ struct ff_effect { | |||
1040 | * @absmin: minimum values for events coming from absolute axes | 1043 | * @absmin: minimum values for events coming from absolute axes |
1041 | * @absfuzz: describes noisiness for axes | 1044 | * @absfuzz: describes noisiness for axes |
1042 | * @absflat: size of the center flat position (used by joydev) | 1045 | * @absflat: size of the center flat position (used by joydev) |
1046 | * @absres: resolution used for events coming form absolute axes | ||
1043 | * @open: this method is called when the very first user calls | 1047 | * @open: this method is called when the very first user calls |
1044 | * input_open_device(). The driver must prepare the device | 1048 | * input_open_device(). The driver must prepare the device |
1045 | * to start generating events (start polling thread, | 1049 | * to start generating events (start polling thread, |
@@ -1294,6 +1298,9 @@ void input_unregister_device(struct input_dev *); | |||
1294 | int __must_check input_register_handler(struct input_handler *); | 1298 | int __must_check input_register_handler(struct input_handler *); |
1295 | void input_unregister_handler(struct input_handler *); | 1299 | void input_unregister_handler(struct input_handler *); |
1296 | 1300 | ||
1301 | int input_handler_for_each_handle(struct input_handler *, void *data, | ||
1302 | int (*fn)(struct input_handle *, void *)); | ||
1303 | |||
1297 | int input_register_handle(struct input_handle *); | 1304 | int input_register_handle(struct input_handle *); |
1298 | void input_unregister_handle(struct input_handle *); | 1305 | void input_unregister_handle(struct input_handle *); |
1299 | 1306 | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index b3cd42d50e16..3bd018baae20 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
@@ -41,6 +41,9 @@ struct matrix_keymap_data { | |||
41 | * @col_scan_delay_us: delay, measured in microseconds, that is | 41 | * @col_scan_delay_us: delay, measured in microseconds, that is |
42 | * needed before we can keypad after activating column gpio | 42 | * needed before we can keypad after activating column gpio |
43 | * @debounce_ms: debounce interval in milliseconds | 43 | * @debounce_ms: debounce interval in milliseconds |
44 | * @active_low: gpio polarity | ||
45 | * @wakeup: controls whether the device should be set up as wakeup | ||
46 | * source | ||
44 | * | 47 | * |
45 | * This structure represents platform-specific data that use used by | 48 | * This structure represents platform-specific data that use used by |
46 | * matrix_keypad driver to perform proper initialization. | 49 | * matrix_keypad driver to perform proper initialization. |
diff --git a/include/linux/input/sh_keysc.h b/include/linux/input/sh_keysc.h new file mode 100644 index 000000000000..c211b5cf08e6 --- /dev/null +++ b/include/linux/input/sh_keysc.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef __SH_KEYSC_H__ | ||
2 | #define __SH_KEYSC_H__ | ||
3 | |||
4 | #define SH_KEYSC_MAXKEYS 30 | ||
5 | |||
6 | struct sh_keysc_info { | ||
7 | enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode; | ||
8 | int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */ | ||
9 | int delay; | ||
10 | int kycr2_delay; | ||
11 | int keycodes[SH_KEYSC_MAXKEYS]; | ||
12 | }; | ||
13 | |||
14 | #endif /* __SH_KEYSC_H__ */ | ||
diff --git a/include/linux/input/sparse-keymap.h b/include/linux/input/sparse-keymap.h new file mode 100644 index 000000000000..52db62064c6e --- /dev/null +++ b/include/linux/input/sparse-keymap.h | |||
@@ -0,0 +1,62 @@ | |||
1 | #ifndef _SPARSE_KEYMAP_H | ||
2 | #define _SPARSE_KEYMAP_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (c) 2009 Dmitry Torokhov | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #define KE_END 0 /* Indicates end of keymap */ | ||
13 | #define KE_KEY 1 /* Ordinary key/button */ | ||
14 | #define KE_SW 2 /* Switch (predetermined value) */ | ||
15 | #define KE_VSW 3 /* Switch (value supplied at runtime) */ | ||
16 | #define KE_IGNORE 4 /* Known entry that should be ignored */ | ||
17 | #define KE_LAST KE_IGNORE | ||
18 | |||
19 | /** | ||
20 | * struct key_entry - keymap entry for use in sparse keymap | ||
21 | * @type: Type of the key entry (KE_KEY, KE_SW, KE_VSW, KE_END); | ||
22 | * drivers are allowed to extend the list with their own | ||
23 | * private definitions. | ||
24 | * @code: Device-specific data identifying the button/switch | ||
25 | * @keycode: KEY_* code assigned to a key/button | ||
26 | * @sw.code: SW_* code assigned to a switch | ||
27 | * @sw.value: Value that should be sent in an input even when KE_SW | ||
28 | * switch is toggled. KE_VSW switches ignore this field and | ||
29 | * expect driver to supply value for the event. | ||
30 | * | ||
31 | * This structure defines an entry in a sparse keymap used by some | ||
32 | * input devices for which traditional table-based approach is not | ||
33 | * suitable. | ||
34 | */ | ||
35 | struct key_entry { | ||
36 | int type; /* See KE_* above */ | ||
37 | u32 code; | ||
38 | union { | ||
39 | u16 keycode; /* For KE_KEY */ | ||
40 | struct { /* For KE_SW, KE_VSW */ | ||
41 | u8 code; | ||
42 | u8 value; /* For KE_SW, ignored by KE_VSW */ | ||
43 | } sw; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | struct key_entry *sparse_keymap_entry_from_scancode(struct input_dev *dev, | ||
48 | unsigned int code); | ||
49 | struct key_entry *sparse_keymap_entry_from_keycode(struct input_dev *dev, | ||
50 | unsigned int code); | ||
51 | int sparse_keymap_setup(struct input_dev *dev, | ||
52 | const struct key_entry *keymap, | ||
53 | int (*setup)(struct input_dev *, struct key_entry *)); | ||
54 | void sparse_keymap_free(struct input_dev *dev); | ||
55 | |||
56 | void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *ke, | ||
57 | unsigned int value, bool autorelease); | ||
58 | |||
59 | bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code, | ||
60 | unsigned int value, bool autorelease); | ||
61 | |||
62 | #endif /* _SPARSE_KEYMAP_H */ | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index ae9653dbcd78..a287cfc0b1a6 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -282,7 +282,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | |||
282 | 282 | ||
283 | /* | 283 | /* |
284 | * Built-in IRQ handlers for various IRQ types, | 284 | * Built-in IRQ handlers for various IRQ types, |
285 | * callable via desc->chip->handle_irq() | 285 | * callable via desc->handle_irq() |
286 | */ | 286 | */ |
287 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); | 287 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); |
288 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); | 288 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); |
diff --git a/include/linux/isicom.h b/include/linux/isicom.h index bbd42197298f..b92e05650639 100644 --- a/include/linux/isicom.h +++ b/include/linux/isicom.h | |||
@@ -67,6 +67,7 @@ | |||
67 | 67 | ||
68 | #define FIRMWARE_LOADED 0x0001 | 68 | #define FIRMWARE_LOADED 0x0001 |
69 | #define BOARD_ACTIVE 0x0002 | 69 | #define BOARD_ACTIVE 0x0002 |
70 | #define BOARD_INIT 0x0004 | ||
70 | 71 | ||
71 | /* isi_port status bitmap */ | 72 | /* isi_port status bitmap */ |
72 | 73 | ||
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 2d241da07236..a24de0b1858e 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -496,6 +496,7 @@ struct kvm_ioeventfd { | |||
496 | #define KVM_CAP_VCPU_EVENTS 41 | 496 | #define KVM_CAP_VCPU_EVENTS 41 |
497 | #endif | 497 | #endif |
498 | #define KVM_CAP_S390_PSW 42 | 498 | #define KVM_CAP_S390_PSW 42 |
499 | #define KVM_CAP_PPC_SEGSTATE 43 | ||
499 | 500 | ||
500 | #ifdef KVM_CAP_IRQ_ROUTING | 501 | #ifdef KVM_CAP_IRQ_ROUTING |
501 | 502 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index a5b3dc71e819..6a9c4ddd3d95 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1024,7 +1024,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev, | |||
1024 | extern int ata_scsi_slave_config(struct scsi_device *sdev); | 1024 | extern int ata_scsi_slave_config(struct scsi_device *sdev); |
1025 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | 1025 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); |
1026 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 1026 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
1027 | int queue_depth); | 1027 | int queue_depth, int reason); |
1028 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 1028 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
1029 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); | 1029 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); |
1030 | 1030 | ||
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h index e5124ceea769..3402042ddc31 100644 --- a/include/linux/mfd/ezx-pcap.h +++ b/include/linux/mfd/ezx-pcap.h | |||
@@ -45,7 +45,7 @@ void pcap_set_ts_bits(struct pcap_chip *, u32); | |||
45 | #define PCAP_CLEAR_INTERRUPT_REGISTER 0x01ffffff | 45 | #define PCAP_CLEAR_INTERRUPT_REGISTER 0x01ffffff |
46 | #define PCAP_MASK_ALL_INTERRUPT 0x01ffffff | 46 | #define PCAP_MASK_ALL_INTERRUPT 0x01ffffff |
47 | 47 | ||
48 | /* registers acessible by both pcap ports */ | 48 | /* registers accessible by both pcap ports */ |
49 | #define PCAP_REG_ISR 0x0 /* Interrupt Status */ | 49 | #define PCAP_REG_ISR 0x0 /* Interrupt Status */ |
50 | #define PCAP_REG_MSR 0x1 /* Interrupt Mask */ | 50 | #define PCAP_REG_MSR 0x1 /* Interrupt Mask */ |
51 | #define PCAP_REG_PSTAT 0x2 /* Processor Status */ | 51 | #define PCAP_REG_PSTAT 0x2 /* Processor Status */ |
@@ -67,7 +67,7 @@ void pcap_set_ts_bits(struct pcap_chip *, u32); | |||
67 | #define PCAP_REG_VENDOR_TEST1 0x1e | 67 | #define PCAP_REG_VENDOR_TEST1 0x1e |
68 | #define PCAP_REG_VENDOR_TEST2 0x1f | 68 | #define PCAP_REG_VENDOR_TEST2 0x1f |
69 | 69 | ||
70 | /* registers acessible by pcap port 1 only (a1200, e2 & e6) */ | 70 | /* registers accessible by pcap port 1 only (a1200, e2 & e6) */ |
71 | #define PCAP_REG_INT_SEL 0x3 /* Interrupt Select */ | 71 | #define PCAP_REG_INT_SEL 0x3 /* Interrupt Select */ |
72 | #define PCAP_REG_SWCTRL 0x4 /* Switching Regulator Control */ | 72 | #define PCAP_REG_SWCTRL 0x4 /* Switching Regulator Control */ |
73 | #define PCAP_REG_VREG1 0x5 /* Regulator Bank 1 Control */ | 73 | #define PCAP_REG_VREG1 0x5 /* Regulator Bank 1 Control */ |
diff --git a/include/linux/mfd/sh_mobile_sdhi.h b/include/linux/mfd/sh_mobile_sdhi.h new file mode 100644 index 000000000000..3bcd7163485c --- /dev/null +++ b/include/linux/mfd/sh_mobile_sdhi.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __SH_MOBILE_SDHI_H__ | ||
2 | #define __SH_MOBILE_SDHI_H__ | ||
3 | |||
4 | struct sh_mobile_sdhi_info { | ||
5 | void (*set_pwr)(struct platform_device *pdev, int state); | ||
6 | }; | ||
7 | |||
8 | #endif /* __SH_MOBILE_SDHI_H__ */ | ||
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h index 6913b71d9ab2..b31bd9e9bca3 100644 --- a/include/linux/mtd/ubi.h +++ b/include/linux/mtd/ubi.h | |||
@@ -174,6 +174,8 @@ void ubi_get_volume_info(struct ubi_volume_desc *desc, | |||
174 | struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode); | 174 | struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode); |
175 | struct ubi_volume_desc *ubi_open_volume_nm(int ubi_num, const char *name, | 175 | struct ubi_volume_desc *ubi_open_volume_nm(int ubi_num, const char *name, |
176 | int mode); | 176 | int mode); |
177 | struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode); | ||
178 | |||
177 | int ubi_register_volume_notifier(struct notifier_block *nb, | 179 | int ubi_register_volume_notifier(struct notifier_block *nb, |
178 | int ignore_existing); | 180 | int ignore_existing); |
179 | int ubi_unregister_volume_notifier(struct notifier_block *nb); | 181 | int ubi_unregister_volume_notifier(struct notifier_block *nb); |
diff --git a/include/linux/namei.h b/include/linux/namei.h index ec0f607b364a..028946750289 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -76,7 +76,6 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | |||
76 | extern void release_open_intent(struct nameidata *); | 76 | extern void release_open_intent(struct nameidata *); |
77 | 77 | ||
78 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 78 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
79 | extern struct dentry *lookup_one_noperm(const char *, struct dentry *); | ||
80 | 79 | ||
81 | extern int follow_down(struct path *); | 80 | extern int follow_down(struct path *); |
82 | extern int follow_up(struct path *); | 81 | extern int follow_up(struct path *); |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index ce520402e840..3fe02cf8b65a 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -151,6 +151,8 @@ struct nilfs_super_root { | |||
151 | #define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */ | 151 | #define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */ |
152 | #define NILFS_MOUNT_STRICT_ORDER 0x2000 /* Apply strict in-order | 152 | #define NILFS_MOUNT_STRICT_ORDER 0x2000 /* Apply strict in-order |
153 | semantics also for data */ | 153 | semantics also for data */ |
154 | #define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during | ||
155 | mount-time recovery */ | ||
154 | 156 | ||
155 | 157 | ||
156 | /** | 158 | /** |
@@ -403,6 +405,28 @@ struct nilfs_segment_summary { | |||
403 | #define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */ | 405 | #define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */ |
404 | 406 | ||
405 | /** | 407 | /** |
408 | * struct nilfs_btree_node - B-tree node | ||
409 | * @bn_flags: flags | ||
410 | * @bn_level: level | ||
411 | * @bn_nchildren: number of children | ||
412 | * @bn_pad: padding | ||
413 | */ | ||
414 | struct nilfs_btree_node { | ||
415 | __u8 bn_flags; | ||
416 | __u8 bn_level; | ||
417 | __le16 bn_nchildren; | ||
418 | __le32 bn_pad; | ||
419 | }; | ||
420 | |||
421 | /* flags */ | ||
422 | #define NILFS_BTREE_NODE_ROOT 0x01 | ||
423 | |||
424 | /* level */ | ||
425 | #define NILFS_BTREE_LEVEL_DATA 0 | ||
426 | #define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1) | ||
427 | #define NILFS_BTREE_LEVEL_MAX 14 | ||
428 | |||
429 | /** | ||
406 | * struct nilfs_palloc_group_desc - block group descriptor | 430 | * struct nilfs_palloc_group_desc - block group descriptor |
407 | * @pg_nfrees: number of free entries in block group | 431 | * @pg_nfrees: number of free entries in block group |
408 | */ | 432 | */ |
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h new file mode 100644 index 000000000000..f46c40ac6d45 --- /dev/null +++ b/include/linux/omapfb.h | |||
@@ -0,0 +1,251 @@ | |||
1 | /* | ||
2 | * File: include/linux/omapfb.h | ||
3 | * | ||
4 | * Framebuffer driver for TI OMAP boards | ||
5 | * | ||
6 | * Copyright (C) 2004 Nokia Corporation | ||
7 | * Author: Imre Deak <imre.deak@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License along | ||
20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
22 | */ | ||
23 | |||
24 | #ifndef __LINUX_OMAPFB_H__ | ||
25 | #define __LINUX_OMAPFB_H__ | ||
26 | |||
27 | #include <linux/fb.h> | ||
28 | #include <linux/ioctl.h> | ||
29 | #include <linux/types.h> | ||
30 | |||
31 | /* IOCTL commands. */ | ||
32 | |||
33 | #define OMAP_IOW(num, dtype) _IOW('O', num, dtype) | ||
34 | #define OMAP_IOR(num, dtype) _IOR('O', num, dtype) | ||
35 | #define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype) | ||
36 | #define OMAP_IO(num) _IO('O', num) | ||
37 | |||
38 | #define OMAPFB_MIRROR OMAP_IOW(31, int) | ||
39 | #define OMAPFB_SYNC_GFX OMAP_IO(37) | ||
40 | #define OMAPFB_VSYNC OMAP_IO(38) | ||
41 | #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) | ||
42 | #define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps) | ||
43 | #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) | ||
44 | #define OMAPFB_LCD_TEST OMAP_IOW(45, int) | ||
45 | #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) | ||
46 | #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old) | ||
47 | #define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) | ||
48 | #define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key) | ||
49 | #define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info) | ||
50 | #define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info) | ||
51 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window) | ||
52 | #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info) | ||
53 | #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info) | ||
54 | #define OMAPFB_WAITFORVSYNC OMAP_IO(57) | ||
55 | #define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read) | ||
56 | #define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode) | ||
57 | #define OMAPFB_WAITFORGO OMAP_IO(60) | ||
58 | #define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info) | ||
59 | #define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info) | ||
60 | |||
61 | #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff | ||
62 | #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 | ||
63 | #define OMAPFB_CAPS_PANEL_MASK 0xff000000 | ||
64 | |||
65 | #define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000 | ||
66 | #define OMAPFB_CAPS_TEARSYNC 0x00002000 | ||
67 | #define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000 | ||
68 | #define OMAPFB_CAPS_PLANE_SCALE 0x00008000 | ||
69 | #define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000 | ||
70 | #define OMAPFB_CAPS_WINDOW_SCALE 0x00020000 | ||
71 | #define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000 | ||
72 | #define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000 | ||
73 | #define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000 | ||
74 | |||
75 | /* Values from DSP must map to lower 16-bits */ | ||
76 | #define OMAPFB_FORMAT_MASK 0x00ff | ||
77 | #define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 | ||
78 | #define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200 | ||
79 | #define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400 | ||
80 | #define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800 | ||
81 | #define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000 | ||
82 | |||
83 | #define OMAPFB_MEMTYPE_SDRAM 0 | ||
84 | #define OMAPFB_MEMTYPE_SRAM 1 | ||
85 | #define OMAPFB_MEMTYPE_MAX 1 | ||
86 | |||
87 | enum omapfb_color_format { | ||
88 | OMAPFB_COLOR_RGB565 = 0, | ||
89 | OMAPFB_COLOR_YUV422, | ||
90 | OMAPFB_COLOR_YUV420, | ||
91 | OMAPFB_COLOR_CLUT_8BPP, | ||
92 | OMAPFB_COLOR_CLUT_4BPP, | ||
93 | OMAPFB_COLOR_CLUT_2BPP, | ||
94 | OMAPFB_COLOR_CLUT_1BPP, | ||
95 | OMAPFB_COLOR_RGB444, | ||
96 | OMAPFB_COLOR_YUY422, | ||
97 | |||
98 | OMAPFB_COLOR_ARGB16, | ||
99 | OMAPFB_COLOR_RGB24U, /* RGB24, 32-bit container */ | ||
100 | OMAPFB_COLOR_RGB24P, /* RGB24, 24-bit container */ | ||
101 | OMAPFB_COLOR_ARGB32, | ||
102 | OMAPFB_COLOR_RGBA32, | ||
103 | OMAPFB_COLOR_RGBX32, | ||
104 | }; | ||
105 | |||
106 | struct omapfb_update_window { | ||
107 | __u32 x, y; | ||
108 | __u32 width, height; | ||
109 | __u32 format; | ||
110 | __u32 out_x, out_y; | ||
111 | __u32 out_width, out_height; | ||
112 | __u32 reserved[8]; | ||
113 | }; | ||
114 | |||
115 | struct omapfb_update_window_old { | ||
116 | __u32 x, y; | ||
117 | __u32 width, height; | ||
118 | __u32 format; | ||
119 | }; | ||
120 | |||
121 | enum omapfb_plane { | ||
122 | OMAPFB_PLANE_GFX = 0, | ||
123 | OMAPFB_PLANE_VID1, | ||
124 | OMAPFB_PLANE_VID2, | ||
125 | }; | ||
126 | |||
127 | enum omapfb_channel_out { | ||
128 | OMAPFB_CHANNEL_OUT_LCD = 0, | ||
129 | OMAPFB_CHANNEL_OUT_DIGIT, | ||
130 | }; | ||
131 | |||
132 | struct omapfb_plane_info { | ||
133 | __u32 pos_x; | ||
134 | __u32 pos_y; | ||
135 | __u8 enabled; | ||
136 | __u8 channel_out; | ||
137 | __u8 mirror; | ||
138 | __u8 reserved1; | ||
139 | __u32 out_width; | ||
140 | __u32 out_height; | ||
141 | __u32 reserved2[12]; | ||
142 | }; | ||
143 | |||
144 | struct omapfb_mem_info { | ||
145 | __u32 size; | ||
146 | __u8 type; | ||
147 | __u8 reserved[3]; | ||
148 | }; | ||
149 | |||
150 | struct omapfb_caps { | ||
151 | __u32 ctrl; | ||
152 | __u32 plane_color; | ||
153 | __u32 wnd_color; | ||
154 | }; | ||
155 | |||
156 | enum omapfb_color_key_type { | ||
157 | OMAPFB_COLOR_KEY_DISABLED = 0, | ||
158 | OMAPFB_COLOR_KEY_GFX_DST, | ||
159 | OMAPFB_COLOR_KEY_VID_SRC, | ||
160 | }; | ||
161 | |||
162 | struct omapfb_color_key { | ||
163 | __u8 channel_out; | ||
164 | __u32 background; | ||
165 | __u32 trans_key; | ||
166 | __u8 key_type; | ||
167 | }; | ||
168 | |||
169 | enum omapfb_update_mode { | ||
170 | OMAPFB_UPDATE_DISABLED = 0, | ||
171 | OMAPFB_AUTO_UPDATE, | ||
172 | OMAPFB_MANUAL_UPDATE | ||
173 | }; | ||
174 | |||
175 | struct omapfb_memory_read { | ||
176 | __u16 x; | ||
177 | __u16 y; | ||
178 | __u16 w; | ||
179 | __u16 h; | ||
180 | size_t buffer_size; | ||
181 | void __user *buffer; | ||
182 | }; | ||
183 | |||
184 | struct omapfb_ovl_colormode { | ||
185 | __u8 overlay_idx; | ||
186 | __u8 mode_idx; | ||
187 | __u32 bits_per_pixel; | ||
188 | __u32 nonstd; | ||
189 | struct fb_bitfield red; | ||
190 | struct fb_bitfield green; | ||
191 | struct fb_bitfield blue; | ||
192 | struct fb_bitfield transp; | ||
193 | }; | ||
194 | |||
195 | struct omapfb_vram_info { | ||
196 | __u32 total; | ||
197 | __u32 free; | ||
198 | __u32 largest_free_block; | ||
199 | __u32 reserved[5]; | ||
200 | }; | ||
201 | |||
202 | struct omapfb_tearsync_info { | ||
203 | __u8 enabled; | ||
204 | __u8 reserved1[3]; | ||
205 | __u16 line; | ||
206 | __u16 reserved2; | ||
207 | }; | ||
208 | |||
209 | #ifdef __KERNEL__ | ||
210 | |||
211 | #include <plat/board.h> | ||
212 | |||
213 | #ifdef CONFIG_ARCH_OMAP1 | ||
214 | #define OMAPFB_PLANE_NUM 1 | ||
215 | #else | ||
216 | #define OMAPFB_PLANE_NUM 3 | ||
217 | #endif | ||
218 | |||
219 | struct omapfb_mem_region { | ||
220 | u32 paddr; | ||
221 | void __iomem *vaddr; | ||
222 | unsigned long size; | ||
223 | u8 type; /* OMAPFB_PLANE_MEM_* */ | ||
224 | enum omapfb_color_format format;/* OMAPFB_COLOR_* */ | ||
225 | unsigned format_used:1; /* Must be set when format is set. | ||
226 | * Needed b/c of the badly chosen 0 | ||
227 | * base for OMAPFB_COLOR_* values | ||
228 | */ | ||
229 | unsigned alloc:1; /* allocated by the driver */ | ||
230 | unsigned map:1; /* kernel mapped by the driver */ | ||
231 | }; | ||
232 | |||
233 | struct omapfb_mem_desc { | ||
234 | int region_cnt; | ||
235 | struct omapfb_mem_region region[OMAPFB_PLANE_NUM]; | ||
236 | }; | ||
237 | |||
238 | struct omapfb_platform_data { | ||
239 | struct omap_lcd_config lcd; | ||
240 | struct omapfb_mem_desc mem_desc; | ||
241 | void *ctrl_platform_data; | ||
242 | }; | ||
243 | |||
244 | /* in arch/arm/plat-omap/fb.c */ | ||
245 | extern void omapfb_set_platform_data(struct omapfb_platform_data *data); | ||
246 | extern void omapfb_set_ctrl_platform_data(void *pdata); | ||
247 | extern void omapfb_reserve_sdram(void); | ||
248 | |||
249 | #endif | ||
250 | |||
251 | #endif /* __OMAPFB_H */ | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index f5c7cd343e56..04771b9c3316 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -218,6 +218,7 @@ struct pci_dev { | |||
218 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ | 218 | unsigned int class; /* 3 bytes: (base,sub,prog-if) */ |
219 | u8 revision; /* PCI revision, low byte of class word */ | 219 | u8 revision; /* PCI revision, low byte of class word */ |
220 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 220 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
221 | u8 pcie_cap; /* PCI-E capability offset */ | ||
221 | u8 pcie_type; /* PCI-E device/port type */ | 222 | u8 pcie_type; /* PCI-E device/port type */ |
222 | u8 rom_base_reg; /* which config register controls the ROM */ | 223 | u8 rom_base_reg; /* which config register controls the ROM */ |
223 | u8 pin; /* which interrupt pin this device uses */ | 224 | u8 pin; /* which interrupt pin this device uses */ |
@@ -280,6 +281,7 @@ struct pci_dev { | |||
280 | unsigned int is_virtfn:1; | 281 | unsigned int is_virtfn:1; |
281 | unsigned int reset_fn:1; | 282 | unsigned int reset_fn:1; |
282 | unsigned int is_hotplug_bridge:1; | 283 | unsigned int is_hotplug_bridge:1; |
284 | unsigned int aer_firmware_first:1; | ||
283 | pci_dev_flags_t dev_flags; | 285 | pci_dev_flags_t dev_flags; |
284 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 286 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
285 | 287 | ||
@@ -635,7 +637,13 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, | |||
635 | unsigned int ss_vendor, unsigned int ss_device, | 637 | unsigned int ss_vendor, unsigned int ss_device, |
636 | struct pci_dev *from); | 638 | struct pci_dev *from); |
637 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); | 639 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); |
638 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); | 640 | struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus, |
641 | unsigned int devfn); | ||
642 | static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | ||
643 | unsigned int devfn) | ||
644 | { | ||
645 | return pci_get_domain_bus_and_slot(0, bus, devfn); | ||
646 | } | ||
639 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); | 647 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); |
640 | int pci_dev_present(const struct pci_device_id *ids); | 648 | int pci_dev_present(const struct pci_device_id *ids); |
641 | 649 | ||
@@ -701,6 +709,7 @@ void pci_disable_device(struct pci_dev *dev); | |||
701 | void pci_set_master(struct pci_dev *dev); | 709 | void pci_set_master(struct pci_dev *dev); |
702 | void pci_clear_master(struct pci_dev *dev); | 710 | void pci_clear_master(struct pci_dev *dev); |
703 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | 711 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); |
712 | int pci_set_cacheline_size(struct pci_dev *dev); | ||
704 | #define HAVE_PCI_SET_MWI | 713 | #define HAVE_PCI_SET_MWI |
705 | int __must_check pci_set_mwi(struct pci_dev *dev); | 714 | int __must_check pci_set_mwi(struct pci_dev *dev); |
706 | int pci_try_set_mwi(struct pci_dev *dev); | 715 | int pci_try_set_mwi(struct pci_dev *dev); |
@@ -1246,6 +1255,8 @@ extern int pci_pci_problems; | |||
1246 | 1255 | ||
1247 | extern unsigned long pci_cardbus_io_size; | 1256 | extern unsigned long pci_cardbus_io_size; |
1248 | extern unsigned long pci_cardbus_mem_size; | 1257 | extern unsigned long pci_cardbus_mem_size; |
1258 | extern u8 pci_dfl_cache_line_size; | ||
1259 | extern u8 pci_cache_line_size; | ||
1249 | 1260 | ||
1250 | extern unsigned long pci_hotplug_io_size; | 1261 | extern unsigned long pci_hotplug_io_size; |
1251 | extern unsigned long pci_hotplug_mem_size; | 1262 | extern unsigned long pci_hotplug_mem_size; |
@@ -1290,5 +1301,34 @@ extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | |||
1290 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | 1301 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); |
1291 | #endif | 1302 | #endif |
1292 | 1303 | ||
1304 | /** | ||
1305 | * pci_pcie_cap - get the saved PCIe capability offset | ||
1306 | * @dev: PCI device | ||
1307 | * | ||
1308 | * PCIe capability offset is calculated at PCI device initialization | ||
1309 | * time and saved in the data structure. This function returns saved | ||
1310 | * PCIe capability offset. Using this instead of pci_find_capability() | ||
1311 | * reduces unnecessary search in the PCI configuration space. If you | ||
1312 | * need to calculate PCIe capability offset from raw device for some | ||
1313 | * reasons, please use pci_find_capability() instead. | ||
1314 | */ | ||
1315 | static inline int pci_pcie_cap(struct pci_dev *dev) | ||
1316 | { | ||
1317 | return dev->pcie_cap; | ||
1318 | } | ||
1319 | |||
1320 | /** | ||
1321 | * pci_is_pcie - check if the PCI device is PCI Express capable | ||
1322 | * @dev: PCI device | ||
1323 | * | ||
1324 | * Retrun true if the PCI device is PCI Express capable, false otherwise. | ||
1325 | */ | ||
1326 | static inline bool pci_is_pcie(struct pci_dev *dev) | ||
1327 | { | ||
1328 | return !!pci_pcie_cap(dev); | ||
1329 | } | ||
1330 | |||
1331 | void pci_request_acs(void); | ||
1332 | |||
1293 | #endif /* __KERNEL__ */ | 1333 | #endif /* __KERNEL__ */ |
1294 | #endif /* LINUX_PCI_H */ | 1334 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cabf074b4324..cca8a044e2b6 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1587,6 +1587,8 @@ | |||
1587 | #define PCI_VENDOR_ID_COMPEX 0x11f6 | 1587 | #define PCI_VENDOR_ID_COMPEX 0x11f6 |
1588 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 | 1588 | #define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 |
1589 | 1589 | ||
1590 | #define PCI_VENDOR_ID_PMC_Sierra 0x11f8 | ||
1591 | |||
1590 | #define PCI_VENDOR_ID_RP 0x11fe | 1592 | #define PCI_VENDOR_ID_RP 0x11fe |
1591 | #define PCI_DEVICE_ID_RP32INTF 0x0001 | 1593 | #define PCI_DEVICE_ID_RP32INTF 0x0001 |
1592 | #define PCI_DEVICE_ID_RP8INTF 0x0002 | 1594 | #define PCI_DEVICE_ID_RP8INTF 0x0002 |
@@ -2293,6 +2295,20 @@ | |||
2293 | #define PCI_DEVICE_ID_MPC8536 0x0051 | 2295 | #define PCI_DEVICE_ID_MPC8536 0x0051 |
2294 | #define PCI_DEVICE_ID_P2020E 0x0070 | 2296 | #define PCI_DEVICE_ID_P2020E 0x0070 |
2295 | #define PCI_DEVICE_ID_P2020 0x0071 | 2297 | #define PCI_DEVICE_ID_P2020 0x0071 |
2298 | #define PCI_DEVICE_ID_P2010E 0x0078 | ||
2299 | #define PCI_DEVICE_ID_P2010 0x0079 | ||
2300 | #define PCI_DEVICE_ID_P1020E 0x0100 | ||
2301 | #define PCI_DEVICE_ID_P1020 0x0101 | ||
2302 | #define PCI_DEVICE_ID_P1011E 0x0108 | ||
2303 | #define PCI_DEVICE_ID_P1011 0x0109 | ||
2304 | #define PCI_DEVICE_ID_P1022E 0x0110 | ||
2305 | #define PCI_DEVICE_ID_P1022 0x0111 | ||
2306 | #define PCI_DEVICE_ID_P1013E 0x0118 | ||
2307 | #define PCI_DEVICE_ID_P1013 0x0119 | ||
2308 | #define PCI_DEVICE_ID_P4080E 0x0400 | ||
2309 | #define PCI_DEVICE_ID_P4080 0x0401 | ||
2310 | #define PCI_DEVICE_ID_P4040E 0x0408 | ||
2311 | #define PCI_DEVICE_ID_P4040 0x0409 | ||
2296 | #define PCI_DEVICE_ID_MPC8641 0x7010 | 2312 | #define PCI_DEVICE_ID_MPC8641 0x7010 |
2297 | #define PCI_DEVICE_ID_MPC8641D 0x7011 | 2313 | #define PCI_DEVICE_ID_MPC8641D 0x7011 |
2298 | #define PCI_DEVICE_ID_MPC8610 0x7018 | 2314 | #define PCI_DEVICE_ID_MPC8610 0x7018 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index dd0bed4f1cf0..9f2ad0aa3c39 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -365,6 +365,11 @@ | |||
365 | #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ | 365 | #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ |
366 | #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ | 366 | #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ |
367 | 367 | ||
368 | /* PCI Bridge Subsystem ID registers */ | ||
369 | |||
370 | #define PCI_SSVID_VENDOR_ID 4 /* PCI-Bridge subsystem vendor id register */ | ||
371 | #define PCI_SSVID_DEVICE_ID 6 /* PCI-Bridge subsystem device id register */ | ||
372 | |||
368 | /* PCI Express capability registers */ | 373 | /* PCI Express capability registers */ |
369 | 374 | ||
370 | #define PCI_EXP_FLAGS 2 /* Capabilities register */ | 375 | #define PCI_EXP_FLAGS 2 /* Capabilities register */ |
@@ -502,6 +507,7 @@ | |||
502 | #define PCI_EXT_CAP_ID_VC 2 | 507 | #define PCI_EXT_CAP_ID_VC 2 |
503 | #define PCI_EXT_CAP_ID_DSN 3 | 508 | #define PCI_EXT_CAP_ID_DSN 3 |
504 | #define PCI_EXT_CAP_ID_PWR 4 | 509 | #define PCI_EXT_CAP_ID_PWR 4 |
510 | #define PCI_EXT_CAP_ID_ACS 13 | ||
505 | #define PCI_EXT_CAP_ID_ARI 14 | 511 | #define PCI_EXT_CAP_ID_ARI 14 |
506 | #define PCI_EXT_CAP_ID_ATS 15 | 512 | #define PCI_EXT_CAP_ID_ATS 15 |
507 | #define PCI_EXT_CAP_ID_SRIOV 16 | 513 | #define PCI_EXT_CAP_ID_SRIOV 16 |
@@ -662,4 +668,16 @@ | |||
662 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ | 668 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ |
663 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ | 669 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ |
664 | 670 | ||
671 | /* Access Control Service */ | ||
672 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ | ||
673 | #define PCI_ACS_SV 0x01 /* Source Validation */ | ||
674 | #define PCI_ACS_TB 0x02 /* Translation Blocking */ | ||
675 | #define PCI_ACS_RR 0x04 /* P2P Request Redirect */ | ||
676 | #define PCI_ACS_CR 0x08 /* P2P Completion Redirect */ | ||
677 | #define PCI_ACS_UF 0x10 /* Upstream Forwarding */ | ||
678 | #define PCI_ACS_EC 0x20 /* P2P Egress Control */ | ||
679 | #define PCI_ACS_DT 0x40 /* Direct Translated P2P */ | ||
680 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ | ||
681 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ | ||
682 | |||
665 | #endif /* LINUX_PCI_REGS_H */ | 683 | #endif /* LINUX_PCI_REGS_H */ |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index b4c79545330b..6775532b92a9 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
@@ -10,10 +10,7 @@ | |||
10 | #define _PCIEPORT_IF_H_ | 10 | #define _PCIEPORT_IF_H_ |
11 | 11 | ||
12 | /* Port Type */ | 12 | /* Port Type */ |
13 | #define PCIE_RC_PORT 4 /* Root port of RC */ | 13 | #define PCIE_ANY_PORT (~0) |
14 | #define PCIE_SW_UPSTREAM_PORT 5 /* Upstream port of Switch */ | ||
15 | #define PCIE_SW_DOWNSTREAM_PORT 6 /* Downstream port of Switch */ | ||
16 | #define PCIE_ANY_PORT 7 | ||
17 | 14 | ||
18 | /* Service Type */ | 15 | /* Service Type */ |
19 | #define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */ | 16 | #define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */ |
@@ -25,17 +22,6 @@ | |||
25 | #define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ | 22 | #define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ |
26 | #define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) | 23 | #define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) |
27 | 24 | ||
28 | /* Root/Upstream/Downstream Port's Interrupt Mode */ | ||
29 | #define PCIE_PORT_NO_IRQ (-1) | ||
30 | #define PCIE_PORT_INTx_MODE 0 | ||
31 | #define PCIE_PORT_MSI_MODE 1 | ||
32 | #define PCIE_PORT_MSIX_MODE 2 | ||
33 | |||
34 | struct pcie_port_data { | ||
35 | int port_type; /* Type of the port */ | ||
36 | int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ | ||
37 | }; | ||
38 | |||
39 | struct pcie_device { | 25 | struct pcie_device { |
40 | int irq; /* Service IRQ/MSI/MSI-X Vector */ | 26 | int irq; /* Service IRQ/MSI/MSI-X Vector */ |
41 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ | 27 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 43adbd7f0010..64a53f74c9a9 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -18,10 +18,6 @@ | |||
18 | #include <linux/ioctl.h> | 18 | #include <linux/ioctl.h> |
19 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
20 | 20 | ||
21 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
22 | #include <asm/hw_breakpoint.h> | ||
23 | #endif | ||
24 | |||
25 | /* | 21 | /* |
26 | * User-space ABI bits: | 22 | * User-space ABI bits: |
27 | */ | 23 | */ |
@@ -215,12 +211,12 @@ struct perf_event_attr { | |||
215 | __u32 wakeup_watermark; /* bytes before wakeup */ | 211 | __u32 wakeup_watermark; /* bytes before wakeup */ |
216 | }; | 212 | }; |
217 | 213 | ||
218 | union { | 214 | struct { /* Hardware breakpoint info */ |
219 | struct { /* Hardware breakpoint info */ | 215 | __u64 bp_addr; |
220 | __u64 bp_addr; | 216 | __u32 bp_type; |
221 | __u32 bp_type; | 217 | __u32 bp_len; |
222 | __u32 bp_len; | 218 | __u64 __bp_reserved_1; |
223 | }; | 219 | __u64 __bp_reserved_2; |
224 | }; | 220 | }; |
225 | 221 | ||
226 | __u32 __reserved_2; | 222 | __u32 __reserved_2; |
@@ -451,6 +447,10 @@ enum perf_callchain_context { | |||
451 | # include <asm/perf_event.h> | 447 | # include <asm/perf_event.h> |
452 | #endif | 448 | #endif |
453 | 449 | ||
450 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | ||
451 | #include <asm/hw_breakpoint.h> | ||
452 | #endif | ||
453 | |||
454 | #include <linux/list.h> | 454 | #include <linux/list.h> |
455 | #include <linux/mutex.h> | 455 | #include <linux/mutex.h> |
456 | #include <linux/rculist.h> | 456 | #include <linux/rculist.h> |
@@ -565,10 +565,12 @@ struct perf_pending_entry { | |||
565 | void (*func)(struct perf_pending_entry *); | 565 | void (*func)(struct perf_pending_entry *); |
566 | }; | 566 | }; |
567 | 567 | ||
568 | typedef void (*perf_callback_t)(struct perf_event *, void *); | ||
569 | |||
570 | struct perf_sample_data; | 568 | struct perf_sample_data; |
571 | 569 | ||
570 | typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | ||
571 | struct perf_sample_data *, | ||
572 | struct pt_regs *regs); | ||
573 | |||
572 | /** | 574 | /** |
573 | * struct perf_event - performance event kernel representation: | 575 | * struct perf_event - performance event kernel representation: |
574 | */ | 576 | */ |
@@ -660,18 +662,12 @@ struct perf_event { | |||
660 | struct pid_namespace *ns; | 662 | struct pid_namespace *ns; |
661 | u64 id; | 663 | u64 id; |
662 | 664 | ||
663 | void (*overflow_handler)(struct perf_event *event, | 665 | perf_overflow_handler_t overflow_handler; |
664 | int nmi, struct perf_sample_data *data, | ||
665 | struct pt_regs *regs); | ||
666 | 666 | ||
667 | #ifdef CONFIG_EVENT_PROFILE | 667 | #ifdef CONFIG_EVENT_PROFILE |
668 | struct event_filter *filter; | 668 | struct event_filter *filter; |
669 | #endif | 669 | #endif |
670 | 670 | ||
671 | perf_callback_t callback; | ||
672 | |||
673 | perf_callback_t event_callback; | ||
674 | |||
675 | #endif /* CONFIG_PERF_EVENTS */ | 671 | #endif /* CONFIG_PERF_EVENTS */ |
676 | }; | 672 | }; |
677 | 673 | ||
@@ -781,7 +777,7 @@ extern struct perf_event * | |||
781 | perf_event_create_kernel_counter(struct perf_event_attr *attr, | 777 | perf_event_create_kernel_counter(struct perf_event_attr *attr, |
782 | int cpu, | 778 | int cpu, |
783 | pid_t pid, | 779 | pid_t pid, |
784 | perf_callback_t callback); | 780 | perf_overflow_handler_t callback); |
785 | extern u64 perf_event_read_value(struct perf_event *event, | 781 | extern u64 perf_event_read_value(struct perf_event *event, |
786 | u64 *enabled, u64 *running); | 782 | u64 *enabled, u64 *running); |
787 | 783 | ||
@@ -876,6 +872,8 @@ extern void perf_output_copy(struct perf_output_handle *handle, | |||
876 | const void *buf, unsigned int len); | 872 | const void *buf, unsigned int len); |
877 | extern int perf_swevent_get_recursion_context(void); | 873 | extern int perf_swevent_get_recursion_context(void); |
878 | extern void perf_swevent_put_recursion_context(int rctx); | 874 | extern void perf_swevent_put_recursion_context(int rctx); |
875 | extern void perf_event_enable(struct perf_event *event); | ||
876 | extern void perf_event_disable(struct perf_event *event); | ||
879 | #else | 877 | #else |
880 | static inline void | 878 | static inline void |
881 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } | 879 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } |
@@ -906,7 +904,8 @@ static inline void perf_event_fork(struct task_struct *tsk) { } | |||
906 | static inline void perf_event_init(void) { } | 904 | static inline void perf_event_init(void) { } |
907 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 905 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
908 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 906 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
909 | 907 | static inline void perf_event_enable(struct perf_event *event) { } | |
908 | static inline void perf_event_disable(struct perf_event *event) { } | ||
910 | #endif | 909 | #endif |
911 | 910 | ||
912 | #define perf_output_put(handle, x) \ | 911 | #define perf_output_put(handle, x) \ |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index d745f5b6c7b0..76e5053e1fac 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * use drive write caching -- we need deferred error handling to be | 32 | * use drive write caching -- we need deferred error handling to be |
33 | * able to sucessfully recover with this option (drive will return good | 33 | * able to successfully recover with this option (drive will return good |
34 | * status as soon as the cdb is validated). | 34 | * status as soon as the cdb is validated). |
35 | */ | 35 | */ |
36 | #if defined(CONFIG_CDROM_PKTCDVD_WCACHE) | 36 | #if defined(CONFIG_CDROM_PKTCDVD_WCACHE) |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 3c6675c2444b..71ff887ca44e 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -83,6 +83,8 @@ struct early_platform_driver { | |||
83 | struct platform_driver *pdrv; | 83 | struct platform_driver *pdrv; |
84 | struct list_head list; | 84 | struct list_head list; |
85 | int requested_id; | 85 | int requested_id; |
86 | char *buffer; | ||
87 | int bufsize; | ||
86 | }; | 88 | }; |
87 | 89 | ||
88 | #define EARLY_PLATFORM_ID_UNSET -2 | 90 | #define EARLY_PLATFORM_ID_UNSET -2 |
@@ -102,21 +104,29 @@ extern int early_platform_driver_probe(char *class_str, | |||
102 | int nr_probe, int user_only); | 104 | int nr_probe, int user_only); |
103 | extern void early_platform_cleanup(void); | 105 | extern void early_platform_cleanup(void); |
104 | 106 | ||
107 | #define early_platform_init(class_string, platdrv) \ | ||
108 | early_platform_init_buffer(class_string, platdrv, NULL, 0) | ||
105 | 109 | ||
106 | #ifndef MODULE | 110 | #ifndef MODULE |
107 | #define early_platform_init(class_string, platform_driver) \ | 111 | #define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ |
108 | static __initdata struct early_platform_driver early_driver = { \ | 112 | static __initdata struct early_platform_driver early_driver = { \ |
109 | .class_str = class_string, \ | 113 | .class_str = class_string, \ |
110 | .pdrv = platform_driver, \ | 114 | .buffer = buf, \ |
115 | .bufsize = bufsiz, \ | ||
116 | .pdrv = platdrv, \ | ||
111 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ | 117 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ |
112 | }; \ | 118 | }; \ |
113 | static int __init early_platform_driver_setup_func(char *buf) \ | 119 | static int __init early_platform_driver_setup_func(char *buffer) \ |
114 | { \ | 120 | { \ |
115 | return early_platform_driver_register(&early_driver, buf); \ | 121 | return early_platform_driver_register(&early_driver, buffer); \ |
116 | } \ | 122 | } \ |
117 | early_param(class_string, early_platform_driver_setup_func) | 123 | early_param(class_string, early_platform_driver_setup_func) |
118 | #else /* MODULE */ | 124 | #else /* MODULE */ |
119 | #define early_platform_init(class_string, platform_driver) | 125 | #define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \ |
126 | static inline char *early_platform_driver_setup_func(void) \ | ||
127 | { \ | ||
128 | return bufsiz ? buf : NULL; \ | ||
129 | } | ||
120 | #endif /* MODULE */ | 130 | #endif /* MODULE */ |
121 | 131 | ||
122 | #endif /* _PLATFORM_DEVICE_H_ */ | 132 | #endif /* _PLATFORM_DEVICE_H_ */ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index ce9a9b2e5cd4..e70e62194243 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -73,6 +73,8 @@ | |||
73 | /* Quota format type IDs */ | 73 | /* Quota format type IDs */ |
74 | #define QFMT_VFS_OLD 1 | 74 | #define QFMT_VFS_OLD 1 |
75 | #define QFMT_VFS_V0 2 | 75 | #define QFMT_VFS_V0 2 |
76 | #define QFMT_OCFS2 3 | ||
77 | #define QFMT_VFS_V1 4 | ||
76 | 78 | ||
77 | /* Size of block in which space limits are passed through the quota | 79 | /* Size of block in which space limits are passed through the quota |
78 | * interface */ | 80 | * interface */ |
@@ -334,7 +336,7 @@ struct quotactl_ops { | |||
334 | 336 | ||
335 | struct quota_format_type { | 337 | struct quota_format_type { |
336 | int qf_fmt_id; /* Quota format id */ | 338 | int qf_fmt_id; /* Quota format id */ |
337 | struct quota_format_ops *qf_ops; /* Operations of format */ | 339 | const struct quota_format_ops *qf_ops; /* Operations of format */ |
338 | struct module *qf_owner; /* Module implementing quota format */ | 340 | struct module *qf_owner; /* Module implementing quota format */ |
339 | struct quota_format_type *qf_next; | 341 | struct quota_format_type *qf_next; |
340 | }; | 342 | }; |
@@ -394,7 +396,7 @@ struct quota_info { | |||
394 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ | 396 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ |
395 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ | 397 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ |
396 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ | 398 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ |
397 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 399 | const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
398 | }; | 400 | }; |
399 | 401 | ||
400 | int register_quota_format(struct quota_format_type *fmt); | 402 | int register_quota_format(struct quota_format_type *fmt); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index dd31e7bae35c..a05b4a20768d 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -52,11 +52,63 @@ | |||
52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | 52 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION |
53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | 53 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION |
54 | 54 | ||
55 | /* Locking primitives */ | 55 | /* |
56 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | 56 | * Locking primitives. The write lock is a per superblock |
57 | would evolve into real per-fs locks */ | 57 | * special mutex that has properties close to the Big Kernel Lock |
58 | #define reiserfs_write_lock( sb ) lock_kernel() | 58 | * which was used in the previous locking scheme. |
59 | #define reiserfs_write_unlock( sb ) unlock_kernel() | 59 | */ |
60 | void reiserfs_write_lock(struct super_block *s); | ||
61 | void reiserfs_write_unlock(struct super_block *s); | ||
62 | int reiserfs_write_lock_once(struct super_block *s); | ||
63 | void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); | ||
64 | |||
65 | /* | ||
66 | * Several mutexes depend on the write lock. | ||
67 | * However sometimes we want to relax the write lock while we hold | ||
68 | * these mutexes, according to the release/reacquire on schedule() | ||
69 | * properties of the Bkl that were used. | ||
70 | * Reiserfs performances and locking were based on this scheme. | ||
71 | * Now that the write lock is a mutex and not the bkl anymore, doing so | ||
72 | * may result in a deadlock: | ||
73 | * | ||
74 | * A acquire write_lock | ||
75 | * A acquire j_commit_mutex | ||
76 | * A release write_lock and wait for something | ||
77 | * B acquire write_lock | ||
78 | * B can't acquire j_commit_mutex and sleep | ||
79 | * A can't acquire write lock anymore | ||
80 | * deadlock | ||
81 | * | ||
82 | * What we do here is avoiding such deadlock by playing the same game | ||
83 | * than the Bkl: if we can't acquire a mutex that depends on the write lock, | ||
84 | * we release the write lock, wait a bit and then retry. | ||
85 | * | ||
86 | * The mutexes concerned by this hack are: | ||
87 | * - The commit mutex of a journal list | ||
88 | * - The flush mutex | ||
89 | * - The journal lock | ||
90 | * - The inode mutex | ||
91 | */ | ||
92 | static inline void reiserfs_mutex_lock_safe(struct mutex *m, | ||
93 | struct super_block *s) | ||
94 | { | ||
95 | reiserfs_write_unlock(s); | ||
96 | mutex_lock(m); | ||
97 | reiserfs_write_lock(s); | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * When we schedule, we usually want to also release the write lock, | ||
102 | * according to the previous bkl based locking scheme of reiserfs. | ||
103 | */ | ||
104 | static inline void reiserfs_cond_resched(struct super_block *s) | ||
105 | { | ||
106 | if (need_resched()) { | ||
107 | reiserfs_write_unlock(s); | ||
108 | schedule(); | ||
109 | reiserfs_write_lock(s); | ||
110 | } | ||
111 | } | ||
60 | 112 | ||
61 | struct fid; | 113 | struct fid; |
62 | 114 | ||
@@ -1329,7 +1381,11 @@ static inline loff_t max_reiserfs_offset(struct inode *inode) | |||
1329 | #define get_generation(s) atomic_read (&fs_generation(s)) | 1381 | #define get_generation(s) atomic_read (&fs_generation(s)) |
1330 | #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen) | 1382 | #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen) |
1331 | #define __fs_changed(gen,s) (gen != get_generation (s)) | 1383 | #define __fs_changed(gen,s) (gen != get_generation (s)) |
1332 | #define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);}) | 1384 | #define fs_changed(gen,s) \ |
1385 | ({ \ | ||
1386 | reiserfs_cond_resched(s); \ | ||
1387 | __fs_changed(gen, s); \ | ||
1388 | }) | ||
1333 | 1389 | ||
1334 | /***************************************************************************/ | 1390 | /***************************************************************************/ |
1335 | /* FIXATE NODES */ | 1391 | /* FIXATE NODES */ |
@@ -2258,8 +2314,7 @@ __u32 r5_hash(const signed char *msg, int len); | |||
2258 | #define SPARE_SPACE 500 | 2314 | #define SPARE_SPACE 500 |
2259 | 2315 | ||
2260 | /* prototypes from ioctl.c */ | 2316 | /* prototypes from ioctl.c */ |
2261 | int reiserfs_ioctl(struct inode *inode, struct file *filp, | 2317 | long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
2262 | unsigned int cmd, unsigned long arg); | ||
2263 | long reiserfs_compat_ioctl(struct file *filp, | 2318 | long reiserfs_compat_ioctl(struct file *filp, |
2264 | unsigned int cmd, unsigned long arg); | 2319 | unsigned int cmd, unsigned long arg); |
2265 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2320 | int reiserfs_unpack(struct inode *inode, struct file *filp); |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index dab68bbed675..52c83b6a758a 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/workqueue.h> | 8 | #include <linux/workqueue.h> |
9 | #include <linux/rwsem.h> | 9 | #include <linux/rwsem.h> |
10 | #include <linux/mutex.h> | ||
11 | #include <linux/sched.h> | ||
10 | #endif | 12 | #endif |
11 | 13 | ||
12 | typedef enum { | 14 | typedef enum { |
@@ -355,6 +357,13 @@ struct reiserfs_sb_info { | |||
355 | struct reiserfs_journal *s_journal; /* pointer to journal information */ | 357 | struct reiserfs_journal *s_journal; /* pointer to journal information */ |
356 | unsigned short s_mount_state; /* reiserfs state (valid, invalid) */ | 358 | unsigned short s_mount_state; /* reiserfs state (valid, invalid) */ |
357 | 359 | ||
360 | /* Serialize writers access, replace the old bkl */ | ||
361 | struct mutex lock; | ||
362 | /* Owner of the lock (can be recursive) */ | ||
363 | struct task_struct *lock_owner; | ||
364 | /* Depth of the lock, start from -1 like the bkl */ | ||
365 | int lock_depth; | ||
366 | |||
358 | /* Comment? -Hans */ | 367 | /* Comment? -Hans */ |
359 | void (*end_io_handler) (struct buffer_head *, int); | 368 | void (*end_io_handler) (struct buffer_head *, int); |
360 | hashf_t s_hash_function; /* pointer to function which is used | 369 | hashf_t s_hash_function; /* pointer to function which is used |
@@ -408,6 +417,17 @@ struct reiserfs_sb_info { | |||
408 | char *s_qf_names[MAXQUOTAS]; | 417 | char *s_qf_names[MAXQUOTAS]; |
409 | int s_jquota_fmt; | 418 | int s_jquota_fmt; |
410 | #endif | 419 | #endif |
420 | #ifdef CONFIG_REISERFS_CHECK | ||
421 | |||
422 | struct tree_balance *cur_tb; /* | ||
423 | * Detects whether more than one | ||
424 | * copy of tb exists per superblock | ||
425 | * as a means of checking whether | ||
426 | * do_balance is executing concurrently | ||
427 | * against another tree reader/writer | ||
428 | * on a same mount point. | ||
429 | */ | ||
430 | #endif | ||
411 | }; | 431 | }; |
412 | 432 | ||
413 | /* Definitions of reiserfs on-disk properties: */ | 433 | /* Definitions of reiserfs on-disk properties: */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 89115ec7d43f..294eb2f80144 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1102,7 +1102,7 @@ struct sched_class { | |||
1102 | 1102 | ||
1103 | void (*set_curr_task) (struct rq *rq); | 1103 | void (*set_curr_task) (struct rq *rq); |
1104 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | 1104 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); |
1105 | void (*task_new) (struct rq *rq, struct task_struct *p); | 1105 | void (*task_fork) (struct task_struct *p); |
1106 | 1106 | ||
1107 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, | 1107 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, |
1108 | int running); | 1108 | int running); |
@@ -1111,7 +1111,8 @@ struct sched_class { | |||
1111 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, | 1111 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, |
1112 | int oldprio, int running); | 1112 | int oldprio, int running); |
1113 | 1113 | ||
1114 | unsigned int (*get_rr_interval) (struct task_struct *task); | 1114 | unsigned int (*get_rr_interval) (struct rq *rq, |
1115 | struct task_struct *task); | ||
1115 | 1116 | ||
1116 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1117 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1117 | void (*moved_group) (struct task_struct *p); | 1118 | void (*moved_group) (struct task_struct *p); |
@@ -1151,8 +1152,6 @@ struct sched_entity { | |||
1151 | u64 start_runtime; | 1152 | u64 start_runtime; |
1152 | u64 avg_wakeup; | 1153 | u64 avg_wakeup; |
1153 | 1154 | ||
1154 | u64 avg_running; | ||
1155 | |||
1156 | #ifdef CONFIG_SCHEDSTATS | 1155 | #ifdef CONFIG_SCHEDSTATS |
1157 | u64 wait_start; | 1156 | u64 wait_start; |
1158 | u64 wait_max; | 1157 | u64 wait_max; |
@@ -1175,7 +1174,6 @@ struct sched_entity { | |||
1175 | u64 nr_failed_migrations_running; | 1174 | u64 nr_failed_migrations_running; |
1176 | u64 nr_failed_migrations_hot; | 1175 | u64 nr_failed_migrations_hot; |
1177 | u64 nr_forced_migrations; | 1176 | u64 nr_forced_migrations; |
1178 | u64 nr_forced2_migrations; | ||
1179 | 1177 | ||
1180 | u64 nr_wakeups; | 1178 | u64 nr_wakeups; |
1181 | u64 nr_wakeups_sync; | 1179 | u64 nr_wakeups_sync; |
@@ -1840,7 +1838,8 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1840 | extern int sched_clock_stable; | 1838 | extern int sched_clock_stable; |
1841 | #endif | 1839 | #endif |
1842 | 1840 | ||
1843 | extern unsigned long long sched_clock(void); | 1841 | /* ftrace calls sched_clock() directly */ |
1842 | extern unsigned long long notrace sched_clock(void); | ||
1844 | 1843 | ||
1845 | extern void sched_clock_init(void); | 1844 | extern void sched_clock_init(void); |
1846 | extern u64 sched_clock_cpu(int cpu); | 1845 | extern u64 sched_clock_cpu(int cpu); |
@@ -1903,14 +1902,22 @@ extern unsigned int sysctl_sched_wakeup_granularity; | |||
1903 | extern unsigned int sysctl_sched_shares_ratelimit; | 1902 | extern unsigned int sysctl_sched_shares_ratelimit; |
1904 | extern unsigned int sysctl_sched_shares_thresh; | 1903 | extern unsigned int sysctl_sched_shares_thresh; |
1905 | extern unsigned int sysctl_sched_child_runs_first; | 1904 | extern unsigned int sysctl_sched_child_runs_first; |
1905 | |||
1906 | enum sched_tunable_scaling { | ||
1907 | SCHED_TUNABLESCALING_NONE, | ||
1908 | SCHED_TUNABLESCALING_LOG, | ||
1909 | SCHED_TUNABLESCALING_LINEAR, | ||
1910 | SCHED_TUNABLESCALING_END, | ||
1911 | }; | ||
1912 | extern enum sched_tunable_scaling sysctl_sched_tunable_scaling; | ||
1913 | |||
1906 | #ifdef CONFIG_SCHED_DEBUG | 1914 | #ifdef CONFIG_SCHED_DEBUG |
1907 | extern unsigned int sysctl_sched_features; | ||
1908 | extern unsigned int sysctl_sched_migration_cost; | 1915 | extern unsigned int sysctl_sched_migration_cost; |
1909 | extern unsigned int sysctl_sched_nr_migrate; | 1916 | extern unsigned int sysctl_sched_nr_migrate; |
1910 | extern unsigned int sysctl_sched_time_avg; | 1917 | extern unsigned int sysctl_sched_time_avg; |
1911 | extern unsigned int sysctl_timer_migration; | 1918 | extern unsigned int sysctl_timer_migration; |
1912 | 1919 | ||
1913 | int sched_nr_latency_handler(struct ctl_table *table, int write, | 1920 | int sched_proc_update_handler(struct ctl_table *table, int write, |
1914 | void __user *buffer, size_t *length, | 1921 | void __user *buffer, size_t *length, |
1915 | loff_t *ppos); | 1922 | loff_t *ppos); |
1916 | #endif | 1923 | #endif |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 850db2e80510..cf9327c051ad 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
@@ -216,10 +216,10 @@ | |||
216 | 216 | ||
217 | #define UART_IIR_TOD 0x08 /* Character Timeout Indication Detected */ | 217 | #define UART_IIR_TOD 0x08 /* Character Timeout Indication Detected */ |
218 | 218 | ||
219 | #define UART_FCR_PXAR1 0x00 /* receive FIFO treshold = 1 */ | 219 | #define UART_FCR_PXAR1 0x00 /* receive FIFO threshold = 1 */ |
220 | #define UART_FCR_PXAR8 0x40 /* receive FIFO treshold = 8 */ | 220 | #define UART_FCR_PXAR8 0x40 /* receive FIFO threshold = 8 */ |
221 | #define UART_FCR_PXAR16 0x80 /* receive FIFO treshold = 16 */ | 221 | #define UART_FCR_PXAR16 0x80 /* receive FIFO threshold = 16 */ |
222 | #define UART_FCR_PXAR32 0xc0 /* receive FIFO treshold = 32 */ | 222 | #define UART_FCR_PXAR32 0xc0 /* receive FIFO threshold = 32 */ |
223 | 223 | ||
224 | 224 | ||
225 | 225 | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index a640bc2afe76..e2f3044d4a4a 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -215,5 +215,6 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
215 | #define SERIO_INEXIO 0x37 | 215 | #define SERIO_INEXIO 0x37 |
216 | #define SERIO_TOUCHIT213 0x38 | 216 | #define SERIO_TOUCHIT213 0x38 |
217 | #define SERIO_W8001 0x39 | 217 | #define SERIO_W8001 0x39 |
218 | #define SERIO_DYNAPRO 0x3a | ||
218 | 219 | ||
219 | #endif | 220 | #endif |
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 68e212ff9dde..4ef246f14654 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -57,10 +57,8 @@ struct intc_desc { | |||
57 | struct intc_sense_reg *sense_regs; | 57 | struct intc_sense_reg *sense_regs; |
58 | unsigned int nr_sense_regs; | 58 | unsigned int nr_sense_regs; |
59 | char *name; | 59 | char *name; |
60 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | ||
61 | struct intc_mask_reg *ack_regs; | 60 | struct intc_mask_reg *ack_regs; |
62 | unsigned int nr_ack_regs; | 61 | unsigned int nr_ack_regs; |
63 | #endif | ||
64 | }; | 62 | }; |
65 | 63 | ||
66 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) | 64 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) |
@@ -73,7 +71,6 @@ struct intc_desc symbol __initdata = { \ | |||
73 | chipname, \ | 71 | chipname, \ |
74 | } | 72 | } |
75 | 73 | ||
76 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A) | ||
77 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ | 74 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ |
78 | mask_regs, prio_regs, sense_regs, ack_regs) \ | 75 | mask_regs, prio_regs, sense_regs, ack_regs) \ |
79 | struct intc_desc symbol __initdata = { \ | 76 | struct intc_desc symbol __initdata = { \ |
@@ -83,9 +80,11 @@ struct intc_desc symbol __initdata = { \ | |||
83 | chipname, \ | 80 | chipname, \ |
84 | _INTC_ARRAY(ack_regs), \ | 81 | _INTC_ARRAY(ack_regs), \ |
85 | } | 82 | } |
86 | #endif | ||
87 | 83 | ||
88 | void __init register_intc_controller(struct intc_desc *desc); | 84 | void __init register_intc_controller(struct intc_desc *desc); |
89 | int intc_set_priority(unsigned int irq, unsigned int prio); | 85 | int intc_set_priority(unsigned int irq, unsigned int prio); |
90 | 86 | ||
87 | int reserve_irq_vector(unsigned int irq); | ||
88 | void reserve_irq_legacy(void); | ||
89 | |||
91 | #endif /* __SH_INTC_H */ | 90 | #endif /* __SH_INTC_H */ |
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h new file mode 100644 index 000000000000..07c08af9f8f6 --- /dev/null +++ b/include/linux/sh_pfc.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * SuperH Pin Function Controller Support | ||
3 | * | ||
4 | * Copyright (c) 2008 Magnus Damm | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #ifndef __SH_PFC_H | ||
12 | #define __SH_PFC_H | ||
13 | |||
14 | #include <asm-generic/gpio.h> | ||
15 | |||
16 | typedef unsigned short pinmux_enum_t; | ||
17 | typedef unsigned short pinmux_flag_t; | ||
18 | |||
19 | #define PINMUX_TYPE_NONE 0 | ||
20 | #define PINMUX_TYPE_FUNCTION 1 | ||
21 | #define PINMUX_TYPE_GPIO 2 | ||
22 | #define PINMUX_TYPE_OUTPUT 3 | ||
23 | #define PINMUX_TYPE_INPUT 4 | ||
24 | #define PINMUX_TYPE_INPUT_PULLUP 5 | ||
25 | #define PINMUX_TYPE_INPUT_PULLDOWN 6 | ||
26 | |||
27 | #define PINMUX_FLAG_TYPE (0x7) | ||
28 | #define PINMUX_FLAG_WANT_PULLUP (1 << 3) | ||
29 | #define PINMUX_FLAG_WANT_PULLDOWN (1 << 4) | ||
30 | |||
31 | #define PINMUX_FLAG_DBIT_SHIFT 5 | ||
32 | #define PINMUX_FLAG_DBIT (0x1f << PINMUX_FLAG_DBIT_SHIFT) | ||
33 | #define PINMUX_FLAG_DREG_SHIFT 10 | ||
34 | #define PINMUX_FLAG_DREG (0x3f << PINMUX_FLAG_DREG_SHIFT) | ||
35 | |||
36 | struct pinmux_gpio { | ||
37 | pinmux_enum_t enum_id; | ||
38 | pinmux_flag_t flags; | ||
39 | }; | ||
40 | |||
41 | #define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark } | ||
42 | #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0 | ||
43 | |||
44 | struct pinmux_cfg_reg { | ||
45 | unsigned long reg, reg_width, field_width; | ||
46 | unsigned long *cnt; | ||
47 | pinmux_enum_t *enum_ids; | ||
48 | }; | ||
49 | |||
50 | #define PINMUX_CFG_REG(name, r, r_width, f_width) \ | ||
51 | .reg = r, .reg_width = r_width, .field_width = f_width, \ | ||
52 | .cnt = (unsigned long [r_width / f_width]) {}, \ | ||
53 | .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \ | ||
54 | |||
55 | struct pinmux_data_reg { | ||
56 | unsigned long reg, reg_width, reg_shadow; | ||
57 | pinmux_enum_t *enum_ids; | ||
58 | }; | ||
59 | |||
60 | #define PINMUX_DATA_REG(name, r, r_width) \ | ||
61 | .reg = r, .reg_width = r_width, \ | ||
62 | .enum_ids = (pinmux_enum_t [r_width]) \ | ||
63 | |||
64 | struct pinmux_range { | ||
65 | pinmux_enum_t begin; | ||
66 | pinmux_enum_t end; | ||
67 | pinmux_enum_t force; | ||
68 | }; | ||
69 | |||
70 | struct pinmux_info { | ||
71 | char *name; | ||
72 | pinmux_enum_t reserved_id; | ||
73 | struct pinmux_range data; | ||
74 | struct pinmux_range input; | ||
75 | struct pinmux_range input_pd; | ||
76 | struct pinmux_range input_pu; | ||
77 | struct pinmux_range output; | ||
78 | struct pinmux_range mark; | ||
79 | struct pinmux_range function; | ||
80 | |||
81 | unsigned first_gpio, last_gpio; | ||
82 | |||
83 | struct pinmux_gpio *gpios; | ||
84 | struct pinmux_cfg_reg *cfg_regs; | ||
85 | struct pinmux_data_reg *data_regs; | ||
86 | |||
87 | pinmux_enum_t *gpio_data; | ||
88 | unsigned int gpio_data_size; | ||
89 | |||
90 | unsigned long *gpio_in_use; | ||
91 | struct gpio_chip chip; | ||
92 | }; | ||
93 | |||
94 | int register_pinmux(struct pinmux_info *pip); | ||
95 | |||
96 | #endif /* __SH_PFC_H */ | ||
diff --git a/include/linux/spi/mpc52xx_spi.h b/include/linux/spi/mpc52xx_spi.h new file mode 100644 index 000000000000..d1004cf09241 --- /dev/null +++ b/include/linux/spi/mpc52xx_spi.h | |||
@@ -0,0 +1,10 @@ | |||
1 | |||
2 | #ifndef INCLUDE_MPC5200_SPI_H | ||
3 | #define INCLUDE_MPC5200_SPI_H | ||
4 | |||
5 | extern void mpc52xx_spi_set_premessage_hook(struct spi_master *master, | ||
6 | void (*hook)(struct spi_message *m, | ||
7 | void *context), | ||
8 | void *hook_context); | ||
9 | |||
10 | #endif | ||
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index eed4254bd503..3274c507b8a9 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * Some hardware works well with requests at spi_transfer scope: | 15 | * Some hardware works well with requests at spi_transfer scope: |
16 | * | 16 | * |
17 | * - Drivers leveraging smarter hardware, with fifos or DMA; or for half | 17 | * - Drivers leveraging smarter hardware, with fifos or DMA; or for half |
18 | * duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(), | 18 | * duplex (MicroWire) controllers. Provide chipselect() and txrx_bufs(), |
19 | * and custom setup()/cleanup() methods. | 19 | * and custom setup()/cleanup() methods. |
20 | */ | 20 | */ |
21 | 21 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 72d69860d901..65793e90d6f6 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -832,4 +832,8 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | |||
832 | asmlinkage long sys_perf_event_open( | 832 | asmlinkage long sys_perf_event_open( |
833 | struct perf_event_attr __user *attr_uptr, | 833 | struct perf_event_attr __user *attr_uptr, |
834 | pid_t pid, int cpu, int group_fd, unsigned long flags); | 834 | pid_t pid, int cpu, int group_fd, unsigned long flags); |
835 | |||
836 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | ||
837 | unsigned long prot, unsigned long flags, | ||
838 | unsigned long fd, unsigned long pgoff); | ||
835 | #endif | 839 | #endif |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 56af3ca75e24..877ba039e6a4 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -89,8 +89,8 @@ enum | |||
89 | KERN_VERSION=4, /* string: compile time info */ | 89 | KERN_VERSION=4, /* string: compile time info */ |
90 | KERN_SECUREMASK=5, /* struct: maximum rights mask */ | 90 | KERN_SECUREMASK=5, /* struct: maximum rights mask */ |
91 | KERN_PROF=6, /* table: profiling information */ | 91 | KERN_PROF=6, /* table: profiling information */ |
92 | KERN_NODENAME=7, | 92 | KERN_NODENAME=7, /* string: hostname */ |
93 | KERN_DOMAINNAME=8, | 93 | KERN_DOMAINNAME=8, /* string: domainname */ |
94 | 94 | ||
95 | KERN_PANIC=15, /* int: panic timeout */ | 95 | KERN_PANIC=15, /* int: panic timeout */ |
96 | KERN_REALROOTDEV=16, /* real root device to mount after initrd */ | 96 | KERN_REALROOTDEV=16, /* real root device to mount after initrd */ |
@@ -102,8 +102,8 @@ enum | |||
102 | KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */ | 102 | KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */ |
103 | KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */ | 103 | KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */ |
104 | KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */ | 104 | KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */ |
105 | KERN_MODPROBE=28, | 105 | KERN_MODPROBE=28, /* string: modprobe path */ |
106 | KERN_SG_BIG_BUFF=29, | 106 | KERN_SG_BIG_BUFF=29, /* int: sg driver reserved buffer size */ |
107 | KERN_ACCT=30, /* BSD process accounting parameters */ | 107 | KERN_ACCT=30, /* BSD process accounting parameters */ |
108 | KERN_PPC_L2CR=31, /* l2cr register on PPC */ | 108 | KERN_PPC_L2CR=31, /* l2cr register on PPC */ |
109 | 109 | ||
@@ -150,7 +150,7 @@ enum | |||
150 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ | 150 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ |
151 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ | 151 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ |
152 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ | 152 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ |
153 | KERN_MAX_LOCK_DEPTH=74, | 153 | KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */ |
154 | KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ | 154 | KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ |
155 | KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ | 155 | KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ |
156 | }; | 156 | }; |
diff --git a/include/linux/tty.h b/include/linux/tty.h index f0f43d08d8b8..405a9035fe40 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -190,9 +190,17 @@ struct tty_port_operations { | |||
190 | /* Control the DTR line */ | 190 | /* Control the DTR line */ |
191 | void (*dtr_rts)(struct tty_port *port, int raise); | 191 | void (*dtr_rts)(struct tty_port *port, int raise); |
192 | /* Called when the last close completes or a hangup finishes | 192 | /* Called when the last close completes or a hangup finishes |
193 | IFF the port was initialized. Do not use to free resources */ | 193 | IFF the port was initialized. Do not use to free resources. Called |
194 | under the port mutex to serialize against activate/shutdowns */ | ||
194 | void (*shutdown)(struct tty_port *port); | 195 | void (*shutdown)(struct tty_port *port); |
195 | void (*drop)(struct tty_port *port); | 196 | void (*drop)(struct tty_port *port); |
197 | /* Called under the port mutex from tty_port_open, serialized using | ||
198 | the port mutex */ | ||
199 | /* FIXME: long term getting the tty argument *out* of this would be | ||
200 | good for consoles */ | ||
201 | int (*activate)(struct tty_port *port, struct tty_struct *tty); | ||
202 | /* Called on the final put of a port */ | ||
203 | void (*destruct)(struct tty_port *port); | ||
196 | }; | 204 | }; |
197 | 205 | ||
198 | struct tty_port { | 206 | struct tty_port { |
@@ -206,12 +214,14 @@ struct tty_port { | |||
206 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 214 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
207 | unsigned long flags; /* TTY flags ASY_*/ | 215 | unsigned long flags; /* TTY flags ASY_*/ |
208 | struct mutex mutex; /* Locking */ | 216 | struct mutex mutex; /* Locking */ |
217 | struct mutex buf_mutex; /* Buffer alloc lock */ | ||
209 | unsigned char *xmit_buf; /* Optional buffer */ | 218 | unsigned char *xmit_buf; /* Optional buffer */ |
210 | unsigned int close_delay; /* Close port delay */ | 219 | unsigned int close_delay; /* Close port delay */ |
211 | unsigned int closing_wait; /* Delay for output */ | 220 | unsigned int closing_wait; /* Delay for output */ |
212 | int drain_delay; /* Set to zero if no pure time | 221 | int drain_delay; /* Set to zero if no pure time |
213 | based drain is needed else | 222 | based drain is needed else |
214 | set to size of fifo */ | 223 | set to size of fifo */ |
224 | struct kref kref; /* Ref counter */ | ||
215 | }; | 225 | }; |
216 | 226 | ||
217 | /* | 227 | /* |
@@ -439,7 +449,7 @@ extern void initialize_tty_struct(struct tty_struct *tty, | |||
439 | struct tty_driver *driver, int idx); | 449 | struct tty_driver *driver, int idx); |
440 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, | 450 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, |
441 | int first_ok); | 451 | int first_ok); |
442 | extern void tty_release_dev(struct file *filp); | 452 | extern int tty_release(struct inode *inode, struct file *filp); |
443 | extern int tty_init_termios(struct tty_struct *tty); | 453 | extern int tty_init_termios(struct tty_struct *tty); |
444 | 454 | ||
445 | extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty); | 455 | extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty); |
@@ -454,6 +464,15 @@ extern int tty_write_lock(struct tty_struct *tty, int ndelay); | |||
454 | extern void tty_port_init(struct tty_port *port); | 464 | extern void tty_port_init(struct tty_port *port); |
455 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); | 465 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); |
456 | extern void tty_port_free_xmit_buf(struct tty_port *port); | 466 | extern void tty_port_free_xmit_buf(struct tty_port *port); |
467 | extern void tty_port_put(struct tty_port *port); | ||
468 | |||
469 | extern inline struct tty_port *tty_port_get(struct tty_port *port) | ||
470 | { | ||
471 | if (port) | ||
472 | kref_get(&port->kref); | ||
473 | return port; | ||
474 | } | ||
475 | |||
457 | extern struct tty_struct *tty_port_tty_get(struct tty_port *port); | 476 | extern struct tty_struct *tty_port_tty_get(struct tty_port *port); |
458 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); | 477 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); |
459 | extern int tty_port_carrier_raised(struct tty_port *port); | 478 | extern int tty_port_carrier_raised(struct tty_port *port); |
@@ -467,6 +486,8 @@ extern int tty_port_close_start(struct tty_port *port, | |||
467 | extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); | 486 | extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); |
468 | extern void tty_port_close(struct tty_port *port, | 487 | extern void tty_port_close(struct tty_port *port, |
469 | struct tty_struct *tty, struct file *filp); | 488 | struct tty_struct *tty, struct file *filp); |
489 | extern int tty_port_open(struct tty_port *port, | ||
490 | struct tty_struct *tty, struct file *filp); | ||
470 | extern inline int tty_port_users(struct tty_port *port) | 491 | extern inline int tty_port_users(struct tty_port *port) |
471 | { | 492 | { |
472 | return port->count + port->blocked_open; | 493 | return port->count + port->blocked_open; |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index adb44066680c..1b4790911052 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -110,6 +110,10 @@ struct ucb1400 { | |||
110 | struct platform_device *ucb1400_gpio; | 110 | struct platform_device *ucb1400_gpio; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct ucb1400_pdata { | ||
114 | int irq; | ||
115 | }; | ||
116 | |||
113 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) | 117 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) |
114 | { | 118 | { |
115 | return ac97->bus->ops->read(ac97, reg); | 119 | return ac97->bus->ops->read(ac97, reg); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index a34fa89f1474..e101a2d04d75 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -331,6 +331,7 @@ struct usb_bus { | |||
331 | u8 otg_port; /* 0, or number of OTG/HNP port */ | 331 | u8 otg_port; /* 0, or number of OTG/HNP port */ |
332 | unsigned is_b_host:1; /* true during some HNP roleswitches */ | 332 | unsigned is_b_host:1; /* true during some HNP roleswitches */ |
333 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ | 333 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ |
334 | unsigned sg_tablesize; /* 0 or largest number of sg list entries */ | ||
334 | 335 | ||
335 | int devnum_next; /* Next open device number in | 336 | int devnum_next; /* Next open device number in |
336 | * round-robin allocation */ | 337 | * round-robin allocation */ |
@@ -428,11 +429,9 @@ struct usb_tt; | |||
428 | * @last_busy: time of last use | 429 | * @last_busy: time of last use |
429 | * @autosuspend_delay: in jiffies | 430 | * @autosuspend_delay: in jiffies |
430 | * @connect_time: time device was first connected | 431 | * @connect_time: time device was first connected |
431 | * @auto_pm: autosuspend/resume in progress | ||
432 | * @do_remote_wakeup: remote wakeup should be enabled | 432 | * @do_remote_wakeup: remote wakeup should be enabled |
433 | * @reset_resume: needs reset instead of resume | 433 | * @reset_resume: needs reset instead of resume |
434 | * @autosuspend_disabled: autosuspend disabled by the user | 434 | * @autosuspend_disabled: autosuspend disabled by the user |
435 | * @autoresume_disabled: autoresume disabled by the user | ||
436 | * @skip_sys_resume: skip the next system resume | 435 | * @skip_sys_resume: skip the next system resume |
437 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB | 436 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB |
438 | * specific data for the device. | 437 | * specific data for the device. |
@@ -513,11 +512,9 @@ struct usb_device { | |||
513 | int autosuspend_delay; | 512 | int autosuspend_delay; |
514 | unsigned long connect_time; | 513 | unsigned long connect_time; |
515 | 514 | ||
516 | unsigned auto_pm:1; | ||
517 | unsigned do_remote_wakeup:1; | 515 | unsigned do_remote_wakeup:1; |
518 | unsigned reset_resume:1; | 516 | unsigned reset_resume:1; |
519 | unsigned autosuspend_disabled:1; | 517 | unsigned autosuspend_disabled:1; |
520 | unsigned autoresume_disabled:1; | ||
521 | unsigned skip_sys_resume:1; | 518 | unsigned skip_sys_resume:1; |
522 | #endif | 519 | #endif |
523 | struct wusb_dev *wusb_dev; | 520 | struct wusb_dev *wusb_dev; |
@@ -543,22 +540,20 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | |||
543 | 540 | ||
544 | /* USB autosuspend and autoresume */ | 541 | /* USB autosuspend and autoresume */ |
545 | #ifdef CONFIG_USB_SUSPEND | 542 | #ifdef CONFIG_USB_SUSPEND |
546 | extern int usb_autopm_set_interface(struct usb_interface *intf); | ||
547 | extern int usb_autopm_get_interface(struct usb_interface *intf); | 543 | extern int usb_autopm_get_interface(struct usb_interface *intf); |
548 | extern void usb_autopm_put_interface(struct usb_interface *intf); | 544 | extern void usb_autopm_put_interface(struct usb_interface *intf); |
549 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); | 545 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); |
550 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); | 546 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); |
551 | 547 | ||
552 | static inline void usb_autopm_enable(struct usb_interface *intf) | 548 | static inline void usb_autopm_get_interface_no_resume( |
549 | struct usb_interface *intf) | ||
553 | { | 550 | { |
554 | atomic_set(&intf->pm_usage_cnt, 0); | 551 | atomic_inc(&intf->pm_usage_cnt); |
555 | usb_autopm_set_interface(intf); | ||
556 | } | 552 | } |
557 | 553 | static inline void usb_autopm_put_interface_no_suspend( | |
558 | static inline void usb_autopm_disable(struct usb_interface *intf) | 554 | struct usb_interface *intf) |
559 | { | 555 | { |
560 | atomic_set(&intf->pm_usage_cnt, 1); | 556 | atomic_dec(&intf->pm_usage_cnt); |
561 | usb_autopm_set_interface(intf); | ||
562 | } | 557 | } |
563 | 558 | ||
564 | static inline void usb_mark_last_busy(struct usb_device *udev) | 559 | static inline void usb_mark_last_busy(struct usb_device *udev) |
@@ -568,12 +563,8 @@ static inline void usb_mark_last_busy(struct usb_device *udev) | |||
568 | 563 | ||
569 | #else | 564 | #else |
570 | 565 | ||
571 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | ||
572 | { return 0; } | ||
573 | |||
574 | static inline int usb_autopm_get_interface(struct usb_interface *intf) | 566 | static inline int usb_autopm_get_interface(struct usb_interface *intf) |
575 | { return 0; } | 567 | { return 0; } |
576 | |||
577 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) | 568 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) |
578 | { return 0; } | 569 | { return 0; } |
579 | 570 | ||
@@ -581,9 +572,11 @@ static inline void usb_autopm_put_interface(struct usb_interface *intf) | |||
581 | { } | 572 | { } |
582 | static inline void usb_autopm_put_interface_async(struct usb_interface *intf) | 573 | static inline void usb_autopm_put_interface_async(struct usb_interface *intf) |
583 | { } | 574 | { } |
584 | static inline void usb_autopm_enable(struct usb_interface *intf) | 575 | static inline void usb_autopm_get_interface_no_resume( |
576 | struct usb_interface *intf) | ||
585 | { } | 577 | { } |
586 | static inline void usb_autopm_disable(struct usb_interface *intf) | 578 | static inline void usb_autopm_put_interface_no_suspend( |
579 | struct usb_interface *intf) | ||
587 | { } | 580 | { } |
588 | static inline void usb_mark_last_busy(struct usb_device *udev) | 581 | static inline void usb_mark_last_busy(struct usb_device *udev) |
589 | { } | 582 | { } |
@@ -626,6 +619,10 @@ extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, | |||
626 | unsigned ifnum); | 619 | unsigned ifnum); |
627 | extern struct usb_host_interface *usb_altnum_to_altsetting( | 620 | extern struct usb_host_interface *usb_altnum_to_altsetting( |
628 | const struct usb_interface *intf, unsigned int altnum); | 621 | const struct usb_interface *intf, unsigned int altnum); |
622 | extern struct usb_host_interface *usb_find_alt_setting( | ||
623 | struct usb_host_config *config, | ||
624 | unsigned int iface_num, | ||
625 | unsigned int alt_num); | ||
629 | 626 | ||
630 | 627 | ||
631 | /** | 628 | /** |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 4f6bb3d2160e..738ea1a691cb 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -127,6 +127,7 @@ struct usb_function { | |||
127 | /* private: */ | 127 | /* private: */ |
128 | /* internals */ | 128 | /* internals */ |
129 | struct list_head list; | 129 | struct list_head list; |
130 | DECLARE_BITMAP(endpoints, 32); | ||
130 | }; | 131 | }; |
131 | 132 | ||
132 | int usb_add_function(struct usb_configuration *, struct usb_function *); | 133 | int usb_add_function(struct usb_configuration *, struct usb_function *); |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 2443c0e7a80c..52bb917641f0 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -33,6 +33,23 @@ enum usb_otg_state { | |||
33 | OTG_STATE_A_VBUS_ERR, | 33 | OTG_STATE_A_VBUS_ERR, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | #define USB_OTG_PULLUP_ID (1 << 0) | ||
37 | #define USB_OTG_PULLDOWN_DP (1 << 1) | ||
38 | #define USB_OTG_PULLDOWN_DM (1 << 2) | ||
39 | #define USB_OTG_EXT_VBUS_INDICATOR (1 << 3) | ||
40 | #define USB_OTG_DRV_VBUS (1 << 4) | ||
41 | #define USB_OTG_DRV_VBUS_EXT (1 << 5) | ||
42 | |||
43 | struct otg_transceiver; | ||
44 | |||
45 | /* for transceivers connected thru an ULPI interface, the user must | ||
46 | * provide access ops | ||
47 | */ | ||
48 | struct otg_io_access_ops { | ||
49 | int (*read)(struct otg_transceiver *otg, u32 reg); | ||
50 | int (*write)(struct otg_transceiver *otg, u32 val, u32 reg); | ||
51 | }; | ||
52 | |||
36 | /* | 53 | /* |
37 | * the otg driver needs to interact with both device side and host side | 54 | * the otg driver needs to interact with both device side and host side |
38 | * usb controllers. it decides which controller is active at a given | 55 | * usb controllers. it decides which controller is active at a given |
@@ -42,6 +59,7 @@ enum usb_otg_state { | |||
42 | struct otg_transceiver { | 59 | struct otg_transceiver { |
43 | struct device *dev; | 60 | struct device *dev; |
44 | const char *label; | 61 | const char *label; |
62 | unsigned int flags; | ||
45 | 63 | ||
46 | u8 default_a; | 64 | u8 default_a; |
47 | enum usb_otg_state state; | 65 | enum usb_otg_state state; |
@@ -49,10 +67,17 @@ struct otg_transceiver { | |||
49 | struct usb_bus *host; | 67 | struct usb_bus *host; |
50 | struct usb_gadget *gadget; | 68 | struct usb_gadget *gadget; |
51 | 69 | ||
70 | struct otg_io_access_ops *io_ops; | ||
71 | void __iomem *io_priv; | ||
72 | |||
52 | /* to pass extra port status to the root hub */ | 73 | /* to pass extra port status to the root hub */ |
53 | u16 port_status; | 74 | u16 port_status; |
54 | u16 port_change; | 75 | u16 port_change; |
55 | 76 | ||
77 | /* initialize/shutdown the OTG controller */ | ||
78 | int (*init)(struct otg_transceiver *otg); | ||
79 | void (*shutdown)(struct otg_transceiver *otg); | ||
80 | |||
56 | /* bind/unbind the host controller */ | 81 | /* bind/unbind the host controller */ |
57 | int (*set_host)(struct otg_transceiver *otg, | 82 | int (*set_host)(struct otg_transceiver *otg, |
58 | struct usb_bus *host); | 83 | struct usb_bus *host); |
@@ -65,6 +90,10 @@ struct otg_transceiver { | |||
65 | int (*set_power)(struct otg_transceiver *otg, | 90 | int (*set_power)(struct otg_transceiver *otg, |
66 | unsigned mA); | 91 | unsigned mA); |
67 | 92 | ||
93 | /* effective for A-peripheral, ignored for B devices */ | ||
94 | int (*set_vbus)(struct otg_transceiver *otg, | ||
95 | bool enabled); | ||
96 | |||
68 | /* for non-OTG B devices: set transceiver into suspend mode */ | 97 | /* for non-OTG B devices: set transceiver into suspend mode */ |
69 | int (*set_suspend)(struct otg_transceiver *otg, | 98 | int (*set_suspend)(struct otg_transceiver *otg, |
70 | int suspend); | 99 | int suspend); |
@@ -85,6 +114,38 @@ extern int otg_set_transceiver(struct otg_transceiver *); | |||
85 | extern void usb_nop_xceiv_register(void); | 114 | extern void usb_nop_xceiv_register(void); |
86 | extern void usb_nop_xceiv_unregister(void); | 115 | extern void usb_nop_xceiv_unregister(void); |
87 | 116 | ||
117 | /* helpers for direct access thru low-level io interface */ | ||
118 | static inline int otg_io_read(struct otg_transceiver *otg, u32 reg) | ||
119 | { | ||
120 | if (otg->io_ops && otg->io_ops->read) | ||
121 | return otg->io_ops->read(otg, reg); | ||
122 | |||
123 | return -EINVAL; | ||
124 | } | ||
125 | |||
126 | static inline int otg_io_write(struct otg_transceiver *otg, u32 reg, u32 val) | ||
127 | { | ||
128 | if (otg->io_ops && otg->io_ops->write) | ||
129 | return otg->io_ops->write(otg, reg, val); | ||
130 | |||
131 | return -EINVAL; | ||
132 | } | ||
133 | |||
134 | static inline int | ||
135 | otg_init(struct otg_transceiver *otg) | ||
136 | { | ||
137 | if (otg->init) | ||
138 | return otg->init(otg); | ||
139 | |||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static inline void | ||
144 | otg_shutdown(struct otg_transceiver *otg) | ||
145 | { | ||
146 | if (otg->shutdown) | ||
147 | otg->shutdown(otg); | ||
148 | } | ||
88 | 149 | ||
89 | /* for usb host and peripheral controller drivers */ | 150 | /* for usb host and peripheral controller drivers */ |
90 | extern struct otg_transceiver *otg_get_transceiver(void); | 151 | extern struct otg_transceiver *otg_get_transceiver(void); |
@@ -97,6 +158,12 @@ otg_start_hnp(struct otg_transceiver *otg) | |||
97 | return otg->start_hnp(otg); | 158 | return otg->start_hnp(otg); |
98 | } | 159 | } |
99 | 160 | ||
161 | /* Context: can sleep */ | ||
162 | static inline int | ||
163 | otg_set_vbus(struct otg_transceiver *otg, bool enabled) | ||
164 | { | ||
165 | return otg->set_vbus(otg, enabled); | ||
166 | } | ||
100 | 167 | ||
101 | /* for HCDs */ | 168 | /* for HCDs */ |
102 | static inline int | 169 | static inline int |
@@ -105,7 +172,6 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
105 | return otg->set_host(otg, host); | 172 | return otg->set_host(otg, host); |
106 | } | 173 | } |
107 | 174 | ||
108 | |||
109 | /* for usb peripheral controller drivers */ | 175 | /* for usb peripheral controller drivers */ |
110 | 176 | ||
111 | /* Context: can sleep */ | 177 | /* Context: can sleep */ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index ce911ebf91e8..acf6e457c04b 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -39,8 +39,6 @@ enum port_dev_state { | |||
39 | * @serial: pointer back to the struct usb_serial owner of this port. | 39 | * @serial: pointer back to the struct usb_serial owner of this port. |
40 | * @port: pointer to the corresponding tty_port for this port. | 40 | * @port: pointer to the corresponding tty_port for this port. |
41 | * @lock: spinlock to grab when updating portions of this structure. | 41 | * @lock: spinlock to grab when updating portions of this structure. |
42 | * @mutex: mutex used to synchronize serial_open() and serial_close() | ||
43 | * access for this port. | ||
44 | * @number: the number of the port (the minor number). | 42 | * @number: the number of the port (the minor number). |
45 | * @interrupt_in_buffer: pointer to the interrupt in buffer for this port. | 43 | * @interrupt_in_buffer: pointer to the interrupt in buffer for this port. |
46 | * @interrupt_in_urb: pointer to the interrupt in struct urb for this port. | 44 | * @interrupt_in_urb: pointer to the interrupt in struct urb for this port. |
@@ -77,7 +75,6 @@ struct usb_serial_port { | |||
77 | struct usb_serial *serial; | 75 | struct usb_serial *serial; |
78 | struct tty_port port; | 76 | struct tty_port port; |
79 | spinlock_t lock; | 77 | spinlock_t lock; |
80 | struct mutex mutex; | ||
81 | unsigned char number; | 78 | unsigned char number; |
82 | 79 | ||
83 | unsigned char *interrupt_in_buffer; | 80 | unsigned char *interrupt_in_buffer; |
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h new file mode 100644 index 000000000000..20675c6ebc4d --- /dev/null +++ b/include/linux/usb/ulpi.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __LINUX_USB_ULPI_H | ||
2 | #define __LINUX_USB_ULPI_H | ||
3 | |||
4 | struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops, | ||
5 | unsigned int flags); | ||
6 | |||
7 | #endif /* __LINUX_USB_ULPI_H */ | ||
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h index 429c631d2aad..63ebdcc5dda6 100644 --- a/include/linux/usb/wusb.h +++ b/include/linux/usb/wusb.h | |||
@@ -74,7 +74,7 @@ enum { | |||
74 | * WUSB defines that CHIDs, CDIDs and CKs are a 16 byte string of | 74 | * WUSB defines that CHIDs, CDIDs and CKs are a 16 byte string of |
75 | * data. In order to avoid confusion and enforce types, we wrap it. | 75 | * data. In order to avoid confusion and enforce types, we wrap it. |
76 | * | 76 | * |
77 | * Make it packed, as we use it in some hw defintions. | 77 | * Make it packed, as we use it in some hw definitions. |
78 | */ | 78 | */ |
79 | struct wusb_ckhdid { | 79 | struct wusb_ckhdid { |
80 | u8 data[16]; | 80 | u8 data[16]; |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 3d15fb9bc116..a4b947e470a5 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -56,7 +56,9 @@ | |||
56 | US_FLAG(SANE_SENSE, 0x00008000) \ | 56 | US_FLAG(SANE_SENSE, 0x00008000) \ |
57 | /* Sane Sense (> 18 bytes) */ \ | 57 | /* Sane Sense (> 18 bytes) */ \ |
58 | US_FLAG(CAPACITY_OK, 0x00010000) \ | 58 | US_FLAG(CAPACITY_OK, 0x00010000) \ |
59 | /* READ CAPACITY response is correct */ | 59 | /* READ CAPACITY response is correct */ \ |
60 | US_FLAG(BAD_SENSE, 0x00020000) \ | ||
61 | /* Bad Sense (never more than 18 bytes) */ | ||
60 | 62 | ||
61 | #define US_FLAG(name, value) US_FL_##name = value , | 63 | #define US_FLAG(name, value) US_FL_##name = value , |
62 | enum { US_DO_ALL_FLAGS }; | 64 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index b2a7d8ba6ee3..15591d2ea400 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -128,6 +128,29 @@ struct usbdevfs_hub_portinfo { | |||
128 | #ifdef __KERNEL__ | 128 | #ifdef __KERNEL__ |
129 | #ifdef CONFIG_COMPAT | 129 | #ifdef CONFIG_COMPAT |
130 | #include <linux/compat.h> | 130 | #include <linux/compat.h> |
131 | |||
132 | struct usbdevfs_ctrltransfer32 { | ||
133 | u8 bRequestType; | ||
134 | u8 bRequest; | ||
135 | u16 wValue; | ||
136 | u16 wIndex; | ||
137 | u16 wLength; | ||
138 | u32 timeout; /* in milliseconds */ | ||
139 | compat_caddr_t data; | ||
140 | }; | ||
141 | |||
142 | struct usbdevfs_bulktransfer32 { | ||
143 | compat_uint_t ep; | ||
144 | compat_uint_t len; | ||
145 | compat_uint_t timeout; /* in milliseconds */ | ||
146 | compat_caddr_t data; | ||
147 | }; | ||
148 | |||
149 | struct usbdevfs_disconnectsignal32 { | ||
150 | compat_int_t signr; | ||
151 | compat_caddr_t context; | ||
152 | }; | ||
153 | |||
131 | struct usbdevfs_urb32 { | 154 | struct usbdevfs_urb32 { |
132 | unsigned char type; | 155 | unsigned char type; |
133 | unsigned char endpoint; | 156 | unsigned char endpoint; |
@@ -153,7 +176,9 @@ struct usbdevfs_ioctl32 { | |||
153 | #endif /* __KERNEL__ */ | 176 | #endif /* __KERNEL__ */ |
154 | 177 | ||
155 | #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) | 178 | #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) |
179 | #define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32) | ||
156 | #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) | 180 | #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) |
181 | #define USBDEVFS_BULK32 _IOWR('U', 2, struct usbdevfs_bulktransfer32) | ||
157 | #define USBDEVFS_RESETEP _IOR('U', 3, unsigned int) | 182 | #define USBDEVFS_RESETEP _IOR('U', 3, unsigned int) |
158 | #define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface) | 183 | #define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface) |
159 | #define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int) | 184 | #define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int) |
@@ -166,6 +191,7 @@ struct usbdevfs_ioctl32 { | |||
166 | #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) | 191 | #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) |
167 | #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32) | 192 | #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32) |
168 | #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) | 193 | #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) |
194 | #define USBDEVFS_DISCSIGNAL32 _IOR('U', 14, struct usbdevfs_disconnectsignal32) | ||
169 | #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) | 195 | #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) |
170 | #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) | 196 | #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) |
171 | #define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo) | 197 | #define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo) |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b59e78c57161..32b92298fd79 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -361,6 +361,7 @@ struct v4l2_pix_format { | |||
361 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 361 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
362 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | 362 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ |
363 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 363 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
364 | #define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ | ||
364 | 365 | ||
365 | /* | 366 | /* |
366 | * F O R M A T E N U M E R A T I O N | 367 | * F O R M A T E N U M E R A T I O N |
@@ -490,7 +491,7 @@ struct v4l2_jpegcompression { | |||
490 | * you do, leave them untouched. | 491 | * you do, leave them untouched. |
491 | * Inluding less markers will make the | 492 | * Inluding less markers will make the |
492 | * resulting code smaller, but there will | 493 | * resulting code smaller, but there will |
493 | * be fewer aplications which can read it. | 494 | * be fewer applications which can read it. |
494 | * The presence of the APP and COM marker | 495 | * The presence of the APP and COM marker |
495 | * is influenced by APP_len and COM_len | 496 | * is influenced by APP_len and COM_len |
496 | * ONLY, not by this property! */ | 497 | * ONLY, not by this property! */ |
@@ -563,6 +564,7 @@ struct v4l2_framebuffer { | |||
563 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 | 564 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 |
564 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 | 565 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 |
565 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 | 566 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 |
567 | #define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080 | ||
566 | /* Flags for the 'flags' field. */ | 568 | /* Flags for the 'flags' field. */ |
567 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 | 569 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 |
568 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 | 570 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 |
@@ -570,6 +572,7 @@ struct v4l2_framebuffer { | |||
570 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 | 572 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 |
571 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 573 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
572 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | 574 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 |
575 | #define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040 | ||
573 | 576 | ||
574 | struct v4l2_clip { | 577 | struct v4l2_clip { |
575 | struct v4l2_rect c; | 578 | struct v4l2_rect c; |
@@ -912,8 +915,10 @@ enum v4l2_colorfx { | |||
912 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 915 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
913 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 916 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
914 | 917 | ||
918 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | ||
919 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | ||
915 | /* last CID + 1 */ | 920 | /* last CID + 1 */ |
916 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) | 921 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) |
917 | 922 | ||
918 | /* MPEG-class control IDs defined by V4L2 */ | 923 | /* MPEG-class control IDs defined by V4L2 */ |
919 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 924 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index cf24c20de9e4..9466e860d8c2 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -25,6 +25,7 @@ typedef void (*work_func_t)(struct work_struct *work); | |||
25 | struct work_struct { | 25 | struct work_struct { |
26 | atomic_long_t data; | 26 | atomic_long_t data; |
27 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ | 27 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ |
28 | #define WORK_STRUCT_STATIC 1 /* static initializer (debugobjects) */ | ||
28 | #define WORK_STRUCT_FLAG_MASK (3UL) | 29 | #define WORK_STRUCT_FLAG_MASK (3UL) |
29 | #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) | 30 | #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) |
30 | struct list_head entry; | 31 | struct list_head entry; |
@@ -35,6 +36,7 @@ struct work_struct { | |||
35 | }; | 36 | }; |
36 | 37 | ||
37 | #define WORK_DATA_INIT() ATOMIC_LONG_INIT(0) | 38 | #define WORK_DATA_INIT() ATOMIC_LONG_INIT(0) |
39 | #define WORK_DATA_STATIC_INIT() ATOMIC_LONG_INIT(2) | ||
38 | 40 | ||
39 | struct delayed_work { | 41 | struct delayed_work { |
40 | struct work_struct work; | 42 | struct work_struct work; |
@@ -63,7 +65,7 @@ struct execute_work { | |||
63 | #endif | 65 | #endif |
64 | 66 | ||
65 | #define __WORK_INITIALIZER(n, f) { \ | 67 | #define __WORK_INITIALIZER(n, f) { \ |
66 | .data = WORK_DATA_INIT(), \ | 68 | .data = WORK_DATA_STATIC_INIT(), \ |
67 | .entry = { &(n).entry, &(n).entry }, \ | 69 | .entry = { &(n).entry, &(n).entry }, \ |
68 | .func = (f), \ | 70 | .func = (f), \ |
69 | __WORK_INIT_LOCKDEP_MAP(#n, &(n)) \ | 71 | __WORK_INIT_LOCKDEP_MAP(#n, &(n)) \ |
@@ -91,6 +93,14 @@ struct execute_work { | |||
91 | #define PREPARE_DELAYED_WORK(_work, _func) \ | 93 | #define PREPARE_DELAYED_WORK(_work, _func) \ |
92 | PREPARE_WORK(&(_work)->work, (_func)) | 94 | PREPARE_WORK(&(_work)->work, (_func)) |
93 | 95 | ||
96 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | ||
97 | extern void __init_work(struct work_struct *work, int onstack); | ||
98 | extern void destroy_work_on_stack(struct work_struct *work); | ||
99 | #else | ||
100 | static inline void __init_work(struct work_struct *work, int onstack) { } | ||
101 | static inline void destroy_work_on_stack(struct work_struct *work) { } | ||
102 | #endif | ||
103 | |||
94 | /* | 104 | /* |
95 | * initialize all of a work item in one go | 105 | * initialize all of a work item in one go |
96 | * | 106 | * |
@@ -99,24 +109,36 @@ struct execute_work { | |||
99 | * to generate better code. | 109 | * to generate better code. |
100 | */ | 110 | */ |
101 | #ifdef CONFIG_LOCKDEP | 111 | #ifdef CONFIG_LOCKDEP |
102 | #define INIT_WORK(_work, _func) \ | 112 | #define __INIT_WORK(_work, _func, _onstack) \ |
103 | do { \ | 113 | do { \ |
104 | static struct lock_class_key __key; \ | 114 | static struct lock_class_key __key; \ |
105 | \ | 115 | \ |
116 | __init_work((_work), _onstack); \ | ||
106 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ | 117 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
107 | lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0);\ | 118 | lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0);\ |
108 | INIT_LIST_HEAD(&(_work)->entry); \ | 119 | INIT_LIST_HEAD(&(_work)->entry); \ |
109 | PREPARE_WORK((_work), (_func)); \ | 120 | PREPARE_WORK((_work), (_func)); \ |
110 | } while (0) | 121 | } while (0) |
111 | #else | 122 | #else |
112 | #define INIT_WORK(_work, _func) \ | 123 | #define __INIT_WORK(_work, _func, _onstack) \ |
113 | do { \ | 124 | do { \ |
125 | __init_work((_work), _onstack); \ | ||
114 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ | 126 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
115 | INIT_LIST_HEAD(&(_work)->entry); \ | 127 | INIT_LIST_HEAD(&(_work)->entry); \ |
116 | PREPARE_WORK((_work), (_func)); \ | 128 | PREPARE_WORK((_work), (_func)); \ |
117 | } while (0) | 129 | } while (0) |
118 | #endif | 130 | #endif |
119 | 131 | ||
132 | #define INIT_WORK(_work, _func) \ | ||
133 | do { \ | ||
134 | __INIT_WORK((_work), (_func), 0); \ | ||
135 | } while (0) | ||
136 | |||
137 | #define INIT_WORK_ON_STACK(_work, _func) \ | ||
138 | do { \ | ||
139 | __INIT_WORK((_work), (_func), 1); \ | ||
140 | } while (0) | ||
141 | |||
120 | #define INIT_DELAYED_WORK(_work, _func) \ | 142 | #define INIT_DELAYED_WORK(_work, _func) \ |
121 | do { \ | 143 | do { \ |
122 | INIT_WORK(&(_work)->work, (_func)); \ | 144 | INIT_WORK(&(_work)->work, (_func)); \ |
@@ -125,22 +147,16 @@ struct execute_work { | |||
125 | 147 | ||
126 | #define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ | 148 | #define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ |
127 | do { \ | 149 | do { \ |
128 | INIT_WORK(&(_work)->work, (_func)); \ | 150 | INIT_WORK_ON_STACK(&(_work)->work, (_func)); \ |
129 | init_timer_on_stack(&(_work)->timer); \ | 151 | init_timer_on_stack(&(_work)->timer); \ |
130 | } while (0) | 152 | } while (0) |
131 | 153 | ||
132 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ | 154 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ |
133 | do { \ | 155 | do { \ |
134 | INIT_WORK(&(_work)->work, (_func)); \ | 156 | INIT_WORK(&(_work)->work, (_func)); \ |
135 | init_timer_deferrable(&(_work)->timer); \ | 157 | init_timer_deferrable(&(_work)->timer); \ |
136 | } while (0) | 158 | } while (0) |
137 | 159 | ||
138 | #define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ | ||
139 | do { \ | ||
140 | INIT_WORK(&(_work)->work, (_func)); \ | ||
141 | init_timer_on_stack(&(_work)->timer); \ | ||
142 | } while (0) | ||
143 | |||
144 | /** | 160 | /** |
145 | * work_pending - Find out whether a work item is currently pending | 161 | * work_pending - Find out whether a work item is currently pending |
146 | * @work: The work item in question | 162 | * @work: The work item in question |