diff options
Diffstat (limited to 'include/linux')
45 files changed, 625 insertions, 169 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b123cc08773d..ef8483673aa3 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -342,11 +342,19 @@ struct acpi_table_ecdt { | |||
342 | 342 | ||
343 | /* PCI MMCONFIG */ | 343 | /* PCI MMCONFIG */ |
344 | 344 | ||
345 | /* Defined in PCI Firmware Specification 3.0 */ | ||
346 | struct acpi_table_mcfg_config { | ||
347 | u32 base_address; | ||
348 | u32 base_reserved; | ||
349 | u16 pci_segment_group_number; | ||
350 | u8 start_bus_number; | ||
351 | u8 end_bus_number; | ||
352 | u8 reserved[4]; | ||
353 | } __attribute__ ((packed)); | ||
345 | struct acpi_table_mcfg { | 354 | struct acpi_table_mcfg { |
346 | struct acpi_table_header header; | 355 | struct acpi_table_header header; |
347 | u8 reserved[8]; | 356 | u8 reserved[8]; |
348 | u32 base_address; | 357 | struct acpi_table_mcfg_config config[0]; |
349 | u32 base_reserved; | ||
350 | } __attribute__ ((packed)); | 358 | } __attribute__ ((packed)); |
351 | 359 | ||
352 | /* Table Handlers */ | 360 | /* Table Handlers */ |
@@ -391,6 +399,7 @@ int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler); | |||
391 | int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header); | 399 | int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header); |
392 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 400 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); |
393 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 401 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); |
402 | int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size); | ||
394 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | 403 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); |
395 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); | 404 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); |
396 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | 405 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); |
@@ -407,9 +416,13 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu); | |||
407 | int acpi_unmap_lsapic(int cpu); | 416 | int acpi_unmap_lsapic(int cpu); |
408 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 417 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
409 | 418 | ||
419 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | ||
420 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | ||
421 | |||
410 | extern int acpi_mp_config; | 422 | extern int acpi_mp_config; |
411 | 423 | ||
412 | extern u32 pci_mmcfg_base_addr; | 424 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; |
425 | extern int pci_mmcfg_config_num; | ||
413 | 426 | ||
414 | extern int sbf_port ; | 427 | extern int sbf_port ; |
415 | 428 | ||
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 09a1451c1159..911c09cb9bf9 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_ATALK_H__ | 1 | #ifndef __LINUX_ATALK_H__ |
2 | #define __LINUX_ATALK_H__ | 2 | #define __LINUX_ATALK_H__ |
3 | 3 | ||
4 | #include <asm/byteorder.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * AppleTalk networking structures | 7 | * AppleTalk networking structures |
6 | * | 8 | * |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 038022763f09..36ef29fa0d8b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/highmem.h> | 23 | #include <linux/highmem.h> |
24 | #include <linux/mempool.h> | 24 | #include <linux/mempool.h> |
25 | #include <linux/ioprio.h> | ||
25 | 26 | ||
26 | /* Platforms may set this to teach the BIO layer about IOMMU hardware. */ | 27 | /* Platforms may set this to teach the BIO layer about IOMMU hardware. */ |
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
@@ -150,6 +151,19 @@ struct bio { | |||
150 | #define BIO_RW_SYNC 4 | 151 | #define BIO_RW_SYNC 4 |
151 | 152 | ||
152 | /* | 153 | /* |
154 | * upper 16 bits of bi_rw define the io priority of this bio | ||
155 | */ | ||
156 | #define BIO_PRIO_SHIFT (8 * sizeof(unsigned long) - IOPRIO_BITS) | ||
157 | #define bio_prio(bio) ((bio)->bi_rw >> BIO_PRIO_SHIFT) | ||
158 | #define bio_prio_valid(bio) ioprio_valid(bio_prio(bio)) | ||
159 | |||
160 | #define bio_set_prio(bio, prio) do { \ | ||
161 | WARN_ON(prio >= (1 << IOPRIO_BITS)); \ | ||
162 | (bio)->bi_rw &= ((1UL << BIO_PRIO_SHIFT) - 1); \ | ||
163 | (bio)->bi_rw |= ((unsigned long) (prio) << BIO_PRIO_SHIFT); \ | ||
164 | } while (0) | ||
165 | |||
166 | /* | ||
153 | * various member access, note that bio_data should of course not be used | 167 | * various member access, note that bio_data should of course not be used |
154 | * on highmem page vectors | 168 | * on highmem page vectors |
155 | */ | 169 | */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b54a0348a890..0881b5cdee3d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -54,16 +54,23 @@ struct as_io_context { | |||
54 | 54 | ||
55 | struct cfq_queue; | 55 | struct cfq_queue; |
56 | struct cfq_io_context { | 56 | struct cfq_io_context { |
57 | void (*dtor)(struct cfq_io_context *); | ||
58 | void (*exit)(struct cfq_io_context *); | ||
59 | |||
60 | struct io_context *ioc; | ||
61 | |||
62 | /* | 57 | /* |
63 | * circular list of cfq_io_contexts belonging to a process io context | 58 | * circular list of cfq_io_contexts belonging to a process io context |
64 | */ | 59 | */ |
65 | struct list_head list; | 60 | struct list_head list; |
66 | struct cfq_queue *cfqq; | 61 | struct cfq_queue *cfqq; |
62 | void *key; | ||
63 | |||
64 | struct io_context *ioc; | ||
65 | |||
66 | unsigned long last_end_request; | ||
67 | unsigned long last_queue; | ||
68 | unsigned long ttime_total; | ||
69 | unsigned long ttime_samples; | ||
70 | unsigned long ttime_mean; | ||
71 | |||
72 | void (*dtor)(struct cfq_io_context *); | ||
73 | void (*exit)(struct cfq_io_context *); | ||
67 | }; | 74 | }; |
68 | 75 | ||
69 | /* | 76 | /* |
@@ -73,7 +80,9 @@ struct cfq_io_context { | |||
73 | */ | 80 | */ |
74 | struct io_context { | 81 | struct io_context { |
75 | atomic_t refcount; | 82 | atomic_t refcount; |
76 | pid_t pid; | 83 | struct task_struct *task; |
84 | |||
85 | int (*set_ioprio)(struct io_context *, unsigned int); | ||
77 | 86 | ||
78 | /* | 87 | /* |
79 | * For request batching | 88 | * For request batching |
@@ -81,14 +90,13 @@ struct io_context { | |||
81 | unsigned long last_waited; /* Time last woken after wait for request */ | 90 | unsigned long last_waited; /* Time last woken after wait for request */ |
82 | int nr_batch_requests; /* Number of requests left in the batch */ | 91 | int nr_batch_requests; /* Number of requests left in the batch */ |
83 | 92 | ||
84 | spinlock_t lock; | ||
85 | |||
86 | struct as_io_context *aic; | 93 | struct as_io_context *aic; |
87 | struct cfq_io_context *cic; | 94 | struct cfq_io_context *cic; |
88 | }; | 95 | }; |
89 | 96 | ||
90 | void put_io_context(struct io_context *ioc); | 97 | void put_io_context(struct io_context *ioc); |
91 | void exit_io_context(void); | 98 | void exit_io_context(void); |
99 | struct io_context *current_io_context(int gfp_flags); | ||
92 | struct io_context *get_io_context(int gfp_flags); | 100 | struct io_context *get_io_context(int gfp_flags); |
93 | void copy_io_context(struct io_context **pdst, struct io_context **psrc); | 101 | void copy_io_context(struct io_context **pdst, struct io_context **psrc); |
94 | void swap_io_context(struct io_context **ioc1, struct io_context **ioc2); | 102 | void swap_io_context(struct io_context **ioc1, struct io_context **ioc2); |
@@ -134,6 +142,8 @@ struct request { | |||
134 | 142 | ||
135 | void *elevator_private; | 143 | void *elevator_private; |
136 | 144 | ||
145 | unsigned short ioprio; | ||
146 | |||
137 | int rq_status; /* should split this into a few status bits */ | 147 | int rq_status; /* should split this into a few status bits */ |
138 | struct gendisk *rq_disk; | 148 | struct gendisk *rq_disk; |
139 | int errors; | 149 | int errors; |
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index d28d9a804d3b..d5f2a3205109 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -92,29 +92,32 @@ | |||
92 | #endif /* OPTIMIZE */ | 92 | #endif /* OPTIMIZE */ |
93 | 93 | ||
94 | 94 | ||
95 | static __inline__ __const__ __u32 __fswahw32(__u32 x) | 95 | static inline __u32 __fswahw32(__u32 x) |
96 | { | 96 | { |
97 | return __arch__swahw32(x); | 97 | return __arch__swahw32(x); |
98 | } | 98 | } |
99 | static __inline__ __u32 __swahw32p(__u32 *x) | 99 | |
100 | static inline __u32 __swahw32p(__u32 *x) | ||
100 | { | 101 | { |
101 | return __arch__swahw32p(x); | 102 | return __arch__swahw32p(x); |
102 | } | 103 | } |
103 | static __inline__ void __swahw32s(__u32 *addr) | 104 | |
105 | static inline void __swahw32s(__u32 *addr) | ||
104 | { | 106 | { |
105 | __arch__swahw32s(addr); | 107 | __arch__swahw32s(addr); |
106 | } | 108 | } |
107 | 109 | ||
108 | 110 | static inline __u32 __fswahb32(__u32 x) | |
109 | static __inline__ __const__ __u32 __fswahb32(__u32 x) | ||
110 | { | 111 | { |
111 | return __arch__swahb32(x); | 112 | return __arch__swahb32(x); |
112 | } | 113 | } |
113 | static __inline__ __u32 __swahb32p(__u32 *x) | 114 | |
115 | static inline __u32 __swahb32p(__u32 *x) | ||
114 | { | 116 | { |
115 | return __arch__swahb32p(x); | 117 | return __arch__swahb32p(x); |
116 | } | 118 | } |
117 | static __inline__ void __swahb32s(__u32 *addr) | 119 | |
120 | static inline void __swahb32s(__u32 *addr) | ||
118 | { | 121 | { |
119 | __arch__swahb32s(addr); | 122 | __arch__swahb32s(addr); |
120 | } | 123 | } |
diff --git a/include/linux/cciss_ioctl.h b/include/linux/cciss_ioctl.h index ee0c6e8995da..424d5e622b43 100644 --- a/include/linux/cciss_ioctl.h +++ b/include/linux/cciss_ioctl.h | |||
@@ -10,6 +10,7 @@ | |||
10 | typedef struct _cciss_pci_info_struct | 10 | typedef struct _cciss_pci_info_struct |
11 | { | 11 | { |
12 | unsigned char bus; | 12 | unsigned char bus; |
13 | unsigned short domain; | ||
13 | unsigned char dev_fn; | 14 | unsigned char dev_fn; |
14 | __u32 board_id; | 15 | __u32 board_id; |
15 | } cciss_pci_info_struct; | 16 | } cciss_pci_info_struct; |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 70a4ebb5d964..ecb0d39c0798 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -346,10 +346,27 @@ COMPATIBLE_IOCTL(PPPOEIOCDFWD) | |||
346 | /* LP */ | 346 | /* LP */ |
347 | COMPATIBLE_IOCTL(LPGETSTATUS) | 347 | COMPATIBLE_IOCTL(LPGETSTATUS) |
348 | /* ppdev */ | 348 | /* ppdev */ |
349 | COMPATIBLE_IOCTL(PPSETMODE) | ||
350 | COMPATIBLE_IOCTL(PPRSTATUS) | ||
351 | COMPATIBLE_IOCTL(PPRCONTROL) | ||
352 | COMPATIBLE_IOCTL(PPWCONTROL) | ||
353 | COMPATIBLE_IOCTL(PPFCONTROL) | ||
354 | COMPATIBLE_IOCTL(PPRDATA) | ||
355 | COMPATIBLE_IOCTL(PPWDATA) | ||
349 | COMPATIBLE_IOCTL(PPCLAIM) | 356 | COMPATIBLE_IOCTL(PPCLAIM) |
350 | COMPATIBLE_IOCTL(PPRELEASE) | 357 | COMPATIBLE_IOCTL(PPRELEASE) |
351 | COMPATIBLE_IOCTL(PPEXCL) | ||
352 | COMPATIBLE_IOCTL(PPYIELD) | 358 | COMPATIBLE_IOCTL(PPYIELD) |
359 | COMPATIBLE_IOCTL(PPEXCL) | ||
360 | COMPATIBLE_IOCTL(PPDATADIR) | ||
361 | COMPATIBLE_IOCTL(PPNEGOT) | ||
362 | COMPATIBLE_IOCTL(PPWCTLONIRQ) | ||
363 | COMPATIBLE_IOCTL(PPCLRIRQ) | ||
364 | COMPATIBLE_IOCTL(PPSETPHASE) | ||
365 | COMPATIBLE_IOCTL(PPGETMODES) | ||
366 | COMPATIBLE_IOCTL(PPGETMODE) | ||
367 | COMPATIBLE_IOCTL(PPGETPHASE) | ||
368 | COMPATIBLE_IOCTL(PPGETFLAGS) | ||
369 | COMPATIBLE_IOCTL(PPSETFLAGS) | ||
353 | /* CDROM stuff */ | 370 | /* CDROM stuff */ |
354 | COMPATIBLE_IOCTL(CDROMPAUSE) | 371 | COMPATIBLE_IOCTL(CDROMPAUSE) |
355 | COMPATIBLE_IOCTL(CDROMRESUME) | 372 | COMPATIBLE_IOCTL(CDROMRESUME) |
diff --git a/include/linux/device.h b/include/linux/device.h index 7b781a72b293..f378c846e6d5 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -69,7 +69,7 @@ struct bus_type { | |||
69 | extern int bus_register(struct bus_type * bus); | 69 | extern int bus_register(struct bus_type * bus); |
70 | extern void bus_unregister(struct bus_type * bus); | 70 | extern void bus_unregister(struct bus_type * bus); |
71 | 71 | ||
72 | extern int bus_rescan_devices(struct bus_type * bus); | 72 | extern void bus_rescan_devices(struct bus_type * bus); |
73 | 73 | ||
74 | extern struct bus_type * get_bus(struct bus_type * bus); | 74 | extern struct bus_type * get_bus(struct bus_type * bus); |
75 | extern void put_bus(struct bus_type * bus); | 75 | extern void put_bus(struct bus_type * bus); |
@@ -80,6 +80,8 @@ extern struct bus_type * find_bus(char * name); | |||
80 | 80 | ||
81 | int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, | 81 | int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, |
82 | int (*fn)(struct device *, void *)); | 82 | int (*fn)(struct device *, void *)); |
83 | struct device * bus_find_device(struct bus_type *bus, struct device *start, | ||
84 | void *data, int (*match)(struct device *, void *)); | ||
83 | 85 | ||
84 | int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, | 86 | int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, |
85 | void * data, int (*fn)(struct device_driver *, void *)); | 87 | void * data, int (*fn)(struct device_driver *, void *)); |
@@ -142,6 +144,9 @@ extern void driver_remove_file(struct device_driver *, struct driver_attribute * | |||
142 | 144 | ||
143 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, | 145 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, |
144 | void * data, int (*fn)(struct device *, void *)); | 146 | void * data, int (*fn)(struct device *, void *)); |
147 | struct device * driver_find_device(struct device_driver *drv, | ||
148 | struct device *start, void *data, | ||
149 | int (*match)(struct device *, void *)); | ||
145 | 150 | ||
146 | 151 | ||
147 | /* | 152 | /* |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index ee54f81faad5..ea6bbc2d7407 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -16,9 +16,9 @@ typedef void (elevator_remove_req_fn) (request_queue_t *, struct request *); | |||
16 | typedef void (elevator_requeue_req_fn) (request_queue_t *, struct request *); | 16 | typedef void (elevator_requeue_req_fn) (request_queue_t *, struct request *); |
17 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); | 17 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); |
18 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); | 18 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); |
19 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); | 19 | typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *); |
20 | 20 | ||
21 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, int); | 21 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, int); |
22 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); | 22 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); |
23 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 23 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); |
24 | 24 | ||
@@ -96,9 +96,9 @@ extern struct request *elv_former_request(request_queue_t *, struct request *); | |||
96 | extern struct request *elv_latter_request(request_queue_t *, struct request *); | 96 | extern struct request *elv_latter_request(request_queue_t *, struct request *); |
97 | extern int elv_register_queue(request_queue_t *q); | 97 | extern int elv_register_queue(request_queue_t *q); |
98 | extern void elv_unregister_queue(request_queue_t *q); | 98 | extern void elv_unregister_queue(request_queue_t *q); |
99 | extern int elv_may_queue(request_queue_t *, int); | 99 | extern int elv_may_queue(request_queue_t *, int, struct bio *); |
100 | extern void elv_completed_request(request_queue_t *, struct request *); | 100 | extern void elv_completed_request(request_queue_t *, struct request *); |
101 | extern int elv_set_request(request_queue_t *, struct request *, int); | 101 | extern int elv_set_request(request_queue_t *, struct request *, struct bio *, int); |
102 | extern void elv_put_request(request_queue_t *, struct request *); | 102 | extern void elv_put_request(request_queue_t *, struct request *); |
103 | 103 | ||
104 | /* | 104 | /* |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index a1478258d002..cf3847edc50f 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define _LINUX_ETHERDEVICE_H | 25 | #define _LINUX_ETHERDEVICE_H |
26 | 26 | ||
27 | #include <linux/if_ether.h> | 27 | #include <linux/if_ether.h> |
28 | #include <linux/netdevice.h> | ||
28 | #include <linux/random.h> | 29 | #include <linux/random.h> |
29 | 30 | ||
30 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
@@ -65,7 +66,7 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
65 | */ | 66 | */ |
66 | static inline int is_multicast_ether_addr(const u8 *addr) | 67 | static inline int is_multicast_ether_addr(const u8 *addr) |
67 | { | 68 | { |
68 | return addr[0] & 0x01; | 69 | return ((addr[0] != 0xff) && (0x01 & addr[0])); |
69 | } | 70 | } |
70 | 71 | ||
71 | /** | 72 | /** |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3ae8e37bdfc8..047bde30836a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -213,6 +213,7 @@ extern int dir_notify_enable; | |||
213 | #include <linux/radix-tree.h> | 213 | #include <linux/radix-tree.h> |
214 | #include <linux/prio_tree.h> | 214 | #include <linux/prio_tree.h> |
215 | #include <linux/init.h> | 215 | #include <linux/init.h> |
216 | #include <linux/sched.h> | ||
216 | 217 | ||
217 | #include <asm/atomic.h> | 218 | #include <asm/atomic.h> |
218 | #include <asm/semaphore.h> | 219 | #include <asm/semaphore.h> |
@@ -822,16 +823,34 @@ enum { | |||
822 | #define vfs_check_frozen(sb, level) \ | 823 | #define vfs_check_frozen(sb, level) \ |
823 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) | 824 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) |
824 | 825 | ||
826 | static inline void get_fs_excl(void) | ||
827 | { | ||
828 | atomic_inc(¤t->fs_excl); | ||
829 | } | ||
830 | |||
831 | static inline void put_fs_excl(void) | ||
832 | { | ||
833 | atomic_dec(¤t->fs_excl); | ||
834 | } | ||
835 | |||
836 | static inline int has_fs_excl(void) | ||
837 | { | ||
838 | return atomic_read(¤t->fs_excl); | ||
839 | } | ||
840 | |||
841 | |||
825 | /* | 842 | /* |
826 | * Superblock locking. | 843 | * Superblock locking. |
827 | */ | 844 | */ |
828 | static inline void lock_super(struct super_block * sb) | 845 | static inline void lock_super(struct super_block * sb) |
829 | { | 846 | { |
847 | get_fs_excl(); | ||
830 | down(&sb->s_lock); | 848 | down(&sb->s_lock); |
831 | } | 849 | } |
832 | 850 | ||
833 | static inline void unlock_super(struct super_block * sb) | 851 | static inline void unlock_super(struct super_block * sb) |
834 | { | 852 | { |
853 | put_fs_excl(); | ||
835 | up(&sb->s_lock); | 854 | up(&sb->s_lock); |
836 | } | 855 | } |
837 | 856 | ||
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index d228230ffe5d..541695679762 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define _LINUX_I2C_DEV_H | 25 | #define _LINUX_I2C_DEV_H |
26 | 26 | ||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/compiler.h> | ||
28 | 29 | ||
29 | /* Some IOCTL commands are defined in <linux/i2c.h> */ | 30 | /* Some IOCTL commands are defined in <linux/i2c.h> */ |
30 | /* Note: 10-bit addresses are NOT supported! */ | 31 | /* Note: 10-bit addresses are NOT supported! */ |
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h index 57024ce2c74f..84598fa2e9de 100644 --- a/include/linux/if_bonding.h +++ b/include/linux/if_bonding.h | |||
@@ -35,6 +35,9 @@ | |||
35 | * | 35 | * |
36 | * 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com> | 36 | * 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com> |
37 | * - Code cleanup and style changes | 37 | * - Code cleanup and style changes |
38 | * | ||
39 | * 2005/05/05 - Jason Gabler <jygabler at lbl dot gov> | ||
40 | * - added definitions for various XOR hashing policies | ||
38 | */ | 41 | */ |
39 | 42 | ||
40 | #ifndef _LINUX_IF_BONDING_H | 43 | #ifndef _LINUX_IF_BONDING_H |
@@ -80,6 +83,10 @@ | |||
80 | 83 | ||
81 | #define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */ | 84 | #define BOND_DEFAULT_MAX_BONDS 1 /* Default maximum number of devices to support */ |
82 | 85 | ||
86 | /* hashing types */ | ||
87 | #define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ | ||
88 | #define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ MAC) */ | ||
89 | |||
83 | typedef struct ifbond { | 90 | typedef struct ifbond { |
84 | __s32 bond_mode; | 91 | __s32 bond_mode; |
85 | __s32 num_slaves; | 92 | __s32 num_slaves; |
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h index 004e6f09a6e2..68c896a36a34 100644 --- a/include/linux/if_shaper.h +++ b/include/linux/if_shaper.h | |||
@@ -23,7 +23,7 @@ struct shaper | |||
23 | __u32 shapeclock; | 23 | __u32 shapeclock; |
24 | unsigned long recovery; /* Time we can next clock a packet out on | 24 | unsigned long recovery; /* Time we can next clock a packet out on |
25 | an empty queue */ | 25 | an empty queue */ |
26 | struct semaphore sem; | 26 | spinlock_t lock; |
27 | struct net_device_stats stats; | 27 | struct net_device_stats stats; |
28 | struct net_device *dev; | 28 | struct net_device *dev; |
29 | int (*hard_start_xmit) (struct sk_buff *skb, | 29 | int (*hard_start_xmit) (struct sk_buff *skb, |
diff --git a/include/linux/in6.h b/include/linux/in6.h index f8256c582845..dcf5720ffcbb 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -156,7 +156,7 @@ struct in6_flowlabel_req | |||
156 | #define IPV6_CHECKSUM 7 | 156 | #define IPV6_CHECKSUM 7 |
157 | #define IPV6_HOPLIMIT 8 | 157 | #define IPV6_HOPLIMIT 8 |
158 | #define IPV6_NEXTHOP 9 | 158 | #define IPV6_NEXTHOP 9 |
159 | #define IPV6_AUTHHDR 10 | 159 | #define IPV6_AUTHHDR 10 /* obsolete */ |
160 | #define IPV6_FLOWINFO 11 | 160 | #define IPV6_FLOWINFO 11 |
161 | 161 | ||
162 | #define IPV6_UNICAST_HOPS 16 | 162 | #define IPV6_UNICAST_HOPS 16 |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 03206a425d7a..c727c195a91a 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -81,6 +81,7 @@ extern struct group_info init_groups; | |||
81 | .mm = NULL, \ | 81 | .mm = NULL, \ |
82 | .active_mm = &init_mm, \ | 82 | .active_mm = &init_mm, \ |
83 | .run_list = LIST_HEAD_INIT(tsk.run_list), \ | 83 | .run_list = LIST_HEAD_INIT(tsk.run_list), \ |
84 | .ioprio = 0, \ | ||
84 | .time_slice = HZ, \ | 85 | .time_slice = HZ, \ |
85 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 86 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
86 | .ptrace_children= LIST_HEAD_INIT(tsk.ptrace_children), \ | 87 | .ptrace_children= LIST_HEAD_INIT(tsk.ptrace_children), \ |
@@ -110,6 +111,7 @@ extern struct group_info init_groups; | |||
110 | .proc_lock = SPIN_LOCK_UNLOCKED, \ | 111 | .proc_lock = SPIN_LOCK_UNLOCKED, \ |
111 | .journal_info = NULL, \ | 112 | .journal_info = NULL, \ |
112 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ | 113 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ |
114 | .fs_excl = ATOMIC_INIT(0), \ | ||
113 | } | 115 | } |
114 | 116 | ||
115 | 117 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 9d9598ed760d..b9cc0ac71f44 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -859,6 +859,10 @@ struct input_dev { | |||
859 | int (*erase_effect)(struct input_dev *dev, int effect_id); | 859 | int (*erase_effect)(struct input_dev *dev, int effect_id); |
860 | 860 | ||
861 | struct input_handle *grab; | 861 | struct input_handle *grab; |
862 | |||
863 | struct semaphore sem; /* serializes open and close operations */ | ||
864 | unsigned int users; | ||
865 | |||
862 | struct device *dev; | 866 | struct device *dev; |
863 | 867 | ||
864 | struct list_head h_list; | 868 | struct list_head h_list; |
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h new file mode 100644 index 000000000000..8a453a0b5e4b --- /dev/null +++ b/include/linux/ioprio.h | |||
@@ -0,0 +1,88 @@ | |||
1 | #ifndef IOPRIO_H | ||
2 | #define IOPRIO_H | ||
3 | |||
4 | #include <linux/sched.h> | ||
5 | |||
6 | /* | ||
7 | * Gives us 8 prio classes with 13-bits of data for each class | ||
8 | */ | ||
9 | #define IOPRIO_BITS (16) | ||
10 | #define IOPRIO_CLASS_SHIFT (13) | ||
11 | #define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) | ||
12 | |||
13 | #define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT) | ||
14 | #define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK) | ||
15 | #define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data) | ||
16 | |||
17 | #define ioprio_valid(mask) (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE) | ||
18 | |||
19 | /* | ||
20 | * These are the io priority groups as implemented by CFQ. RT is the realtime | ||
21 | * class, it always gets premium service. BE is the best-effort scheduling | ||
22 | * class, the default for any process. IDLE is the idle scheduling class, it | ||
23 | * is only served when no one else is using the disk. | ||
24 | */ | ||
25 | enum { | ||
26 | IOPRIO_CLASS_NONE, | ||
27 | IOPRIO_CLASS_RT, | ||
28 | IOPRIO_CLASS_BE, | ||
29 | IOPRIO_CLASS_IDLE, | ||
30 | }; | ||
31 | |||
32 | /* | ||
33 | * 8 best effort priority levels are supported | ||
34 | */ | ||
35 | #define IOPRIO_BE_NR (8) | ||
36 | |||
37 | asmlinkage int sys_ioprio_set(int, int, int); | ||
38 | asmlinkage int sys_ioprio_get(int, int); | ||
39 | |||
40 | enum { | ||
41 | IOPRIO_WHO_PROCESS = 1, | ||
42 | IOPRIO_WHO_PGRP, | ||
43 | IOPRIO_WHO_USER, | ||
44 | }; | ||
45 | |||
46 | /* | ||
47 | * if process has set io priority explicitly, use that. if not, convert | ||
48 | * the cpu scheduler nice value to an io priority | ||
49 | */ | ||
50 | #define IOPRIO_NORM (4) | ||
51 | static inline int task_ioprio(struct task_struct *task) | ||
52 | { | ||
53 | WARN_ON(!ioprio_valid(task->ioprio)); | ||
54 | return IOPRIO_PRIO_DATA(task->ioprio); | ||
55 | } | ||
56 | |||
57 | static inline int task_nice_ioprio(struct task_struct *task) | ||
58 | { | ||
59 | return (task_nice(task) + 20) / 5; | ||
60 | } | ||
61 | |||
62 | /* | ||
63 | * For inheritance, return the highest of the two given priorities | ||
64 | */ | ||
65 | static inline int ioprio_best(unsigned short aprio, unsigned short bprio) | ||
66 | { | ||
67 | unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); | ||
68 | unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); | ||
69 | |||
70 | if (!ioprio_valid(aprio)) | ||
71 | return bprio; | ||
72 | if (!ioprio_valid(bprio)) | ||
73 | return aprio; | ||
74 | |||
75 | if (aclass == IOPRIO_CLASS_NONE) | ||
76 | aclass = IOPRIO_CLASS_BE; | ||
77 | if (bclass == IOPRIO_CLASS_NONE) | ||
78 | bclass = IOPRIO_CLASS_BE; | ||
79 | |||
80 | if (aclass == bclass) | ||
81 | return min(aprio, bprio); | ||
82 | if (aclass > bclass) | ||
83 | return bprio; | ||
84 | else | ||
85 | return aprio; | ||
86 | } | ||
87 | |||
88 | #endif | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 12277799c007..069d3b84d311 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -85,9 +85,10 @@ extern int no_irq_affinity; | |||
85 | extern int noirqdebug_setup(char *str); | 85 | extern int noirqdebug_setup(char *str); |
86 | 86 | ||
87 | extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | 87 | extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, |
88 | struct irqaction *action); | 88 | struct irqaction *action); |
89 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); | 89 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); |
90 | extern void note_interrupt(unsigned int irq, irq_desc_t *desc, int action_ret); | 90 | extern void note_interrupt(unsigned int irq, irq_desc_t *desc, |
91 | int action_ret, struct pt_regs *regs); | ||
91 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); | 92 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); |
92 | 93 | ||
93 | extern void init_irq_proc(void); | 94 | extern void init_irq_proc(void); |
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index b7e0ab622cd7..06b9af77eb7f 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h | |||
@@ -111,18 +111,35 @@ struct js_corr { | |||
111 | #define JS_SET_ALL 8 | 111 | #define JS_SET_ALL 8 |
112 | 112 | ||
113 | struct JS_DATA_TYPE { | 113 | struct JS_DATA_TYPE { |
114 | int buttons; | 114 | __s32 buttons; |
115 | int x; | 115 | __s32 x; |
116 | int y; | 116 | __s32 y; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct JS_DATA_SAVE_TYPE { | 119 | struct JS_DATA_SAVE_TYPE_32 { |
120 | int JS_TIMEOUT; | 120 | __s32 JS_TIMEOUT; |
121 | int BUSY; | 121 | __s32 BUSY; |
122 | long JS_EXPIRETIME; | 122 | __s32 JS_EXPIRETIME; |
123 | long JS_TIMELIMIT; | 123 | __s32 JS_TIMELIMIT; |
124 | struct JS_DATA_TYPE JS_SAVE; | 124 | struct JS_DATA_TYPE JS_SAVE; |
125 | struct JS_DATA_TYPE JS_CORR; | 125 | struct JS_DATA_TYPE JS_CORR; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct JS_DATA_SAVE_TYPE_64 { | ||
129 | __s32 JS_TIMEOUT; | ||
130 | __s32 BUSY; | ||
131 | __s64 JS_EXPIRETIME; | ||
132 | __s64 JS_TIMELIMIT; | ||
133 | struct JS_DATA_TYPE JS_SAVE; | ||
134 | struct JS_DATA_TYPE JS_CORR; | ||
135 | }; | ||
136 | |||
137 | #if BITS_PER_LONG == 64 | ||
138 | #define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64 | ||
139 | #elif BITS_PER_LONG == 32 | ||
140 | #define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_32 | ||
141 | #else | ||
142 | #error Unexpected BITS_PER_LONG | ||
143 | #endif | ||
144 | |||
128 | #endif /* _LINUX_JOYSTICK_H */ | 145 | #endif /* _LINUX_JOYSTICK_H */ |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 5e1a7b0d7b3f..e050fc2d4c26 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -104,33 +104,12 @@ struct jprobe { | |||
104 | }; | 104 | }; |
105 | 105 | ||
106 | #ifdef ARCH_SUPPORTS_KRETPROBES | 106 | #ifdef ARCH_SUPPORTS_KRETPROBES |
107 | extern int trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs); | ||
108 | extern void trampoline_post_handler(struct kprobe *p, struct pt_regs *regs, | ||
109 | unsigned long flags); | ||
110 | extern struct task_struct *arch_get_kprobe_task(void *ptr); | ||
111 | extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); | 107 | extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); |
112 | extern void arch_kprobe_flush_task(struct task_struct *tk); | ||
113 | #else /* ARCH_SUPPORTS_KRETPROBES */ | 108 | #else /* ARCH_SUPPORTS_KRETPROBES */ |
114 | static inline void kretprobe_trampoline(void) | ||
115 | { | ||
116 | } | ||
117 | static inline int trampoline_probe_handler(struct kprobe *p, | ||
118 | struct pt_regs *regs) | ||
119 | { | ||
120 | return 0; | ||
121 | } | ||
122 | static inline void trampoline_post_handler(struct kprobe *p, | ||
123 | struct pt_regs *regs, unsigned long flags) | ||
124 | { | ||
125 | } | ||
126 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, | 109 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, |
127 | struct pt_regs *regs) | 110 | struct pt_regs *regs) |
128 | { | 111 | { |
129 | } | 112 | } |
130 | static inline void arch_kprobe_flush_task(struct task_struct *tk) | ||
131 | { | ||
132 | } | ||
133 | #define arch_get_kprobe_task(ptr) ((struct task_struct *)NULL) | ||
134 | #endif /* ARCH_SUPPORTS_KRETPROBES */ | 113 | #endif /* ARCH_SUPPORTS_KRETPROBES */ |
135 | /* | 114 | /* |
136 | * Function-return probe - | 115 | * Function-return probe - |
@@ -155,8 +134,8 @@ struct kretprobe_instance { | |||
155 | struct hlist_node uflist; /* either on free list or used list */ | 134 | struct hlist_node uflist; /* either on free list or used list */ |
156 | struct hlist_node hlist; | 135 | struct hlist_node hlist; |
157 | struct kretprobe *rp; | 136 | struct kretprobe *rp; |
158 | void *ret_addr; | 137 | kprobe_opcode_t *ret_addr; |
159 | void *stack_addr; | 138 | struct task_struct *task; |
160 | }; | 139 | }; |
161 | 140 | ||
162 | #ifdef CONFIG_KPROBES | 141 | #ifdef CONFIG_KPROBES |
@@ -176,7 +155,10 @@ extern void arch_copy_kprobe(struct kprobe *p); | |||
176 | extern void arch_arm_kprobe(struct kprobe *p); | 155 | extern void arch_arm_kprobe(struct kprobe *p); |
177 | extern void arch_disarm_kprobe(struct kprobe *p); | 156 | extern void arch_disarm_kprobe(struct kprobe *p); |
178 | extern void arch_remove_kprobe(struct kprobe *p); | 157 | extern void arch_remove_kprobe(struct kprobe *p); |
158 | extern int arch_init_kprobes(void); | ||
179 | extern void show_registers(struct pt_regs *regs); | 159 | extern void show_registers(struct pt_regs *regs); |
160 | extern kprobe_opcode_t *get_insn_slot(void); | ||
161 | extern void free_insn_slot(kprobe_opcode_t *slot); | ||
180 | 162 | ||
181 | /* Get the kprobe at this addr (if any). Must have called lock_kprobes */ | 163 | /* Get the kprobe at this addr (if any). Must have called lock_kprobes */ |
182 | struct kprobe *get_kprobe(void *addr); | 164 | struct kprobe *get_kprobe(void *addr); |
@@ -194,8 +176,6 @@ int register_kretprobe(struct kretprobe *rp); | |||
194 | void unregister_kretprobe(struct kretprobe *rp); | 176 | void unregister_kretprobe(struct kretprobe *rp); |
195 | 177 | ||
196 | struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); | 178 | struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); |
197 | struct kretprobe_instance *get_rp_inst(void *sara); | ||
198 | struct kretprobe_instance *get_rp_inst_tsk(struct task_struct *tk); | ||
199 | void add_rp_inst(struct kretprobe_instance *ri); | 179 | void add_rp_inst(struct kretprobe_instance *ri); |
200 | void kprobe_flush_task(struct task_struct *tk); | 180 | void kprobe_flush_task(struct task_struct *tk); |
201 | void recycle_rp_inst(struct kretprobe_instance *ri); | 181 | void recycle_rp_inst(struct kretprobe_instance *ri); |
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index 923bdbc6d9e4..a710bddda4eb 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h | |||
@@ -41,6 +41,7 @@ struct ps2dev { | |||
41 | 41 | ||
42 | void ps2_init(struct ps2dev *ps2dev, struct serio *serio); | 42 | void ps2_init(struct ps2dev *ps2dev, struct serio *serio); |
43 | int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); | 43 | int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); |
44 | void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); | ||
44 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); | 45 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); |
45 | int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command); | 46 | int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command); |
46 | int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); | 47 | int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index d6eb7b2efc04..9b6d05172ed4 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -175,4 +175,50 @@ struct serio_device_id { | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | 177 | ||
178 | /* PCMCIA */ | ||
179 | |||
180 | struct pcmcia_device_id { | ||
181 | __u16 match_flags; | ||
182 | |||
183 | __u16 manf_id; | ||
184 | __u16 card_id; | ||
185 | |||
186 | __u8 func_id; | ||
187 | |||
188 | /* for real multi-function devices */ | ||
189 | __u8 function; | ||
190 | |||
191 | /* for pseude multi-function devices */ | ||
192 | __u8 device_no; | ||
193 | |||
194 | __u32 prod_id_hash[4]; | ||
195 | |||
196 | /* not matched against in kernelspace*/ | ||
197 | #ifdef __KERNEL__ | ||
198 | const char * prod_id[4]; | ||
199 | #else | ||
200 | kernel_ulong_t prod_id[4]; | ||
201 | #endif | ||
202 | |||
203 | /* not matched against */ | ||
204 | kernel_ulong_t driver_info; | ||
205 | #ifdef __KERNEL__ | ||
206 | char * cisfile; | ||
207 | #else | ||
208 | kernel_ulong_t cisfile; | ||
209 | #endif | ||
210 | }; | ||
211 | |||
212 | #define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001 | ||
213 | #define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002 | ||
214 | #define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004 | ||
215 | #define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008 | ||
216 | #define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010 | ||
217 | #define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020 | ||
218 | #define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040 | ||
219 | #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 | ||
220 | #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 | ||
221 | #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 | ||
222 | #define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400 | ||
223 | |||
178 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 224 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 3029cad63a01..27e4d164a108 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -168,6 +168,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) | |||
168 | nlh->nlmsg_flags = flags; | 168 | nlh->nlmsg_flags = flags; |
169 | nlh->nlmsg_pid = pid; | 169 | nlh->nlmsg_pid = pid; |
170 | nlh->nlmsg_seq = seq; | 170 | nlh->nlmsg_seq = seq; |
171 | memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); | ||
171 | return nlh; | 172 | return nlh; |
172 | } | 173 | } |
173 | 174 | ||
diff --git a/include/linux/pci-dynids.h b/include/linux/pci-dynids.h deleted file mode 100644 index 183b6b0de81c..000000000000 --- a/include/linux/pci-dynids.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * PCI defines and function prototypes | ||
3 | * Copyright 2003 Dell Inc. | ||
4 | * by Matt Domsch <Matt_Domsch@dell.com> | ||
5 | */ | ||
6 | |||
7 | #ifndef LINUX_PCI_DYNIDS_H | ||
8 | #define LINUX_PCI_DYNIDS_H | ||
9 | |||
10 | #include <linux/list.h> | ||
11 | #include <linux/mod_devicetable.h> | ||
12 | |||
13 | struct dynid { | ||
14 | struct list_head node; | ||
15 | struct pci_device_id id; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index b5238bd18830..7ac14961ba22 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -586,7 +586,7 @@ struct pci_dev { | |||
586 | #define PCI_NUM_RESOURCES 11 | 586 | #define PCI_NUM_RESOURCES 11 |
587 | 587 | ||
588 | #ifndef PCI_BUS_NUM_RESOURCES | 588 | #ifndef PCI_BUS_NUM_RESOURCES |
589 | #define PCI_BUS_NUM_RESOURCES 4 | 589 | #define PCI_BUS_NUM_RESOURCES 8 |
590 | #endif | 590 | #endif |
591 | 591 | ||
592 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ | 592 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ |
@@ -734,16 +734,20 @@ void pcibios_update_irq(struct pci_dev *, int irq); | |||
734 | /* Generic PCI functions used internally */ | 734 | /* Generic PCI functions used internally */ |
735 | 735 | ||
736 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 736 | extern struct pci_bus *pci_find_bus(int domain, int busnr); |
737 | void pci_bus_add_devices(struct pci_bus *bus); | ||
737 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata); | 738 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata); |
738 | static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata) | 739 | static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata) |
739 | { | 740 | { |
740 | return pci_scan_bus_parented(NULL, bus, ops, sysdata); | 741 | struct pci_bus *root_bus; |
742 | root_bus = pci_scan_bus_parented(NULL, bus, ops, sysdata); | ||
743 | if (root_bus) | ||
744 | pci_bus_add_devices(root_bus); | ||
745 | return root_bus; | ||
741 | } | 746 | } |
742 | int pci_scan_slot(struct pci_bus *bus, int devfn); | 747 | int pci_scan_slot(struct pci_bus *bus, int devfn); |
743 | struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn); | 748 | struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn); |
744 | unsigned int pci_scan_child_bus(struct pci_bus *bus); | 749 | unsigned int pci_scan_child_bus(struct pci_bus *bus); |
745 | void pci_bus_add_device(struct pci_dev *dev); | 750 | void pci_bus_add_device(struct pci_dev *dev); |
746 | void pci_bus_add_devices(struct pci_bus *bus); | ||
747 | void pci_name_device(struct pci_dev *dev); | 751 | void pci_name_device(struct pci_dev *dev); |
748 | char *pci_class_name(u32 class); | 752 | char *pci_class_name(u32 class); |
749 | void pci_read_bridge_bases(struct pci_bus *child); | 753 | void pci_read_bridge_bases(struct pci_bus *child); |
@@ -856,7 +860,8 @@ int pci_register_driver(struct pci_driver *); | |||
856 | void pci_unregister_driver(struct pci_driver *); | 860 | void pci_unregister_driver(struct pci_driver *); |
857 | void pci_remove_behind_bridge(struct pci_dev *); | 861 | void pci_remove_behind_bridge(struct pci_dev *); |
858 | struct pci_driver *pci_dev_driver(const struct pci_dev *); | 862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); |
859 | const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev); | 863 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); |
864 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); | ||
860 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); | 865 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); |
861 | 866 | ||
862 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 867 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
@@ -870,6 +875,15 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass | |||
870 | #define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle) | 875 | #define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle) |
871 | #define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr) | 876 | #define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr) |
872 | 877 | ||
878 | enum pci_dma_burst_strategy { | ||
879 | PCI_DMA_BURST_INFINITY, /* make bursts as large as possible, | ||
880 | strategy_parameter is N/A */ | ||
881 | PCI_DMA_BURST_BOUNDARY, /* disconnect at every strategy_parameter | ||
882 | byte boundaries */ | ||
883 | PCI_DMA_BURST_MULTIPLE, /* disconnect at some multiple of | ||
884 | strategy_parameter byte boundaries */ | ||
885 | }; | ||
886 | |||
873 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | 887 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) |
874 | extern struct pci_dev *isa_bridge; | 888 | extern struct pci_dev *isa_bridge; |
875 | #endif | 889 | #endif |
@@ -972,6 +986,8 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
972 | } | 986 | } |
973 | #endif | 987 | #endif |
974 | 988 | ||
989 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | ||
990 | |||
975 | #endif /* !CONFIG_PCI */ | 991 | #endif /* !CONFIG_PCI */ |
976 | 992 | ||
977 | /* these helpers provide future and backwards compatibility | 993 | /* these helpers provide future and backwards compatibility |
@@ -1016,6 +1032,20 @@ static inline char *pci_name(struct pci_dev *pdev) | |||
1016 | #define pci_pretty_name(dev) "" | 1032 | #define pci_pretty_name(dev) "" |
1017 | #endif | 1033 | #endif |
1018 | 1034 | ||
1035 | |||
1036 | /* Some archs don't want to expose struct resource to userland as-is | ||
1037 | * in sysfs and /proc | ||
1038 | */ | ||
1039 | #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER | ||
1040 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, | ||
1041 | const struct resource *rsrc, u64 *start, u64 *end) | ||
1042 | { | ||
1043 | *start = rsrc->start; | ||
1044 | *end = rsrc->end; | ||
1045 | } | ||
1046 | #endif /* HAVE_ARCH_PCI_RESOURCE_TO_USER */ | ||
1047 | |||
1048 | |||
1019 | /* | 1049 | /* |
1020 | * The world is not perfect and supplies us with broken PCI devices. | 1050 | * The world is not perfect and supplies us with broken PCI devices. |
1021 | * For at least a part of these bugs we need a work-around, so both | 1051 | * For at least a part of these bugs we need a work-around, so both |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index bf608808a60c..27348c22dacb 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -62,6 +62,8 @@ | |||
62 | 62 | ||
63 | #define PCI_BASE_CLASS_SYSTEM 0x08 | 63 | #define PCI_BASE_CLASS_SYSTEM 0x08 |
64 | #define PCI_CLASS_SYSTEM_PIC 0x0800 | 64 | #define PCI_CLASS_SYSTEM_PIC 0x0800 |
65 | #define PCI_CLASS_SYSTEM_PIC_IOAPIC 0x080010 | ||
66 | #define PCI_CLASS_SYSTEM_PIC_IOXAPIC 0x080020 | ||
65 | #define PCI_CLASS_SYSTEM_DMA 0x0801 | 67 | #define PCI_CLASS_SYSTEM_DMA 0x0801 |
66 | #define PCI_CLASS_SYSTEM_TIMER 0x0802 | 68 | #define PCI_CLASS_SYSTEM_TIMER 0x0802 |
67 | #define PCI_CLASS_SYSTEM_RTC 0x0803 | 69 | #define PCI_CLASS_SYSTEM_RTC 0x0803 |
@@ -712,8 +714,9 @@ | |||
712 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 | 714 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 |
713 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 | 715 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 |
714 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
715 | #define PCI_DEVICE_ID_HP_CISSB 0x3230 | 717 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 |
716 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | 718 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 |
719 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | ||
717 | 720 | ||
718 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 721 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
719 | #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 | 722 | #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 |
@@ -1235,6 +1238,7 @@ | |||
1235 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 |
1236 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | 1239 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 |
1237 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | 1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 |
1241 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | ||
1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | 1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 |
1239 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | 1243 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 |
1240 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | 1244 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B |
@@ -1284,6 +1288,8 @@ | |||
1284 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348 | 1288 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348 |
1285 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C | 1289 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C |
1286 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E | 1290 | #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E |
1291 | #define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372 | ||
1292 | #define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 | ||
1287 | 1293 | ||
1288 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1294 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1289 | #define PCI_DEVICE_ID_IMS_8849 0x8849 | 1295 | #define PCI_DEVICE_ID_IMS_8849 0x8849 |
@@ -1812,6 +1818,8 @@ | |||
1812 | #define PCI_VENDOR_ID_ITE 0x1283 | 1818 | #define PCI_VENDOR_ID_ITE 0x1283 |
1813 | #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 | 1819 | #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 |
1814 | #define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 | 1820 | #define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 |
1821 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | ||
1822 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | ||
1815 | #define PCI_DEVICE_ID_ITE_8872 0x8872 | 1823 | #define PCI_DEVICE_ID_ITE_8872 0x8872 |
1816 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 | 1824 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 |
1817 | 1825 | ||
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 25d2d67c1faf..bd2c5a2bbbf5 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -276,6 +276,7 @@ struct tc_rsvp_pinfo | |||
276 | __u8 protocol; | 276 | __u8 protocol; |
277 | __u8 tunnelid; | 277 | __u8 tunnelid; |
278 | __u8 tunnelhdr; | 278 | __u8 tunnelhdr; |
279 | __u8 pad; | ||
279 | }; | 280 | }; |
280 | 281 | ||
281 | /* ROUTE filter */ | 282 | /* ROUTE filter */ |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 1d9da36eb9db..60ffcb9c5791 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -221,9 +221,11 @@ struct tc_gred_qopt | |||
221 | /* gred setup */ | 221 | /* gred setup */ |
222 | struct tc_gred_sopt | 222 | struct tc_gred_sopt |
223 | { | 223 | { |
224 | __u32 DPs; | 224 | __u32 DPs; |
225 | __u32 def_DP; | 225 | __u32 def_DP; |
226 | __u8 grio; | 226 | __u8 grio; |
227 | __u8 pad1; | ||
228 | __u16 pad2; | ||
227 | }; | 229 | }; |
228 | 230 | ||
229 | /* HTB section */ | 231 | /* HTB section */ |
@@ -351,6 +353,7 @@ struct tc_cbq_ovl | |||
351 | #define TC_CBQ_OVL_DROP 3 | 353 | #define TC_CBQ_OVL_DROP 3 |
352 | #define TC_CBQ_OVL_RCLASSIC 4 | 354 | #define TC_CBQ_OVL_RCLASSIC 4 |
353 | unsigned char priority2; | 355 | unsigned char priority2; |
356 | __u16 pad; | ||
354 | __u32 penalty; | 357 | __u32 penalty; |
355 | }; | 358 | }; |
356 | 359 | ||
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 6d73eada277e..373bd3b9b330 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -166,7 +166,7 @@ extern int pmu_i2c_simple_read(int bus, int addr, u8* data, int len); | |||
166 | extern int pmu_i2c_simple_write(int bus, int addr, u8* data, int len); | 166 | extern int pmu_i2c_simple_write(int bus, int addr, u8* data, int len); |
167 | 167 | ||
168 | 168 | ||
169 | #ifdef CONFIG_PMAC_PBOOK | 169 | #ifdef CONFIG_PM |
170 | /* | 170 | /* |
171 | * Stuff for putting the powerbook to sleep and waking it again. | 171 | * Stuff for putting the powerbook to sleep and waking it again. |
172 | * | 172 | * |
@@ -208,6 +208,8 @@ struct pmu_sleep_notifier | |||
208 | int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier); | 208 | int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier); |
209 | int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier); | 209 | int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier); |
210 | 210 | ||
211 | #endif /* CONFIG_PM */ | ||
212 | |||
211 | #define PMU_MAX_BATTERIES 2 | 213 | #define PMU_MAX_BATTERIES 2 |
212 | 214 | ||
213 | /* values for pmu_power_flags */ | 215 | /* values for pmu_power_flags */ |
@@ -235,6 +237,4 @@ extern int pmu_battery_count; | |||
235 | extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; | 237 | extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; |
236 | extern unsigned int pmu_power_flags; | 238 | extern unsigned int pmu_power_flags; |
237 | 239 | ||
238 | #endif /* CONFIG_PMAC_PBOOK */ | ||
239 | |||
240 | #endif /* __KERNEL__ */ | 240 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index d021888b58f1..657c05ab8f9e 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -363,6 +363,8 @@ enum | |||
363 | struct rta_session | 363 | struct rta_session |
364 | { | 364 | { |
365 | __u8 proto; | 365 | __u8 proto; |
366 | __u8 pad1; | ||
367 | __u16 pad2; | ||
366 | 368 | ||
367 | union { | 369 | union { |
368 | struct { | 370 | struct { |
@@ -635,10 +637,13 @@ struct ifinfomsg | |||
635 | struct prefixmsg | 637 | struct prefixmsg |
636 | { | 638 | { |
637 | unsigned char prefix_family; | 639 | unsigned char prefix_family; |
640 | unsigned char prefix_pad1; | ||
641 | unsigned short prefix_pad2; | ||
638 | int prefix_ifindex; | 642 | int prefix_ifindex; |
639 | unsigned char prefix_type; | 643 | unsigned char prefix_type; |
640 | unsigned char prefix_len; | 644 | unsigned char prefix_len; |
641 | unsigned char prefix_flags; | 645 | unsigned char prefix_flags; |
646 | unsigned char prefix_pad3; | ||
642 | }; | 647 | }; |
643 | 648 | ||
644 | enum | 649 | enum |
@@ -898,7 +903,9 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
898 | memcpy(skb_put(skb, attrlen), data, attrlen); }) | 903 | memcpy(skb_put(skb, attrlen), data, attrlen); }) |
899 | 904 | ||
900 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ | 905 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ |
901 | RTA_APPEND(skb, RTA_ALIGN(attrlen), data) | 906 | ({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \ |
907 | memset(skb->tail - (RTA_ALIGN(attrlen) - attrlen), 0, \ | ||
908 | RTA_ALIGN(attrlen) - attrlen); }) | ||
902 | 909 | ||
903 | #define RTA_PUT_U8(skb, attrtype, value) \ | 910 | #define RTA_PUT_U8(skb, attrtype, value) \ |
904 | ({ u8 _tmp = (value); \ | 911 | ({ u8 _tmp = (value); \ |
@@ -978,6 +985,7 @@ __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) | |||
978 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); | 985 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); |
979 | rta->rta_type = attrtype; | 986 | rta->rta_type = attrtype; |
980 | rta->rta_len = size; | 987 | rta->rta_len = size; |
988 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
981 | return rta; | 989 | return rta; |
982 | } | 990 | } |
983 | 991 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9530b1903160..ff48815bd3a2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -608,6 +608,8 @@ struct task_struct { | |||
608 | struct list_head run_list; | 608 | struct list_head run_list; |
609 | prio_array_t *array; | 609 | prio_array_t *array; |
610 | 610 | ||
611 | unsigned short ioprio; | ||
612 | |||
611 | unsigned long sleep_avg; | 613 | unsigned long sleep_avg; |
612 | unsigned long long timestamp, last_ran; | 614 | unsigned long long timestamp, last_ran; |
613 | unsigned long long sched_time; /* sched_clock time spent running */ | 615 | unsigned long long sched_time; /* sched_clock time spent running */ |
@@ -763,6 +765,7 @@ struct task_struct { | |||
763 | nodemask_t mems_allowed; | 765 | nodemask_t mems_allowed; |
764 | int cpuset_mems_generation; | 766 | int cpuset_mems_generation; |
765 | #endif | 767 | #endif |
768 | atomic_t fs_excl; /* holding fs exclusive resources */ | ||
766 | }; | 769 | }; |
767 | 770 | ||
768 | static inline pid_t process_group(struct task_struct *tsk) | 771 | static inline pid_t process_group(struct task_struct *tsk) |
@@ -1112,7 +1115,8 @@ extern void unhash_process(struct task_struct *p); | |||
1112 | 1115 | ||
1113 | /* | 1116 | /* |
1114 | * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring | 1117 | * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring |
1115 | * subscriptions and synchronises with wait4(). Also used in procfs. | 1118 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
1119 | * pins the final release of task.io_context. | ||
1116 | * | 1120 | * |
1117 | * Nests both inside and outside of read_lock(&tasklist_lock). | 1121 | * Nests both inside and outside of read_lock(&tasklist_lock). |
1118 | * It must not be nested with write_lock_irq(&tasklist_lock), | 1122 | * It must not be nested with write_lock_irq(&tasklist_lock), |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 3a2702bbb1d6..dc89116bb1ca 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -19,6 +19,11 @@ static inline void secure_computing(int this_syscall) | |||
19 | __secure_computing(this_syscall); | 19 | __secure_computing(this_syscall); |
20 | } | 20 | } |
21 | 21 | ||
22 | static inline int has_secure_computing(struct thread_info *ti) | ||
23 | { | ||
24 | return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP)); | ||
25 | } | ||
26 | |||
22 | #else /* CONFIG_SECCOMP */ | 27 | #else /* CONFIG_SECCOMP */ |
23 | 28 | ||
24 | #if (__GNUC__ > 2) | 29 | #if (__GNUC__ > 2) |
@@ -28,6 +33,11 @@ static inline void secure_computing(int this_syscall) | |||
28 | #endif | 33 | #endif |
29 | 34 | ||
30 | #define secure_computing(x) do { } while (0) | 35 | #define secure_computing(x) do { } while (0) |
36 | /* static inline to preserve typechecking */ | ||
37 | static inline int has_secure_computing(struct thread_info *ti) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
31 | 41 | ||
32 | #endif /* CONFIG_SECCOMP */ | 42 | #endif /* CONFIG_SECCOMP */ |
33 | 43 | ||
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 823181af6ddf..3e3c1fa35b06 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -22,6 +22,7 @@ struct plat_serial8250_port { | |||
22 | unsigned int uartclk; /* UART clock rate */ | 22 | unsigned int uartclk; /* UART clock rate */ |
23 | unsigned char regshift; /* register shift */ | 23 | unsigned char regshift; /* register shift */ |
24 | unsigned char iotype; /* UPIO_* */ | 24 | unsigned char iotype; /* UPIO_* */ |
25 | unsigned char hub6; | ||
25 | unsigned int flags; /* UPF_* flags */ | 26 | unsigned int flags; /* UPF_* flags */ |
26 | }; | 27 | }; |
27 | 28 | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index a2d3b9ae06f4..aa4d6493a034 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -83,6 +83,7 @@ static inline void serio_register_port(struct serio *serio) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | void serio_unregister_port(struct serio *serio); | 85 | void serio_unregister_port(struct serio *serio); |
86 | void serio_unregister_child_port(struct serio *serio); | ||
86 | void __serio_unregister_port_delayed(struct serio *serio, struct module *owner); | 87 | void __serio_unregister_port_delayed(struct serio *serio, struct module *owner); |
87 | static inline void serio_unregister_port_delayed(struct serio *serio) | 88 | static inline void serio_unregister_port_delayed(struct serio *serio) |
88 | { | 89 | { |
@@ -153,6 +154,11 @@ static inline int serio_pin_driver(struct serio *serio) | |||
153 | return down_interruptible(&serio->drv_sem); | 154 | return down_interruptible(&serio->drv_sem); |
154 | } | 155 | } |
155 | 156 | ||
157 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) | ||
158 | { | ||
159 | down(&serio->drv_sem); | ||
160 | } | ||
161 | |||
156 | static inline void serio_unpin_driver(struct serio *serio) | 162 | static inline void serio_unpin_driver(struct serio *serio) |
157 | { | 163 | { |
158 | up(&serio->drv_sem); | 164 | up(&serio->drv_sem); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 416a2e4024b2..14b950413495 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -183,7 +183,6 @@ struct skb_shared_info { | |||
183 | * @priority: Packet queueing priority | 183 | * @priority: Packet queueing priority |
184 | * @users: User count - see {datagram,tcp}.c | 184 | * @users: User count - see {datagram,tcp}.c |
185 | * @protocol: Packet protocol from driver | 185 | * @protocol: Packet protocol from driver |
186 | * @security: Security level of packet | ||
187 | * @truesize: Buffer size | 186 | * @truesize: Buffer size |
188 | * @head: Head of buffer | 187 | * @head: Head of buffer |
189 | * @data: Data head pointer | 188 | * @data: Data head pointer |
@@ -249,18 +248,18 @@ struct sk_buff { | |||
249 | data_len, | 248 | data_len, |
250 | mac_len, | 249 | mac_len, |
251 | csum; | 250 | csum; |
252 | unsigned char local_df, | ||
253 | cloned:1, | ||
254 | nohdr:1, | ||
255 | pkt_type, | ||
256 | ip_summed; | ||
257 | __u32 priority; | 251 | __u32 priority; |
258 | unsigned short protocol, | 252 | __u8 local_df:1, |
259 | security; | 253 | cloned:1, |
254 | ip_summed:2, | ||
255 | nohdr:1; | ||
256 | /* 3 bits spare */ | ||
257 | __u8 pkt_type; | ||
258 | __u16 protocol; | ||
260 | 259 | ||
261 | void (*destructor)(struct sk_buff *skb); | 260 | void (*destructor)(struct sk_buff *skb); |
262 | #ifdef CONFIG_NETFILTER | 261 | #ifdef CONFIG_NETFILTER |
263 | unsigned long nfmark; | 262 | unsigned long nfmark; |
264 | __u32 nfcache; | 263 | __u32 nfcache; |
265 | __u32 nfctinfo; | 264 | __u32 nfctinfo; |
266 | struct nf_conntrack *nfct; | 265 | struct nf_conntrack *nfct; |
@@ -1211,7 +1210,7 @@ static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | |||
1211 | { | 1210 | { |
1212 | int hlen = skb_headlen(skb); | 1211 | int hlen = skb_headlen(skb); |
1213 | 1212 | ||
1214 | if (offset + len <= hlen) | 1213 | if (hlen - offset >= len) |
1215 | return skb->data + offset; | 1214 | return skb->data + offset; |
1216 | 1215 | ||
1217 | if (skb_copy_bits(skb, offset, buffer, len) < 0) | 1216 | if (skb_copy_bits(skb, offset, buffer, len) < 0) |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index ebfe1250f0a4..5b5f434ac9a0 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -641,6 +641,7 @@ enum { | |||
641 | NET_SCTP_ADDIP_ENABLE = 13, | 641 | NET_SCTP_ADDIP_ENABLE = 13, |
642 | NET_SCTP_PRSCTP_ENABLE = 14, | 642 | NET_SCTP_PRSCTP_ENABLE = 14, |
643 | NET_SCTP_SNDBUF_POLICY = 15, | 643 | NET_SCTP_SNDBUF_POLICY = 15, |
644 | NET_SCTP_SACK_TIMEOUT = 16, | ||
644 | }; | 645 | }; |
645 | 646 | ||
646 | /* /proc/sys/net/bridge */ | 647 | /* /proc/sys/net/bridge */ |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index a6b2cc530af5..bcb762d93123 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -45,7 +45,7 @@ enum | |||
45 | TCF_META_ID_REALDEV, | 45 | TCF_META_ID_REALDEV, |
46 | TCF_META_ID_PRIORITY, | 46 | TCF_META_ID_PRIORITY, |
47 | TCF_META_ID_PROTOCOL, | 47 | TCF_META_ID_PROTOCOL, |
48 | TCF_META_ID_SECURITY, | 48 | TCF_META_ID_SECURITY, /* obsolete */ |
49 | TCF_META_ID_PKTTYPE, | 49 | TCF_META_ID_PKTTYPE, |
50 | TCF_META_ID_PKTLEN, | 50 | TCF_META_ID_PKTLEN, |
51 | TCF_META_ID_DATALEN, | 51 | TCF_META_ID_DATALEN, |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index dfd93d03f5d2..e4fd82e42104 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -286,7 +286,7 @@ struct tcp_sock { | |||
286 | __u32 max_window; /* Maximal window ever seen from peer */ | 286 | __u32 max_window; /* Maximal window ever seen from peer */ |
287 | __u32 pmtu_cookie; /* Last pmtu seen by socket */ | 287 | __u32 pmtu_cookie; /* Last pmtu seen by socket */ |
288 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ | 288 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ |
289 | __u16 mss_cache_std; /* Like mss_cache, but without TSO */ | 289 | __u16 xmit_size_goal; /* Goal for segmenting output packets */ |
290 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ | 290 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ |
291 | __u8 ca_state; /* State of fast-retransmit machine */ | 291 | __u8 ca_state; /* State of fast-retransmit machine */ |
292 | __u8 retransmits; /* Number of unrecovered RTO timeouts. */ | 292 | __u8 retransmits; /* Number of unrecovered RTO timeouts. */ |
diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index f5fe94e09a03..ee21e6bf3867 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h | |||
@@ -6,17 +6,20 @@ | |||
6 | * | 6 | * |
7 | * - the master/host side Linux-USB kernel driver API; | 7 | * - the master/host side Linux-USB kernel driver API; |
8 | * - the "usbfs" user space API; and | 8 | * - the "usbfs" user space API; and |
9 | * - (eventually) a Linux "gadget" slave/device side driver API. | 9 | * - the Linux "gadget" slave/device/peripheral side driver API. |
10 | * | 10 | * |
11 | * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems | 11 | * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems |
12 | * act either as a USB master/host or as a USB slave/device. That means | 12 | * act either as a USB master/host or as a USB slave/device. That means |
13 | * the master and slave side APIs will benefit from working well together. | 13 | * the master and slave side APIs benefit from working well together. |
14 | * | ||
15 | * There's also "Wireless USB", using low power short range radios for | ||
16 | * peripheral interconnection but otherwise building on the USB framework. | ||
14 | */ | 17 | */ |
15 | 18 | ||
16 | #ifndef __LINUX_USB_CH9_H | 19 | #ifndef __LINUX_USB_CH9_H |
17 | #define __LINUX_USB_CH9_H | 20 | #define __LINUX_USB_CH9_H |
18 | 21 | ||
19 | #include <asm/types.h> /* __u8 etc */ | 22 | #include <linux/types.h> /* __u8 etc */ |
20 | 23 | ||
21 | /*-------------------------------------------------------------------------*/ | 24 | /*-------------------------------------------------------------------------*/ |
22 | 25 | ||
@@ -68,6 +71,18 @@ | |||
68 | #define USB_REQ_SET_INTERFACE 0x0B | 71 | #define USB_REQ_SET_INTERFACE 0x0B |
69 | #define USB_REQ_SYNCH_FRAME 0x0C | 72 | #define USB_REQ_SYNCH_FRAME 0x0C |
70 | 73 | ||
74 | #define USB_REQ_SET_ENCRYPTION 0x0D /* Wireless USB */ | ||
75 | #define USB_REQ_GET_ENCRYPTION 0x0E | ||
76 | #define USB_REQ_SET_HANDSHAKE 0x0F | ||
77 | #define USB_REQ_GET_HANDSHAKE 0x10 | ||
78 | #define USB_REQ_SET_CONNECTION 0x11 | ||
79 | #define USB_REQ_SET_SECURITY_DATA 0x12 | ||
80 | #define USB_REQ_GET_SECURITY_DATA 0x13 | ||
81 | #define USB_REQ_SET_WUSB_DATA 0x14 | ||
82 | #define USB_REQ_LOOPBACK_DATA_WRITE 0x15 | ||
83 | #define USB_REQ_LOOPBACK_DATA_READ 0x16 | ||
84 | #define USB_REQ_SET_INTERFACE_DS 0x17 | ||
85 | |||
71 | /* | 86 | /* |
72 | * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and | 87 | * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and |
73 | * are read as a bit array returned by USB_REQ_GET_STATUS. (So there | 88 | * are read as a bit array returned by USB_REQ_GET_STATUS. (So there |
@@ -75,10 +90,12 @@ | |||
75 | */ | 90 | */ |
76 | #define USB_DEVICE_SELF_POWERED 0 /* (read only) */ | 91 | #define USB_DEVICE_SELF_POWERED 0 /* (read only) */ |
77 | #define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ | 92 | #define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */ |
78 | #define USB_DEVICE_TEST_MODE 2 /* (high speed only) */ | 93 | #define USB_DEVICE_TEST_MODE 2 /* (wired high speed only) */ |
79 | #define USB_DEVICE_B_HNP_ENABLE 3 /* dev may initiate HNP */ | 94 | #define USB_DEVICE_BATTERY 2 /* (wireless) */ |
80 | #define USB_DEVICE_A_HNP_SUPPORT 4 /* RH port supports HNP */ | 95 | #define USB_DEVICE_B_HNP_ENABLE 3 /* (otg) dev may initiate HNP */ |
81 | #define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* other RH port does */ | 96 | #define USB_DEVICE_WUSB_DEVICE 3 /* (wireless)*/ |
97 | #define USB_DEVICE_A_HNP_SUPPORT 4 /* (otg) RH port supports HNP */ | ||
98 | #define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */ | ||
82 | #define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ | 99 | #define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */ |
83 | 100 | ||
84 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ | 101 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ |
@@ -135,6 +152,13 @@ struct usb_ctrlrequest { | |||
135 | #define USB_DT_OTG 0x09 | 152 | #define USB_DT_OTG 0x09 |
136 | #define USB_DT_DEBUG 0x0a | 153 | #define USB_DT_DEBUG 0x0a |
137 | #define USB_DT_INTERFACE_ASSOCIATION 0x0b | 154 | #define USB_DT_INTERFACE_ASSOCIATION 0x0b |
155 | /* these are from the Wireless USB spec */ | ||
156 | #define USB_DT_SECURITY 0x0c | ||
157 | #define USB_DT_KEY 0x0d | ||
158 | #define USB_DT_ENCRYPTION_TYPE 0x0e | ||
159 | #define USB_DT_BOS 0x0f | ||
160 | #define USB_DT_DEVICE_CAPABILITY 0x10 | ||
161 | #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 | ||
138 | 162 | ||
139 | /* conventional codes for class-specific descriptors */ | 163 | /* conventional codes for class-specific descriptors */ |
140 | #define USB_DT_CS_DEVICE 0x21 | 164 | #define USB_DT_CS_DEVICE 0x21 |
@@ -192,6 +216,7 @@ struct usb_device_descriptor { | |||
192 | #define USB_CLASS_CSCID 0x0b /* chip+ smart card */ | 216 | #define USB_CLASS_CSCID 0x0b /* chip+ smart card */ |
193 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ | 217 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ |
194 | #define USB_CLASS_VIDEO 0x0e | 218 | #define USB_CLASS_VIDEO 0x0e |
219 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 | ||
195 | #define USB_CLASS_APP_SPEC 0xfe | 220 | #define USB_CLASS_APP_SPEC 0xfe |
196 | #define USB_CLASS_VENDOR_SPEC 0xff | 221 | #define USB_CLASS_VENDOR_SPEC 0xff |
197 | 222 | ||
@@ -223,6 +248,7 @@ struct usb_config_descriptor { | |||
223 | #define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */ | 248 | #define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */ |
224 | #define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */ | 249 | #define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */ |
225 | #define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */ | 250 | #define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */ |
251 | #define USB_CONFIG_ATT_BATTERY (1 << 4) /* battery powered */ | ||
226 | 252 | ||
227 | /*-------------------------------------------------------------------------*/ | 253 | /*-------------------------------------------------------------------------*/ |
228 | 254 | ||
@@ -268,8 +294,8 @@ struct usb_endpoint_descriptor { | |||
268 | __le16 wMaxPacketSize; | 294 | __le16 wMaxPacketSize; |
269 | __u8 bInterval; | 295 | __u8 bInterval; |
270 | 296 | ||
271 | // NOTE: these two are _only_ in audio endpoints. | 297 | /* NOTE: these two are _only_ in audio endpoints. */ |
272 | // use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. | 298 | /* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */ |
273 | __u8 bRefresh; | 299 | __u8 bRefresh; |
274 | __u8 bSynchAddress; | 300 | __u8 bSynchAddress; |
275 | } __attribute__ ((packed)); | 301 | } __attribute__ ((packed)); |
@@ -289,6 +315,7 @@ struct usb_endpoint_descriptor { | |||
289 | #define USB_ENDPOINT_XFER_ISOC 1 | 315 | #define USB_ENDPOINT_XFER_ISOC 1 |
290 | #define USB_ENDPOINT_XFER_BULK 2 | 316 | #define USB_ENDPOINT_XFER_BULK 2 |
291 | #define USB_ENDPOINT_XFER_INT 3 | 317 | #define USB_ENDPOINT_XFER_INT 3 |
318 | #define USB_ENDPOINT_MAX_ADJUSTABLE 0x80 | ||
292 | 319 | ||
293 | 320 | ||
294 | /*-------------------------------------------------------------------------*/ | 321 | /*-------------------------------------------------------------------------*/ |
@@ -352,12 +379,154 @@ struct usb_interface_assoc_descriptor { | |||
352 | 379 | ||
353 | /*-------------------------------------------------------------------------*/ | 380 | /*-------------------------------------------------------------------------*/ |
354 | 381 | ||
382 | /* USB_DT_SECURITY: group of wireless security descriptors, including | ||
383 | * encryption types available for setting up a CC/association. | ||
384 | */ | ||
385 | struct usb_security_descriptor { | ||
386 | __u8 bLength; | ||
387 | __u8 bDescriptorType; | ||
388 | |||
389 | __le16 wTotalLength; | ||
390 | __u8 bNumEncryptionTypes; | ||
391 | }; | ||
392 | |||
393 | /*-------------------------------------------------------------------------*/ | ||
394 | |||
395 | /* USB_DT_KEY: used with {GET,SET}_SECURITY_DATA; only public keys | ||
396 | * may be retrieved. | ||
397 | */ | ||
398 | struct usb_key_descriptor { | ||
399 | __u8 bLength; | ||
400 | __u8 bDescriptorType; | ||
401 | |||
402 | __u8 tTKID[3]; | ||
403 | __u8 bReserved; | ||
404 | __u8 bKeyData[0]; | ||
405 | }; | ||
406 | |||
407 | /*-------------------------------------------------------------------------*/ | ||
408 | |||
409 | /* USB_DT_ENCRYPTION_TYPE: bundled in DT_SECURITY groups */ | ||
410 | struct usb_encryption_descriptor { | ||
411 | __u8 bLength; | ||
412 | __u8 bDescriptorType; | ||
413 | |||
414 | __u8 bEncryptionType; | ||
415 | #define USB_ENC_TYPE_UNSECURE 0 | ||
416 | #define USB_ENC_TYPE_WIRED 1 /* non-wireless mode */ | ||
417 | #define USB_ENC_TYPE_CCM_1 2 /* aes128/cbc session */ | ||
418 | #define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */ | ||
419 | __u8 bEncryptionValue; /* use in SET_ENCRYPTION */ | ||
420 | __u8 bAuthKeyIndex; | ||
421 | }; | ||
422 | |||
423 | |||
424 | /*-------------------------------------------------------------------------*/ | ||
425 | |||
426 | /* USB_DT_BOS: group of wireless capabilities */ | ||
427 | struct usb_bos_descriptor { | ||
428 | __u8 bLength; | ||
429 | __u8 bDescriptorType; | ||
430 | |||
431 | __le16 wTotalLength; | ||
432 | __u8 bNumDeviceCaps; | ||
433 | }; | ||
434 | |||
435 | /*-------------------------------------------------------------------------*/ | ||
436 | |||
437 | /* USB_DT_DEVICE_CAPABILITY: grouped with BOS */ | ||
438 | struct usb_dev_cap_header { | ||
439 | __u8 bLength; | ||
440 | __u8 bDescriptorType; | ||
441 | __u8 bDevCapabilityType; | ||
442 | }; | ||
443 | |||
444 | #define USB_CAP_TYPE_WIRELESS_USB 1 | ||
445 | |||
446 | struct usb_wireless_cap_descriptor { /* Ultra Wide Band */ | ||
447 | __u8 bLength; | ||
448 | __u8 bDescriptorType; | ||
449 | __u8 bDevCapabilityType; | ||
450 | |||
451 | __u8 bmAttributes; | ||
452 | #define USB_WIRELESS_P2P_DRD (1 << 1) | ||
453 | #define USB_WIRELESS_BEACON_MASK (3 << 2) | ||
454 | #define USB_WIRELESS_BEACON_SELF (1 << 2) | ||
455 | #define USB_WIRELESS_BEACON_DIRECTED (2 << 2) | ||
456 | #define USB_WIRELESS_BEACON_NONE (3 << 2) | ||
457 | __le16 wPHYRates; /* bit rates, Mbps */ | ||
458 | #define USB_WIRELESS_PHY_53 (1 << 0) /* always set */ | ||
459 | #define USB_WIRELESS_PHY_80 (1 << 1) | ||
460 | #define USB_WIRELESS_PHY_107 (1 << 2) /* always set */ | ||
461 | #define USB_WIRELESS_PHY_160 (1 << 3) | ||
462 | #define USB_WIRELESS_PHY_200 (1 << 4) /* always set */ | ||
463 | #define USB_WIRELESS_PHY_320 (1 << 5) | ||
464 | #define USB_WIRELESS_PHY_400 (1 << 6) | ||
465 | #define USB_WIRELESS_PHY_480 (1 << 7) | ||
466 | __u8 bmTFITXPowerInfo; /* TFI power levels */ | ||
467 | __u8 bmFFITXPowerInfo; /* FFI power levels */ | ||
468 | __le16 bmBandGroup; | ||
469 | __u8 bReserved; | ||
470 | }; | ||
471 | |||
472 | /*-------------------------------------------------------------------------*/ | ||
473 | |||
474 | /* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with | ||
475 | * each endpoint descriptor for a wireless device | ||
476 | */ | ||
477 | struct usb_wireless_ep_comp_descriptor { | ||
478 | __u8 bLength; | ||
479 | __u8 bDescriptorType; | ||
480 | |||
481 | __u8 bMaxBurst; | ||
482 | __u8 bMaxSequence; | ||
483 | __le16 wMaxStreamDelay; | ||
484 | __le16 wOverTheAirPacketSize; | ||
485 | __u8 bOverTheAirInterval; | ||
486 | __u8 bmCompAttributes; | ||
487 | #define USB_ENDPOINT_SWITCH_MASK 0x03 /* in bmCompAttributes */ | ||
488 | #define USB_ENDPOINT_SWITCH_NO 0 | ||
489 | #define USB_ENDPOINT_SWITCH_SWITCH 1 | ||
490 | #define USB_ENDPOINT_SWITCH_SCALE 2 | ||
491 | }; | ||
492 | |||
493 | /*-------------------------------------------------------------------------*/ | ||
494 | |||
495 | /* USB_REQ_SET_HANDSHAKE is a four-way handshake used between a wireless | ||
496 | * host and a device for connection set up, mutual authentication, and | ||
497 | * exchanging short lived session keys. The handshake depends on a CC. | ||
498 | */ | ||
499 | struct usb_handshake { | ||
500 | __u8 bMessageNumber; | ||
501 | __u8 bStatus; | ||
502 | __u8 tTKID[3]; | ||
503 | __u8 bReserved; | ||
504 | __u8 CDID[16]; | ||
505 | __u8 nonce[16]; | ||
506 | __u8 MIC[8]; | ||
507 | }; | ||
508 | |||
509 | /*-------------------------------------------------------------------------*/ | ||
510 | |||
511 | /* USB_REQ_SET_CONNECTION modifies or revokes a connection context (CC). | ||
512 | * A CC may also be set up using non-wireless secure channels (including | ||
513 | * wired USB!), and some devices may support CCs with multiple hosts. | ||
514 | */ | ||
515 | struct usb_connection_context { | ||
516 | __u8 CHID[16]; /* persistent host id */ | ||
517 | __u8 CDID[16]; /* device id (unique w/in host context) */ | ||
518 | __u8 CK[16]; /* connection key */ | ||
519 | }; | ||
520 | |||
521 | /*-------------------------------------------------------------------------*/ | ||
522 | |||
355 | /* USB 2.0 defines three speeds, here's how Linux identifies them */ | 523 | /* USB 2.0 defines three speeds, here's how Linux identifies them */ |
356 | 524 | ||
357 | enum usb_device_speed { | 525 | enum usb_device_speed { |
358 | USB_SPEED_UNKNOWN = 0, /* enumerating */ | 526 | USB_SPEED_UNKNOWN = 0, /* enumerating */ |
359 | USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ | 527 | USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ |
360 | USB_SPEED_HIGH /* usb 2.0 */ | 528 | USB_SPEED_HIGH, /* usb 2.0 */ |
529 | USB_SPEED_VARIABLE, /* wireless (usb 2.5) */ | ||
361 | }; | 530 | }; |
362 | 531 | ||
363 | enum usb_device_state { | 532 | enum usb_device_state { |
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index 9bba9997947b..b00f127cb447 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -711,7 +711,7 @@ usb_gadget_disconnect (struct usb_gadget *gadget) | |||
711 | * the hardware level driver. Most calls must be handled by | 711 | * the hardware level driver. Most calls must be handled by |
712 | * the gadget driver, including descriptor and configuration | 712 | * the gadget driver, including descriptor and configuration |
713 | * management. The 16 bit members of the setup data are in | 713 | * management. The 16 bit members of the setup data are in |
714 | * cpu order. Called in_interrupt; this may not sleep. Driver | 714 | * USB byte order. Called in_interrupt; this may not sleep. Driver |
715 | * queues a response to ep0, or returns negative to stall. | 715 | * queues a response to ep0, or returns negative to stall. |
716 | * @disconnect: Invoked after all transfers have been stopped, | 716 | * @disconnect: Invoked after all transfers have been stopped, |
717 | * when the host is disconnected. May be called in_interrupt; this | 717 | * when the host is disconnected. May be called in_interrupt; this |
diff --git a/include/linux/usb_isp116x.h b/include/linux/usb_isp116x.h new file mode 100644 index 000000000000..5f5a9d9bd6c2 --- /dev/null +++ b/include/linux/usb_isp116x.h | |||
@@ -0,0 +1,47 @@ | |||
1 | |||
2 | /* | ||
3 | * Board initialization code should put one of these into dev->platform_data | ||
4 | * and place the isp116x onto platform_bus. | ||
5 | */ | ||
6 | |||
7 | struct isp116x_platform_data { | ||
8 | /* Enable internal resistors on downstream ports */ | ||
9 | unsigned sel15Kres:1; | ||
10 | /* Chip's internal clock won't be stopped in suspended state. | ||
11 | Setting/unsetting this bit takes effect only if | ||
12 | 'remote_wakeup_enable' below is not set. */ | ||
13 | unsigned clknotstop:1; | ||
14 | /* On-chip overcurrent protection */ | ||
15 | unsigned oc_enable:1; | ||
16 | /* INT output polarity */ | ||
17 | unsigned int_act_high:1; | ||
18 | /* INT edge or level triggered */ | ||
19 | unsigned int_edge_triggered:1; | ||
20 | /* WAKEUP pin connected - NOT SUPPORTED */ | ||
21 | /* unsigned remote_wakeup_connected:1; */ | ||
22 | /* Wakeup by devices on usb bus enabled */ | ||
23 | unsigned remote_wakeup_enable:1; | ||
24 | /* Switch or not to switch (keep always powered) */ | ||
25 | unsigned no_power_switching:1; | ||
26 | /* Ganged port power switching (0) or individual port | ||
27 | power switching (1) */ | ||
28 | unsigned power_switching_mode:1; | ||
29 | /* Given port_power, msec/2 after power on till power good */ | ||
30 | u8 potpg; | ||
31 | /* Hardware reset set/clear. If implemented, this function must: | ||
32 | if set == 0, deassert chip's HW reset pin | ||
33 | otherwise, assert chip's HW reset pin */ | ||
34 | void (*reset) (struct device * dev, int set); | ||
35 | /* Hardware clock start/stop. If implemented, this function must: | ||
36 | if start == 0, stop the external clock | ||
37 | otherwise, start the external clock | ||
38 | */ | ||
39 | void (*clock) (struct device * dev, int start); | ||
40 | /* Inter-io delay (ns). The chip is picky about access timings; it | ||
41 | expects at least: | ||
42 | 150ns delay between consecutive accesses to DATA_REG, | ||
43 | 300ns delay between access to ADDR_REG and DATA_REG | ||
44 | OE, WE MUST NOT be changed during these intervals | ||
45 | */ | ||
46 | void (*delay) (struct device * dev, int delay); | ||
47 | }; | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 4e0edce53760..acbfc525576d 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -221,6 +221,8 @@ struct v4l2_pix_format | |||
221 | /* Vendor-specific formats */ | 221 | /* Vendor-specific formats */ |
222 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ | 222 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ |
223 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ | 223 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ |
224 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ | ||
225 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ | ||
224 | 226 | ||
225 | /* | 227 | /* |
226 | * F O R M A T E N U M E R A T I O N | 228 | * F O R M A T E N U M E R A T I O N |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 1262cb43c3ab..542dbaee6512 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -14,11 +14,13 @@ extern struct list_head inode_unused; | |||
14 | * Yes, writeback.h requires sched.h | 14 | * Yes, writeback.h requires sched.h |
15 | * No, sched.h is not included from here. | 15 | * No, sched.h is not included from here. |
16 | */ | 16 | */ |
17 | static inline int current_is_pdflush(void) | 17 | static inline int task_is_pdflush(struct task_struct *task) |
18 | { | 18 | { |
19 | return current->flags & PF_FLUSHER; | 19 | return task->flags & PF_FLUSHER; |
20 | } | 20 | } |
21 | 21 | ||
22 | #define current_is_pdflush() task_is_pdflush(current) | ||
23 | |||
22 | /* | 24 | /* |
23 | * fs/fs-writeback.c | 25 | * fs/fs-writeback.c |
24 | */ | 26 | */ |
@@ -83,7 +85,7 @@ static inline void wait_on_inode(struct inode *inode) | |||
83 | /* | 85 | /* |
84 | * mm/page-writeback.c | 86 | * mm/page-writeback.c |
85 | */ | 87 | */ |
86 | int wakeup_bdflush(long nr_pages); | 88 | int wakeup_pdflush(long nr_pages); |
87 | void laptop_io_completion(void); | 89 | void laptop_io_completion(void); |
88 | void laptop_sync_completion(void); | 90 | void laptop_sync_completion(void); |
89 | void throttle_vm_writeout(void); | 91 | void throttle_vm_writeout(void); |
diff --git a/include/linux/xattr_acl.h b/include/linux/xattr_acl.h deleted file mode 100644 index 7a1f9b93a45f..000000000000 --- a/include/linux/xattr_acl.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | File: linux/xattr_acl.h | ||
3 | |||
4 | (extended attribute representation of access control lists) | ||
5 | |||
6 | (C) 2000 Andreas Gruenbacher, <a.gruenbacher@computer.org> | ||
7 | */ | ||
8 | |||
9 | #ifndef _LINUX_XATTR_ACL_H | ||
10 | #define _LINUX_XATTR_ACL_H | ||
11 | |||
12 | #include <linux/posix_acl.h> | ||
13 | |||
14 | #define XATTR_NAME_ACL_ACCESS "system.posix_acl_access" | ||
15 | #define XATTR_NAME_ACL_DEFAULT "system.posix_acl_default" | ||
16 | |||
17 | #define XATTR_ACL_VERSION 0x0002 | ||
18 | |||
19 | typedef struct { | ||
20 | __u16 e_tag; | ||
21 | __u16 e_perm; | ||
22 | __u32 e_id; | ||
23 | } xattr_acl_entry; | ||
24 | |||
25 | typedef struct { | ||
26 | __u32 a_version; | ||
27 | xattr_acl_entry a_entries[0]; | ||
28 | } xattr_acl_header; | ||
29 | |||
30 | static inline size_t xattr_acl_size(int count) | ||
31 | { | ||
32 | return sizeof(xattr_acl_header) + count * sizeof(xattr_acl_entry); | ||
33 | } | ||
34 | |||
35 | static inline int xattr_acl_count(size_t size) | ||
36 | { | ||
37 | if (size < sizeof(xattr_acl_header)) | ||
38 | return -1; | ||
39 | size -= sizeof(xattr_acl_header); | ||
40 | if (size % sizeof(xattr_acl_entry)) | ||
41 | return -1; | ||
42 | return size / sizeof(xattr_acl_entry); | ||
43 | } | ||
44 | |||
45 | struct posix_acl * posix_acl_from_xattr(const void *value, size_t size); | ||
46 | int posix_acl_to_xattr(const struct posix_acl *acl, void *buffer, size_t size); | ||
47 | |||
48 | |||
49 | |||
50 | #endif /* _LINUX_XATTR_ACL_H */ | ||