diff options
Diffstat (limited to 'include/linux')
180 files changed, 2850 insertions, 2480 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 157db77a7170..e81e301a4d71 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -11,6 +11,7 @@ header-y += netfilter_arp/ | |||
11 | header-y += netfilter_bridge/ | 11 | header-y += netfilter_bridge/ |
12 | header-y += netfilter_ipv4/ | 12 | header-y += netfilter_ipv4/ |
13 | header-y += netfilter_ipv6/ | 13 | header-y += netfilter_ipv6/ |
14 | header-y += usb/ | ||
14 | 15 | ||
15 | header-y += affs_hardblocks.h | 16 | header-y += affs_hardblocks.h |
16 | header-y += aio_abi.h | 17 | header-y += aio_abi.h |
@@ -155,7 +156,6 @@ header-y += video_encoder.h | |||
155 | header-y += videotext.h | 156 | header-y += videotext.h |
156 | header-y += vt.h | 157 | header-y += vt.h |
157 | header-y += wireless.h | 158 | header-y += wireless.h |
158 | header-y += xattr.h | ||
159 | header-y += x25.h | 159 | header-y += x25.h |
160 | 160 | ||
161 | unifdef-y += acct.h | 161 | unifdef-y += acct.h |
@@ -323,10 +323,10 @@ unifdef-y += tty.h | |||
323 | unifdef-y += types.h | 323 | unifdef-y += types.h |
324 | unifdef-y += udf_fs_i.h | 324 | unifdef-y += udf_fs_i.h |
325 | unifdef-y += udp.h | 325 | unifdef-y += udp.h |
326 | unifdef-y += ufs_fs.h | ||
326 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
327 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
328 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
329 | unifdef-y += usb_ch9.h | ||
330 | unifdef-y += usbdevice_fs.h | 330 | unifdef-y += usbdevice_fs.h |
331 | unifdef-y += user.h | 331 | unifdef-y += user.h |
332 | unifdef-y += utsname.h | 332 | unifdef-y += utsname.h |
@@ -336,6 +336,7 @@ unifdef-y += wait.h | |||
336 | unifdef-y += wanrouter.h | 336 | unifdef-y += wanrouter.h |
337 | unifdef-y += watchdog.h | 337 | unifdef-y += watchdog.h |
338 | unifdef-y += wireless.h | 338 | unifdef-y += wireless.h |
339 | unifdef-y += xattr.h | ||
339 | unifdef-y += xfrm.h | 340 | unifdef-y += xfrm.h |
340 | 341 | ||
341 | objhdr-y += version.h | 342 | objhdr-y += version.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 91f1f2363870..8bcfaa4c66ae 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -53,166 +53,6 @@ enum acpi_irq_model_id { | |||
53 | 53 | ||
54 | extern enum acpi_irq_model_id acpi_irq_model; | 54 | extern enum acpi_irq_model_id acpi_irq_model; |
55 | 55 | ||
56 | |||
57 | /* Root System Description Pointer (RSDP) */ | ||
58 | |||
59 | struct acpi_table_rsdp { | ||
60 | char signature[8]; | ||
61 | u8 checksum; | ||
62 | char oem_id[6]; | ||
63 | u8 revision; | ||
64 | u32 rsdt_address; | ||
65 | } __attribute__ ((packed)); | ||
66 | |||
67 | struct acpi20_table_rsdp { | ||
68 | char signature[8]; | ||
69 | u8 checksum; | ||
70 | char oem_id[6]; | ||
71 | u8 revision; | ||
72 | u32 rsdt_address; | ||
73 | u32 length; | ||
74 | u64 xsdt_address; | ||
75 | u8 ext_checksum; | ||
76 | u8 reserved[3]; | ||
77 | } __attribute__ ((packed)); | ||
78 | |||
79 | typedef struct { | ||
80 | u8 type; | ||
81 | u8 length; | ||
82 | } __attribute__ ((packed)) acpi_table_entry_header; | ||
83 | |||
84 | /* Root System Description Table (RSDT) */ | ||
85 | |||
86 | struct acpi_table_rsdt { | ||
87 | struct acpi_table_header header; | ||
88 | u32 entry[8]; | ||
89 | } __attribute__ ((packed)); | ||
90 | |||
91 | /* Extended System Description Table (XSDT) */ | ||
92 | |||
93 | struct acpi_table_xsdt { | ||
94 | struct acpi_table_header header; | ||
95 | u64 entry[1]; | ||
96 | } __attribute__ ((packed)); | ||
97 | |||
98 | /* Fixed ACPI Description Table (FADT) */ | ||
99 | |||
100 | struct acpi_table_fadt { | ||
101 | struct acpi_table_header header; | ||
102 | u32 facs_addr; | ||
103 | u32 dsdt_addr; | ||
104 | /* ... */ | ||
105 | } __attribute__ ((packed)); | ||
106 | |||
107 | /* Multiple APIC Description Table (MADT) */ | ||
108 | |||
109 | struct acpi_table_madt { | ||
110 | struct acpi_table_header header; | ||
111 | u32 lapic_address; | ||
112 | struct { | ||
113 | u32 pcat_compat:1; | ||
114 | u32 reserved:31; | ||
115 | } flags; | ||
116 | } __attribute__ ((packed)); | ||
117 | |||
118 | enum acpi_madt_entry_id { | ||
119 | ACPI_MADT_LAPIC = 0, | ||
120 | ACPI_MADT_IOAPIC, | ||
121 | ACPI_MADT_INT_SRC_OVR, | ||
122 | ACPI_MADT_NMI_SRC, | ||
123 | ACPI_MADT_LAPIC_NMI, | ||
124 | ACPI_MADT_LAPIC_ADDR_OVR, | ||
125 | ACPI_MADT_IOSAPIC, | ||
126 | ACPI_MADT_LSAPIC, | ||
127 | ACPI_MADT_PLAT_INT_SRC, | ||
128 | ACPI_MADT_ENTRY_COUNT | ||
129 | }; | ||
130 | |||
131 | typedef struct { | ||
132 | u16 polarity:2; | ||
133 | u16 trigger:2; | ||
134 | u16 reserved:12; | ||
135 | } __attribute__ ((packed)) acpi_interrupt_flags; | ||
136 | |||
137 | struct acpi_table_lapic { | ||
138 | acpi_table_entry_header header; | ||
139 | u8 acpi_id; | ||
140 | u8 id; | ||
141 | struct { | ||
142 | u32 enabled:1; | ||
143 | u32 reserved:31; | ||
144 | } flags; | ||
145 | } __attribute__ ((packed)); | ||
146 | |||
147 | struct acpi_table_ioapic { | ||
148 | acpi_table_entry_header header; | ||
149 | u8 id; | ||
150 | u8 reserved; | ||
151 | u32 address; | ||
152 | u32 global_irq_base; | ||
153 | } __attribute__ ((packed)); | ||
154 | |||
155 | struct acpi_table_int_src_ovr { | ||
156 | acpi_table_entry_header header; | ||
157 | u8 bus; | ||
158 | u8 bus_irq; | ||
159 | u32 global_irq; | ||
160 | acpi_interrupt_flags flags; | ||
161 | } __attribute__ ((packed)); | ||
162 | |||
163 | struct acpi_table_nmi_src { | ||
164 | acpi_table_entry_header header; | ||
165 | acpi_interrupt_flags flags; | ||
166 | u32 global_irq; | ||
167 | } __attribute__ ((packed)); | ||
168 | |||
169 | struct acpi_table_lapic_nmi { | ||
170 | acpi_table_entry_header header; | ||
171 | u8 acpi_id; | ||
172 | acpi_interrupt_flags flags; | ||
173 | u8 lint; | ||
174 | } __attribute__ ((packed)); | ||
175 | |||
176 | struct acpi_table_lapic_addr_ovr { | ||
177 | acpi_table_entry_header header; | ||
178 | u8 reserved[2]; | ||
179 | u64 address; | ||
180 | } __attribute__ ((packed)); | ||
181 | |||
182 | struct acpi_table_iosapic { | ||
183 | acpi_table_entry_header header; | ||
184 | u8 id; | ||
185 | u8 reserved; | ||
186 | u32 global_irq_base; | ||
187 | u64 address; | ||
188 | } __attribute__ ((packed)); | ||
189 | |||
190 | struct acpi_table_lsapic { | ||
191 | acpi_table_entry_header header; | ||
192 | u8 acpi_id; | ||
193 | u8 id; | ||
194 | u8 eid; | ||
195 | u8 reserved[3]; | ||
196 | struct { | ||
197 | u32 enabled:1; | ||
198 | u32 reserved:31; | ||
199 | } flags; | ||
200 | } __attribute__ ((packed)); | ||
201 | |||
202 | struct acpi_table_plat_int_src { | ||
203 | acpi_table_entry_header header; | ||
204 | acpi_interrupt_flags flags; | ||
205 | u8 type; /* See acpi_interrupt_type */ | ||
206 | u8 id; | ||
207 | u8 eid; | ||
208 | u8 iosapic_vector; | ||
209 | u32 global_irq; | ||
210 | struct { | ||
211 | u32 cpei_override_flag:1; | ||
212 | u32 reserved:31; | ||
213 | } plint_flags; | ||
214 | } __attribute__ ((packed)); | ||
215 | |||
216 | enum acpi_interrupt_id { | 56 | enum acpi_interrupt_id { |
217 | ACPI_INTERRUPT_PMI = 1, | 57 | ACPI_INTERRUPT_PMI = 1, |
218 | ACPI_INTERRUPT_INIT, | 58 | ACPI_INTERRUPT_INIT, |
@@ -222,89 +62,6 @@ enum acpi_interrupt_id { | |||
222 | 62 | ||
223 | #define ACPI_SPACE_MEM 0 | 63 | #define ACPI_SPACE_MEM 0 |
224 | 64 | ||
225 | struct acpi_gen_regaddr { | ||
226 | u8 space_id; | ||
227 | u8 bit_width; | ||
228 | u8 bit_offset; | ||
229 | u8 resv; | ||
230 | u32 addrl; | ||
231 | u32 addrh; | ||
232 | } __attribute__ ((packed)); | ||
233 | |||
234 | struct acpi_table_hpet { | ||
235 | struct acpi_table_header header; | ||
236 | u32 id; | ||
237 | struct acpi_gen_regaddr addr; | ||
238 | u8 number; | ||
239 | u16 min_tick; | ||
240 | u8 page_protect; | ||
241 | } __attribute__ ((packed)); | ||
242 | |||
243 | /* | ||
244 | * Simple Boot Flags | ||
245 | * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx | ||
246 | */ | ||
247 | struct acpi_table_sbf | ||
248 | { | ||
249 | u8 sbf_signature[4]; | ||
250 | u32 sbf_len; | ||
251 | u8 sbf_revision; | ||
252 | u8 sbf_csum; | ||
253 | u8 sbf_oemid[6]; | ||
254 | u8 sbf_oemtable[8]; | ||
255 | u8 sbf_revdata[4]; | ||
256 | u8 sbf_creator[4]; | ||
257 | u8 sbf_crearev[4]; | ||
258 | u8 sbf_cmos; | ||
259 | u8 sbf_spare[3]; | ||
260 | } __attribute__ ((packed)); | ||
261 | |||
262 | /* | ||
263 | * System Resource Affinity Table (SRAT) | ||
264 | * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx | ||
265 | */ | ||
266 | |||
267 | struct acpi_table_srat { | ||
268 | struct acpi_table_header header; | ||
269 | u32 table_revision; | ||
270 | u64 reserved; | ||
271 | } __attribute__ ((packed)); | ||
272 | |||
273 | enum acpi_srat_entry_id { | ||
274 | ACPI_SRAT_PROCESSOR_AFFINITY = 0, | ||
275 | ACPI_SRAT_MEMORY_AFFINITY, | ||
276 | ACPI_SRAT_ENTRY_COUNT | ||
277 | }; | ||
278 | |||
279 | struct acpi_table_processor_affinity { | ||
280 | acpi_table_entry_header header; | ||
281 | u8 proximity_domain; | ||
282 | u8 apic_id; | ||
283 | struct { | ||
284 | u32 enabled:1; | ||
285 | u32 reserved:31; | ||
286 | } flags; | ||
287 | u8 lsapic_eid; | ||
288 | u8 reserved[7]; | ||
289 | } __attribute__ ((packed)); | ||
290 | |||
291 | struct acpi_table_memory_affinity { | ||
292 | acpi_table_entry_header header; | ||
293 | u8 proximity_domain; | ||
294 | u8 reserved1[5]; | ||
295 | u32 base_addr_lo; | ||
296 | u32 base_addr_hi; | ||
297 | u32 length_lo; | ||
298 | u32 length_hi; | ||
299 | u32 memory_type; /* See acpi_address_range_id */ | ||
300 | struct { | ||
301 | u32 enabled:1; | ||
302 | u32 hot_pluggable:1; | ||
303 | u32 reserved:30; | ||
304 | } flags; | ||
305 | u64 reserved2; | ||
306 | } __attribute__ ((packed)); | ||
307 | |||
308 | enum acpi_address_range_id { | 65 | enum acpi_address_range_id { |
309 | ACPI_ADDRESS_RANGE_MEMORY = 1, | 66 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
310 | ACPI_ADDRESS_RANGE_RESERVED = 2, | 67 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
@@ -313,84 +70,12 @@ enum acpi_address_range_id { | |||
313 | ACPI_ADDRESS_RANGE_COUNT | 70 | ACPI_ADDRESS_RANGE_COUNT |
314 | }; | 71 | }; |
315 | 72 | ||
316 | /* | ||
317 | * System Locality Information Table (SLIT) | ||
318 | * see http://devresource.hp.com/devresource/docs/techpapers/ia64/slit.pdf | ||
319 | */ | ||
320 | |||
321 | struct acpi_table_slit { | ||
322 | struct acpi_table_header header; | ||
323 | u64 localities; | ||
324 | u8 entry[1]; /* real size = localities^2 */ | ||
325 | } __attribute__ ((packed)); | ||
326 | |||
327 | /* Smart Battery Description Table (SBST) */ | ||
328 | |||
329 | struct acpi_table_sbst { | ||
330 | struct acpi_table_header header; | ||
331 | u32 warning; /* Warn user */ | ||
332 | u32 low; /* Critical sleep */ | ||
333 | u32 critical; /* Critical shutdown */ | ||
334 | } __attribute__ ((packed)); | ||
335 | |||
336 | /* Embedded Controller Boot Resources Table (ECDT) */ | ||
337 | |||
338 | struct acpi_table_ecdt { | ||
339 | struct acpi_table_header header; | ||
340 | struct acpi_generic_address ec_control; | ||
341 | struct acpi_generic_address ec_data; | ||
342 | u32 uid; | ||
343 | u8 gpe_bit; | ||
344 | char ec_id[0]; | ||
345 | } __attribute__ ((packed)); | ||
346 | |||
347 | /* PCI MMCONFIG */ | ||
348 | |||
349 | /* Defined in PCI Firmware Specification 3.0 */ | ||
350 | struct acpi_table_mcfg_config { | ||
351 | u32 base_address; | ||
352 | u32 base_reserved; | ||
353 | u16 pci_segment_group_number; | ||
354 | u8 start_bus_number; | ||
355 | u8 end_bus_number; | ||
356 | u8 reserved[4]; | ||
357 | } __attribute__ ((packed)); | ||
358 | struct acpi_table_mcfg { | ||
359 | struct acpi_table_header header; | ||
360 | u8 reserved[8]; | ||
361 | struct acpi_table_mcfg_config config[0]; | ||
362 | } __attribute__ ((packed)); | ||
363 | 73 | ||
364 | /* Table Handlers */ | 74 | /* Table Handlers */ |
365 | 75 | ||
366 | enum acpi_table_id { | 76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); |
367 | ACPI_TABLE_UNKNOWN = 0, | ||
368 | ACPI_APIC, | ||
369 | ACPI_BOOT, | ||
370 | ACPI_DBGP, | ||
371 | ACPI_DSDT, | ||
372 | ACPI_ECDT, | ||
373 | ACPI_ETDT, | ||
374 | ACPI_FADT, | ||
375 | ACPI_FACS, | ||
376 | ACPI_OEMX, | ||
377 | ACPI_PSDT, | ||
378 | ACPI_SBST, | ||
379 | ACPI_SLIT, | ||
380 | ACPI_SPCR, | ||
381 | ACPI_SRAT, | ||
382 | ACPI_SSDT, | ||
383 | ACPI_SPMI, | ||
384 | ACPI_HPET, | ||
385 | ACPI_MCFG, | ||
386 | ACPI_TABLE_COUNT | ||
387 | }; | ||
388 | |||
389 | typedef int (*acpi_table_handler) (unsigned long phys_addr, unsigned long size); | ||
390 | |||
391 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; | ||
392 | 77 | ||
393 | typedef int (*acpi_madt_entry_handler) (acpi_table_entry_header *header, const unsigned long end); | 78 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
394 | 79 | ||
395 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 80 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
396 | unsigned long acpi_find_rsdp (void); | 81 | unsigned long acpi_find_rsdp (void); |
@@ -399,14 +84,14 @@ int acpi_boot_table_init (void); | |||
399 | int acpi_numa_init (void); | 84 | int acpi_numa_init (void); |
400 | 85 | ||
401 | int acpi_table_init (void); | 86 | int acpi_table_init (void); |
402 | int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler); | 87 | int acpi_table_parse (char *id, acpi_table_handler handler); |
403 | int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header); | 88 | int __init acpi_table_parse_entries(char *id, unsigned long table_size, |
404 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 89 | int entry_id, acpi_table_entry_handler handler, unsigned int max_entries); |
405 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 90 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_table_entry_handler handler, unsigned int max_entries); |
406 | int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size); | 91 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_table_entry_handler handler, unsigned int max_entries); |
407 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | 92 | int acpi_parse_mcfg (struct acpi_table_header *header); |
408 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); | 93 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
409 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | 94 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); |
410 | 95 | ||
411 | /* the following four functions are architecture-dependent */ | 96 | /* the following four functions are architecture-dependent */ |
412 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT | 97 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT |
@@ -417,8 +102,8 @@ void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | |||
417 | #define acpi_numa_arch_fixup() do {} while (0) | 102 | #define acpi_numa_arch_fixup() do {} while (0) |
418 | #else | 103 | #else |
419 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 104 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
420 | void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); | 105 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
421 | void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); | 106 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
422 | void acpi_numa_arch_fixup(void); | 107 | void acpi_numa_arch_fixup(void); |
423 | #endif | 108 | #endif |
424 | 109 | ||
@@ -433,7 +118,7 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | |||
433 | 118 | ||
434 | extern int acpi_mp_config; | 119 | extern int acpi_mp_config; |
435 | 120 | ||
436 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 121 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
437 | extern int pci_mmcfg_config_num; | 122 | extern int pci_mmcfg_config_num; |
438 | 123 | ||
439 | extern int sbf_port; | 124 | extern int sbf_port; |
diff --git a/include/linux/acpi_pmtmr.h b/include/linux/acpi_pmtmr.h new file mode 100644 index 000000000000..1d0ef1ae8036 --- /dev/null +++ b/include/linux/acpi_pmtmr.h | |||
@@ -0,0 +1,38 @@ | |||
1 | #ifndef _ACPI_PMTMR_H_ | ||
2 | #define _ACPI_PMTMR_H_ | ||
3 | |||
4 | #include <linux/clocksource.h> | ||
5 | |||
6 | /* Number of PMTMR ticks expected during calibration run */ | ||
7 | #define PMTMR_TICKS_PER_SEC 3579545 | ||
8 | |||
9 | /* limit it to 24 bits */ | ||
10 | #define ACPI_PM_MASK CLOCKSOURCE_MASK(24) | ||
11 | |||
12 | /* Overrun value */ | ||
13 | #define ACPI_PM_OVRRUN (1<<24) | ||
14 | |||
15 | #ifdef CONFIG_X86_PM_TIMER | ||
16 | |||
17 | extern u32 acpi_pm_read_verified(void); | ||
18 | extern u32 pmtmr_ioport; | ||
19 | |||
20 | static inline u32 acpi_pm_read_early(void) | ||
21 | { | ||
22 | if (!pmtmr_ioport) | ||
23 | return 0; | ||
24 | /* mask the output to 24 bits */ | ||
25 | return acpi_pm_read_verified() & ACPI_PM_MASK; | ||
26 | } | ||
27 | |||
28 | #else | ||
29 | |||
30 | static inline u32 acpi_pm_read_early(void) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | #endif | ||
36 | |||
37 | #endif | ||
38 | |||
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index a5c8bb5d80ba..abc521cfb084 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -87,10 +87,15 @@ struct agp_memory { | |||
87 | u32 physical; | 87 | u32 physical; |
88 | u8 is_bound; | 88 | u8 is_bound; |
89 | u8 is_flushed; | 89 | u8 is_flushed; |
90 | u8 vmalloc_flag; | ||
90 | }; | 91 | }; |
91 | 92 | ||
92 | #define AGP_NORMAL_MEMORY 0 | 93 | #define AGP_NORMAL_MEMORY 0 |
93 | 94 | ||
95 | #define AGP_USER_TYPES (1 << 16) | ||
96 | #define AGP_USER_MEMORY (AGP_USER_TYPES) | ||
97 | #define AGP_USER_CACHED_MEMORY (AGP_USER_TYPES + 1) | ||
98 | |||
94 | extern struct agp_bridge_data *agp_bridge; | 99 | extern struct agp_bridge_data *agp_bridge; |
95 | extern struct list_head agp_bridges; | 100 | extern struct list_head agp_bridges; |
96 | 101 | ||
diff --git a/include/linux/apm-emulation.h b/include/linux/apm-emulation.h new file mode 100644 index 000000000000..e6d800358dd6 --- /dev/null +++ b/include/linux/apm-emulation.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* -*- linux-c -*- | ||
2 | * | ||
3 | * (C) 2003 zecke@handhelds.org | ||
4 | * | ||
5 | * GPL version 2 | ||
6 | * | ||
7 | * based on arch/arm/kernel/apm.c | ||
8 | * factor out the information needed by architectures to provide | ||
9 | * apm status | ||
10 | */ | ||
11 | #ifndef __LINUX_APM_EMULATION_H | ||
12 | #define __LINUX_APM_EMULATION_H | ||
13 | |||
14 | #include <linux/apm_bios.h> | ||
15 | |||
16 | /* | ||
17 | * This structure gets filled in by the machine specific 'get_power_status' | ||
18 | * implementation. Any fields which are not set default to a safe value. | ||
19 | */ | ||
20 | struct apm_power_info { | ||
21 | unsigned char ac_line_status; | ||
22 | #define APM_AC_OFFLINE 0 | ||
23 | #define APM_AC_ONLINE 1 | ||
24 | #define APM_AC_BACKUP 2 | ||
25 | #define APM_AC_UNKNOWN 0xff | ||
26 | |||
27 | unsigned char battery_status; | ||
28 | #define APM_BATTERY_STATUS_HIGH 0 | ||
29 | #define APM_BATTERY_STATUS_LOW 1 | ||
30 | #define APM_BATTERY_STATUS_CRITICAL 2 | ||
31 | #define APM_BATTERY_STATUS_CHARGING 3 | ||
32 | #define APM_BATTERY_STATUS_NOT_PRESENT 4 | ||
33 | #define APM_BATTERY_STATUS_UNKNOWN 0xff | ||
34 | |||
35 | unsigned char battery_flag; | ||
36 | #define APM_BATTERY_FLAG_HIGH (1 << 0) | ||
37 | #define APM_BATTERY_FLAG_LOW (1 << 1) | ||
38 | #define APM_BATTERY_FLAG_CRITICAL (1 << 2) | ||
39 | #define APM_BATTERY_FLAG_CHARGING (1 << 3) | ||
40 | #define APM_BATTERY_FLAG_NOT_PRESENT (1 << 7) | ||
41 | #define APM_BATTERY_FLAG_UNKNOWN 0xff | ||
42 | |||
43 | int battery_life; | ||
44 | int time; | ||
45 | int units; | ||
46 | #define APM_UNITS_MINS 0 | ||
47 | #define APM_UNITS_SECS 1 | ||
48 | #define APM_UNITS_UNKNOWN -1 | ||
49 | |||
50 | }; | ||
51 | |||
52 | /* | ||
53 | * This allows machines to provide their own "apm get power status" function. | ||
54 | */ | ||
55 | extern void (*apm_get_power_status)(struct apm_power_info *); | ||
56 | |||
57 | /* | ||
58 | * Queue an event (APM_SYS_SUSPEND or APM_CRITICAL_SUSPEND) | ||
59 | */ | ||
60 | void apm_queue_event(apm_event_t event); | ||
61 | |||
62 | #endif /* __LINUX_APM_EMULATION_H */ | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1df941648a57..272736e37990 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -44,9 +44,9 @@ enum { | |||
44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | 44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ |
45 | 45 | ||
46 | ATA_ID_WORDS = 256, | 46 | ATA_ID_WORDS = 256, |
47 | ATA_ID_SERNO_OFS = 10, | 47 | ATA_ID_SERNO = 10, |
48 | ATA_ID_FW_REV_OFS = 23, | 48 | ATA_ID_FW_REV = 23, |
49 | ATA_ID_PROD_OFS = 27, | 49 | ATA_ID_PROD = 27, |
50 | ATA_ID_OLD_PIO_MODES = 51, | 50 | ATA_ID_OLD_PIO_MODES = 51, |
51 | ATA_ID_FIELD_VALID = 53, | 51 | ATA_ID_FIELD_VALID = 53, |
52 | ATA_ID_MWDMA_MODES = 63, | 52 | ATA_ID_MWDMA_MODES = 63, |
@@ -58,8 +58,11 @@ enum { | |||
58 | ATA_ID_MAJOR_VER = 80, | 58 | ATA_ID_MAJOR_VER = 80, |
59 | ATA_ID_PIO4 = (1 << 1), | 59 | ATA_ID_PIO4 = (1 << 1), |
60 | 60 | ||
61 | ATA_ID_SERNO_LEN = 20, | ||
62 | ATA_ID_FW_REV_LEN = 8, | ||
63 | ATA_ID_PROD_LEN = 40, | ||
64 | |||
61 | ATA_PCI_CTL_OFS = 2, | 65 | ATA_PCI_CTL_OFS = 2, |
62 | ATA_SERNO_LEN = 20, | ||
63 | ATA_UDMA0 = (1 << 0), | 66 | ATA_UDMA0 = (1 << 0), |
64 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), | 67 | ATA_UDMA1 = ATA_UDMA0 | (1 << 1), |
65 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), | 68 | ATA_UDMA2 = ATA_UDMA1 | (1 << 2), |
@@ -296,6 +299,8 @@ struct ata_taskfile { | |||
296 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) | 299 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) |
297 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 300 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) |
298 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) | 301 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) |
302 | #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) | ||
303 | #define ata_id_has_iordy(id) ((id)[49] & (1 << 9)) | ||
299 | #define ata_id_u32(id,n) \ | 304 | #define ata_id_u32(id,n) \ |
300 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) | 305 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) |
301 | #define ata_id_u64(id,n) \ | 306 | #define ata_id_u64(id,n) \ |
@@ -347,7 +352,7 @@ static inline int ata_drive_40wire(const u16 *dev_id) | |||
347 | { | 352 | { |
348 | if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id)) | 353 | if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id)) |
349 | return 0; /* SATA */ | 354 | return 0; /* SATA */ |
350 | if (dev_id[93] & 0x4000) | 355 | if ((dev_id[93] & 0xE000) == 0x6000) |
351 | return 0; /* 80 wire */ | 356 | return 0; /* 80 wire */ |
352 | return 1; | 357 | return 1; |
353 | } | 358 | } |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 75b8baca08f3..d12984ddaa9f 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -182,7 +182,7 @@ extern rwlock_t atalk_interfaces_lock; | |||
182 | 182 | ||
183 | extern struct atalk_route atrtr_default; | 183 | extern struct atalk_route atrtr_default; |
184 | 184 | ||
185 | extern struct file_operations atalk_seq_arp_fops; | 185 | extern const struct file_operations atalk_seq_arp_fops; |
186 | 186 | ||
187 | extern int sysctl_aarp_expiry_time; | 187 | extern int sysctl_aarp_expiry_time; |
188 | extern int sysctl_aarp_tick_time; | 188 | extern int sysctl_aarp_tick_time; |
diff --git a/include/linux/atmarp.h b/include/linux/atmarp.h index ee108f9e9cb7..231f4bdec730 100644 --- a/include/linux/atmarp.h +++ b/include/linux/atmarp.h | |||
@@ -6,9 +6,7 @@ | |||
6 | #ifndef _LINUX_ATMARP_H | 6 | #ifndef _LINUX_ATMARP_H |
7 | #define _LINUX_ATMARP_H | 7 | #define _LINUX_ATMARP_H |
8 | 8 | ||
9 | #ifdef __KERNEL__ | ||
10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
11 | #endif | ||
12 | #include <linux/atmapi.h> | 10 | #include <linux/atmapi.h> |
13 | #include <linux/atmioc.h> | 11 | #include <linux/atmioc.h> |
14 | 12 | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 0e07db6cc0d0..229fa012c893 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -89,6 +89,7 @@ | |||
89 | #define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ | 89 | #define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ |
90 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ | 90 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ |
91 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ | 91 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ |
92 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | ||
92 | 93 | ||
93 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 94 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
94 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 95 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -387,6 +388,7 @@ extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode | |||
387 | extern int audit_bprm(struct linux_binprm *bprm); | 388 | extern int audit_bprm(struct linux_binprm *bprm); |
388 | extern int audit_socketcall(int nargs, unsigned long *args); | 389 | extern int audit_socketcall(int nargs, unsigned long *args); |
389 | extern int audit_sockaddr(int len, void *addr); | 390 | extern int audit_sockaddr(int len, void *addr); |
391 | extern int __audit_fd_pair(int fd1, int fd2); | ||
390 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); | 392 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); |
391 | extern int audit_set_macxattr(const char *name); | 393 | extern int audit_set_macxattr(const char *name); |
392 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); | 394 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); |
@@ -401,6 +403,12 @@ static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | |||
401 | return __audit_ipc_obj(ipcp); | 403 | return __audit_ipc_obj(ipcp); |
402 | return 0; | 404 | return 0; |
403 | } | 405 | } |
406 | static inline int audit_fd_pair(int fd1, int fd2) | ||
407 | { | ||
408 | if (unlikely(!audit_dummy_context())) | ||
409 | return __audit_fd_pair(fd1, fd2); | ||
410 | return 0; | ||
411 | } | ||
404 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 412 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
405 | { | 413 | { |
406 | if (unlikely(!audit_dummy_context())) | 414 | if (unlikely(!audit_dummy_context())) |
@@ -459,6 +467,7 @@ extern int audit_n_rules; | |||
459 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) | 467 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) |
460 | #define audit_bprm(p) ({ 0; }) | 468 | #define audit_bprm(p) ({ 0; }) |
461 | #define audit_socketcall(n,a) ({ 0; }) | 469 | #define audit_socketcall(n,a) ({ 0; }) |
470 | #define audit_fd_pair(n,a) ({ 0; }) | ||
462 | #define audit_sockaddr(len, addr) ({ 0; }) | 471 | #define audit_sockaddr(len, addr) ({ 0; }) |
463 | #define audit_avc_path(dentry, mnt) ({ 0; }) | 472 | #define audit_avc_path(dentry, mnt) ({ 0; }) |
464 | #define audit_set_macxattr(n) do { ; } while (0) | 473 | #define audit_set_macxattr(n) do { ; } while (0) |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index c1e82c514443..2d956cd566ae 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -59,6 +59,7 @@ struct linux_binfmt { | |||
59 | int (*load_shlib)(struct file *); | 59 | int (*load_shlib)(struct file *); |
60 | int (*core_dump)(long signr, struct pt_regs * regs, struct file * file); | 60 | int (*core_dump)(long signr, struct pt_regs * regs, struct file * file); |
61 | unsigned long min_coredump; /* minimal dump size */ | 61 | unsigned long min_coredump; /* minimal dump size */ |
62 | int hasvdso; | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | extern int register_binfmt(struct linux_binfmt *); | 65 | extern int register_binfmt(struct linux_binfmt *); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 36a6eacefe20..83dcd8c0e974 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -82,7 +82,6 @@ struct cfq_io_context { | |||
82 | 82 | ||
83 | unsigned long last_end_request; | 83 | unsigned long last_end_request; |
84 | sector_t last_request_pos; | 84 | sector_t last_request_pos; |
85 | unsigned long last_queue; | ||
86 | 85 | ||
87 | unsigned long ttime_total; | 86 | unsigned long ttime_total; |
88 | unsigned long ttime_samples; | 87 | unsigned long ttime_samples; |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5d9fb0e94156..dd27b1c7227f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -34,6 +34,7 @@ enum bh_state_bits { | |||
34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
35 | BH_Ordered, /* ordered write */ | 35 | BH_Ordered, /* ordered write */ |
36 | BH_Eopnotsupp, /* operation not supported (barrier) */ | 36 | BH_Eopnotsupp, /* operation not supported (barrier) */ |
37 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | ||
37 | 38 | ||
38 | BH_PrivateStart,/* not a state bit, but the first bit available | 39 | BH_PrivateStart,/* not a state bit, but the first bit available |
39 | * for private allocation by other entities | 40 | * for private allocation by other entities |
@@ -126,6 +127,7 @@ BUFFER_FNS(Boundary, boundary) | |||
126 | BUFFER_FNS(Write_EIO, write_io_error) | 127 | BUFFER_FNS(Write_EIO, write_io_error) |
127 | BUFFER_FNS(Ordered, ordered) | 128 | BUFFER_FNS(Ordered, ordered) |
128 | BUFFER_FNS(Eopnotsupp, eopnotsupp) | 129 | BUFFER_FNS(Eopnotsupp, eopnotsupp) |
130 | BUFFER_FNS(Unwritten, unwritten) | ||
129 | 131 | ||
130 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) | 132 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) |
131 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) | 133 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) |
@@ -172,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *); | |||
172 | void thaw_bdev(struct block_device *, struct super_block *); | 174 | void thaw_bdev(struct block_device *, struct super_block *); |
173 | int fsync_super(struct super_block *); | 175 | int fsync_super(struct super_block *); |
174 | int fsync_no_super(struct block_device *); | 176 | int fsync_no_super(struct block_device *); |
175 | struct buffer_head *__find_get_block(struct block_device *, sector_t, int); | 177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
176 | struct buffer_head * __getblk(struct block_device *, sector_t, int); | 178 | unsigned size); |
179 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | ||
180 | unsigned size); | ||
177 | void __brelse(struct buffer_head *); | 181 | void __brelse(struct buffer_head *); |
178 | void __bforget(struct buffer_head *); | 182 | void __bforget(struct buffer_head *); |
179 | void __breadahead(struct block_device *, sector_t block, int size); | 183 | void __breadahead(struct block_device *, sector_t block, unsigned int size); |
180 | struct buffer_head *__bread(struct block_device *, sector_t block, int size); | 184 | struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); |
181 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); | 185 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
182 | void free_buffer_head(struct buffer_head * bh); | 186 | void free_buffer_head(struct buffer_head * bh); |
183 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); | 187 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); |
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild index 56499ab9e32e..79bedddfd9ca 100644 --- a/include/linux/byteorder/Kbuild +++ b/include/linux/byteorder/Kbuild | |||
@@ -1,7 +1,5 @@ | |||
1 | header-y += big_endian.h | 1 | header-y += big_endian.h |
2 | header-y += little_endian.h | 2 | header-y += little_endian.h |
3 | header-y += pdp_endian.h | ||
4 | 3 | ||
5 | unifdef-y += generic.h | 4 | unifdef-y += generic.h |
6 | unifdef-y += swabb.h | ||
7 | unifdef-y += swab.h | 5 | unifdef-y += swab.h |
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h deleted file mode 100644 index 618631cbc6e3..000000000000 --- a/include/linux/byteorder/pdp_endian.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
2 | #define _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
3 | |||
4 | /* | ||
5 | * Could have been named NUXI-endian, but we use the same name as in glibc. | ||
6 | * hopefully only the PDP and its evolutions (old VAXen in compatibility mode) | ||
7 | * should ever use this braindead byteorder. | ||
8 | * This file *should* work, but has not been tested. | ||
9 | * | ||
10 | * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412 | ||
11 | * | ||
12 | * I thought vaxen were NUXI-endian, but was told they were correct-endian | ||
13 | * (little-endian), though indeed there existed NUXI-endian machines | ||
14 | * (DEC PDP-11 and old VAXen in compatibility mode). | ||
15 | * This makes this file a bit useless, but as a proof-of-concept. | ||
16 | * | ||
17 | * But what does a __u64 look like: is it 34127856 or 78563412 ??? | ||
18 | * I don't dare imagine! Hence, no 64-bit byteorder support yet. | ||
19 | * Hopefully, there 64-bit pdp-endian support shouldn't ever be required. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __PDP_ENDIAN | ||
24 | #define __PDP_ENDIAN 3412 | ||
25 | #endif | ||
26 | #ifndef __PDP_ENDIAN_BITFIELD | ||
27 | #define __PDP_ENDIAN_BITFIELD | ||
28 | #endif | ||
29 | |||
30 | #include <linux/byteorder/swab.h> | ||
31 | #include <linux/byteorder/swabb.h> | ||
32 | |||
33 | #define __constant_htonl(x) ___constant_swahb32((x)) | ||
34 | #define __constant_ntohl(x) ___constant_swahb32((x)) | ||
35 | #define __constant_htons(x) ___constant_swab16((x)) | ||
36 | #define __constant_ntohs(x) ___constant_swab16((x)) | ||
37 | #define __constant_cpu_to_le64(x) I DON'T KNOW | ||
38 | #define __constant_le64_to_cpu(x) I DON'T KNOW | ||
39 | #define __constant_cpu_to_le32(x) ___constant_swahw32((x)) | ||
40 | #define __constant_le32_to_cpu(x) ___constant_swahw32((x)) | ||
41 | #define __constant_cpu_to_le16(x) ((__u16)(x) | ||
42 | #define __constant_le16_to_cpu(x) ((__u16)(x) | ||
43 | #define __constant_cpu_to_be64(x) I DON'T KNOW | ||
44 | #define __constant_be64_to_cpu(x) I DON'T KNOW | ||
45 | #define __constant_cpu_to_be32(x) ___constant_swahb32((x)) | ||
46 | #define __constant_be32_to_cpu(x) ___constant_swahb32((x)) | ||
47 | #define __constant_cpu_to_be16(x) ___constant_swab16((x)) | ||
48 | #define __constant_be16_to_cpu(x) ___constant_swab16((x)) | ||
49 | #define __cpu_to_le64(x) I DON'T KNOW | ||
50 | #define __le64_to_cpu(x) I DON'T KNOW | ||
51 | #define __cpu_to_le32(x) ___swahw32((x)) | ||
52 | #define __le32_to_cpu(x) ___swahw32((x)) | ||
53 | #define __cpu_to_le16(x) ((__u16)(x) | ||
54 | #define __le16_to_cpu(x) ((__u16)(x) | ||
55 | #define __cpu_to_be64(x) I DON'T KNOW | ||
56 | #define __be64_to_cpu(x) I DON'T KNOW | ||
57 | #define __cpu_to_be32(x) __swahb32((x)) | ||
58 | #define __be32_to_cpu(x) __swahb32((x)) | ||
59 | #define __cpu_to_be16(x) __swab16((x)) | ||
60 | #define __be16_to_cpu(x) __swab16((x)) | ||
61 | #define __cpu_to_le64p(x) I DON'T KNOW | ||
62 | #define __le64_to_cpup(x) I DON'T KNOW | ||
63 | #define __cpu_to_le32p(x) ___swahw32p((x)) | ||
64 | #define __le32_to_cpup(x) ___swahw32p((x)) | ||
65 | #define __cpu_to_le16p(x) (*(__u16*)(x)) | ||
66 | #define __le16_to_cpup(x) (*(__u16*)(x)) | ||
67 | #define __cpu_to_be64p(x) I DON'T KNOW | ||
68 | #define __be64_to_cpup(x) I DON'T KNOW | ||
69 | #define __cpu_to_be32p(x) __swahb32p((x)) | ||
70 | #define __be32_to_cpup(x) __swahb32p((x)) | ||
71 | #define __cpu_to_be16p(x) __swab16p((x)) | ||
72 | #define __be16_to_cpup(x) __swab16p((x)) | ||
73 | #define __cpu_to_le64s(x) I DON'T KNOW | ||
74 | #define __le64_to_cpus(x) I DON'T KNOW | ||
75 | #define __cpu_to_le32s(x) ___swahw32s((x)) | ||
76 | #define __le32_to_cpus(x) ___swahw32s((x)) | ||
77 | #define __cpu_to_le16s(x) do {} while (0) | ||
78 | #define __le16_to_cpus(x) do {} while (0) | ||
79 | #define __cpu_to_be64s(x) I DON'T KNOW | ||
80 | #define __be64_to_cpus(x) I DON'T KNOW | ||
81 | #define __cpu_to_be32s(x) __swahb32s((x)) | ||
82 | #define __be32_to_cpus(x) __swahb32s((x)) | ||
83 | #define __cpu_to_be16s(x) __swab16s((x)) | ||
84 | #define __be16_to_cpus(x) __swab16s((x)) | ||
85 | |||
86 | #include <linux/byteorder/generic.h> | ||
87 | |||
88 | #endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */ | ||
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index ae5e5f914bf4..8c780c7d779e 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | #define ___swahw32(x) \ | 30 | #define ___swahw32(x) \ |
29 | ({ \ | 31 | ({ \ |
30 | __u32 __x = (x); \ | 32 | __u32 __x = (x); \ |
@@ -77,19 +79,14 @@ | |||
77 | /* | 79 | /* |
78 | * Allow constant folding | 80 | * Allow constant folding |
79 | */ | 81 | */ |
80 | #if defined(__GNUC__) && defined(__OPTIMIZE__) | 82 | #define __swahw32(x) \ |
81 | # define __swahw32(x) \ | ||
82 | (__builtin_constant_p((__u32)(x)) ? \ | 83 | (__builtin_constant_p((__u32)(x)) ? \ |
83 | ___swahw32((x)) : \ | 84 | ___swahw32((x)) : \ |
84 | __fswahw32((x))) | 85 | __fswahw32((x))) |
85 | # define __swahb32(x) \ | 86 | #define __swahb32(x) \ |
86 | (__builtin_constant_p((__u32)(x)) ? \ | 87 | (__builtin_constant_p((__u32)(x)) ? \ |
87 | ___swahb32((x)) : \ | 88 | ___swahb32((x)) : \ |
88 | __fswahb32((x))) | 89 | __fswahb32((x))) |
89 | #else | ||
90 | # define __swahw32(x) __fswahw32(x) | ||
91 | # define __swahb32(x) __fswahb32(x) | ||
92 | #endif /* OPTIMIZE */ | ||
93 | 90 | ||
94 | 91 | ||
95 | static inline __u32 __fswahw32(__u32 x) | 92 | static inline __u32 __fswahw32(__u32 x) |
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr) | |||
128 | */ | 125 | */ |
129 | #endif /* __BYTEORDER_HAS_U64__ */ | 126 | #endif /* __BYTEORDER_HAS_U64__ */ |
130 | 127 | ||
131 | #if defined(__KERNEL__) | ||
132 | #define swahw32 __swahw32 | 128 | #define swahw32 __swahw32 |
133 | #define swahb32 __swahb32 | 129 | #define swahb32 __swahb32 |
134 | #define swahw32p __swahw32p | 130 | #define swahw32p __swahw32p |
135 | #define swahb32p __swahb32p | 131 | #define swahb32p __swahb32p |
136 | #define swahw32s __swahw32s | 132 | #define swahw32s __swahw32s |
137 | #define swahb32s __swahb32s | 133 | #define swahb32s __swahb32s |
138 | #endif | ||
139 | 134 | ||
140 | #endif /* _LINUX_BYTEORDER_SWABB_H */ | 135 | #endif /* _LINUX_BYTEORDER_SWABB_H */ |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h new file mode 100644 index 000000000000..0bc45e69da5a --- /dev/null +++ b/include/linux/cfag12864b.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864b.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-12 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _CFAG12864B_H_ | ||
26 | #define _CFAG12864B_H_ | ||
27 | |||
28 | #define CFAG12864B_WIDTH (128) | ||
29 | #define CFAG12864B_HEIGHT (64) | ||
30 | #define CFAG12864B_CONTROLLERS (2) | ||
31 | #define CFAG12864B_PAGES (8) | ||
32 | #define CFAG12864B_ADDRESSES (64) | ||
33 | #define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \ | ||
34 | (CFAG12864B_PAGES) * \ | ||
35 | (CFAG12864B_ADDRESSES)) | ||
36 | |||
37 | /* | ||
38 | * The driver will blit this buffer to the LCD | ||
39 | * | ||
40 | * Its size is CFAG12864B_SIZE. | ||
41 | */ | ||
42 | extern unsigned char * cfag12864b_buffer; | ||
43 | |||
44 | /* | ||
45 | * Get the refresh rate of the LCD | ||
46 | * | ||
47 | * Returns the refresh rate (hertzs). | ||
48 | */ | ||
49 | extern unsigned int cfag12864b_getrate(void); | ||
50 | |||
51 | /* | ||
52 | * Enable refreshing | ||
53 | * | ||
54 | * Returns 0 if successful (anyone was using it), | ||
55 | * or != 0 if failed (someone is using it). | ||
56 | */ | ||
57 | extern unsigned char cfag12864b_enable(void); | ||
58 | |||
59 | /* | ||
60 | * Disable refreshing | ||
61 | * | ||
62 | * You should call this only when you finish using the LCD. | ||
63 | */ | ||
64 | extern void cfag12864b_disable(void); | ||
65 | |||
66 | /* | ||
67 | * Is enabled refreshing? (is anyone using the module?) | ||
68 | * | ||
69 | * Returns 0 if refreshing is not enabled (anyone is using it), | ||
70 | * or != 0 if refreshing is enabled (someone is using it). | ||
71 | * | ||
72 | * Useful for buffer read-only modules. | ||
73 | */ | ||
74 | extern unsigned char cfag12864b_isenabled(void); | ||
75 | |||
76 | #endif /* _CFAG12864B_H_ */ | ||
77 | |||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h new file mode 100644 index 000000000000..4ea7e7bcfafe --- /dev/null +++ b/include/linux/clockchips.h | |||
@@ -0,0 +1,142 @@ | |||
1 | /* linux/include/linux/clockchips.h | ||
2 | * | ||
3 | * This file contains the structure definitions for clockchips. | ||
4 | * | ||
5 | * If you are not a clockchip, or the time of day code, you should | ||
6 | * not be including this file! | ||
7 | */ | ||
8 | #ifndef _LINUX_CLOCKCHIPS_H | ||
9 | #define _LINUX_CLOCKCHIPS_H | ||
10 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
12 | |||
13 | #include <linux/clocksource.h> | ||
14 | #include <linux/cpumask.h> | ||
15 | #include <linux/ktime.h> | ||
16 | #include <linux/notifier.h> | ||
17 | |||
18 | struct clock_event_device; | ||
19 | |||
20 | /* Clock event mode commands */ | ||
21 | enum clock_event_mode { | ||
22 | CLOCK_EVT_MODE_UNUSED = 0, | ||
23 | CLOCK_EVT_MODE_SHUTDOWN, | ||
24 | CLOCK_EVT_MODE_PERIODIC, | ||
25 | CLOCK_EVT_MODE_ONESHOT, | ||
26 | }; | ||
27 | |||
28 | /* Clock event notification values */ | ||
29 | enum clock_event_nofitiers { | ||
30 | CLOCK_EVT_NOTIFY_ADD, | ||
31 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
32 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
33 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
34 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
35 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
36 | CLOCK_EVT_NOTIFY_RESUME, | ||
37 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | * Clock event features | ||
42 | */ | ||
43 | #define CLOCK_EVT_FEAT_PERIODIC 0x000001 | ||
44 | #define CLOCK_EVT_FEAT_ONESHOT 0x000002 | ||
45 | /* | ||
46 | * x86(64) specific misfeatures: | ||
47 | * | ||
48 | * - Clockevent source stops in C3 State and needs broadcast support. | ||
49 | * - Local APIC timer is used as a dummy device. | ||
50 | */ | ||
51 | #define CLOCK_EVT_FEAT_C3STOP 0x000004 | ||
52 | #define CLOCK_EVT_FEAT_DUMMY 0x000008 | ||
53 | |||
54 | /** | ||
55 | * struct clock_event_device - clock event device descriptor | ||
56 | * @name: ptr to clock event name | ||
57 | * @hints: usage hints | ||
58 | * @max_delta_ns: maximum delta value in ns | ||
59 | * @min_delta_ns: minimum delta value in ns | ||
60 | * @mult: nanosecond to cycles multiplier | ||
61 | * @shift: nanoseconds to cycles divisor (power of two) | ||
62 | * @rating: variable to rate clock event devices | ||
63 | * @irq: irq number (only for non cpu local devices) | ||
64 | * @cpumask: cpumask to indicate for which cpus this device works | ||
65 | * @set_next_event: set next event | ||
66 | * @set_mode: set mode function | ||
67 | * @evthandler: Assigned by the framework to be called by the low | ||
68 | * level handler of the event source | ||
69 | * @broadcast: function to broadcast events | ||
70 | * @list: list head for the management code | ||
71 | * @mode: operating mode assigned by the management code | ||
72 | * @next_event: local storage for the next event in oneshot mode | ||
73 | */ | ||
74 | struct clock_event_device { | ||
75 | const char *name; | ||
76 | unsigned int features; | ||
77 | unsigned long max_delta_ns; | ||
78 | unsigned long min_delta_ns; | ||
79 | unsigned long mult; | ||
80 | int shift; | ||
81 | int rating; | ||
82 | int irq; | ||
83 | cpumask_t cpumask; | ||
84 | int (*set_next_event)(unsigned long evt, | ||
85 | struct clock_event_device *); | ||
86 | void (*set_mode)(enum clock_event_mode mode, | ||
87 | struct clock_event_device *); | ||
88 | void (*event_handler)(struct clock_event_device *); | ||
89 | void (*broadcast)(cpumask_t mask); | ||
90 | struct list_head list; | ||
91 | enum clock_event_mode mode; | ||
92 | ktime_t next_event; | ||
93 | }; | ||
94 | |||
95 | /* | ||
96 | * Calculate a multiplication factor for scaled math, which is used to convert | ||
97 | * nanoseconds based values to clock ticks: | ||
98 | * | ||
99 | * clock_ticks = (nanoseconds * factor) >> shift. | ||
100 | * | ||
101 | * div_sc is the rearranged equation to calculate a factor from a given clock | ||
102 | * ticks / nanoseconds ratio: | ||
103 | * | ||
104 | * factor = (clock_ticks << shift) / nanoseconds | ||
105 | */ | ||
106 | static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec, | ||
107 | int shift) | ||
108 | { | ||
109 | uint64_t tmp = ((uint64_t)ticks) << shift; | ||
110 | |||
111 | do_div(tmp, nsec); | ||
112 | return (unsigned long) tmp; | ||
113 | } | ||
114 | |||
115 | /* Clock event layer functions */ | ||
116 | extern unsigned long clockevent_delta2ns(unsigned long latch, | ||
117 | struct clock_event_device *evt); | ||
118 | extern void clockevents_register_device(struct clock_event_device *dev); | ||
119 | |||
120 | extern void clockevents_exchange_device(struct clock_event_device *old, | ||
121 | struct clock_event_device *new); | ||
122 | extern | ||
123 | struct clock_event_device *clockevents_request_device(unsigned int features, | ||
124 | cpumask_t cpumask); | ||
125 | extern void clockevents_release_device(struct clock_event_device *dev); | ||
126 | extern void clockevents_set_mode(struct clock_event_device *dev, | ||
127 | enum clock_event_mode mode); | ||
128 | extern int clockevents_register_notifier(struct notifier_block *nb); | ||
129 | extern void clockevents_unregister_notifier(struct notifier_block *nb); | ||
130 | extern int clockevents_program_event(struct clock_event_device *dev, | ||
131 | ktime_t expires, ktime_t now); | ||
132 | |||
133 | extern void clockevents_notify(unsigned long reason, void *arg); | ||
134 | |||
135 | #else | ||
136 | |||
137 | static inline void clockevents_resume_events(void) { } | ||
138 | #define clockevents_notify(reason, arg) do { } while (0) | ||
139 | |||
140 | #endif | ||
141 | |||
142 | #endif | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 1622d23a8dc3..daa4940cc0f1 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -12,11 +12,13 @@ | |||
12 | #include <linux/timex.h> | 12 | #include <linux/timex.h> |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/timer.h> | ||
15 | #include <asm/div64.h> | 16 | #include <asm/div64.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
18 | /* clocksource cycle base type */ | 19 | /* clocksource cycle base type */ |
19 | typedef u64 cycle_t; | 20 | typedef u64 cycle_t; |
21 | struct clocksource; | ||
20 | 22 | ||
21 | /** | 23 | /** |
22 | * struct clocksource - hardware abstraction for a free running counter | 24 | * struct clocksource - hardware abstraction for a free running counter |
@@ -44,8 +46,8 @@ typedef u64 cycle_t; | |||
44 | * subtraction of non 64 bit counters | 46 | * subtraction of non 64 bit counters |
45 | * @mult: cycle to nanosecond multiplier | 47 | * @mult: cycle to nanosecond multiplier |
46 | * @shift: cycle to nanosecond divisor (power of two) | 48 | * @shift: cycle to nanosecond divisor (power of two) |
47 | * @update_callback: called when safe to alter clocksource values | 49 | * @flags: flags describing special properties |
48 | * @is_continuous: defines if clocksource is free-running. | 50 | * @vread: vsyscall based read |
49 | * @cycle_interval: Used internally by timekeeping core, please ignore. | 51 | * @cycle_interval: Used internally by timekeeping core, please ignore. |
50 | * @xtime_interval: Used internally by timekeeping core, please ignore. | 52 | * @xtime_interval: Used internally by timekeeping core, please ignore. |
51 | */ | 53 | */ |
@@ -57,15 +59,30 @@ struct clocksource { | |||
57 | cycle_t mask; | 59 | cycle_t mask; |
58 | u32 mult; | 60 | u32 mult; |
59 | u32 shift; | 61 | u32 shift; |
60 | int (*update_callback)(void); | 62 | unsigned long flags; |
61 | int is_continuous; | 63 | cycle_t (*vread)(void); |
62 | 64 | ||
63 | /* timekeeping specific data, ignore */ | 65 | /* timekeeping specific data, ignore */ |
64 | cycle_t cycle_last, cycle_interval; | 66 | cycle_t cycle_last, cycle_interval; |
65 | u64 xtime_nsec, xtime_interval; | 67 | u64 xtime_nsec, xtime_interval; |
66 | s64 error; | 68 | s64 error; |
69 | |||
70 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | ||
71 | /* Watchdog related data, used by the framework */ | ||
72 | struct list_head wd_list; | ||
73 | cycle_t wd_last; | ||
74 | #endif | ||
67 | }; | 75 | }; |
68 | 76 | ||
77 | /* | ||
78 | * Clock source flags bits:: | ||
79 | */ | ||
80 | #define CLOCK_SOURCE_IS_CONTINUOUS 0x01 | ||
81 | #define CLOCK_SOURCE_MUST_VERIFY 0x02 | ||
82 | |||
83 | #define CLOCK_SOURCE_WATCHDOG 0x10 | ||
84 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 | ||
85 | |||
69 | /* simplify initialization of mask field */ | 86 | /* simplify initialization of mask field */ |
70 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) | 87 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) |
71 | 88 | ||
@@ -178,8 +195,16 @@ static inline void clocksource_calculate_interval(struct clocksource *c, | |||
178 | 195 | ||
179 | 196 | ||
180 | /* used to install a new clocksource */ | 197 | /* used to install a new clocksource */ |
181 | int clocksource_register(struct clocksource*); | 198 | extern int clocksource_register(struct clocksource*); |
182 | void clocksource_reselect(void); | 199 | extern struct clocksource* clocksource_get_next(void); |
183 | struct clocksource* clocksource_get_next(void); | 200 | extern void clocksource_change_rating(struct clocksource *cs, int rating); |
201 | |||
202 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | ||
203 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); | ||
204 | #else | ||
205 | static inline void update_vsyscall(struct timespec *ts, struct clocksource *c) | ||
206 | { | ||
207 | } | ||
208 | #endif | ||
184 | 209 | ||
185 | #endif /* _LINUX_CLOCKSOURCE_H */ | 210 | #endif /* _LINUX_CLOCKSOURCE_H */ |
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 4c2632a8d31b..e4ac016ad272 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/coda_fs_i.h> | 23 | #include <linux/coda_fs_i.h> |
24 | 24 | ||
25 | /* operations */ | 25 | /* operations */ |
26 | extern struct inode_operations coda_dir_inode_operations; | 26 | extern const struct inode_operations coda_dir_inode_operations; |
27 | extern struct inode_operations coda_file_inode_operations; | 27 | extern const struct inode_operations coda_file_inode_operations; |
28 | extern struct inode_operations coda_ioctl_inode_operations; | 28 | extern const struct inode_operations coda_ioctl_inode_operations; |
29 | 29 | ||
30 | extern const struct address_space_operations coda_file_aops; | 30 | extern const struct address_space_operations coda_file_aops; |
31 | extern const struct address_space_operations coda_symlink_aops; | 31 | extern const struct address_space_operations coda_symlink_aops; |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 6e1c44a935d4..9008eabb9c3d 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -27,6 +27,13 @@ | |||
27 | #define __inline__ __inline__ __attribute__((always_inline)) | 27 | #define __inline__ __inline__ __attribute__((always_inline)) |
28 | #define __inline __inline __attribute__((always_inline)) | 28 | #define __inline __inline __attribute__((always_inline)) |
29 | #define __deprecated __attribute__((deprecated)) | 29 | #define __deprecated __attribute__((deprecated)) |
30 | #define __packed __attribute__((packed)) | ||
31 | #define __weak __attribute__((weak)) | ||
32 | #define __naked __attribute__((naked)) | ||
33 | #define __noreturn __attribute__((noreturn)) | ||
34 | #define __pure __attribute__((pure)) | ||
35 | #define __aligned(x) __attribute__((aligned(x))) | ||
36 | #define __printf(a,b) __attribute__((format(printf,a,b))) | ||
30 | #define noinline __attribute__((noinline)) | 37 | #define noinline __attribute__((noinline)) |
31 | #define __attribute_pure__ __attribute__((pure)) | 38 | #define __attribute_pure__ __attribute__((pure)) |
32 | #define __attribute_const__ __attribute__((__const__)) | 39 | #define __attribute_const__ __attribute__((__const__)) |
diff --git a/include/linux/console.h b/include/linux/console.h index 7d0420274de0..de25ee3b7919 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -21,6 +21,7 @@ struct vc_data; | |||
21 | struct console_font_op; | 21 | struct console_font_op; |
22 | struct console_font; | 22 | struct console_font; |
23 | struct module; | 23 | struct module; |
24 | struct tty_struct; | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * this is what the terminal answers to a ESC-Z or csi0c query. | 27 | * this is what the terminal answers to a ESC-Z or csi0c query. |
@@ -132,6 +133,9 @@ static inline void resume_console(void) {} | |||
132 | int mda_console_init(void); | 133 | int mda_console_init(void); |
133 | void prom_con_init(void); | 134 | void prom_con_init(void); |
134 | 135 | ||
136 | void vcs_make_sysfs(struct tty_struct *tty); | ||
137 | void vcs_remove_sysfs(struct tty_struct *tty); | ||
138 | |||
135 | /* Some debug stub to catch some of the obvious races in the VT code */ | 139 | /* Some debug stub to catch some of the obvious races in the VT code */ |
136 | #if 1 | 140 | #if 1 |
137 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) | 141 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) |
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index ed6c0fee1ac7..a86162b26c0d 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/wait.h> | 12 | #include <linux/wait.h> |
13 | #include <linux/vt.h> | 13 | #include <linux/vt.h> |
14 | #include <linux/workqueue.h> | ||
14 | 15 | ||
15 | struct vt_struct; | 16 | struct vt_struct; |
16 | 17 | ||
@@ -103,6 +104,7 @@ struct vc_data { | |||
103 | 104 | ||
104 | struct vc { | 105 | struct vc { |
105 | struct vc_data *d; | 106 | struct vc_data *d; |
107 | struct work_struct SAK_work; | ||
106 | 108 | ||
107 | /* might add scrmem, vt_struct, kbd at some time, | 109 | /* might add scrmem, vt_struct, kbd at some time, |
108 | to have everything in one place - the disadvantage | 110 | to have everything in one place - the disadvantage |
@@ -110,6 +112,7 @@ struct vc { | |||
110 | }; | 112 | }; |
111 | 113 | ||
112 | extern struct vc vc_cons [MAX_NR_CONSOLES]; | 114 | extern struct vc vc_cons [MAX_NR_CONSOLES]; |
115 | extern void vc_SAK(struct work_struct *work); | ||
113 | 116 | ||
114 | #define CUR_DEF 0 | 117 | #define CUR_DEF 0 |
115 | #define CUR_NONE 1 | 118 | #define CUR_NONE 1 |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index bfb520212d71..769ddc6df492 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -49,10 +49,20 @@ struct notifier_block; | |||
49 | 49 | ||
50 | #ifdef CONFIG_SMP | 50 | #ifdef CONFIG_SMP |
51 | /* Need to know about CPUs going up/down? */ | 51 | /* Need to know about CPUs going up/down? */ |
52 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
53 | #ifdef CONFIG_HOTPLUG_CPU | 52 | #ifdef CONFIG_HOTPLUG_CPU |
53 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
54 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 54 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
55 | #else | 55 | #else |
56 | |||
57 | #ifndef MODULE | ||
58 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
59 | #else | ||
60 | static inline int register_cpu_notifier(struct notifier_block *nb) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | #endif | ||
65 | |||
56 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | 66 | static inline void unregister_cpu_notifier(struct notifier_block *nb) |
57 | { | 67 | { |
58 | } | 68 | } |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 7f008f6bfdc3..0899e2cdcdd1 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -84,9 +84,6 @@ struct cpufreq_policy { | |||
84 | unsigned int policy; /* see above */ | 84 | unsigned int policy; /* see above */ |
85 | struct cpufreq_governor *governor; /* see below */ | 85 | struct cpufreq_governor *governor; /* see below */ |
86 | 86 | ||
87 | struct mutex lock; /* CPU ->setpolicy or ->target may | ||
88 | only be called once a time */ | ||
89 | |||
90 | struct work_struct update; /* if update_policy() needs to be | 87 | struct work_struct update; /* if update_policy() needs to be |
91 | * called, but you're in IRQ context */ | 88 | * called, but you're in IRQ context */ |
92 | 89 | ||
@@ -172,11 +169,16 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, | |||
172 | unsigned int relation); | 169 | unsigned int relation); |
173 | 170 | ||
174 | 171 | ||
175 | extern int cpufreq_driver_getavg(struct cpufreq_policy *policy); | 172 | extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy); |
176 | 173 | ||
177 | int cpufreq_register_governor(struct cpufreq_governor *governor); | 174 | int cpufreq_register_governor(struct cpufreq_governor *governor); |
178 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); | 175 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); |
179 | 176 | ||
177 | int lock_policy_rwsem_read(int cpu); | ||
178 | int lock_policy_rwsem_write(int cpu); | ||
179 | void unlock_policy_rwsem_read(int cpu); | ||
180 | void unlock_policy_rwsem_write(int cpu); | ||
181 | |||
180 | 182 | ||
181 | /********************************************************************* | 183 | /********************************************************************* |
182 | * CPUFREQ DRIVER INTERFACE * | 184 | * CPUFREQ DRIVER INTERFACE * |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index fd404416f31c..826b15e914e2 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -55,7 +55,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | |||
55 | extern int cpuset_memory_pressure_enabled; | 55 | extern int cpuset_memory_pressure_enabled; |
56 | extern void __cpuset_memory_pressure_bump(void); | 56 | extern void __cpuset_memory_pressure_bump(void); |
57 | 57 | ||
58 | extern struct file_operations proc_cpuset_operations; | 58 | extern const struct file_operations proc_cpuset_operations; |
59 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 59 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
60 | 60 | ||
61 | extern void cpuset_lock(void); | 61 | extern void cpuset_lock(void); |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 4aa9046601da..779aa78ee643 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -51,15 +51,9 @@ | |||
51 | /* | 51 | /* |
52 | * Transform masks and values (for crt_flags). | 52 | * Transform masks and values (for crt_flags). |
53 | */ | 53 | */ |
54 | #define CRYPTO_TFM_MODE_MASK 0x000000ff | ||
55 | #define CRYPTO_TFM_REQ_MASK 0x000fff00 | 54 | #define CRYPTO_TFM_REQ_MASK 0x000fff00 |
56 | #define CRYPTO_TFM_RES_MASK 0xfff00000 | 55 | #define CRYPTO_TFM_RES_MASK 0xfff00000 |
57 | 56 | ||
58 | #define CRYPTO_TFM_MODE_ECB 0x00000001 | ||
59 | #define CRYPTO_TFM_MODE_CBC 0x00000002 | ||
60 | #define CRYPTO_TFM_MODE_CFB 0x00000004 | ||
61 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | ||
62 | |||
63 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 57 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
64 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | 58 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 |
65 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 59 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
@@ -71,12 +65,8 @@ | |||
71 | /* | 65 | /* |
72 | * Miscellaneous stuff. | 66 | * Miscellaneous stuff. |
73 | */ | 67 | */ |
74 | #define CRYPTO_UNSPEC 0 | ||
75 | #define CRYPTO_MAX_ALG_NAME 64 | 68 | #define CRYPTO_MAX_ALG_NAME 64 |
76 | 69 | ||
77 | #define CRYPTO_DIR_ENCRYPT 1 | ||
78 | #define CRYPTO_DIR_DECRYPT 0 | ||
79 | |||
80 | /* | 70 | /* |
81 | * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual | 71 | * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual |
82 | * declaration) is used to ensure that the crypto_tfm context structure is | 72 | * declaration) is used to ensure that the crypto_tfm context structure is |
@@ -148,19 +138,6 @@ struct cipher_alg { | |||
148 | unsigned int keylen); | 138 | unsigned int keylen); |
149 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 139 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
150 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); | 140 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
151 | |||
152 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, | ||
153 | u8 *dst, const u8 *src, | ||
154 | unsigned int nbytes) __deprecated; | ||
155 | unsigned int (*cia_decrypt_ecb)(const struct cipher_desc *desc, | ||
156 | u8 *dst, const u8 *src, | ||
157 | unsigned int nbytes) __deprecated; | ||
158 | unsigned int (*cia_encrypt_cbc)(const struct cipher_desc *desc, | ||
159 | u8 *dst, const u8 *src, | ||
160 | unsigned int nbytes) __deprecated; | ||
161 | unsigned int (*cia_decrypt_cbc)(const struct cipher_desc *desc, | ||
162 | u8 *dst, const u8 *src, | ||
163 | unsigned int nbytes) __deprecated; | ||
164 | }; | 141 | }; |
165 | 142 | ||
166 | struct digest_alg { | 143 | struct digest_alg { |
@@ -243,11 +220,6 @@ int crypto_unregister_alg(struct crypto_alg *alg); | |||
243 | #ifdef CONFIG_CRYPTO | 220 | #ifdef CONFIG_CRYPTO |
244 | int crypto_has_alg(const char *name, u32 type, u32 mask); | 221 | int crypto_has_alg(const char *name, u32 type, u32 mask); |
245 | #else | 222 | #else |
246 | static inline int crypto_alg_available(const char *name, u32 flags) | ||
247 | { | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static inline int crypto_has_alg(const char *name, u32 type, u32 mask) | 223 | static inline int crypto_has_alg(const char *name, u32 type, u32 mask) |
252 | { | 224 | { |
253 | return 0; | 225 | return 0; |
@@ -339,13 +311,18 @@ struct crypto_tfm { | |||
339 | void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; | 311 | void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; |
340 | }; | 312 | }; |
341 | 313 | ||
342 | #define crypto_cipher crypto_tfm | ||
343 | #define crypto_comp crypto_tfm | ||
344 | |||
345 | struct crypto_blkcipher { | 314 | struct crypto_blkcipher { |
346 | struct crypto_tfm base; | 315 | struct crypto_tfm base; |
347 | }; | 316 | }; |
348 | 317 | ||
318 | struct crypto_cipher { | ||
319 | struct crypto_tfm base; | ||
320 | }; | ||
321 | |||
322 | struct crypto_comp { | ||
323 | struct crypto_tfm base; | ||
324 | }; | ||
325 | |||
349 | struct crypto_hash { | 326 | struct crypto_hash { |
350 | struct crypto_tfm base; | 327 | struct crypto_tfm base; |
351 | }; | 328 | }; |
@@ -395,40 +372,11 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) | |||
395 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; | 372 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; |
396 | } | 373 | } |
397 | 374 | ||
398 | static unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) | ||
399 | __deprecated; | ||
400 | static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) | ||
401 | { | ||
402 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
403 | return tfm->__crt_alg->cra_cipher.cia_min_keysize; | ||
404 | } | ||
405 | |||
406 | static unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) | ||
407 | __deprecated; | ||
408 | static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) | ||
409 | { | ||
410 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
411 | return tfm->__crt_alg->cra_cipher.cia_max_keysize; | ||
412 | } | ||
413 | |||
414 | static unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) __deprecated; | ||
415 | static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) | ||
416 | { | ||
417 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
418 | return tfm->crt_cipher.cit_ivsize; | ||
419 | } | ||
420 | |||
421 | static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) | 375 | static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) |
422 | { | 376 | { |
423 | return tfm->__crt_alg->cra_blocksize; | 377 | return tfm->__crt_alg->cra_blocksize; |
424 | } | 378 | } |
425 | 379 | ||
426 | static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) | ||
427 | { | ||
428 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); | ||
429 | return tfm->__crt_alg->cra_digest.dia_digestsize; | ||
430 | } | ||
431 | |||
432 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) | 380 | static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) |
433 | { | 381 | { |
434 | return tfm->__crt_alg->cra_alignmask; | 382 | return tfm->__crt_alg->cra_alignmask; |
@@ -633,7 +581,7 @@ static inline struct crypto_cipher *crypto_alloc_cipher(const char *alg_name, | |||
633 | 581 | ||
634 | static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) | 582 | static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) |
635 | { | 583 | { |
636 | return tfm; | 584 | return &tfm->base; |
637 | } | 585 | } |
638 | 586 | ||
639 | static inline void crypto_free_cipher(struct crypto_cipher *tfm) | 587 | static inline void crypto_free_cipher(struct crypto_cipher *tfm) |
@@ -809,76 +757,6 @@ static inline int crypto_hash_setkey(struct crypto_hash *hash, | |||
809 | return crypto_hash_crt(hash)->setkey(hash, key, keylen); | 757 | return crypto_hash_crt(hash)->setkey(hash, key, keylen); |
810 | } | 758 | } |
811 | 759 | ||
812 | static int crypto_cipher_encrypt(struct crypto_tfm *tfm, | ||
813 | struct scatterlist *dst, | ||
814 | struct scatterlist *src, | ||
815 | unsigned int nbytes) __deprecated; | ||
816 | static inline int crypto_cipher_encrypt(struct crypto_tfm *tfm, | ||
817 | struct scatterlist *dst, | ||
818 | struct scatterlist *src, | ||
819 | unsigned int nbytes) | ||
820 | { | ||
821 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
822 | return tfm->crt_cipher.cit_encrypt(tfm, dst, src, nbytes); | ||
823 | } | ||
824 | |||
825 | static int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | ||
826 | struct scatterlist *dst, | ||
827 | struct scatterlist *src, | ||
828 | unsigned int nbytes, u8 *iv) __deprecated; | ||
829 | static inline int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | ||
830 | struct scatterlist *dst, | ||
831 | struct scatterlist *src, | ||
832 | unsigned int nbytes, u8 *iv) | ||
833 | { | ||
834 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
835 | return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); | ||
836 | } | ||
837 | |||
838 | static int crypto_cipher_decrypt(struct crypto_tfm *tfm, | ||
839 | struct scatterlist *dst, | ||
840 | struct scatterlist *src, | ||
841 | unsigned int nbytes) __deprecated; | ||
842 | static inline int crypto_cipher_decrypt(struct crypto_tfm *tfm, | ||
843 | struct scatterlist *dst, | ||
844 | struct scatterlist *src, | ||
845 | unsigned int nbytes) | ||
846 | { | ||
847 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
848 | return tfm->crt_cipher.cit_decrypt(tfm, dst, src, nbytes); | ||
849 | } | ||
850 | |||
851 | static int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | ||
852 | struct scatterlist *dst, | ||
853 | struct scatterlist *src, | ||
854 | unsigned int nbytes, u8 *iv) __deprecated; | ||
855 | static inline int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | ||
856 | struct scatterlist *dst, | ||
857 | struct scatterlist *src, | ||
858 | unsigned int nbytes, u8 *iv) | ||
859 | { | ||
860 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
861 | return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); | ||
862 | } | ||
863 | |||
864 | static void crypto_cipher_set_iv(struct crypto_tfm *tfm, | ||
865 | const u8 *src, unsigned int len) __deprecated; | ||
866 | static inline void crypto_cipher_set_iv(struct crypto_tfm *tfm, | ||
867 | const u8 *src, unsigned int len) | ||
868 | { | ||
869 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
870 | memcpy(tfm->crt_cipher.cit_iv, src, len); | ||
871 | } | ||
872 | |||
873 | static void crypto_cipher_get_iv(struct crypto_tfm *tfm, | ||
874 | u8 *dst, unsigned int len) __deprecated; | ||
875 | static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm, | ||
876 | u8 *dst, unsigned int len) | ||
877 | { | ||
878 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | ||
879 | memcpy(dst, tfm->crt_cipher.cit_iv, len); | ||
880 | } | ||
881 | |||
882 | static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) | 760 | static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) |
883 | { | 761 | { |
884 | return (struct crypto_comp *)tfm; | 762 | return (struct crypto_comp *)tfm; |
@@ -903,7 +781,7 @@ static inline struct crypto_comp *crypto_alloc_comp(const char *alg_name, | |||
903 | 781 | ||
904 | static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) | 782 | static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) |
905 | { | 783 | { |
906 | return tfm; | 784 | return &tfm->base; |
907 | } | 785 | } |
908 | 786 | ||
909 | static inline void crypto_free_comp(struct crypto_comp *tfm) | 787 | static inline void crypto_free_comp(struct crypto_comp *tfm) |
@@ -934,14 +812,16 @@ static inline int crypto_comp_compress(struct crypto_comp *tfm, | |||
934 | const u8 *src, unsigned int slen, | 812 | const u8 *src, unsigned int slen, |
935 | u8 *dst, unsigned int *dlen) | 813 | u8 *dst, unsigned int *dlen) |
936 | { | 814 | { |
937 | return crypto_comp_crt(tfm)->cot_compress(tfm, src, slen, dst, dlen); | 815 | return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm), |
816 | src, slen, dst, dlen); | ||
938 | } | 817 | } |
939 | 818 | ||
940 | static inline int crypto_comp_decompress(struct crypto_comp *tfm, | 819 | static inline int crypto_comp_decompress(struct crypto_comp *tfm, |
941 | const u8 *src, unsigned int slen, | 820 | const u8 *src, unsigned int slen, |
942 | u8 *dst, unsigned int *dlen) | 821 | u8 *dst, unsigned int *dlen) |
943 | { | 822 | { |
944 | return crypto_comp_crt(tfm)->cot_decompress(tfm, src, slen, dst, dlen); | 823 | return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm), |
824 | src, slen, dst, dlen); | ||
945 | } | 825 | } |
946 | 826 | ||
947 | #endif /* _LINUX_CRYPTO_H */ | 827 | #endif /* _LINUX_CRYPTO_H */ |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 047567d34ca7..9fa0983d1aa8 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -33,6 +33,9 @@ struct dentry *debugfs_create_file(const char *name, mode_t mode, | |||
33 | 33 | ||
34 | struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); | 34 | struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); |
35 | 35 | ||
36 | struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, | ||
37 | const char *dest); | ||
38 | |||
36 | void debugfs_remove(struct dentry *dentry); | 39 | void debugfs_remove(struct dentry *dentry); |
37 | 40 | ||
38 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 41 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
@@ -70,6 +73,13 @@ static inline struct dentry *debugfs_create_dir(const char *name, | |||
70 | return ERR_PTR(-ENODEV); | 73 | return ERR_PTR(-ENODEV); |
71 | } | 74 | } |
72 | 75 | ||
76 | static inline struct dentry *debugfs_create_symlink(const char *name, | ||
77 | struct dentry *parent, | ||
78 | const char *dest) | ||
79 | { | ||
80 | return ERR_PTR(-ENODEV); | ||
81 | } | ||
82 | |||
73 | static inline void debugfs_remove(struct dentry *dentry) | 83 | static inline void debugfs_remove(struct dentry *dentry) |
74 | { } | 84 | { } |
75 | 85 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index f44247fe8135..d1a3a27c3988 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * device.h - generic, centralized driver model | 2 | * device.h - generic, centralized driver model |
3 | * | 3 | * |
4 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> | 4 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> |
5 | * Copyright (c) 2004-2007 Greg Kroah-Hartman <gregkh@suse.de> | ||
5 | * | 6 | * |
6 | * This file is released under the GPLv2 | 7 | * This file is released under the GPLv2 |
7 | * | 8 | * |
@@ -101,7 +102,7 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
101 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | 102 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be |
102 | unbound */ | 103 | unbound */ |
103 | 104 | ||
104 | /* driverfs interface for exporting bus attributes */ | 105 | /* sysfs interface for exporting bus attributes */ |
105 | 106 | ||
106 | struct bus_attribute { | 107 | struct bus_attribute { |
107 | struct attribute attr; | 108 | struct attribute attr; |
@@ -126,6 +127,7 @@ struct device_driver { | |||
126 | struct klist_node knode_bus; | 127 | struct klist_node knode_bus; |
127 | 128 | ||
128 | struct module * owner; | 129 | struct module * owner; |
130 | const char * mod_name; /* used for built-in modules */ | ||
129 | 131 | ||
130 | int (*probe) (struct device * dev); | 132 | int (*probe) (struct device * dev); |
131 | int (*remove) (struct device * dev); | 133 | int (*remove) (struct device * dev); |
@@ -145,7 +147,7 @@ extern void put_driver(struct device_driver * drv); | |||
145 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); | 147 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); |
146 | extern int driver_probe_done(void); | 148 | extern int driver_probe_done(void); |
147 | 149 | ||
148 | /* driverfs interface for exporting driver attributes */ | 150 | /* sysfs interface for exporting driver attributes */ |
149 | 151 | ||
150 | struct driver_attribute { | 152 | struct driver_attribute { |
151 | struct attribute attr; | 153 | struct attribute attr; |
@@ -327,6 +329,13 @@ extern struct class_device *class_device_create(struct class *cls, | |||
327 | __attribute__((format(printf,5,6))); | 329 | __attribute__((format(printf,5,6))); |
328 | extern void class_device_destroy(struct class *cls, dev_t devt); | 330 | extern void class_device_destroy(struct class *cls, dev_t devt); |
329 | 331 | ||
332 | struct device_type { | ||
333 | struct device_attribute *attrs; | ||
334 | int (*uevent)(struct device *dev, char **envp, int num_envp, | ||
335 | char *buffer, int buffer_size); | ||
336 | void (*release)(struct device *dev); | ||
337 | }; | ||
338 | |||
330 | /* interface for exporting device attributes */ | 339 | /* interface for exporting device attributes */ |
331 | struct device_attribute { | 340 | struct device_attribute { |
332 | struct attribute attr; | 341 | struct attribute attr; |
@@ -346,6 +355,41 @@ extern int __must_check device_create_bin_file(struct device *dev, | |||
346 | struct bin_attribute *attr); | 355 | struct bin_attribute *attr); |
347 | extern void device_remove_bin_file(struct device *dev, | 356 | extern void device_remove_bin_file(struct device *dev, |
348 | struct bin_attribute *attr); | 357 | struct bin_attribute *attr); |
358 | |||
359 | /* device resource management */ | ||
360 | typedef void (*dr_release_t)(struct device *dev, void *res); | ||
361 | typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); | ||
362 | |||
363 | #ifdef CONFIG_DEBUG_DEVRES | ||
364 | extern void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, | ||
365 | const char *name); | ||
366 | #define devres_alloc(release, size, gfp) \ | ||
367 | __devres_alloc(release, size, gfp, #release) | ||
368 | #else | ||
369 | extern void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp); | ||
370 | #endif | ||
371 | extern void devres_free(void *res); | ||
372 | extern void devres_add(struct device *dev, void *res); | ||
373 | extern void * devres_find(struct device *dev, dr_release_t release, | ||
374 | dr_match_t match, void *match_data); | ||
375 | extern void * devres_get(struct device *dev, void *new_res, | ||
376 | dr_match_t match, void *match_data); | ||
377 | extern void * devres_remove(struct device *dev, dr_release_t release, | ||
378 | dr_match_t match, void *match_data); | ||
379 | extern int devres_destroy(struct device *dev, dr_release_t release, | ||
380 | dr_match_t match, void *match_data); | ||
381 | |||
382 | /* devres group */ | ||
383 | extern void * __must_check devres_open_group(struct device *dev, void *id, | ||
384 | gfp_t gfp); | ||
385 | extern void devres_close_group(struct device *dev, void *id); | ||
386 | extern void devres_remove_group(struct device *dev, void *id); | ||
387 | extern int devres_release_group(struct device *dev, void *id); | ||
388 | |||
389 | /* managed kzalloc/kfree for device drivers, no kmalloc, always use kzalloc */ | ||
390 | extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); | ||
391 | extern void devm_kfree(struct device *dev, void *p); | ||
392 | |||
349 | struct device { | 393 | struct device { |
350 | struct klist klist_children; | 394 | struct klist klist_children; |
351 | struct klist_node knode_parent; /* node in sibling list */ | 395 | struct klist_node knode_parent; /* node in sibling list */ |
@@ -355,6 +399,7 @@ struct device { | |||
355 | 399 | ||
356 | struct kobject kobj; | 400 | struct kobject kobj; |
357 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 401 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
402 | struct device_type *type; | ||
358 | unsigned is_registered:1; | 403 | unsigned is_registered:1; |
359 | struct device_attribute uevent_attr; | 404 | struct device_attribute uevent_attr; |
360 | struct device_attribute *devt_attr; | 405 | struct device_attribute *devt_attr; |
@@ -388,11 +433,15 @@ struct device { | |||
388 | /* arch specific additions */ | 433 | /* arch specific additions */ |
389 | struct dev_archdata archdata; | 434 | struct dev_archdata archdata; |
390 | 435 | ||
436 | spinlock_t devres_lock; | ||
437 | struct list_head devres_head; | ||
438 | |||
391 | /* class_device migration path */ | 439 | /* class_device migration path */ |
392 | struct list_head node; | 440 | struct list_head node; |
393 | struct class *class; /* optional*/ | 441 | struct class *class; |
394 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 442 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
395 | struct attribute_group **groups; /* optional groups */ | 443 | struct attribute_group **groups; /* optional groups */ |
444 | int uevent_suppress; | ||
396 | 445 | ||
397 | void (*release)(struct device * dev); | 446 | void (*release)(struct device * dev); |
398 | }; | 447 | }; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ff203c465fed..9a663c6db16a 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -66,6 +66,33 @@ dma_mark_declared_memory_occupied(struct device *dev, | |||
66 | } | 66 | } |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #endif | 69 | /* |
70 | * Managed DMA API | ||
71 | */ | ||
72 | extern void *dmam_alloc_coherent(struct device *dev, size_t size, | ||
73 | dma_addr_t *dma_handle, gfp_t gfp); | ||
74 | extern void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, | ||
75 | dma_addr_t dma_handle); | ||
76 | extern void *dmam_alloc_noncoherent(struct device *dev, size_t size, | ||
77 | dma_addr_t *dma_handle, gfp_t gfp); | ||
78 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, | ||
79 | dma_addr_t dma_handle); | ||
80 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
81 | extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
82 | dma_addr_t device_addr, size_t size, | ||
83 | int flags); | ||
84 | extern void dmam_release_declared_memory(struct device *dev); | ||
85 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | ||
86 | static inline int dmam_declare_coherent_memory(struct device *dev, | ||
87 | dma_addr_t bus_addr, dma_addr_t device_addr, | ||
88 | size_t size, gfp_t gfp) | ||
89 | { | ||
90 | return 0; | ||
91 | } | ||
70 | 92 | ||
93 | static inline void dmam_release_declared_memory(struct device *dev) | ||
94 | { | ||
95 | } | ||
96 | #endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | ||
71 | 97 | ||
98 | #endif | ||
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h index 76f12f46db7f..022e34fcbd1b 100644 --- a/include/linux/dmapool.h +++ b/include/linux/dmapool.h | |||
@@ -24,5 +24,12 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, | |||
24 | 24 | ||
25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); | 25 | void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); |
26 | 26 | ||
27 | /* | ||
28 | * Managed DMA pool | ||
29 | */ | ||
30 | struct dma_pool *dmam_pool_create(const char *name, struct device *dev, | ||
31 | size_t size, size_t align, size_t allocation); | ||
32 | void dmam_pool_destroy(struct dma_pool *pool); | ||
33 | |||
27 | #endif | 34 | #endif |
28 | 35 | ||
diff --git a/include/linux/dn.h b/include/linux/dn.h index 10b6a6fd5837..02bba040fcfb 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -113,7 +113,7 @@ struct accessdata_dn | |||
113 | * DECnet logical link information structure | 113 | * DECnet logical link information structure |
114 | */ | 114 | */ |
115 | struct linkinfo_dn { | 115 | struct linkinfo_dn { |
116 | __le16 idn_segsize; /* Segment size for link */ | 116 | __u16 idn_segsize; /* Segment size for link */ |
117 | __u8 idn_linkstate; /* Logical link state */ | 117 | __u8 idn_linkstate; /* Logical link state */ |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index 278ef4495819..dfed8009ebff 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h | |||
@@ -36,7 +36,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb) | |||
36 | 36 | ||
37 | struct statfs; | 37 | struct statfs; |
38 | 38 | ||
39 | extern struct inode_operations efs_dir_inode_operations; | 39 | extern const struct inode_operations efs_dir_inode_operations; |
40 | extern const struct file_operations efs_dir_operations; | 40 | extern const struct file_operations efs_dir_operations; |
41 | extern const struct address_space_operations efs_symlink_aops; | 41 | extern const struct address_space_operations efs_symlink_aops; |
42 | 42 | ||
diff --git a/include/linux/eisa.h b/include/linux/eisa.h index 1ff7c1392525..fe806b6f030d 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h | |||
@@ -61,10 +61,20 @@ struct eisa_driver { | |||
61 | 61 | ||
62 | #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) | 62 | #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) |
63 | 63 | ||
64 | /* These external functions are only available when EISA support is enabled. */ | ||
65 | #ifdef CONFIG_EISA | ||
66 | |||
64 | extern struct bus_type eisa_bus_type; | 67 | extern struct bus_type eisa_bus_type; |
65 | int eisa_driver_register (struct eisa_driver *edrv); | 68 | int eisa_driver_register (struct eisa_driver *edrv); |
66 | void eisa_driver_unregister (struct eisa_driver *edrv); | 69 | void eisa_driver_unregister (struct eisa_driver *edrv); |
67 | 70 | ||
71 | #else /* !CONFIG_EISA */ | ||
72 | |||
73 | static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; } | ||
74 | static inline void eisa_driver_unregister (struct eisa_driver *edrv) { } | ||
75 | |||
76 | #endif /* !CONFIG_EISA */ | ||
77 | |||
68 | /* Mimics pci.h... */ | 78 | /* Mimics pci.h... */ |
69 | static inline void *eisa_get_drvdata (struct eisa_device *edev) | 79 | static inline void *eisa_get_drvdata (struct eisa_device *edev) |
70 | { | 80 | { |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 11cca1bdc0c7..4eb18ac510ae 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -868,16 +868,16 @@ do { \ | |||
868 | extern const struct file_operations ext3_dir_operations; | 868 | extern const struct file_operations ext3_dir_operations; |
869 | 869 | ||
870 | /* file.c */ | 870 | /* file.c */ |
871 | extern struct inode_operations ext3_file_inode_operations; | 871 | extern const struct inode_operations ext3_file_inode_operations; |
872 | extern const struct file_operations ext3_file_operations; | 872 | extern const struct file_operations ext3_file_operations; |
873 | 873 | ||
874 | /* namei.c */ | 874 | /* namei.c */ |
875 | extern struct inode_operations ext3_dir_inode_operations; | 875 | extern const struct inode_operations ext3_dir_inode_operations; |
876 | extern struct inode_operations ext3_special_inode_operations; | 876 | extern const struct inode_operations ext3_special_inode_operations; |
877 | 877 | ||
878 | /* symlink.c */ | 878 | /* symlink.c */ |
879 | extern struct inode_operations ext3_symlink_inode_operations; | 879 | extern const struct inode_operations ext3_symlink_inode_operations; |
880 | extern struct inode_operations ext3_fast_symlink_inode_operations; | 880 | extern const struct inode_operations ext3_fast_symlink_inode_operations; |
881 | 881 | ||
882 | 882 | ||
883 | #endif /* __KERNEL__ */ | 883 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 498503ee613d..54c576d414c3 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h | |||
@@ -955,16 +955,16 @@ do { \ | |||
955 | extern const struct file_operations ext4_dir_operations; | 955 | extern const struct file_operations ext4_dir_operations; |
956 | 956 | ||
957 | /* file.c */ | 957 | /* file.c */ |
958 | extern struct inode_operations ext4_file_inode_operations; | 958 | extern const struct inode_operations ext4_file_inode_operations; |
959 | extern const struct file_operations ext4_file_operations; | 959 | extern const struct file_operations ext4_file_operations; |
960 | 960 | ||
961 | /* namei.c */ | 961 | /* namei.c */ |
962 | extern struct inode_operations ext4_dir_inode_operations; | 962 | extern const struct inode_operations ext4_dir_inode_operations; |
963 | extern struct inode_operations ext4_special_inode_operations; | 963 | extern const struct inode_operations ext4_special_inode_operations; |
964 | 964 | ||
965 | /* symlink.c */ | 965 | /* symlink.c */ |
966 | extern struct inode_operations ext4_symlink_inode_operations; | 966 | extern const struct inode_operations ext4_symlink_inode_operations; |
967 | extern struct inode_operations ext4_fast_symlink_inode_operations; | 967 | extern const struct inode_operations ext4_fast_symlink_inode_operations; |
968 | 968 | ||
969 | /* extents.c */ | 969 | /* extents.c */ |
970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); | 970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); |
diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h index a41cc24568ca..7eb1d73fc5d1 100644 --- a/include/linux/ext4_fs_extents.h +++ b/include/linux/ext4_fs_extents.h | |||
@@ -22,12 +22,12 @@ | |||
22 | #include <linux/ext4_fs.h> | 22 | #include <linux/ext4_fs.h> |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * With AGRESSIVE_TEST defined, the capacity of index/leaf blocks | 25 | * With AGGRESSIVE_TEST defined, the capacity of index/leaf blocks |
26 | * becomes very small, so index split, in-depth growing and | 26 | * becomes very small, so index split, in-depth growing and |
27 | * other hard changes happen much more often. | 27 | * other hard changes happen much more often. |
28 | * This is for debug purposes only. | 28 | * This is for debug purposes only. |
29 | */ | 29 | */ |
30 | #define AGRESSIVE_TEST_ | 30 | #define AGGRESSIVE_TEST_ |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * With EXTENTS_STATS defined, the number of blocks and extents | 33 | * With EXTENTS_STATS defined, the number of blocks and extents |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 64177ec9a019..a78e25683f82 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -49,6 +49,13 @@ | |||
49 | #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ | 49 | #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ |
50 | #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ | 50 | #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ |
51 | #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ | 51 | #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ |
52 | #define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */ | ||
53 | #define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */ | ||
54 | #define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */ | ||
55 | #define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */ | ||
56 | #define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */ | ||
57 | #define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */ | ||
58 | #define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */ | ||
52 | 59 | ||
53 | #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ | 60 | #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ |
54 | #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ | 61 | #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ |
@@ -945,25 +952,26 @@ extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); | |||
945 | /* drivers/video/modedb.c */ | 952 | /* drivers/video/modedb.c */ |
946 | #define VESA_MODEDB_SIZE 34 | 953 | #define VESA_MODEDB_SIZE 34 |
947 | extern void fb_var_to_videomode(struct fb_videomode *mode, | 954 | extern void fb_var_to_videomode(struct fb_videomode *mode, |
948 | struct fb_var_screeninfo *var); | 955 | const struct fb_var_screeninfo *var); |
949 | extern void fb_videomode_to_var(struct fb_var_screeninfo *var, | 956 | extern void fb_videomode_to_var(struct fb_var_screeninfo *var, |
950 | struct fb_videomode *mode); | 957 | const struct fb_videomode *mode); |
951 | extern int fb_mode_is_equal(struct fb_videomode *mode1, | 958 | extern int fb_mode_is_equal(const struct fb_videomode *mode1, |
952 | struct fb_videomode *mode2); | 959 | const struct fb_videomode *mode2); |
953 | extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); | 960 | extern int fb_add_videomode(const struct fb_videomode *mode, |
954 | extern void fb_delete_videomode(struct fb_videomode *mode, | 961 | struct list_head *head); |
962 | extern void fb_delete_videomode(const struct fb_videomode *mode, | ||
955 | struct list_head *head); | 963 | struct list_head *head); |
956 | extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, | 964 | extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var, |
957 | struct list_head *head); | 965 | struct list_head *head); |
958 | extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, | 966 | extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var, |
959 | struct list_head *head); | 967 | struct list_head *head); |
960 | extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, | 968 | extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, |
961 | struct list_head *head); | 969 | struct list_head *head); |
962 | extern void fb_destroy_modelist(struct list_head *head); | 970 | extern void fb_destroy_modelist(struct list_head *head); |
963 | extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, | 971 | extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num, |
964 | struct list_head *head); | 972 | struct list_head *head); |
965 | extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, | 973 | extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs, |
966 | struct list_head *head); | 974 | struct list_head *head); |
967 | 975 | ||
968 | /* drivers/video/fbcmap.c */ | 976 | /* drivers/video/fbcmap.c */ |
969 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 977 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1410e5330c8d..86ec3f4a7da6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -169,6 +169,7 @@ extern int dir_notify_enable; | |||
169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ | 169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ |
170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) | 170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) |
171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) | 171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) |
172 | #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) | ||
172 | 173 | ||
173 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) | 174 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) |
174 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) | 175 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) |
@@ -550,7 +551,7 @@ struct inode { | |||
550 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 551 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
551 | struct mutex i_mutex; | 552 | struct mutex i_mutex; |
552 | struct rw_semaphore i_alloc_sem; | 553 | struct rw_semaphore i_alloc_sem; |
553 | struct inode_operations *i_op; | 554 | const struct inode_operations *i_op; |
554 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 555 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
555 | struct super_block *i_sb; | 556 | struct super_block *i_sb; |
556 | struct file_lock *i_flock; | 557 | struct file_lock *i_flock; |
@@ -906,7 +907,7 @@ struct super_block { | |||
906 | unsigned char s_dirt; | 907 | unsigned char s_dirt; |
907 | unsigned long long s_maxbytes; /* Max file size */ | 908 | unsigned long long s_maxbytes; /* Max file size */ |
908 | struct file_system_type *s_type; | 909 | struct file_system_type *s_type; |
909 | struct super_operations *s_op; | 910 | const struct super_operations *s_op; |
910 | struct dquot_operations *dq_op; | 911 | struct dquot_operations *dq_op; |
911 | struct quotactl_ops *s_qcop; | 912 | struct quotactl_ops *s_qcop; |
912 | struct export_operations *s_export_op; | 913 | struct export_operations *s_export_op; |
@@ -1382,7 +1383,7 @@ struct super_block *sget(struct file_system_type *type, | |||
1382 | int (*set)(struct super_block *,void *), | 1383 | int (*set)(struct super_block *,void *), |
1383 | void *data); | 1384 | void *data); |
1384 | extern int get_sb_pseudo(struct file_system_type *, char *, | 1385 | extern int get_sb_pseudo(struct file_system_type *, char *, |
1385 | struct super_operations *ops, unsigned long, | 1386 | const struct super_operations *ops, unsigned long, |
1386 | struct vfsmount *mnt); | 1387 | struct vfsmount *mnt); |
1387 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1388 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1388 | int __put_super(struct super_block *sb); | 1389 | int __put_super(struct super_block *sb); |
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int); | |||
1572 | extern int invalidate_inodes(struct super_block *); | 1573 | extern int invalidate_inodes(struct super_block *); |
1573 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1574 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1574 | pgoff_t start, pgoff_t end); | 1575 | pgoff_t start, pgoff_t end); |
1575 | unsigned long invalidate_inode_pages(struct address_space *mapping); | 1576 | |
1577 | static inline unsigned long __deprecated | ||
1578 | invalidate_inode_pages(struct address_space *mapping) | ||
1579 | { | ||
1580 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
1581 | } | ||
1582 | |||
1576 | static inline void invalidate_remote_inode(struct inode *inode) | 1583 | static inline void invalidate_remote_inode(struct inode *inode) |
1577 | { | 1584 | { |
1578 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 1585 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
1579 | S_ISLNK(inode->i_mode)) | 1586 | S_ISLNK(inode->i_mode)) |
1580 | invalidate_inode_pages(inode->i_mapping); | 1587 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
1581 | } | 1588 | } |
1582 | extern int invalidate_inode_pages2(struct address_space *mapping); | 1589 | extern int invalidate_inode_pages2(struct address_space *mapping); |
1583 | extern int invalidate_inode_pages2_range(struct address_space *mapping, | 1590 | extern int invalidate_inode_pages2_range(struct address_space *mapping, |
@@ -1681,7 +1688,6 @@ extern struct inode *new_inode(struct super_block *); | |||
1681 | extern int __remove_suid(struct dentry *, int); | 1688 | extern int __remove_suid(struct dentry *, int); |
1682 | extern int should_remove_suid(struct dentry *); | 1689 | extern int should_remove_suid(struct dentry *); |
1683 | extern int remove_suid(struct dentry *); | 1690 | extern int remove_suid(struct dentry *); |
1684 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | ||
1685 | 1691 | ||
1686 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1692 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1687 | extern void remove_inode_hash(struct inode *); | 1693 | extern void remove_inode_hash(struct inode *); |
@@ -1822,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *); | |||
1822 | extern int __page_symlink(struct inode *inode, const char *symname, int len, | 1828 | extern int __page_symlink(struct inode *inode, const char *symname, int len, |
1823 | gfp_t gfp_mask); | 1829 | gfp_t gfp_mask); |
1824 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 1830 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1825 | extern struct inode_operations page_symlink_inode_operations; | 1831 | extern const struct inode_operations page_symlink_inode_operations; |
1826 | extern int generic_readlink(struct dentry *, char __user *, int); | 1832 | extern int generic_readlink(struct dentry *, char __user *, int); |
1827 | extern void generic_fillattr(struct inode *, struct kstat *); | 1833 | extern void generic_fillattr(struct inode *, struct kstat *); |
1828 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 1834 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
@@ -1867,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page, | |||
1867 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); | 1873 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); |
1868 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 1874 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
1869 | extern const struct file_operations simple_dir_operations; | 1875 | extern const struct file_operations simple_dir_operations; |
1870 | extern struct inode_operations simple_dir_inode_operations; | 1876 | extern const struct inode_operations simple_dir_inode_operations; |
1871 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 1877 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
1872 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1878 | struct dentry *d_alloc_name(struct dentry *, const char *); |
1873 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1879 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 0a022b2f63fc..2c65da7cabb2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -20,7 +20,11 @@ enum { | |||
20 | LINUX_EXTENDED_PARTITION = 0x85, | 20 | LINUX_EXTENDED_PARTITION = 0x85, |
21 | WIN98_EXTENDED_PARTITION = 0x0f, | 21 | WIN98_EXTENDED_PARTITION = 0x0f, |
22 | 22 | ||
23 | SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, | ||
24 | |||
23 | LINUX_SWAP_PARTITION = 0x82, | 25 | LINUX_SWAP_PARTITION = 0x82, |
26 | LINUX_DATA_PARTITION = 0x83, | ||
27 | LINUX_LVM_PARTITION = 0x8e, | ||
24 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ | 28 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ |
25 | 29 | ||
26 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, | 30 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, |
@@ -400,10 +404,14 @@ struct unixware_disklabel { | |||
400 | 404 | ||
401 | #ifdef __KERNEL__ | 405 | #ifdef __KERNEL__ |
402 | 406 | ||
407 | #define ADDPART_FLAG_NONE 0 | ||
408 | #define ADDPART_FLAG_RAID 1 | ||
409 | #define ADDPART_FLAG_WHOLEDISK 2 | ||
410 | |||
403 | char *disk_name (struct gendisk *hd, int part, char *buf); | 411 | char *disk_name (struct gendisk *hd, int part, char *buf); |
404 | 412 | ||
405 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 413 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
406 | extern void add_partition(struct gendisk *, int, sector_t, sector_t); | 414 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); |
407 | extern void delete_partition(struct gendisk *, int); | 415 | extern void delete_partition(struct gendisk *, int); |
408 | 416 | ||
409 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | 417 | extern struct gendisk *alloc_disk_node(int minors, int node_id); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 00c314aedab7..2a7d15bcde46 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -70,7 +70,7 @@ struct vm_area_struct; | |||
70 | #ifdef CONFIG_NUMA | 70 | #ifdef CONFIG_NUMA |
71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
72 | #else | 72 | #else |
73 | #define GFP_THISNODE 0 | 73 | #define GFP_THISNODE ((__force gfp_t)0) |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | 76 | ||
@@ -85,8 +85,10 @@ struct vm_area_struct; | |||
85 | 85 | ||
86 | static inline enum zone_type gfp_zone(gfp_t flags) | 86 | static inline enum zone_type gfp_zone(gfp_t flags) |
87 | { | 87 | { |
88 | #ifdef CONFIG_ZONE_DMA | ||
88 | if (flags & __GFP_DMA) | 89 | if (flags & __GFP_DMA) |
89 | return ZONE_DMA; | 90 | return ZONE_DMA; |
91 | #endif | ||
90 | #ifdef CONFIG_ZONE_DMA32 | 92 | #ifdef CONFIG_ZONE_DMA32 |
91 | if (flags & __GFP_DMA32) | 93 | if (flags & __GFP_DMA32) |
92 | return ZONE_DMA32; | 94 | return ZONE_DMA32; |
diff --git a/include/linux/gigaset_dev.h b/include/linux/gigaset_dev.h index 70ad09c8ad1e..5dc4a316ca37 100644 --- a/include/linux/gigaset_dev.h +++ b/include/linux/gigaset_dev.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * Version: $Id: gigaset_dev.h,v 1.4.4.4 2005/11/21 22:28:09 hjlipp Exp $ | ||
13 | * ===================================================================== | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | #ifndef GIGASET_INTERFACE_H | 14 | #ifndef GIGASET_INTERFACE_H |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 612472aaa79c..7803014f3a11 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -106,7 +106,7 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
106 | * always balanced, so the interrupted value of ->hardirq_context | 106 | * always balanced, so the interrupted value of ->hardirq_context |
107 | * will always be restored. | 107 | * will always be restored. |
108 | */ | 108 | */ |
109 | #define irq_enter() \ | 109 | #define __irq_enter() \ |
110 | do { \ | 110 | do { \ |
111 | account_system_vtime(current); \ | 111 | account_system_vtime(current); \ |
112 | add_preempt_count(HARDIRQ_OFFSET); \ | 112 | add_preempt_count(HARDIRQ_OFFSET); \ |
@@ -114,6 +114,11 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
114 | } while (0) | 114 | } while (0) |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * Enter irq context (on NO_HZ, update jiffies): | ||
118 | */ | ||
119 | extern void irq_enter(void); | ||
120 | |||
121 | /* | ||
117 | * Exit irq context without processing softirqs: | 122 | * Exit irq context without processing softirqs: |
118 | */ | 123 | */ |
119 | #define __irq_exit() \ | 124 | #define __irq_exit() \ |
@@ -128,7 +133,7 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
128 | */ | 133 | */ |
129 | extern void irq_exit(void); | 134 | extern void irq_exit(void); |
130 | 135 | ||
131 | #define nmi_enter() do { lockdep_off(); irq_enter(); } while (0) | 136 | #define nmi_enter() do { lockdep_off(); __irq_enter(); } while (0) |
132 | #define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) | 137 | #define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) |
133 | 138 | ||
134 | #endif /* LINUX_HARDIRQ_H */ | 139 | #endif /* LINUX_HARDIRQ_H */ |
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h index 8e4dbb51fc70..50d568ec178a 100644 --- a/include/linux/hid-debug.h +++ b/include/linux/hid-debug.h | |||
@@ -1,10 +1,8 @@ | |||
1 | #ifndef __HID_DEBUG_H | ||
2 | #define __HID_DEBUG_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * $Id: hid-debug.h,v 1.8 2001/09/25 09:37:57 vojtech Exp $ | 5 | * Copyright (c) 2007 Jiri Kosina |
3 | * | ||
4 | * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de> | ||
5 | * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz> | ||
6 | * | ||
7 | * Some debug stuff for the HID parser. | ||
8 | */ | 6 | */ |
9 | 7 | ||
10 | /* | 8 | /* |
@@ -22,737 +20,26 @@ | |||
22 | * along with this program; if not, write to the Free Software | 20 | * along with this program; if not, write to the Free Software |
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | * | 22 | * |
25 | * Should you need to contact me, the author, you can do so either by | ||
26 | * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail: | ||
27 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | ||
28 | */ | 23 | */ |
29 | 24 | ||
30 | #include <linux/input.h> | 25 | #ifdef CONFIG_HID_DEBUG |
31 | |||
32 | struct hid_usage_entry { | ||
33 | unsigned page; | ||
34 | unsigned usage; | ||
35 | char *description; | ||
36 | }; | ||
37 | |||
38 | static const struct hid_usage_entry hid_usage_table[] = { | ||
39 | { 0, 0, "Undefined" }, | ||
40 | { 1, 0, "GenericDesktop" }, | ||
41 | {0, 0x01, "Pointer"}, | ||
42 | {0, 0x02, "Mouse"}, | ||
43 | {0, 0x04, "Joystick"}, | ||
44 | {0, 0x05, "GamePad"}, | ||
45 | {0, 0x06, "Keyboard"}, | ||
46 | {0, 0x07, "Keypad"}, | ||
47 | {0, 0x08, "MultiAxis"}, | ||
48 | {0, 0x30, "X"}, | ||
49 | {0, 0x31, "Y"}, | ||
50 | {0, 0x32, "Z"}, | ||
51 | {0, 0x33, "Rx"}, | ||
52 | {0, 0x34, "Ry"}, | ||
53 | {0, 0x35, "Rz"}, | ||
54 | {0, 0x36, "Slider"}, | ||
55 | {0, 0x37, "Dial"}, | ||
56 | {0, 0x38, "Wheel"}, | ||
57 | {0, 0x39, "HatSwitch"}, | ||
58 | {0, 0x3a, "CountedBuffer"}, | ||
59 | {0, 0x3b, "ByteCount"}, | ||
60 | {0, 0x3c, "MotionWakeup"}, | ||
61 | {0, 0x3d, "Start"}, | ||
62 | {0, 0x3e, "Select"}, | ||
63 | {0, 0x40, "Vx"}, | ||
64 | {0, 0x41, "Vy"}, | ||
65 | {0, 0x42, "Vz"}, | ||
66 | {0, 0x43, "Vbrx"}, | ||
67 | {0, 0x44, "Vbry"}, | ||
68 | {0, 0x45, "Vbrz"}, | ||
69 | {0, 0x46, "Vno"}, | ||
70 | {0, 0x80, "SystemControl"}, | ||
71 | {0, 0x81, "SystemPowerDown"}, | ||
72 | {0, 0x82, "SystemSleep"}, | ||
73 | {0, 0x83, "SystemWakeUp"}, | ||
74 | {0, 0x84, "SystemContextMenu"}, | ||
75 | {0, 0x85, "SystemMainMenu"}, | ||
76 | {0, 0x86, "SystemAppMenu"}, | ||
77 | {0, 0x87, "SystemMenuHelp"}, | ||
78 | {0, 0x88, "SystemMenuExit"}, | ||
79 | {0, 0x89, "SystemMenuSelect"}, | ||
80 | {0, 0x8a, "SystemMenuRight"}, | ||
81 | {0, 0x8b, "SystemMenuLeft"}, | ||
82 | {0, 0x8c, "SystemMenuUp"}, | ||
83 | {0, 0x8d, "SystemMenuDown"}, | ||
84 | {0, 0x90, "D-PadUp"}, | ||
85 | {0, 0x91, "D-PadDown"}, | ||
86 | {0, 0x92, "D-PadRight"}, | ||
87 | {0, 0x93, "D-PadLeft"}, | ||
88 | { 2, 0, "Simulation" }, | ||
89 | {0, 0xb0, "Aileron"}, | ||
90 | {0, 0xb1, "AileronTrim"}, | ||
91 | {0, 0xb2, "Anti-Torque"}, | ||
92 | {0, 0xb3, "Autopilot"}, | ||
93 | {0, 0xb4, "Chaff"}, | ||
94 | {0, 0xb5, "Collective"}, | ||
95 | {0, 0xb6, "DiveBrake"}, | ||
96 | {0, 0xb7, "ElectronicCountermeasures"}, | ||
97 | {0, 0xb8, "Elevator"}, | ||
98 | {0, 0xb9, "ElevatorTrim"}, | ||
99 | {0, 0xba, "Rudder"}, | ||
100 | {0, 0xbb, "Throttle"}, | ||
101 | {0, 0xbc, "FlightCommunications"}, | ||
102 | {0, 0xbd, "FlareRelease"}, | ||
103 | {0, 0xbe, "LandingGear"}, | ||
104 | {0, 0xbf, "ToeBrake"}, | ||
105 | { 7, 0, "Keyboard" }, | ||
106 | { 8, 0, "LED" }, | ||
107 | {0, 0x01, "NumLock"}, | ||
108 | {0, 0x02, "CapsLock"}, | ||
109 | {0, 0x03, "ScrollLock"}, | ||
110 | {0, 0x04, "Compose"}, | ||
111 | {0, 0x05, "Kana"}, | ||
112 | {0, 0x4b, "GenericIndicator"}, | ||
113 | { 9, 0, "Button" }, | ||
114 | { 10, 0, "Ordinal" }, | ||
115 | { 12, 0, "Consumer" }, | ||
116 | {0, 0x238, "HorizontalWheel"}, | ||
117 | { 13, 0, "Digitizers" }, | ||
118 | {0, 0x01, "Digitizer"}, | ||
119 | {0, 0x02, "Pen"}, | ||
120 | {0, 0x03, "LightPen"}, | ||
121 | {0, 0x04, "TouchScreen"}, | ||
122 | {0, 0x05, "TouchPad"}, | ||
123 | {0, 0x20, "Stylus"}, | ||
124 | {0, 0x21, "Puck"}, | ||
125 | {0, 0x22, "Finger"}, | ||
126 | {0, 0x30, "TipPressure"}, | ||
127 | {0, 0x31, "BarrelPressure"}, | ||
128 | {0, 0x32, "InRange"}, | ||
129 | {0, 0x33, "Touch"}, | ||
130 | {0, 0x34, "UnTouch"}, | ||
131 | {0, 0x35, "Tap"}, | ||
132 | {0, 0x39, "TabletFunctionKey"}, | ||
133 | {0, 0x3a, "ProgramChangeKey"}, | ||
134 | {0, 0x3c, "Invert"}, | ||
135 | {0, 0x42, "TipSwitch"}, | ||
136 | {0, 0x43, "SecondaryTipSwitch"}, | ||
137 | {0, 0x44, "BarrelSwitch"}, | ||
138 | {0, 0x45, "Eraser"}, | ||
139 | {0, 0x46, "TabletPick"}, | ||
140 | { 15, 0, "PhysicalInterfaceDevice" }, | ||
141 | {0, 0x00, "Undefined"}, | ||
142 | {0, 0x01, "Physical_Interface_Device"}, | ||
143 | {0, 0x20, "Normal"}, | ||
144 | {0, 0x21, "Set_Effect_Report"}, | ||
145 | {0, 0x22, "Effect_Block_Index"}, | ||
146 | {0, 0x23, "Parameter_Block_Offset"}, | ||
147 | {0, 0x24, "ROM_Flag"}, | ||
148 | {0, 0x25, "Effect_Type"}, | ||
149 | {0, 0x26, "ET_Constant_Force"}, | ||
150 | {0, 0x27, "ET_Ramp"}, | ||
151 | {0, 0x28, "ET_Custom_Force_Data"}, | ||
152 | {0, 0x30, "ET_Square"}, | ||
153 | {0, 0x31, "ET_Sine"}, | ||
154 | {0, 0x32, "ET_Triangle"}, | ||
155 | {0, 0x33, "ET_Sawtooth_Up"}, | ||
156 | {0, 0x34, "ET_Sawtooth_Down"}, | ||
157 | {0, 0x40, "ET_Spring"}, | ||
158 | {0, 0x41, "ET_Damper"}, | ||
159 | {0, 0x42, "ET_Inertia"}, | ||
160 | {0, 0x43, "ET_Friction"}, | ||
161 | {0, 0x50, "Duration"}, | ||
162 | {0, 0x51, "Sample_Period"}, | ||
163 | {0, 0x52, "Gain"}, | ||
164 | {0, 0x53, "Trigger_Button"}, | ||
165 | {0, 0x54, "Trigger_Repeat_Interval"}, | ||
166 | {0, 0x55, "Axes_Enable"}, | ||
167 | {0, 0x56, "Direction_Enable"}, | ||
168 | {0, 0x57, "Direction"}, | ||
169 | {0, 0x58, "Type_Specific_Block_Offset"}, | ||
170 | {0, 0x59, "Block_Type"}, | ||
171 | {0, 0x5A, "Set_Envelope_Report"}, | ||
172 | {0, 0x5B, "Attack_Level"}, | ||
173 | {0, 0x5C, "Attack_Time"}, | ||
174 | {0, 0x5D, "Fade_Level"}, | ||
175 | {0, 0x5E, "Fade_Time"}, | ||
176 | {0, 0x5F, "Set_Condition_Report"}, | ||
177 | {0, 0x60, "CP_Offset"}, | ||
178 | {0, 0x61, "Positive_Coefficient"}, | ||
179 | {0, 0x62, "Negative_Coefficient"}, | ||
180 | {0, 0x63, "Positive_Saturation"}, | ||
181 | {0, 0x64, "Negative_Saturation"}, | ||
182 | {0, 0x65, "Dead_Band"}, | ||
183 | {0, 0x66, "Download_Force_Sample"}, | ||
184 | {0, 0x67, "Isoch_Custom_Force_Enable"}, | ||
185 | {0, 0x68, "Custom_Force_Data_Report"}, | ||
186 | {0, 0x69, "Custom_Force_Data"}, | ||
187 | {0, 0x6A, "Custom_Force_Vendor_Defined_Data"}, | ||
188 | {0, 0x6B, "Set_Custom_Force_Report"}, | ||
189 | {0, 0x6C, "Custom_Force_Data_Offset"}, | ||
190 | {0, 0x6D, "Sample_Count"}, | ||
191 | {0, 0x6E, "Set_Periodic_Report"}, | ||
192 | {0, 0x6F, "Offset"}, | ||
193 | {0, 0x70, "Magnitude"}, | ||
194 | {0, 0x71, "Phase"}, | ||
195 | {0, 0x72, "Period"}, | ||
196 | {0, 0x73, "Set_Constant_Force_Report"}, | ||
197 | {0, 0x74, "Set_Ramp_Force_Report"}, | ||
198 | {0, 0x75, "Ramp_Start"}, | ||
199 | {0, 0x76, "Ramp_End"}, | ||
200 | {0, 0x77, "Effect_Operation_Report"}, | ||
201 | {0, 0x78, "Effect_Operation"}, | ||
202 | {0, 0x79, "Op_Effect_Start"}, | ||
203 | {0, 0x7A, "Op_Effect_Start_Solo"}, | ||
204 | {0, 0x7B, "Op_Effect_Stop"}, | ||
205 | {0, 0x7C, "Loop_Count"}, | ||
206 | {0, 0x7D, "Device_Gain_Report"}, | ||
207 | {0, 0x7E, "Device_Gain"}, | ||
208 | {0, 0x7F, "PID_Pool_Report"}, | ||
209 | {0, 0x80, "RAM_Pool_Size"}, | ||
210 | {0, 0x81, "ROM_Pool_Size"}, | ||
211 | {0, 0x82, "ROM_Effect_Block_Count"}, | ||
212 | {0, 0x83, "Simultaneous_Effects_Max"}, | ||
213 | {0, 0x84, "Pool_Alignment"}, | ||
214 | {0, 0x85, "PID_Pool_Move_Report"}, | ||
215 | {0, 0x86, "Move_Source"}, | ||
216 | {0, 0x87, "Move_Destination"}, | ||
217 | {0, 0x88, "Move_Length"}, | ||
218 | {0, 0x89, "PID_Block_Load_Report"}, | ||
219 | {0, 0x8B, "Block_Load_Status"}, | ||
220 | {0, 0x8C, "Block_Load_Success"}, | ||
221 | {0, 0x8D, "Block_Load_Full"}, | ||
222 | {0, 0x8E, "Block_Load_Error"}, | ||
223 | {0, 0x8F, "Block_Handle"}, | ||
224 | {0, 0x90, "PID_Block_Free_Report"}, | ||
225 | {0, 0x91, "Type_Specific_Block_Handle"}, | ||
226 | {0, 0x92, "PID_State_Report"}, | ||
227 | {0, 0x94, "Effect_Playing"}, | ||
228 | {0, 0x95, "PID_Device_Control_Report"}, | ||
229 | {0, 0x96, "PID_Device_Control"}, | ||
230 | {0, 0x97, "DC_Enable_Actuators"}, | ||
231 | {0, 0x98, "DC_Disable_Actuators"}, | ||
232 | {0, 0x99, "DC_Stop_All_Effects"}, | ||
233 | {0, 0x9A, "DC_Device_Reset"}, | ||
234 | {0, 0x9B, "DC_Device_Pause"}, | ||
235 | {0, 0x9C, "DC_Device_Continue"}, | ||
236 | {0, 0x9F, "Device_Paused"}, | ||
237 | {0, 0xA0, "Actuators_Enabled"}, | ||
238 | {0, 0xA4, "Safety_Switch"}, | ||
239 | {0, 0xA5, "Actuator_Override_Switch"}, | ||
240 | {0, 0xA6, "Actuator_Power"}, | ||
241 | {0, 0xA7, "Start_Delay"}, | ||
242 | {0, 0xA8, "Parameter_Block_Size"}, | ||
243 | {0, 0xA9, "Device_Managed_Pool"}, | ||
244 | {0, 0xAA, "Shared_Parameter_Blocks"}, | ||
245 | {0, 0xAB, "Create_New_Effect_Report"}, | ||
246 | {0, 0xAC, "RAM_Pool_Available"}, | ||
247 | { 0x84, 0, "Power Device" }, | ||
248 | { 0x84, 0x02, "PresentStatus" }, | ||
249 | { 0x84, 0x03, "ChangeStatus" }, | ||
250 | { 0x84, 0x04, "UPS" }, | ||
251 | { 0x84, 0x05, "PowerSupply" }, | ||
252 | { 0x84, 0x10, "BatterySystem" }, | ||
253 | { 0x84, 0x11, "BatterySystemID" }, | ||
254 | { 0x84, 0x12, "Battery" }, | ||
255 | { 0x84, 0x13, "BatteryID" }, | ||
256 | { 0x84, 0x14, "Charger" }, | ||
257 | { 0x84, 0x15, "ChargerID" }, | ||
258 | { 0x84, 0x16, "PowerConverter" }, | ||
259 | { 0x84, 0x17, "PowerConverterID" }, | ||
260 | { 0x84, 0x18, "OutletSystem" }, | ||
261 | { 0x84, 0x19, "OutletSystemID" }, | ||
262 | { 0x84, 0x1a, "Input" }, | ||
263 | { 0x84, 0x1b, "InputID" }, | ||
264 | { 0x84, 0x1c, "Output" }, | ||
265 | { 0x84, 0x1d, "OutputID" }, | ||
266 | { 0x84, 0x1e, "Flow" }, | ||
267 | { 0x84, 0x1f, "FlowID" }, | ||
268 | { 0x84, 0x20, "Outlet" }, | ||
269 | { 0x84, 0x21, "OutletID" }, | ||
270 | { 0x84, 0x22, "Gang" }, | ||
271 | { 0x84, 0x24, "PowerSummary" }, | ||
272 | { 0x84, 0x25, "PowerSummaryID" }, | ||
273 | { 0x84, 0x30, "Voltage" }, | ||
274 | { 0x84, 0x31, "Current" }, | ||
275 | { 0x84, 0x32, "Frequency" }, | ||
276 | { 0x84, 0x33, "ApparentPower" }, | ||
277 | { 0x84, 0x35, "PercentLoad" }, | ||
278 | { 0x84, 0x40, "ConfigVoltage" }, | ||
279 | { 0x84, 0x41, "ConfigCurrent" }, | ||
280 | { 0x84, 0x43, "ConfigApparentPower" }, | ||
281 | { 0x84, 0x53, "LowVoltageTransfer" }, | ||
282 | { 0x84, 0x54, "HighVoltageTransfer" }, | ||
283 | { 0x84, 0x56, "DelayBeforeStartup" }, | ||
284 | { 0x84, 0x57, "DelayBeforeShutdown" }, | ||
285 | { 0x84, 0x58, "Test" }, | ||
286 | { 0x84, 0x5a, "AudibleAlarmControl" }, | ||
287 | { 0x84, 0x60, "Present" }, | ||
288 | { 0x84, 0x61, "Good" }, | ||
289 | { 0x84, 0x62, "InternalFailure" }, | ||
290 | { 0x84, 0x65, "Overload" }, | ||
291 | { 0x84, 0x66, "OverCharged" }, | ||
292 | { 0x84, 0x67, "OverTemperature" }, | ||
293 | { 0x84, 0x68, "ShutdownRequested" }, | ||
294 | { 0x84, 0x69, "ShutdownImminent" }, | ||
295 | { 0x84, 0x6b, "SwitchOn/Off" }, | ||
296 | { 0x84, 0x6c, "Switchable" }, | ||
297 | { 0x84, 0x6d, "Used" }, | ||
298 | { 0x84, 0x6e, "Boost" }, | ||
299 | { 0x84, 0x73, "CommunicationLost" }, | ||
300 | { 0x84, 0xfd, "iManufacturer" }, | ||
301 | { 0x84, 0xfe, "iProduct" }, | ||
302 | { 0x84, 0xff, "iSerialNumber" }, | ||
303 | { 0x85, 0, "Battery System" }, | ||
304 | { 0x85, 0x01, "SMBBatteryMode" }, | ||
305 | { 0x85, 0x02, "SMBBatteryStatus" }, | ||
306 | { 0x85, 0x03, "SMBAlarmWarning" }, | ||
307 | { 0x85, 0x04, "SMBChargerMode" }, | ||
308 | { 0x85, 0x05, "SMBChargerStatus" }, | ||
309 | { 0x85, 0x06, "SMBChargerSpecInfo" }, | ||
310 | { 0x85, 0x07, "SMBSelectorState" }, | ||
311 | { 0x85, 0x08, "SMBSelectorPresets" }, | ||
312 | { 0x85, 0x09, "SMBSelectorInfo" }, | ||
313 | { 0x85, 0x29, "RemainingCapacityLimit" }, | ||
314 | { 0x85, 0x2c, "CapacityMode" }, | ||
315 | { 0x85, 0x42, "BelowRemainingCapacityLimit" }, | ||
316 | { 0x85, 0x44, "Charging" }, | ||
317 | { 0x85, 0x45, "Discharging" }, | ||
318 | { 0x85, 0x4b, "NeedReplacement" }, | ||
319 | { 0x85, 0x66, "RemainingCapacity" }, | ||
320 | { 0x85, 0x68, "RunTimeToEmpty" }, | ||
321 | { 0x85, 0x6a, "AverageTimeToFull" }, | ||
322 | { 0x85, 0x83, "DesignCapacity" }, | ||
323 | { 0x85, 0x85, "ManufacturerDate" }, | ||
324 | { 0x85, 0x89, "iDeviceChemistry" }, | ||
325 | { 0x85, 0x8b, "Rechargable" }, | ||
326 | { 0x85, 0x8f, "iOEMInformation" }, | ||
327 | { 0x85, 0x8d, "CapacityGranularity1" }, | ||
328 | { 0x85, 0xd0, "ACPresent" }, | ||
329 | /* pages 0xff00 to 0xffff are vendor-specific */ | ||
330 | { 0xffff, 0, "Vendor-specific-FF" }, | ||
331 | { 0, 0, NULL } | ||
332 | }; | ||
333 | |||
334 | static void resolv_usage_page(unsigned page) { | ||
335 | const struct hid_usage_entry *p; | ||
336 | |||
337 | for (p = hid_usage_table; p->description; p++) | ||
338 | if (p->page == page) { | ||
339 | printk("%s", p->description); | ||
340 | return; | ||
341 | } | ||
342 | printk("%04x", page); | ||
343 | } | ||
344 | |||
345 | static void resolv_usage(unsigned usage) { | ||
346 | const struct hid_usage_entry *p; | ||
347 | |||
348 | resolv_usage_page(usage >> 16); | ||
349 | printk("."); | ||
350 | for (p = hid_usage_table; p->description; p++) | ||
351 | if (p->page == (usage >> 16)) { | ||
352 | for(++p; p->description && p->usage != 0; p++) | ||
353 | if (p->usage == (usage & 0xffff)) { | ||
354 | printk("%s", p->description); | ||
355 | return; | ||
356 | } | ||
357 | break; | ||
358 | } | ||
359 | printk("%04x", usage & 0xffff); | ||
360 | } | ||
361 | |||
362 | __inline__ static void tab(int n) { | ||
363 | while (n--) printk(" "); | ||
364 | } | ||
365 | |||
366 | static void hid_dump_field(struct hid_field *field, int n) { | ||
367 | int j; | ||
368 | |||
369 | if (field->physical) { | ||
370 | tab(n); | ||
371 | printk("Physical("); | ||
372 | resolv_usage(field->physical); printk(")\n"); | ||
373 | } | ||
374 | if (field->logical) { | ||
375 | tab(n); | ||
376 | printk("Logical("); | ||
377 | resolv_usage(field->logical); printk(")\n"); | ||
378 | } | ||
379 | tab(n); printk("Usage(%d)\n", field->maxusage); | ||
380 | for (j = 0; j < field->maxusage; j++) { | ||
381 | tab(n+2);resolv_usage(field->usage[j].hid); printk("\n"); | ||
382 | } | ||
383 | if (field->logical_minimum != field->logical_maximum) { | ||
384 | tab(n); printk("Logical Minimum(%d)\n", field->logical_minimum); | ||
385 | tab(n); printk("Logical Maximum(%d)\n", field->logical_maximum); | ||
386 | } | ||
387 | if (field->physical_minimum != field->physical_maximum) { | ||
388 | tab(n); printk("Physical Minimum(%d)\n", field->physical_minimum); | ||
389 | tab(n); printk("Physical Maximum(%d)\n", field->physical_maximum); | ||
390 | } | ||
391 | if (field->unit_exponent) { | ||
392 | tab(n); printk("Unit Exponent(%d)\n", field->unit_exponent); | ||
393 | } | ||
394 | if (field->unit) { | ||
395 | char *systems[5] = { "None", "SI Linear", "SI Rotation", "English Linear", "English Rotation" }; | ||
396 | char *units[5][8] = { | ||
397 | { "None", "None", "None", "None", "None", "None", "None", "None" }, | ||
398 | { "None", "Centimeter", "Gram", "Seconds", "Kelvin", "Ampere", "Candela", "None" }, | ||
399 | { "None", "Radians", "Gram", "Seconds", "Kelvin", "Ampere", "Candela", "None" }, | ||
400 | { "None", "Inch", "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" }, | ||
401 | { "None", "Degrees", "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" } | ||
402 | }; | ||
403 | |||
404 | int i; | ||
405 | int sys; | ||
406 | __u32 data = field->unit; | ||
407 | |||
408 | /* First nibble tells us which system we're in. */ | ||
409 | sys = data & 0xf; | ||
410 | data >>= 4; | ||
411 | |||
412 | if(sys > 4) { | ||
413 | tab(n); printk("Unit(Invalid)\n"); | ||
414 | } | ||
415 | else { | ||
416 | int earlier_unit = 0; | ||
417 | |||
418 | tab(n); printk("Unit(%s : ", systems[sys]); | ||
419 | |||
420 | for (i=1 ; i<sizeof(__u32)*2 ; i++) { | ||
421 | char nibble = data & 0xf; | ||
422 | data >>= 4; | ||
423 | if (nibble != 0) { | ||
424 | if(earlier_unit++ > 0) | ||
425 | printk("*"); | ||
426 | printk("%s", units[sys][i]); | ||
427 | if(nibble != 1) { | ||
428 | /* This is a _signed_ nibble(!) */ | ||
429 | |||
430 | int val = nibble & 0x7; | ||
431 | if(nibble & 0x08) | ||
432 | val = -((0x7 & ~val) +1); | ||
433 | printk("^%d", val); | ||
434 | } | ||
435 | } | ||
436 | } | ||
437 | printk(")\n"); | ||
438 | } | ||
439 | } | ||
440 | tab(n); printk("Report Size(%u)\n", field->report_size); | ||
441 | tab(n); printk("Report Count(%u)\n", field->report_count); | ||
442 | tab(n); printk("Report Offset(%u)\n", field->report_offset); | ||
443 | |||
444 | tab(n); printk("Flags( "); | ||
445 | j = field->flags; | ||
446 | printk("%s", HID_MAIN_ITEM_CONSTANT & j ? "Constant " : ""); | ||
447 | printk("%s", HID_MAIN_ITEM_VARIABLE & j ? "Variable " : "Array "); | ||
448 | printk("%s", HID_MAIN_ITEM_RELATIVE & j ? "Relative " : "Absolute "); | ||
449 | printk("%s", HID_MAIN_ITEM_WRAP & j ? "Wrap " : ""); | ||
450 | printk("%s", HID_MAIN_ITEM_NONLINEAR & j ? "NonLinear " : ""); | ||
451 | printk("%s", HID_MAIN_ITEM_NO_PREFERRED & j ? "NoPrefferedState " : ""); | ||
452 | printk("%s", HID_MAIN_ITEM_NULL_STATE & j ? "NullState " : ""); | ||
453 | printk("%s", HID_MAIN_ITEM_VOLATILE & j ? "Volatile " : ""); | ||
454 | printk("%s", HID_MAIN_ITEM_BUFFERED_BYTE & j ? "BufferedByte " : ""); | ||
455 | printk(")\n"); | ||
456 | } | ||
457 | |||
458 | static void __attribute__((unused)) hid_dump_device(struct hid_device *device) { | ||
459 | struct hid_report_enum *report_enum; | ||
460 | struct hid_report *report; | ||
461 | struct list_head *list; | ||
462 | unsigned i,k; | ||
463 | static char *table[] = {"INPUT", "OUTPUT", "FEATURE"}; | ||
464 | |||
465 | for (i = 0; i < HID_REPORT_TYPES; i++) { | ||
466 | report_enum = device->report_enum + i; | ||
467 | list = report_enum->report_list.next; | ||
468 | while (list != &report_enum->report_list) { | ||
469 | report = (struct hid_report *) list; | ||
470 | tab(2); | ||
471 | printk("%s", table[i]); | ||
472 | if (report->id) | ||
473 | printk("(%d)", report->id); | ||
474 | printk("[%s]", table[report->type]); | ||
475 | printk("\n"); | ||
476 | for (k = 0; k < report->maxfield; k++) { | ||
477 | tab(4); | ||
478 | printk("Field(%d)\n", k); | ||
479 | hid_dump_field(report->field[k], 6); | ||
480 | } | ||
481 | list = list->next; | ||
482 | } | ||
483 | } | ||
484 | } | ||
485 | |||
486 | static void __attribute__((unused)) hid_dump_input(struct hid_usage *usage, __s32 value) { | ||
487 | printk("hid-debug: input "); | ||
488 | resolv_usage(usage->hid); | ||
489 | printk(" = %d\n", value); | ||
490 | } | ||
491 | |||
492 | |||
493 | static char *events[EV_MAX + 1] = { | ||
494 | [EV_SYN] = "Sync", [EV_KEY] = "Key", | ||
495 | [EV_REL] = "Relative", [EV_ABS] = "Absolute", | ||
496 | [EV_MSC] = "Misc", [EV_LED] = "LED", | ||
497 | [EV_SND] = "Sound", [EV_REP] = "Repeat", | ||
498 | [EV_FF] = "ForceFeedback", [EV_PWR] = "Power", | ||
499 | [EV_FF_STATUS] = "ForceFeedbackStatus", | ||
500 | }; | ||
501 | |||
502 | static char *syncs[2] = { | ||
503 | [SYN_REPORT] = "Report", [SYN_CONFIG] = "Config", | ||
504 | }; | ||
505 | static char *keys[KEY_MAX + 1] = { | ||
506 | [KEY_RESERVED] = "Reserved", [KEY_ESC] = "Esc", | ||
507 | [KEY_1] = "1", [KEY_2] = "2", | ||
508 | [KEY_3] = "3", [KEY_4] = "4", | ||
509 | [KEY_5] = "5", [KEY_6] = "6", | ||
510 | [KEY_7] = "7", [KEY_8] = "8", | ||
511 | [KEY_9] = "9", [KEY_0] = "0", | ||
512 | [KEY_MINUS] = "Minus", [KEY_EQUAL] = "Equal", | ||
513 | [KEY_BACKSPACE] = "Backspace", [KEY_TAB] = "Tab", | ||
514 | [KEY_Q] = "Q", [KEY_W] = "W", | ||
515 | [KEY_E] = "E", [KEY_R] = "R", | ||
516 | [KEY_T] = "T", [KEY_Y] = "Y", | ||
517 | [KEY_U] = "U", [KEY_I] = "I", | ||
518 | [KEY_O] = "O", [KEY_P] = "P", | ||
519 | [KEY_LEFTBRACE] = "LeftBrace", [KEY_RIGHTBRACE] = "RightBrace", | ||
520 | [KEY_ENTER] = "Enter", [KEY_LEFTCTRL] = "LeftControl", | ||
521 | [KEY_A] = "A", [KEY_S] = "S", | ||
522 | [KEY_D] = "D", [KEY_F] = "F", | ||
523 | [KEY_G] = "G", [KEY_H] = "H", | ||
524 | [KEY_J] = "J", [KEY_K] = "K", | ||
525 | [KEY_L] = "L", [KEY_SEMICOLON] = "Semicolon", | ||
526 | [KEY_APOSTROPHE] = "Apostrophe", [KEY_GRAVE] = "Grave", | ||
527 | [KEY_LEFTSHIFT] = "LeftShift", [KEY_BACKSLASH] = "BackSlash", | ||
528 | [KEY_Z] = "Z", [KEY_X] = "X", | ||
529 | [KEY_C] = "C", [KEY_V] = "V", | ||
530 | [KEY_B] = "B", [KEY_N] = "N", | ||
531 | [KEY_M] = "M", [KEY_COMMA] = "Comma", | ||
532 | [KEY_DOT] = "Dot", [KEY_SLASH] = "Slash", | ||
533 | [KEY_RIGHTSHIFT] = "RightShift", [KEY_KPASTERISK] = "KPAsterisk", | ||
534 | [KEY_LEFTALT] = "LeftAlt", [KEY_SPACE] = "Space", | ||
535 | [KEY_CAPSLOCK] = "CapsLock", [KEY_F1] = "F1", | ||
536 | [KEY_F2] = "F2", [KEY_F3] = "F3", | ||
537 | [KEY_F4] = "F4", [KEY_F5] = "F5", | ||
538 | [KEY_F6] = "F6", [KEY_F7] = "F7", | ||
539 | [KEY_F8] = "F8", [KEY_F9] = "F9", | ||
540 | [KEY_F10] = "F10", [KEY_NUMLOCK] = "NumLock", | ||
541 | [KEY_SCROLLLOCK] = "ScrollLock", [KEY_KP7] = "KP7", | ||
542 | [KEY_KP8] = "KP8", [KEY_KP9] = "KP9", | ||
543 | [KEY_KPMINUS] = "KPMinus", [KEY_KP4] = "KP4", | ||
544 | [KEY_KP5] = "KP5", [KEY_KP6] = "KP6", | ||
545 | [KEY_KPPLUS] = "KPPlus", [KEY_KP1] = "KP1", | ||
546 | [KEY_KP2] = "KP2", [KEY_KP3] = "KP3", | ||
547 | [KEY_KP0] = "KP0", [KEY_KPDOT] = "KPDot", | ||
548 | [KEY_ZENKAKUHANKAKU] = "Zenkaku/Hankaku", [KEY_102ND] = "102nd", | ||
549 | [KEY_F11] = "F11", [KEY_F12] = "F12", | ||
550 | [KEY_RO] = "RO", [KEY_KATAKANA] = "Katakana", | ||
551 | [KEY_HIRAGANA] = "HIRAGANA", [KEY_HENKAN] = "Henkan", | ||
552 | [KEY_KATAKANAHIRAGANA] = "Katakana/Hiragana", [KEY_MUHENKAN] = "Muhenkan", | ||
553 | [KEY_KPJPCOMMA] = "KPJpComma", [KEY_KPENTER] = "KPEnter", | ||
554 | [KEY_RIGHTCTRL] = "RightCtrl", [KEY_KPSLASH] = "KPSlash", | ||
555 | [KEY_SYSRQ] = "SysRq", [KEY_RIGHTALT] = "RightAlt", | ||
556 | [KEY_LINEFEED] = "LineFeed", [KEY_HOME] = "Home", | ||
557 | [KEY_UP] = "Up", [KEY_PAGEUP] = "PageUp", | ||
558 | [KEY_LEFT] = "Left", [KEY_RIGHT] = "Right", | ||
559 | [KEY_END] = "End", [KEY_DOWN] = "Down", | ||
560 | [KEY_PAGEDOWN] = "PageDown", [KEY_INSERT] = "Insert", | ||
561 | [KEY_DELETE] = "Delete", [KEY_MACRO] = "Macro", | ||
562 | [KEY_MUTE] = "Mute", [KEY_VOLUMEDOWN] = "VolumeDown", | ||
563 | [KEY_VOLUMEUP] = "VolumeUp", [KEY_POWER] = "Power", | ||
564 | [KEY_KPEQUAL] = "KPEqual", [KEY_KPPLUSMINUS] = "KPPlusMinus", | ||
565 | [KEY_PAUSE] = "Pause", [KEY_KPCOMMA] = "KPComma", | ||
566 | [KEY_HANGUEL] = "Hangeul", [KEY_HANJA] = "Hanja", | ||
567 | [KEY_YEN] = "Yen", [KEY_LEFTMETA] = "LeftMeta", | ||
568 | [KEY_RIGHTMETA] = "RightMeta", [KEY_COMPOSE] = "Compose", | ||
569 | [KEY_STOP] = "Stop", [KEY_AGAIN] = "Again", | ||
570 | [KEY_PROPS] = "Props", [KEY_UNDO] = "Undo", | ||
571 | [KEY_FRONT] = "Front", [KEY_COPY] = "Copy", | ||
572 | [KEY_OPEN] = "Open", [KEY_PASTE] = "Paste", | ||
573 | [KEY_FIND] = "Find", [KEY_CUT] = "Cut", | ||
574 | [KEY_HELP] = "Help", [KEY_MENU] = "Menu", | ||
575 | [KEY_CALC] = "Calc", [KEY_SETUP] = "Setup", | ||
576 | [KEY_SLEEP] = "Sleep", [KEY_WAKEUP] = "WakeUp", | ||
577 | [KEY_FILE] = "File", [KEY_SENDFILE] = "SendFile", | ||
578 | [KEY_DELETEFILE] = "DeleteFile", [KEY_XFER] = "X-fer", | ||
579 | [KEY_PROG1] = "Prog1", [KEY_PROG2] = "Prog2", | ||
580 | [KEY_WWW] = "WWW", [KEY_MSDOS] = "MSDOS", | ||
581 | [KEY_COFFEE] = "Coffee", [KEY_DIRECTION] = "Direction", | ||
582 | [KEY_CYCLEWINDOWS] = "CycleWindows", [KEY_MAIL] = "Mail", | ||
583 | [KEY_BOOKMARKS] = "Bookmarks", [KEY_COMPUTER] = "Computer", | ||
584 | [KEY_BACK] = "Back", [KEY_FORWARD] = "Forward", | ||
585 | [KEY_CLOSECD] = "CloseCD", [KEY_EJECTCD] = "EjectCD", | ||
586 | [KEY_EJECTCLOSECD] = "EjectCloseCD", [KEY_NEXTSONG] = "NextSong", | ||
587 | [KEY_PLAYPAUSE] = "PlayPause", [KEY_PREVIOUSSONG] = "PreviousSong", | ||
588 | [KEY_STOPCD] = "StopCD", [KEY_RECORD] = "Record", | ||
589 | [KEY_REWIND] = "Rewind", [KEY_PHONE] = "Phone", | ||
590 | [KEY_ISO] = "ISOKey", [KEY_CONFIG] = "Config", | ||
591 | [KEY_HOMEPAGE] = "HomePage", [KEY_REFRESH] = "Refresh", | ||
592 | [KEY_EXIT] = "Exit", [KEY_MOVE] = "Move", | ||
593 | [KEY_EDIT] = "Edit", [KEY_SCROLLUP] = "ScrollUp", | ||
594 | [KEY_SCROLLDOWN] = "ScrollDown", [KEY_KPLEFTPAREN] = "KPLeftParenthesis", | ||
595 | [KEY_KPRIGHTPAREN] = "KPRightParenthesis", [KEY_NEW] = "New", | ||
596 | [KEY_REDO] = "Redo", [KEY_F13] = "F13", | ||
597 | [KEY_F14] = "F14", [KEY_F15] = "F15", | ||
598 | [KEY_F16] = "F16", [KEY_F17] = "F17", | ||
599 | [KEY_F18] = "F18", [KEY_F19] = "F19", | ||
600 | [KEY_F20] = "F20", [KEY_F21] = "F21", | ||
601 | [KEY_F22] = "F22", [KEY_F23] = "F23", | ||
602 | [KEY_F24] = "F24", [KEY_PLAYCD] = "PlayCD", | ||
603 | [KEY_PAUSECD] = "PauseCD", [KEY_PROG3] = "Prog3", | ||
604 | [KEY_PROG4] = "Prog4", [KEY_SUSPEND] = "Suspend", | ||
605 | [KEY_CLOSE] = "Close", [KEY_PLAY] = "Play", | ||
606 | [KEY_FASTFORWARD] = "FastForward", [KEY_BASSBOOST] = "BassBoost", | ||
607 | [KEY_PRINT] = "Print", [KEY_HP] = "HP", | ||
608 | [KEY_CAMERA] = "Camera", [KEY_SOUND] = "Sound", | ||
609 | [KEY_QUESTION] = "Question", [KEY_EMAIL] = "Email", | ||
610 | [KEY_CHAT] = "Chat", [KEY_SEARCH] = "Search", | ||
611 | [KEY_CONNECT] = "Connect", [KEY_FINANCE] = "Finance", | ||
612 | [KEY_SPORT] = "Sport", [KEY_SHOP] = "Shop", | ||
613 | [KEY_ALTERASE] = "AlternateErase", [KEY_CANCEL] = "Cancel", | ||
614 | [KEY_BRIGHTNESSDOWN] = "BrightnessDown", [KEY_BRIGHTNESSUP] = "BrightnessUp", | ||
615 | [KEY_MEDIA] = "Media", [KEY_UNKNOWN] = "Unknown", | ||
616 | [BTN_0] = "Btn0", [BTN_1] = "Btn1", | ||
617 | [BTN_2] = "Btn2", [BTN_3] = "Btn3", | ||
618 | [BTN_4] = "Btn4", [BTN_5] = "Btn5", | ||
619 | [BTN_6] = "Btn6", [BTN_7] = "Btn7", | ||
620 | [BTN_8] = "Btn8", [BTN_9] = "Btn9", | ||
621 | [BTN_LEFT] = "LeftBtn", [BTN_RIGHT] = "RightBtn", | ||
622 | [BTN_MIDDLE] = "MiddleBtn", [BTN_SIDE] = "SideBtn", | ||
623 | [BTN_EXTRA] = "ExtraBtn", [BTN_FORWARD] = "ForwardBtn", | ||
624 | [BTN_BACK] = "BackBtn", [BTN_TASK] = "TaskBtn", | ||
625 | [BTN_TRIGGER] = "Trigger", [BTN_THUMB] = "ThumbBtn", | ||
626 | [BTN_THUMB2] = "ThumbBtn2", [BTN_TOP] = "TopBtn", | ||
627 | [BTN_TOP2] = "TopBtn2", [BTN_PINKIE] = "PinkieBtn", | ||
628 | [BTN_BASE] = "BaseBtn", [BTN_BASE2] = "BaseBtn2", | ||
629 | [BTN_BASE3] = "BaseBtn3", [BTN_BASE4] = "BaseBtn4", | ||
630 | [BTN_BASE5] = "BaseBtn5", [BTN_BASE6] = "BaseBtn6", | ||
631 | [BTN_DEAD] = "BtnDead", [BTN_A] = "BtnA", | ||
632 | [BTN_B] = "BtnB", [BTN_C] = "BtnC", | ||
633 | [BTN_X] = "BtnX", [BTN_Y] = "BtnY", | ||
634 | [BTN_Z] = "BtnZ", [BTN_TL] = "BtnTL", | ||
635 | [BTN_TR] = "BtnTR", [BTN_TL2] = "BtnTL2", | ||
636 | [BTN_TR2] = "BtnTR2", [BTN_SELECT] = "BtnSelect", | ||
637 | [BTN_START] = "BtnStart", [BTN_MODE] = "BtnMode", | ||
638 | [BTN_THUMBL] = "BtnThumbL", [BTN_THUMBR] = "BtnThumbR", | ||
639 | [BTN_TOOL_PEN] = "ToolPen", [BTN_TOOL_RUBBER] = "ToolRubber", | ||
640 | [BTN_TOOL_BRUSH] = "ToolBrush", [BTN_TOOL_PENCIL] = "ToolPencil", | ||
641 | [BTN_TOOL_AIRBRUSH] = "ToolAirbrush", [BTN_TOOL_FINGER] = "ToolFinger", | ||
642 | [BTN_TOOL_MOUSE] = "ToolMouse", [BTN_TOOL_LENS] = "ToolLens", | ||
643 | [BTN_TOUCH] = "Touch", [BTN_STYLUS] = "Stylus", | ||
644 | [BTN_STYLUS2] = "Stylus2", [BTN_TOOL_DOUBLETAP] = "ToolDoubleTap", | ||
645 | [BTN_TOOL_TRIPLETAP] = "ToolTripleTap", [BTN_GEAR_DOWN] = "WheelBtn", | ||
646 | [BTN_GEAR_UP] = "Gear up", [KEY_OK] = "Ok", | ||
647 | [KEY_SELECT] = "Select", [KEY_GOTO] = "Goto", | ||
648 | [KEY_CLEAR] = "Clear", [KEY_POWER2] = "Power2", | ||
649 | [KEY_OPTION] = "Option", [KEY_INFO] = "Info", | ||
650 | [KEY_TIME] = "Time", [KEY_VENDOR] = "Vendor", | ||
651 | [KEY_ARCHIVE] = "Archive", [KEY_PROGRAM] = "Program", | ||
652 | [KEY_CHANNEL] = "Channel", [KEY_FAVORITES] = "Favorites", | ||
653 | [KEY_EPG] = "EPG", [KEY_PVR] = "PVR", | ||
654 | [KEY_MHP] = "MHP", [KEY_LANGUAGE] = "Language", | ||
655 | [KEY_TITLE] = "Title", [KEY_SUBTITLE] = "Subtitle", | ||
656 | [KEY_ANGLE] = "Angle", [KEY_ZOOM] = "Zoom", | ||
657 | [KEY_MODE] = "Mode", [KEY_KEYBOARD] = "Keyboard", | ||
658 | [KEY_SCREEN] = "Screen", [KEY_PC] = "PC", | ||
659 | [KEY_TV] = "TV", [KEY_TV2] = "TV2", | ||
660 | [KEY_VCR] = "VCR", [KEY_VCR2] = "VCR2", | ||
661 | [KEY_SAT] = "Sat", [KEY_SAT2] = "Sat2", | ||
662 | [KEY_CD] = "CD", [KEY_TAPE] = "Tape", | ||
663 | [KEY_RADIO] = "Radio", [KEY_TUNER] = "Tuner", | ||
664 | [KEY_PLAYER] = "Player", [KEY_TEXT] = "Text", | ||
665 | [KEY_DVD] = "DVD", [KEY_AUX] = "Aux", | ||
666 | [KEY_MP3] = "MP3", [KEY_AUDIO] = "Audio", | ||
667 | [KEY_VIDEO] = "Video", [KEY_DIRECTORY] = "Directory", | ||
668 | [KEY_LIST] = "List", [KEY_MEMO] = "Memo", | ||
669 | [KEY_CALENDAR] = "Calendar", [KEY_RED] = "Red", | ||
670 | [KEY_GREEN] = "Green", [KEY_YELLOW] = "Yellow", | ||
671 | [KEY_BLUE] = "Blue", [KEY_CHANNELUP] = "ChannelUp", | ||
672 | [KEY_CHANNELDOWN] = "ChannelDown", [KEY_FIRST] = "First", | ||
673 | [KEY_LAST] = "Last", [KEY_AB] = "AB", | ||
674 | [KEY_NEXT] = "Next", [KEY_RESTART] = "Restart", | ||
675 | [KEY_SLOW] = "Slow", [KEY_SHUFFLE] = "Shuffle", | ||
676 | [KEY_BREAK] = "Break", [KEY_PREVIOUS] = "Previous", | ||
677 | [KEY_DIGITS] = "Digits", [KEY_TEEN] = "TEEN", | ||
678 | [KEY_TWEN] = "TWEN", [KEY_DEL_EOL] = "DeleteEOL", | ||
679 | [KEY_DEL_EOS] = "DeleteEOS", [KEY_INS_LINE] = "InsertLine", | ||
680 | [KEY_DEL_LINE] = "DeleteLine", | ||
681 | [KEY_SEND] = "Send", [KEY_REPLY] = "Reply", | ||
682 | [KEY_FORWARDMAIL] = "ForwardMail", [KEY_SAVE] = "Save", | ||
683 | [KEY_DOCUMENTS] = "Documents", | ||
684 | [KEY_FN] = "Fn", [KEY_FN_ESC] = "Fn+ESC", | ||
685 | [KEY_FN_1] = "Fn+1", [KEY_FN_2] = "Fn+2", | ||
686 | [KEY_FN_B] = "Fn+B", [KEY_FN_D] = "Fn+D", | ||
687 | [KEY_FN_E] = "Fn+E", [KEY_FN_F] = "Fn+F", | ||
688 | [KEY_FN_S] = "Fn+S", | ||
689 | [KEY_FN_F1] = "Fn+F1", [KEY_FN_F2] = "Fn+F2", | ||
690 | [KEY_FN_F3] = "Fn+F3", [KEY_FN_F4] = "Fn+F4", | ||
691 | [KEY_FN_F5] = "Fn+F5", [KEY_FN_F6] = "Fn+F6", | ||
692 | [KEY_FN_F7] = "Fn+F7", [KEY_FN_F8] = "Fn+F8", | ||
693 | [KEY_FN_F9] = "Fn+F9", [KEY_FN_F10] = "Fn+F10", | ||
694 | [KEY_FN_F11] = "Fn+F11", [KEY_FN_F12] = "Fn+F12", | ||
695 | [KEY_KBDILLUMTOGGLE] = "KbdIlluminationToggle", | ||
696 | [KEY_KBDILLUMDOWN] = "KbdIlluminationDown", | ||
697 | [KEY_KBDILLUMUP] = "KbdIlluminationUp", | ||
698 | [KEY_SWITCHVIDEOMODE] = "SwitchVideoMode", | ||
699 | }; | ||
700 | |||
701 | static char *relatives[REL_MAX + 1] = { | ||
702 | [REL_X] = "X", [REL_Y] = "Y", | ||
703 | [REL_Z] = "Z", [REL_RX] = "Rx", | ||
704 | [REL_RY] = "Ry", [REL_RZ] = "Rz", | ||
705 | [REL_HWHEEL] = "HWheel", [REL_DIAL] = "Dial", | ||
706 | [REL_WHEEL] = "Wheel", [REL_MISC] = "Misc", | ||
707 | }; | ||
708 | |||
709 | static char *absolutes[ABS_MAX + 1] = { | ||
710 | [ABS_X] = "X", [ABS_Y] = "Y", | ||
711 | [ABS_Z] = "Z", [ABS_RX] = "Rx", | ||
712 | [ABS_RY] = "Ry", [ABS_RZ] = "Rz", | ||
713 | [ABS_THROTTLE] = "Throttle", [ABS_RUDDER] = "Rudder", | ||
714 | [ABS_WHEEL] = "Wheel", [ABS_GAS] = "Gas", | ||
715 | [ABS_BRAKE] = "Brake", [ABS_HAT0X] = "Hat0X", | ||
716 | [ABS_HAT0Y] = "Hat0Y", [ABS_HAT1X] = "Hat1X", | ||
717 | [ABS_HAT1Y] = "Hat1Y", [ABS_HAT2X] = "Hat2X", | ||
718 | [ABS_HAT2Y] = "Hat2Y", [ABS_HAT3X] = "Hat3X", | ||
719 | [ABS_HAT3Y] = "Hat 3Y", [ABS_PRESSURE] = "Pressure", | ||
720 | [ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt", | ||
721 | [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "Tool Width", | ||
722 | [ABS_VOLUME] = "Volume", [ABS_MISC] = "Misc", | ||
723 | }; | ||
724 | 26 | ||
725 | static char *misc[MSC_MAX + 1] = { | 27 | void hid_dump_input(struct hid_usage *, __s32); |
726 | [MSC_SERIAL] = "Serial", [MSC_PULSELED] = "Pulseled", | 28 | void hid_dump_device(struct hid_device *); |
727 | [MSC_GESTURE] = "Gesture", [MSC_RAW] = "RawData" | 29 | void hid_dump_field(struct hid_field *, int); |
728 | }; | 30 | void hid_resolv_usage(unsigned); |
31 | void hid_resolv_event(__u8, __u16); | ||
729 | 32 | ||
730 | static char *leds[LED_MAX + 1] = { | 33 | #else |
731 | [LED_NUML] = "NumLock", [LED_CAPSL] = "CapsLock", | ||
732 | [LED_SCROLLL] = "ScrollLock", [LED_COMPOSE] = "Compose", | ||
733 | [LED_KANA] = "Kana", [LED_SLEEP] = "Sleep", | ||
734 | [LED_SUSPEND] = "Suspend", [LED_MUTE] = "Mute", | ||
735 | [LED_MISC] = "Misc", | ||
736 | }; | ||
737 | 34 | ||
738 | static char *repeats[REP_MAX + 1] = { | 35 | #define hid_dump_input(a,b) do { } while (0) |
739 | [REP_DELAY] = "Delay", [REP_PERIOD] = "Period" | 36 | #define hid_dump_device(c) do { } while (0) |
740 | }; | 37 | #define hid_dump_field(a,b) do { } while (0) |
38 | #define hid_resolv_usage(a) do { } while (0) | ||
39 | #define hid_resolv_event(a,b) do { } while (0) | ||
741 | 40 | ||
742 | static char *sounds[SND_MAX + 1] = { | 41 | #endif /* CONFIG_HID_DEBUG */ |
743 | [SND_CLICK] = "Click", [SND_BELL] = "Bell", | ||
744 | [SND_TONE] = "Tone" | ||
745 | }; | ||
746 | 42 | ||
747 | static char **names[EV_MAX + 1] = { | ||
748 | [EV_SYN] = syncs, [EV_KEY] = keys, | ||
749 | [EV_REL] = relatives, [EV_ABS] = absolutes, | ||
750 | [EV_MSC] = misc, [EV_LED] = leds, | ||
751 | [EV_SND] = sounds, [EV_REP] = repeats, | ||
752 | }; | ||
753 | 43 | ||
754 | static void __attribute__((unused)) resolv_event(__u8 type, __u16 code) { | 44 | #endif |
755 | 45 | ||
756 | printk("%s.%s", events[type] ? events[type] : "?", | ||
757 | names[type] ? (names[type][code] ? names[type][code] : "?") : "?"); | ||
758 | } | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index 342b4e639acb..d26b08f461f2 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -264,6 +264,9 @@ struct hid_item { | |||
264 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 | 264 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 |
265 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 | 265 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 |
266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 |
267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | ||
268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | ||
269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | ||
267 | 270 | ||
268 | /* | 271 | /* |
269 | * This is the global environment of the parser. This information is | 272 | * This is the global environment of the parser. This information is |
@@ -430,8 +433,8 @@ struct hid_device { /* device report descriptor */ | |||
430 | 433 | ||
431 | /* device-specific function pointers */ | 434 | /* device-specific function pointers */ |
432 | int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); | 435 | int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); |
433 | int (*hidinput_open) (struct input_dev *); | 436 | int (*hid_open) (struct hid_device *); |
434 | void (*hidinput_close) (struct input_dev *); | 437 | void (*hid_close) (struct hid_device *); |
435 | 438 | ||
436 | /* hiddev event handler */ | 439 | /* hiddev event handler */ |
437 | void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field, | 440 | void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field, |
@@ -471,16 +474,6 @@ struct hid_descriptor { | |||
471 | struct hid_class_descriptor desc[1]; | 474 | struct hid_class_descriptor desc[1]; |
472 | } __attribute__ ((packed)); | 475 | } __attribute__ ((packed)); |
473 | 476 | ||
474 | #ifdef DEBUG | ||
475 | #include "hid-debug.h" | ||
476 | #else | ||
477 | #define hid_dump_input(a,b) do { } while (0) | ||
478 | #define hid_dump_device(c) do { } while (0) | ||
479 | #define hid_dump_field(a,b) do { } while (0) | ||
480 | #define resolv_usage(a) do { } while (0) | ||
481 | #define resolv_event(a,b) do { } while (0) | ||
482 | #endif | ||
483 | |||
484 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ | 477 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ |
485 | /* We ignore a few input applications that are not widely used */ | 478 | /* We ignore a few input applications that are not widely used */ |
486 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 479 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
@@ -503,6 +496,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size); | |||
503 | int hid_ff_init(struct hid_device *hid); | 496 | int hid_ff_init(struct hid_device *hid); |
504 | 497 | ||
505 | int hid_lgff_init(struct hid_device *hid); | 498 | int hid_lgff_init(struct hid_device *hid); |
499 | int hid_plff_init(struct hid_device *hid); | ||
506 | int hid_tmff_init(struct hid_device *hid); | 500 | int hid_tmff_init(struct hid_device *hid); |
507 | int hid_zpff_init(struct hid_device *hid); | 501 | int hid_zpff_init(struct hid_device *hid); |
508 | #ifdef CONFIG_HID_PID | 502 | #ifdef CONFIG_HID_PID |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fca93025ab51..37f9279192a9 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -21,22 +21,72 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | 23 | ||
24 | struct hrtimer_clock_base; | ||
25 | struct hrtimer_cpu_base; | ||
26 | |||
24 | /* | 27 | /* |
25 | * Mode arguments of xxx_hrtimer functions: | 28 | * Mode arguments of xxx_hrtimer functions: |
26 | */ | 29 | */ |
27 | enum hrtimer_mode { | 30 | enum hrtimer_mode { |
28 | HRTIMER_ABS, /* Time value is absolute */ | 31 | HRTIMER_MODE_ABS, /* Time value is absolute */ |
29 | HRTIMER_REL, /* Time value is relative to now */ | 32 | HRTIMER_MODE_REL, /* Time value is relative to now */ |
30 | }; | 33 | }; |
31 | 34 | ||
35 | /* | ||
36 | * Return values for the callback function | ||
37 | */ | ||
32 | enum hrtimer_restart { | 38 | enum hrtimer_restart { |
33 | HRTIMER_NORESTART, | 39 | HRTIMER_NORESTART, /* Timer is not restarted */ |
34 | HRTIMER_RESTART, | 40 | HRTIMER_RESTART, /* Timer must be restarted */ |
35 | }; | 41 | }; |
36 | 42 | ||
37 | #define HRTIMER_INACTIVE ((void *)1UL) | 43 | /* |
44 | * hrtimer callback modes: | ||
45 | * | ||
46 | * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context | ||
47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | ||
48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | ||
49 | * does not restart the timer | ||
50 | * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in softirq context | ||
51 | * Special mode for tick emultation | ||
52 | */ | ||
53 | enum hrtimer_cb_mode { | ||
54 | HRTIMER_CB_SOFTIRQ, | ||
55 | HRTIMER_CB_IRQSAFE, | ||
56 | HRTIMER_CB_IRQSAFE_NO_RESTART, | ||
57 | HRTIMER_CB_IRQSAFE_NO_SOFTIRQ, | ||
58 | }; | ||
38 | 59 | ||
39 | struct hrtimer_base; | 60 | /* |
61 | * Values to track state of the timer | ||
62 | * | ||
63 | * Possible states: | ||
64 | * | ||
65 | * 0x00 inactive | ||
66 | * 0x01 enqueued into rbtree | ||
67 | * 0x02 callback function running | ||
68 | * 0x04 callback pending (high resolution mode) | ||
69 | * | ||
70 | * Special case: | ||
71 | * 0x03 callback function running and enqueued | ||
72 | * (was requeued on another CPU) | ||
73 | * The "callback function running and enqueued" status is only possible on | ||
74 | * SMP. It happens for example when a posix timer expired and the callback | ||
75 | * queued a signal. Between dropping the lock which protects the posix timer | ||
76 | * and reacquiring the base lock of the hrtimer, another CPU can deliver the | ||
77 | * signal and rearm the timer. We have to preserve the callback running state, | ||
78 | * as otherwise the timer could be removed before the softirq code finishes the | ||
79 | * the handling of the timer. | ||
80 | * | ||
81 | * The HRTIMER_STATE_ENQUEUE bit is always or'ed to the current state to | ||
82 | * preserve the HRTIMER_STATE_CALLBACK bit in the above scenario. | ||
83 | * | ||
84 | * All state transitions are protected by cpu_base->lock. | ||
85 | */ | ||
86 | #define HRTIMER_STATE_INACTIVE 0x00 | ||
87 | #define HRTIMER_STATE_ENQUEUED 0x01 | ||
88 | #define HRTIMER_STATE_CALLBACK 0x02 | ||
89 | #define HRTIMER_STATE_PENDING 0x04 | ||
40 | 90 | ||
41 | /** | 91 | /** |
42 | * struct hrtimer - the basic hrtimer structure | 92 | * struct hrtimer - the basic hrtimer structure |
@@ -46,14 +96,34 @@ struct hrtimer_base; | |||
46 | * which the timer is based. | 96 | * which the timer is based. |
47 | * @function: timer expiry callback function | 97 | * @function: timer expiry callback function |
48 | * @base: pointer to the timer base (per cpu and per clock) | 98 | * @base: pointer to the timer base (per cpu and per clock) |
99 | * @state: state information (See bit values above) | ||
100 | * @cb_mode: high resolution timer feature to select the callback execution | ||
101 | * mode | ||
102 | * @cb_entry: list head to enqueue an expired timer into the callback list | ||
103 | * @start_site: timer statistics field to store the site where the timer | ||
104 | * was started | ||
105 | * @start_comm: timer statistics field to store the name of the process which | ||
106 | * started the timer | ||
107 | * @start_pid: timer statistics field to store the pid of the task which | ||
108 | * started the timer | ||
49 | * | 109 | * |
50 | * The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE() | 110 | * The hrtimer structure must be initialized by hrtimer_init() |
51 | */ | 111 | */ |
52 | struct hrtimer { | 112 | struct hrtimer { |
53 | struct rb_node node; | 113 | struct rb_node node; |
54 | ktime_t expires; | 114 | ktime_t expires; |
55 | int (*function)(struct hrtimer *); | 115 | enum hrtimer_restart (*function)(struct hrtimer *); |
56 | struct hrtimer_base *base; | 116 | struct hrtimer_clock_base *base; |
117 | unsigned long state; | ||
118 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
119 | enum hrtimer_cb_mode cb_mode; | ||
120 | struct list_head cb_entry; | ||
121 | #endif | ||
122 | #ifdef CONFIG_TIMER_STATS | ||
123 | void *start_site; | ||
124 | char start_comm[16]; | ||
125 | int start_pid; | ||
126 | #endif | ||
57 | }; | 127 | }; |
58 | 128 | ||
59 | /** | 129 | /** |
@@ -70,37 +140,114 @@ struct hrtimer_sleeper { | |||
70 | 140 | ||
71 | /** | 141 | /** |
72 | * struct hrtimer_base - the timer base for a specific clock | 142 | * struct hrtimer_base - the timer base for a specific clock |
73 | * @index: clock type index for per_cpu support when moving a timer | 143 | * @index: clock type index for per_cpu support when moving a |
74 | * to a base on another cpu. | 144 | * timer to a base on another cpu. |
75 | * @lock: lock protecting the base and associated timers | ||
76 | * @active: red black tree root node for the active timers | 145 | * @active: red black tree root node for the active timers |
77 | * @first: pointer to the timer node which expires first | 146 | * @first: pointer to the timer node which expires first |
78 | * @resolution: the resolution of the clock, in nanoseconds | 147 | * @resolution: the resolution of the clock, in nanoseconds |
79 | * @get_time: function to retrieve the current time of the clock | 148 | * @get_time: function to retrieve the current time of the clock |
80 | * @get_softirq_time: function to retrieve the current time from the softirq | 149 | * @get_softirq_time: function to retrieve the current time from the softirq |
81 | * @curr_timer: the timer which is executing a callback right now | ||
82 | * @softirq_time: the time when running the hrtimer queue in the softirq | 150 | * @softirq_time: the time when running the hrtimer queue in the softirq |
83 | * @lock_key: the lock_class_key for use with lockdep | 151 | * @cb_pending: list of timers where the callback is pending |
152 | * @offset: offset of this clock to the monotonic base | ||
153 | * @reprogram: function to reprogram the timer event | ||
84 | */ | 154 | */ |
85 | struct hrtimer_base { | 155 | struct hrtimer_clock_base { |
156 | struct hrtimer_cpu_base *cpu_base; | ||
86 | clockid_t index; | 157 | clockid_t index; |
87 | spinlock_t lock; | ||
88 | struct rb_root active; | 158 | struct rb_root active; |
89 | struct rb_node *first; | 159 | struct rb_node *first; |
90 | ktime_t resolution; | 160 | ktime_t resolution; |
91 | ktime_t (*get_time)(void); | 161 | ktime_t (*get_time)(void); |
92 | ktime_t (*get_softirq_time)(void); | 162 | ktime_t (*get_softirq_time)(void); |
93 | struct hrtimer *curr_timer; | ||
94 | ktime_t softirq_time; | 163 | ktime_t softirq_time; |
95 | struct lock_class_key lock_key; | 164 | #ifdef CONFIG_HIGH_RES_TIMERS |
165 | ktime_t offset; | ||
166 | int (*reprogram)(struct hrtimer *t, | ||
167 | struct hrtimer_clock_base *b, | ||
168 | ktime_t n); | ||
169 | #endif | ||
170 | }; | ||
171 | |||
172 | #define HRTIMER_MAX_CLOCK_BASES 2 | ||
173 | |||
174 | /* | ||
175 | * struct hrtimer_cpu_base - the per cpu clock bases | ||
176 | * @lock: lock protecting the base and associated clock bases | ||
177 | * and timers | ||
178 | * @lock_key: the lock_class_key for use with lockdep | ||
179 | * @clock_base: array of clock bases for this cpu | ||
180 | * @curr_timer: the timer which is executing a callback right now | ||
181 | * @expires_next: absolute time of the next event which was scheduled | ||
182 | * via clock_set_next_event() | ||
183 | * @hres_active: State of high resolution mode | ||
184 | * @check_clocks: Indictator, when set evaluate time source and clock | ||
185 | * event devices whether high resolution mode can be | ||
186 | * activated. | ||
187 | * @cb_pending: Expired timers are moved from the rbtree to this | ||
188 | * list in the timer interrupt. The list is processed | ||
189 | * in the softirq. | ||
190 | * @nr_events: Total number of timer interrupt events | ||
191 | */ | ||
192 | struct hrtimer_cpu_base { | ||
193 | spinlock_t lock; | ||
194 | struct lock_class_key lock_key; | ||
195 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | ||
196 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
197 | ktime_t expires_next; | ||
198 | int hres_active; | ||
199 | struct list_head cb_pending; | ||
200 | unsigned long nr_events; | ||
201 | #endif | ||
96 | }; | 202 | }; |
97 | 203 | ||
204 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
205 | struct clock_event_device; | ||
206 | |||
207 | extern void clock_was_set(void); | ||
208 | extern void hrtimer_interrupt(struct clock_event_device *dev); | ||
209 | |||
210 | /* | ||
211 | * In high resolution mode the time reference must be read accurate | ||
212 | */ | ||
213 | static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) | ||
214 | { | ||
215 | return timer->base->get_time(); | ||
216 | } | ||
217 | |||
218 | /* | ||
219 | * The resolution of the clocks. The resolution value is returned in | ||
220 | * the clock_getres() system call to give application programmers an | ||
221 | * idea of the (in)accuracy of timers. Timer values are rounded up to | ||
222 | * this resolution values. | ||
223 | */ | ||
224 | # define KTIME_HIGH_RES (ktime_t) { .tv64 = 1 } | ||
225 | # define KTIME_MONOTONIC_RES KTIME_HIGH_RES | ||
226 | |||
227 | #else | ||
228 | |||
229 | # define KTIME_MONOTONIC_RES KTIME_LOW_RES | ||
230 | |||
98 | /* | 231 | /* |
99 | * clock_was_set() is a NOP for non- high-resolution systems. The | 232 | * clock_was_set() is a NOP for non- high-resolution systems. The |
100 | * time-sorted order guarantees that a timer does not expire early and | 233 | * time-sorted order guarantees that a timer does not expire early and |
101 | * is expired in the next softirq when the clock was advanced. | 234 | * is expired in the next softirq when the clock was advanced. |
102 | */ | 235 | */ |
103 | #define clock_was_set() do { } while (0) | 236 | static inline void clock_was_set(void) { } |
237 | |||
238 | /* | ||
239 | * In non high resolution mode the time reference is taken from | ||
240 | * the base softirq time variable. | ||
241 | */ | ||
242 | static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) | ||
243 | { | ||
244 | return timer->base->softirq_time; | ||
245 | } | ||
246 | |||
247 | #endif | ||
248 | |||
249 | extern ktime_t ktime_get(void); | ||
250 | extern ktime_t ktime_get_real(void); | ||
104 | 251 | ||
105 | /* Exported timer functions: */ | 252 | /* Exported timer functions: */ |
106 | 253 | ||
@@ -114,19 +261,33 @@ extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, | |||
114 | extern int hrtimer_cancel(struct hrtimer *timer); | 261 | extern int hrtimer_cancel(struct hrtimer *timer); |
115 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 262 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
116 | 263 | ||
117 | #define hrtimer_restart(timer) hrtimer_start((timer), (timer)->expires, HRTIMER_ABS) | 264 | static inline int hrtimer_restart(struct hrtimer *timer) |
265 | { | ||
266 | return hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS); | ||
267 | } | ||
118 | 268 | ||
119 | /* Query timers: */ | 269 | /* Query timers: */ |
120 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); | 270 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); |
121 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); | 271 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); |
122 | 272 | ||
123 | #ifdef CONFIG_NO_IDLE_HZ | ||
124 | extern ktime_t hrtimer_get_next_event(void); | 273 | extern ktime_t hrtimer_get_next_event(void); |
125 | #endif | ||
126 | 274 | ||
275 | /* | ||
276 | * A timer is active, when it is enqueued into the rbtree or the callback | ||
277 | * function is running. | ||
278 | */ | ||
127 | static inline int hrtimer_active(const struct hrtimer *timer) | 279 | static inline int hrtimer_active(const struct hrtimer *timer) |
128 | { | 280 | { |
129 | return rb_parent(&timer->node) != &timer->node; | 281 | return timer->state != HRTIMER_STATE_INACTIVE; |
282 | } | ||
283 | |||
284 | /* | ||
285 | * Helper function to check, whether the timer is on one of the queues | ||
286 | */ | ||
287 | static inline int hrtimer_is_queued(struct hrtimer *timer) | ||
288 | { | ||
289 | return timer->state & | ||
290 | (HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING); | ||
130 | } | 291 | } |
131 | 292 | ||
132 | /* Forward a hrtimer so it expires after now: */ | 293 | /* Forward a hrtimer so it expires after now: */ |
@@ -149,4 +310,53 @@ extern void hrtimer_run_queues(void); | |||
149 | /* Bootup initialization: */ | 310 | /* Bootup initialization: */ |
150 | extern void __init hrtimers_init(void); | 311 | extern void __init hrtimers_init(void); |
151 | 312 | ||
313 | #if BITS_PER_LONG < 64 | ||
314 | extern unsigned long ktime_divns(const ktime_t kt, s64 div); | ||
315 | #else /* BITS_PER_LONG < 64 */ | ||
316 | # define ktime_divns(kt, div) (unsigned long)((kt).tv64 / (div)) | ||
317 | #endif | ||
318 | |||
319 | /* Show pending timers: */ | ||
320 | extern void sysrq_timer_list_show(void); | ||
321 | |||
322 | /* | ||
323 | * Timer-statistics info: | ||
324 | */ | ||
325 | #ifdef CONFIG_TIMER_STATS | ||
326 | |||
327 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
328 | void *timerf, char * comm); | ||
329 | |||
330 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
331 | { | ||
332 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
333 | timer->function, timer->start_comm); | ||
334 | } | ||
335 | |||
336 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | ||
337 | void *addr); | ||
338 | |||
339 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
340 | { | ||
341 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | ||
342 | } | ||
343 | |||
344 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
345 | { | ||
346 | timer->start_site = NULL; | ||
347 | } | ||
348 | #else | ||
349 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
350 | { | ||
351 | } | ||
352 | |||
353 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
354 | { | ||
355 | } | ||
356 | |||
357 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
358 | { | ||
359 | } | ||
360 | #endif | ||
361 | |||
152 | #endif | 362 | #endif |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index d38778f2fbec..9c21dc793d7b 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -115,6 +115,8 @@ | |||
115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
117 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ | 117 | #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ |
118 | #define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ | ||
119 | #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ | ||
118 | 120 | ||
119 | #define I2C_DRIVERID_I2CDEV 900 | 121 | #define I2C_DRIVERID_I2CDEV 900 |
120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 122 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
@@ -230,7 +232,6 @@ | |||
230 | #define I2C_HW_SMBUS_PIIX4 0x040000 | 232 | #define I2C_HW_SMBUS_PIIX4 0x040000 |
231 | #define I2C_HW_SMBUS_ALI15X3 0x040001 | 233 | #define I2C_HW_SMBUS_ALI15X3 0x040001 |
232 | #define I2C_HW_SMBUS_VIA2 0x040002 | 234 | #define I2C_HW_SMBUS_VIA2 0x040002 |
233 | #define I2C_HW_SMBUS_VOODOO3 0x040003 | ||
234 | #define I2C_HW_SMBUS_I801 0x040004 | 235 | #define I2C_HW_SMBUS_I801 0x040004 |
235 | #define I2C_HW_SMBUS_AMD756 0x040005 | 236 | #define I2C_HW_SMBUS_AMD756 0x040005 |
236 | #define I2C_HW_SMBUS_SIS5595 0x040006 | 237 | #define I2C_HW_SMBUS_SIS5595 0x040006 |
@@ -246,13 +247,11 @@ | |||
246 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ | 247 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ |
247 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ | 248 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ |
248 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | 249 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ |
250 | #define I2C_HW_SMBUS_ALI1563 0x040013 | ||
249 | 251 | ||
250 | /* --- ISA pseudo-adapter */ | 252 | /* --- ISA pseudo-adapter */ |
251 | #define I2C_HW_ISA 0x050000 | 253 | #define I2C_HW_ISA 0x050000 |
252 | 254 | ||
253 | /* --- IPMI pseudo-adapter */ | ||
254 | #define I2C_HW_IPMI 0x0b0000 | ||
255 | |||
256 | /* --- IPMB adapter */ | 255 | /* --- IPMB adapter */ |
257 | #define I2C_HW_IPMB 0x0c0000 | 256 | #define I2C_HW_IPMB 0x0c0000 |
258 | 257 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 71e50d3e492f..9428092017e3 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -125,7 +125,12 @@ struct i2c_driver { | |||
125 | * it must be freed here. | 125 | * it must be freed here. |
126 | */ | 126 | */ |
127 | int (*detach_client)(struct i2c_client *); | 127 | int (*detach_client)(struct i2c_client *); |
128 | 128 | ||
129 | /* driver model interfaces that don't relate to enumeration */ | ||
130 | void (*shutdown)(struct i2c_client *); | ||
131 | int (*suspend)(struct i2c_client *, pm_message_t mesg); | ||
132 | int (*resume)(struct i2c_client *); | ||
133 | |||
129 | /* a ioctl like command that can be used to perform specific functions | 134 | /* a ioctl like command that can be used to perform specific functions |
130 | * with the device. | 135 | * with the device. |
131 | */ | 136 | */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index e26a03981a94..79c028251c70 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -18,6 +18,9 @@ | |||
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/completion.h> | 20 | #include <linux/completion.h> |
21 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
22 | #include <acpi/acpi.h> | ||
23 | #endif | ||
21 | #include <asm/byteorder.h> | 24 | #include <asm/byteorder.h> |
22 | #include <asm/system.h> | 25 | #include <asm/system.h> |
23 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -541,6 +544,11 @@ typedef enum { | |||
541 | struct ide_driver_s; | 544 | struct ide_driver_s; |
542 | struct ide_settings_s; | 545 | struct ide_settings_s; |
543 | 546 | ||
547 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
548 | struct ide_acpi_drive_link; | ||
549 | struct ide_acpi_hwif_link; | ||
550 | #endif | ||
551 | |||
544 | typedef struct ide_drive_s { | 552 | typedef struct ide_drive_s { |
545 | char name[4]; /* drive name, such as "hda" */ | 553 | char name[4]; /* drive name, such as "hda" */ |
546 | char driver_req[10]; /* requests specific driver */ | 554 | char driver_req[10]; /* requests specific driver */ |
@@ -628,7 +636,6 @@ typedef struct ide_drive_s { | |||
628 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 636 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
629 | unsigned int cyl; /* "real" number of cyls */ | 637 | unsigned int cyl; /* "real" number of cyls */ |
630 | unsigned int drive_data; /* use by tuneproc/selectproc */ | 638 | unsigned int drive_data; /* use by tuneproc/selectproc */ |
631 | unsigned int usage; /* current "open()" count for drive */ | ||
632 | unsigned int failures; /* current failure count */ | 639 | unsigned int failures; /* current failure count */ |
633 | unsigned int max_failures; /* maximum allowed failure count */ | 640 | unsigned int max_failures; /* maximum allowed failure count */ |
634 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 641 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ |
@@ -637,6 +644,9 @@ typedef struct ide_drive_s { | |||
637 | 644 | ||
638 | int lun; /* logical unit */ | 645 | int lun; /* logical unit */ |
639 | int crc_count; /* crc counter to reduce drive speed */ | 646 | int crc_count; /* crc counter to reduce drive speed */ |
647 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
648 | struct ide_acpi_drive_link *acpidata; | ||
649 | #endif | ||
640 | struct list_head list; | 650 | struct list_head list; |
641 | struct device gendev; | 651 | struct device gendev; |
642 | struct completion gendev_rel_comp; /* to deal with device release() */ | 652 | struct completion gendev_rel_comp; /* to deal with device release() */ |
@@ -725,23 +735,22 @@ typedef struct hwif_s { | |||
725 | int (*ide_dma_end)(ide_drive_t *drive); | 735 | int (*ide_dma_end)(ide_drive_t *drive); |
726 | int (*ide_dma_check)(ide_drive_t *drive); | 736 | int (*ide_dma_check)(ide_drive_t *drive); |
727 | int (*ide_dma_on)(ide_drive_t *drive); | 737 | int (*ide_dma_on)(ide_drive_t *drive); |
728 | int (*ide_dma_off_quietly)(ide_drive_t *drive); | 738 | void (*dma_off_quietly)(ide_drive_t *drive); |
729 | int (*ide_dma_test_irq)(ide_drive_t *drive); | 739 | int (*ide_dma_test_irq)(ide_drive_t *drive); |
730 | int (*ide_dma_host_on)(ide_drive_t *drive); | 740 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
731 | int (*ide_dma_host_off)(ide_drive_t *drive); | 741 | void (*dma_host_on)(ide_drive_t *drive); |
742 | void (*dma_host_off)(ide_drive_t *drive); | ||
732 | int (*ide_dma_lostirq)(ide_drive_t *drive); | 743 | int (*ide_dma_lostirq)(ide_drive_t *drive); |
733 | int (*ide_dma_timeout)(ide_drive_t *drive); | 744 | int (*ide_dma_timeout)(ide_drive_t *drive); |
734 | 745 | ||
735 | void (*OUTB)(u8 addr, unsigned long port); | 746 | void (*OUTB)(u8 addr, unsigned long port); |
736 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); | 747 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); |
737 | void (*OUTW)(u16 addr, unsigned long port); | 748 | void (*OUTW)(u16 addr, unsigned long port); |
738 | void (*OUTL)(u32 addr, unsigned long port); | ||
739 | void (*OUTSW)(unsigned long port, void *addr, u32 count); | 749 | void (*OUTSW)(unsigned long port, void *addr, u32 count); |
740 | void (*OUTSL)(unsigned long port, void *addr, u32 count); | 750 | void (*OUTSL)(unsigned long port, void *addr, u32 count); |
741 | 751 | ||
742 | u8 (*INB)(unsigned long port); | 752 | u8 (*INB)(unsigned long port); |
743 | u16 (*INW)(unsigned long port); | 753 | u16 (*INW)(unsigned long port); |
744 | u32 (*INL)(unsigned long port); | ||
745 | void (*INSW)(unsigned long port, void *addr, u32 count); | 754 | void (*INSW)(unsigned long port, void *addr, u32 count); |
746 | void (*INSL)(unsigned long port, void *addr, u32 count); | 755 | void (*INSL)(unsigned long port, void *addr, u32 count); |
747 | 756 | ||
@@ -763,7 +772,6 @@ typedef struct hwif_s { | |||
763 | unsigned int cursg; | 772 | unsigned int cursg; |
764 | unsigned int cursg_ofs; | 773 | unsigned int cursg_ofs; |
765 | 774 | ||
766 | int mmio; /* hosts iomio (0) or custom (2) select */ | ||
767 | int rqsize; /* max sectors per request */ | 775 | int rqsize; /* max sectors per request */ |
768 | int irq; /* our irq number */ | 776 | int irq; /* our irq number */ |
769 | 777 | ||
@@ -791,12 +799,11 @@ typedef struct hwif_s { | |||
791 | unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ | 799 | unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ |
792 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ | 800 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ |
793 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ | 801 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ |
794 | unsigned no_dsc : 1; /* 0 default, 1 dsc_overlap disabled */ | ||
795 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 802 | unsigned auto_poll : 1; /* supports nop auto-poll */ |
796 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 803 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
797 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ | 804 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ |
798 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ | 805 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ |
799 | unsigned atapi_irq_bogon : 1; /* Generates spurious DMA interrupts in PIO mode */ | 806 | unsigned mmio : 1; /* host uses MMIO */ |
800 | 807 | ||
801 | struct device gendev; | 808 | struct device gendev; |
802 | struct completion gendev_rel_comp; /* To deal with device release() */ | 809 | struct completion gendev_rel_comp; /* To deal with device release() */ |
@@ -804,6 +811,10 @@ typedef struct hwif_s { | |||
804 | void *hwif_data; /* extra hwif data */ | 811 | void *hwif_data; /* extra hwif data */ |
805 | 812 | ||
806 | unsigned dma; | 813 | unsigned dma; |
814 | |||
815 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
816 | struct ide_acpi_hwif_link *acpidata; | ||
817 | #endif | ||
807 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 818 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
808 | 819 | ||
809 | /* | 820 | /* |
@@ -1192,8 +1203,8 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1192 | extern int ideprobe_init(void); | 1203 | extern int ideprobe_init(void); |
1193 | 1204 | ||
1194 | extern void ide_scan_pcibus(int scan_direction) __init; | 1205 | extern void ide_scan_pcibus(int scan_direction) __init; |
1195 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner); | 1206 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1196 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE) | 1207 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1197 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1208 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); |
1198 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1209 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); |
1199 | 1210 | ||
@@ -1265,8 +1276,9 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
1265 | int __ide_dma_bad_drive(ide_drive_t *); | 1276 | int __ide_dma_bad_drive(ide_drive_t *); |
1266 | int __ide_dma_good_drive(ide_drive_t *); | 1277 | int __ide_dma_good_drive(ide_drive_t *); |
1267 | int ide_use_dma(ide_drive_t *); | 1278 | int ide_use_dma(ide_drive_t *); |
1268 | int __ide_dma_off(ide_drive_t *); | 1279 | void ide_dma_off(ide_drive_t *); |
1269 | void ide_dma_verbose(ide_drive_t *); | 1280 | void ide_dma_verbose(ide_drive_t *); |
1281 | int ide_set_dma(ide_drive_t *); | ||
1270 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1282 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
1271 | 1283 | ||
1272 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1284 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
@@ -1276,9 +1288,9 @@ extern void ide_destroy_dmatable(ide_drive_t *); | |||
1276 | extern int ide_release_dma(ide_hwif_t *); | 1288 | extern int ide_release_dma(ide_hwif_t *); |
1277 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); | 1289 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); |
1278 | 1290 | ||
1279 | extern int __ide_dma_host_off(ide_drive_t *); | 1291 | void ide_dma_host_off(ide_drive_t *); |
1280 | extern int __ide_dma_off_quietly(ide_drive_t *); | 1292 | void ide_dma_off_quietly(ide_drive_t *); |
1281 | extern int __ide_dma_host_on(ide_drive_t *); | 1293 | void ide_dma_host_on(ide_drive_t *); |
1282 | extern int __ide_dma_on(ide_drive_t *); | 1294 | extern int __ide_dma_on(ide_drive_t *); |
1283 | extern int __ide_dma_check(ide_drive_t *); | 1295 | extern int __ide_dma_check(ide_drive_t *); |
1284 | extern int ide_dma_setup(ide_drive_t *); | 1296 | extern int ide_dma_setup(ide_drive_t *); |
@@ -1290,14 +1302,27 @@ extern int __ide_dma_timeout(ide_drive_t *); | |||
1290 | 1302 | ||
1291 | #else | 1303 | #else |
1292 | static inline int ide_use_dma(ide_drive_t *drive) { return 0; } | 1304 | static inline int ide_use_dma(ide_drive_t *drive) { return 0; } |
1293 | static inline int __ide_dma_off(ide_drive_t *drive) { return 0; } | 1305 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
1294 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1306 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
1307 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | ||
1295 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1308 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1296 | 1309 | ||
1297 | #ifndef CONFIG_BLK_DEV_IDEDMA_PCI | 1310 | #ifndef CONFIG_BLK_DEV_IDEDMA_PCI |
1298 | static inline void ide_release_dma(ide_hwif_t *drive) {;} | 1311 | static inline void ide_release_dma(ide_hwif_t *drive) {;} |
1299 | #endif | 1312 | #endif |
1300 | 1313 | ||
1314 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
1315 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | ||
1316 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | ||
1317 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | ||
1318 | extern void ide_acpi_init(ide_hwif_t *hwif); | ||
1319 | #else | ||
1320 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | ||
1321 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | ||
1322 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | ||
1323 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | ||
1324 | #endif | ||
1325 | |||
1301 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1326 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
1302 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); | 1327 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); |
1303 | extern void ide_unregister (unsigned int index); | 1328 | extern void ide_unregister (unsigned int index); |
@@ -1327,6 +1352,7 @@ extern int ide_dma_enable(ide_drive_t *drive); | |||
1327 | extern char *ide_xfer_verbose(u8 xfer_rate); | 1352 | extern char *ide_xfer_verbose(u8 xfer_rate); |
1328 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1353 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1329 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1354 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
1355 | int ide_use_fast_pio(ide_drive_t *); | ||
1330 | 1356 | ||
1331 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1357 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1332 | 1358 | ||
@@ -1340,7 +1366,6 @@ typedef struct ide_pio_data_s { | |||
1340 | u8 pio_mode; | 1366 | u8 pio_mode; |
1341 | u8 use_iordy; | 1367 | u8 use_iordy; |
1342 | u8 overridden; | 1368 | u8 overridden; |
1343 | u8 blacklisted; | ||
1344 | unsigned int cycle_time; | 1369 | unsigned int cycle_time; |
1345 | } ide_pio_data_t; | 1370 | } ide_pio_data_t; |
1346 | 1371 | ||
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 99393ef3af39..f3de05c30678 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -41,6 +41,7 @@ struct sockaddr_ll | |||
41 | #define PACKET_RX_RING 5 | 41 | #define PACKET_RX_RING 5 |
42 | #define PACKET_STATISTICS 6 | 42 | #define PACKET_STATISTICS 6 |
43 | #define PACKET_COPY_THRESH 7 | 43 | #define PACKET_COPY_THRESH 7 |
44 | #define PACKET_AUXDATA 8 | ||
44 | 45 | ||
45 | struct tpacket_stats | 46 | struct tpacket_stats |
46 | { | 47 | { |
@@ -48,6 +49,15 @@ struct tpacket_stats | |||
48 | unsigned int tp_drops; | 49 | unsigned int tp_drops; |
49 | }; | 50 | }; |
50 | 51 | ||
52 | struct tpacket_auxdata | ||
53 | { | ||
54 | __u32 tp_status; | ||
55 | __u32 tp_len; | ||
56 | __u32 tp_snaplen; | ||
57 | __u16 tp_mac; | ||
58 | __u16 tp_net; | ||
59 | }; | ||
60 | |||
51 | struct tpacket_hdr | 61 | struct tpacket_hdr |
52 | { | 62 | { |
53 | unsigned long tp_status; | 63 | unsigned long tp_status; |
diff --git a/include/linux/init.h b/include/linux/init.h index 5a593a1dec1e..e290a010e3f2 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -67,7 +67,8 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; | |||
67 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 67 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
68 | 68 | ||
69 | /* Defined in init/main.c */ | 69 | /* Defined in init/main.c */ |
70 | extern char saved_command_line[]; | 70 | extern char __initdata boot_command_line[]; |
71 | extern char *saved_command_line; | ||
71 | extern unsigned int reset_devices; | 72 | extern unsigned int reset_devices; |
72 | 73 | ||
73 | /* used by init/main.c */ | 74 | /* used by init/main.c */ |
@@ -164,7 +165,7 @@ struct obs_kernel_param { | |||
164 | #define early_param(str, fn) \ | 165 | #define early_param(str, fn) \ |
165 | __setup_param(str, fn, fn, 1) | 166 | __setup_param(str, fn, fn, 1) |
166 | 167 | ||
167 | /* Relies on saved_command_line being set */ | 168 | /* Relies on boot_command_line being set */ |
168 | void __init parse_early_param(void); | 169 | void __init parse_early_param(void); |
169 | #endif /* __ASSEMBLY__ */ | 170 | #endif /* __ASSEMBLY__ */ |
170 | 171 | ||
@@ -172,7 +173,7 @@ void __init parse_early_param(void); | |||
172 | * module_init() - driver initialization entry point | 173 | * module_init() - driver initialization entry point |
173 | * @x: function to be run at kernel boot time or module insertion | 174 | * @x: function to be run at kernel boot time or module insertion |
174 | * | 175 | * |
175 | * module_init() will either be called during do_initcalls (if | 176 | * module_init() will either be called during do_initcalls() (if |
176 | * builtin) or at module insertion time (if a module). There can only | 177 | * builtin) or at module insertion time (if a module). There can only |
177 | * be one per module. | 178 | * be one per module. |
178 | */ | 179 | */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6383d2d83bb0..a2d95ff50e9b 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -66,7 +66,7 @@ | |||
66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
67 | .rlim = INIT_RLIMITS, \ | 67 | .rlim = INIT_RLIMITS, \ |
68 | .pgrp = 1, \ | 68 | .pgrp = 1, \ |
69 | .tty_old_pgrp = 0, \ | 69 | .tty_old_pgrp = NULL, \ |
70 | { .__session = 1}, \ | 70 | { .__session = 1}, \ |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index e36e86c869fb..838cf5a5bd7f 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
14 | #include <linux/bottom_half.h> | 14 | #include <linux/bottom_half.h> |
15 | #include <linux/device.h> | ||
15 | #include <asm/atomic.h> | 16 | #include <asm/atomic.h> |
16 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
17 | #include <asm/system.h> | 18 | #include <asm/system.h> |
@@ -41,6 +42,8 @@ | |||
41 | * IRQF_SHARED - allow sharing the irq among several devices | 42 | * IRQF_SHARED - allow sharing the irq among several devices |
42 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | 43 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur |
43 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt | 44 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt |
45 | * IRQF_PERCPU - Interrupt is per cpu | ||
46 | * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing | ||
44 | */ | 47 | */ |
45 | #define IRQF_DISABLED 0x00000020 | 48 | #define IRQF_DISABLED 0x00000020 |
46 | #define IRQF_SAMPLE_RANDOM 0x00000040 | 49 | #define IRQF_SAMPLE_RANDOM 0x00000040 |
@@ -48,6 +51,7 @@ | |||
48 | #define IRQF_PROBE_SHARED 0x00000100 | 51 | #define IRQF_PROBE_SHARED 0x00000100 |
49 | #define IRQF_TIMER 0x00000200 | 52 | #define IRQF_TIMER 0x00000200 |
50 | #define IRQF_PERCPU 0x00000400 | 53 | #define IRQF_PERCPU 0x00000400 |
54 | #define IRQF_NOBALANCING 0x00000800 | ||
51 | 55 | ||
52 | /* | 56 | /* |
53 | * Migration helpers. Scheduled for removal in 1/2007 | 57 | * Migration helpers. Scheduled for removal in 1/2007 |
@@ -83,6 +87,11 @@ extern int request_irq(unsigned int, irq_handler_t handler, | |||
83 | unsigned long, const char *, void *); | 87 | unsigned long, const char *, void *); |
84 | extern void free_irq(unsigned int, void *); | 88 | extern void free_irq(unsigned int, void *); |
85 | 89 | ||
90 | extern int devm_request_irq(struct device *dev, unsigned int irq, | ||
91 | irq_handler_t handler, unsigned long irqflags, | ||
92 | const char *devname, void *dev_id); | ||
93 | extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); | ||
94 | |||
86 | /* | 95 | /* |
87 | * On lockdep we dont want to enable hardirqs in hardirq | 96 | * On lockdep we dont want to enable hardirqs in hardirq |
88 | * context. Use local_irq_enable_in_hardirq() to annotate | 97 | * context. Use local_irq_enable_in_hardirq() to annotate |
@@ -233,6 +242,9 @@ enum | |||
233 | BLOCK_SOFTIRQ, | 242 | BLOCK_SOFTIRQ, |
234 | TASKLET_SOFTIRQ, | 243 | TASKLET_SOFTIRQ, |
235 | SCHED_SOFTIRQ, | 244 | SCHED_SOFTIRQ, |
245 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
246 | HRTIMER_SOFTIRQ, | ||
247 | #endif | ||
236 | }; | 248 | }; |
237 | 249 | ||
238 | /* softirq mask and active fields moved to irq_cpustat_t in | 250 | /* softirq mask and active fields moved to irq_cpustat_t in |
@@ -411,4 +423,13 @@ extern int probe_irq_off(unsigned long); /* returns 0 or negative on failure */ | |||
411 | extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */ | 423 | extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */ |
412 | #endif | 424 | #endif |
413 | 425 | ||
426 | #ifdef CONFIG_PROC_FS | ||
427 | /* Initialize /proc/irq/ */ | ||
428 | extern void init_irq_proc(void); | ||
429 | #else | ||
430 | static inline void init_irq_proc(void) | ||
431 | { | ||
432 | } | ||
433 | #endif | ||
434 | |||
414 | #endif | 435 | #endif |
diff --git a/include/linux/io.h b/include/linux/io.h index 81877ea39309..c244a0cc9319 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -22,12 +22,27 @@ | |||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | 24 | ||
25 | struct device; | ||
26 | |||
25 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | 27 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); |
26 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); | 28 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); |
27 | 29 | ||
28 | int ioremap_page_range(unsigned long addr, unsigned long end, | 30 | int ioremap_page_range(unsigned long addr, unsigned long end, |
29 | unsigned long phys_addr, pgprot_t prot); | 31 | unsigned long phys_addr, pgprot_t prot); |
30 | 32 | ||
33 | /* | ||
34 | * Managed iomap interface | ||
35 | */ | ||
36 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | ||
37 | unsigned int nr); | ||
38 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); | ||
39 | |||
40 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | ||
41 | unsigned long size); | ||
42 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | ||
43 | unsigned long size); | ||
44 | void devm_iounmap(struct device *dev, void __iomem *addr); | ||
45 | |||
31 | /** | 46 | /** |
32 | * check_signature - find BIOS signatures | 47 | * check_signature - find BIOS signatures |
33 | * @io_addr: mmio address to check | 48 | * @io_addr: mmio address to check |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 15228d79c5bc..6859a3b14088 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -137,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s, | |||
137 | { | 137 | { |
138 | return __check_region(&ioport_resource, s, n); | 138 | return __check_region(&ioport_resource, s, n); |
139 | } | 139 | } |
140 | |||
141 | /* Wrappers for managed devices */ | ||
142 | struct device; | ||
143 | #define devm_request_region(dev,start,n,name) \ | ||
144 | __devm_request_region(dev, &ioport_resource, (start), (n), (name)) | ||
145 | #define devm_request_mem_region(dev,start,n,name) \ | ||
146 | __devm_request_region(dev, &iomem_resource, (start), (n), (name)) | ||
147 | |||
148 | extern struct resource * __devm_request_region(struct device *dev, | ||
149 | struct resource *parent, resource_size_t start, | ||
150 | resource_size_t n, const char *name); | ||
151 | |||
152 | #define devm_release_region(start,n) \ | ||
153 | __devm_release_region(dev, &ioport_resource, (start), (n)) | ||
154 | #define devm_release_mem_region(start,n) \ | ||
155 | __devm_release_region(dev, &iomem_resource, (start), (n)) | ||
156 | |||
157 | extern void __devm_release_region(struct device *dev, struct resource *parent, | ||
158 | resource_size_t start, resource_size_t n); | ||
159 | |||
140 | #endif /* _LINUX_IOPORT_H */ | 160 | #endif /* _LINUX_IOPORT_H */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 52fc4052a0ae..aa5b3e6178a0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -31,7 +31,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
31 | /* | 31 | /* |
32 | * IRQ line status. | 32 | * IRQ line status. |
33 | * | 33 | * |
34 | * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h | 34 | * Bits 0-7 are reserved for the IRQF_* bits in linux/interrupt.h |
35 | * | 35 | * |
36 | * IRQ types | 36 | * IRQ types |
37 | */ | 37 | */ |
@@ -45,29 +45,32 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
45 | #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ | 45 | #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ |
46 | 46 | ||
47 | /* Internal flags */ | 47 | /* Internal flags */ |
48 | #define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */ | 48 | #define IRQ_INPROGRESS 0x00000100 /* IRQ handler active - do not enter! */ |
49 | #define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */ | 49 | #define IRQ_DISABLED 0x00000200 /* IRQ disabled - do not enter! */ |
50 | #define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */ | 50 | #define IRQ_PENDING 0x00000400 /* IRQ pending - replay on enable */ |
51 | #define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */ | 51 | #define IRQ_REPLAY 0x00000800 /* IRQ has been replayed but not acked yet */ |
52 | #define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */ | 52 | #define IRQ_AUTODETECT 0x00001000 /* IRQ is being autodetected */ |
53 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ | 53 | #define IRQ_WAITING 0x00002000 /* IRQ not yet seen - for autodetection */ |
54 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ | 54 | #define IRQ_LEVEL 0x00004000 /* IRQ level triggered */ |
55 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ | 55 | #define IRQ_MASKED 0x00008000 /* IRQ masked - shouldn't be seen again */ |
56 | #define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ | 56 | #define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */ |
57 | #define IRQ_NOPROBE 0x00020000 /* IRQ is not valid for probing */ | ||
58 | #define IRQ_NOREQUEST 0x00040000 /* IRQ cannot be requested */ | ||
59 | #define IRQ_NOAUTOEN 0x00080000 /* IRQ will not be enabled on request irq */ | ||
60 | #define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */ | ||
61 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ | ||
62 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ | ||
63 | |||
57 | #ifdef CONFIG_IRQ_PER_CPU | 64 | #ifdef CONFIG_IRQ_PER_CPU |
58 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 65 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
66 | # define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) | ||
59 | #else | 67 | #else |
60 | # define CHECK_IRQ_PER_CPU(var) 0 | 68 | # define CHECK_IRQ_PER_CPU(var) 0 |
69 | # define IRQ_NO_BALANCING_MASK IRQ_NO_BALANCING | ||
61 | #endif | 70 | #endif |
62 | 71 | ||
63 | #define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */ | ||
64 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ | ||
65 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ | ||
66 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ | ||
67 | #define IRQ_WAKEUP 0x20000000 /* IRQ triggers system wakeup */ | ||
68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ | ||
69 | |||
70 | struct proc_dir_entry; | 72 | struct proc_dir_entry; |
73 | struct msi_desc; | ||
71 | 74 | ||
72 | /** | 75 | /** |
73 | * struct irq_chip - hardware interrupt chip descriptor | 76 | * struct irq_chip - hardware interrupt chip descriptor |
@@ -126,6 +129,7 @@ struct irq_chip { | |||
126 | * | 129 | * |
127 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] | 130 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] |
128 | * @chip: low level interrupt hardware access | 131 | * @chip: low level interrupt hardware access |
132 | * @msi_desc: MSI descriptor | ||
129 | * @handler_data: per-IRQ data for the irq_chip methods | 133 | * @handler_data: per-IRQ data for the irq_chip methods |
130 | * @chip_data: platform-specific per-chip private data for the chip | 134 | * @chip_data: platform-specific per-chip private data for the chip |
131 | * methods, to allow shared chip implementations | 135 | * methods, to allow shared chip implementations |
@@ -148,6 +152,7 @@ struct irq_chip { | |||
148 | struct irq_desc { | 152 | struct irq_desc { |
149 | irq_flow_handler_t handle_irq; | 153 | irq_flow_handler_t handle_irq; |
150 | struct irq_chip *chip; | 154 | struct irq_chip *chip; |
155 | struct msi_desc *msi_desc; | ||
151 | void *handler_data; | 156 | void *handler_data; |
152 | void *chip_data; | 157 | void *chip_data; |
153 | struct irqaction *action; /* IRQ action list */ | 158 | struct irqaction *action; /* IRQ action list */ |
@@ -233,11 +238,21 @@ static inline void set_pending_irq(unsigned int irq, cpumask_t mask) | |||
233 | 238 | ||
234 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ | 239 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ |
235 | 240 | ||
241 | extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask); | ||
242 | extern int irq_can_set_affinity(unsigned int irq); | ||
243 | |||
236 | #else /* CONFIG_SMP */ | 244 | #else /* CONFIG_SMP */ |
237 | 245 | ||
238 | #define move_native_irq(x) | 246 | #define move_native_irq(x) |
239 | #define move_masked_irq(x) | 247 | #define move_masked_irq(x) |
240 | 248 | ||
249 | static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask) | ||
250 | { | ||
251 | return -EINVAL; | ||
252 | } | ||
253 | |||
254 | static inline int irq_can_set_affinity(unsigned int irq) { return 0; } | ||
255 | |||
241 | #endif /* CONFIG_SMP */ | 256 | #endif /* CONFIG_SMP */ |
242 | 257 | ||
243 | #ifdef CONFIG_IRQBALANCE | 258 | #ifdef CONFIG_IRQBALANCE |
@@ -259,6 +274,11 @@ static inline int select_smp_affinity(unsigned int irq) | |||
259 | 274 | ||
260 | extern int no_irq_affinity; | 275 | extern int no_irq_affinity; |
261 | 276 | ||
277 | static inline int irq_balancing_disabled(unsigned int irq) | ||
278 | { | ||
279 | return irq_desc[irq].status & IRQ_NO_BALANCING_MASK; | ||
280 | } | ||
281 | |||
262 | /* Handle irq action chains: */ | 282 | /* Handle irq action chains: */ |
263 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); | 283 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); |
264 | 284 | ||
@@ -308,9 +328,6 @@ extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | |||
308 | /* Resending of interrupts :*/ | 328 | /* Resending of interrupts :*/ |
309 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 329 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
310 | 330 | ||
311 | /* Initialize /proc/irq/ */ | ||
312 | extern void init_irq_proc(void); | ||
313 | |||
314 | /* Enable/disable irq debugging output: */ | 331 | /* Enable/disable irq debugging output: */ |
315 | extern int noirqdebug_setup(char *str); | 332 | extern int noirqdebug_setup(char *str); |
316 | 333 | ||
@@ -373,10 +390,12 @@ extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | |||
373 | extern int set_irq_data(unsigned int irq, void *data); | 390 | extern int set_irq_data(unsigned int irq, void *data); |
374 | extern int set_irq_chip_data(unsigned int irq, void *data); | 391 | extern int set_irq_chip_data(unsigned int irq, void *data); |
375 | extern int set_irq_type(unsigned int irq, unsigned int type); | 392 | extern int set_irq_type(unsigned int irq, unsigned int type); |
393 | extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | ||
376 | 394 | ||
377 | #define get_irq_chip(irq) (irq_desc[irq].chip) | 395 | #define get_irq_chip(irq) (irq_desc[irq].chip) |
378 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) | 396 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) |
379 | #define get_irq_data(irq) (irq_desc[irq].handler_data) | 397 | #define get_irq_data(irq) (irq_desc[irq].handler_data) |
398 | #define get_irq_msi(irq) (irq_desc[irq].msi_desc) | ||
380 | 399 | ||
381 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 400 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
382 | 401 | ||
diff --git a/include/linux/jffs.h b/include/linux/jffs.h deleted file mode 100644 index 92213215277f..000000000000 --- a/include/linux/jffs.h +++ /dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | /* | ||
2 | * JFFS -- Journalling Flash File System, Linux implementation. | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000 Axis Communications AB. | ||
5 | * | ||
6 | * Created by Finn Hakansson <finn@axis.com>. | ||
7 | * | ||
8 | * This is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * $Id: jffs.h,v 1.20 2001/09/18 21:33:37 dwmw2 Exp $ | ||
14 | * | ||
15 | * Ported to Linux 2.3.x and MTD: | ||
16 | * Copyright (C) 2000 Alexander Larsson (alex@cendio.se), Cendio Systems AB | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __LINUX_JFFS_H__ | ||
21 | #define __LINUX_JFFS_H__ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | #include <linux/completion.h> | ||
25 | |||
26 | #define JFFS_VERSION_STRING "1.0" | ||
27 | |||
28 | /* This is a magic number that is used as an identification number for | ||
29 | this file system. It is written to the super_block structure. */ | ||
30 | #define JFFS_MAGIC_SB_BITMASK 0x07c0 /* 1984 */ | ||
31 | |||
32 | /* This is a magic number that every on-flash raw inode begins with. */ | ||
33 | #define JFFS_MAGIC_BITMASK 0x34383931 /* "1984" */ | ||
34 | |||
35 | /* These two bitmasks are the valid ones for the flash memories we have | ||
36 | for the moment. */ | ||
37 | #define JFFS_EMPTY_BITMASK 0xffffffff | ||
38 | #define JFFS_DIRTY_BITMASK 0x00000000 | ||
39 | |||
40 | /* This is the inode number of the root node. */ | ||
41 | #define JFFS_MIN_INO 1 | ||
42 | |||
43 | /* How many slots in the file hash table should we have? */ | ||
44 | #define JFFS_HASH_SIZE 40 | ||
45 | |||
46 | /* Don't use more than 254 bytes as the maximum allowed length of a file's | ||
47 | name due to errors that could occur during the scanning of the flash | ||
48 | memory. In fact, a name length of 255 or 0xff, could be the result of | ||
49 | an uncompleted write. For instance, if a raw inode is written to the | ||
50 | flash memory and there is a power lossage just before the length of | ||
51 | the name is written, the length 255 would be interpreted as an illegal | ||
52 | value. */ | ||
53 | #define JFFS_MAX_NAME_LEN 254 | ||
54 | |||
55 | /* Commands for ioctl(). */ | ||
56 | #define JFFS_IOCTL_MAGIC 't' | ||
57 | #define JFFS_PRINT_HASH _IO(JFFS_IOCTL_MAGIC, 90) | ||
58 | #define JFFS_PRINT_TREE _IO(JFFS_IOCTL_MAGIC, 91) | ||
59 | #define JFFS_GET_STATUS _IO(JFFS_IOCTL_MAGIC, 92) | ||
60 | |||
61 | /* XXX: This is something that we should try to get rid of in the future. */ | ||
62 | #define JFFS_MODIFY_INODE 0x01 | ||
63 | #define JFFS_MODIFY_NAME 0x02 | ||
64 | #define JFFS_MODIFY_DATA 0x04 | ||
65 | #define JFFS_MODIFY_EXIST 0x08 | ||
66 | |||
67 | struct jffs_control; | ||
68 | |||
69 | /* The JFFS raw inode structure: Used for storage on physical media. */ | ||
70 | /* Perhaps the uid, gid, atime, mtime and ctime members should have | ||
71 | more space due to future changes in the Linux kernel. Anyhow, since | ||
72 | a user of this filesystem probably have to fix a large number of | ||
73 | other things, we have decided to not be forward compatible. */ | ||
74 | struct jffs_raw_inode | ||
75 | { | ||
76 | __u32 magic; /* A constant magic number. */ | ||
77 | __u32 ino; /* Inode number. */ | ||
78 | __u32 pino; /* Parent's inode number. */ | ||
79 | __u32 version; /* Version number. */ | ||
80 | __u32 mode; /* The file's type or mode. */ | ||
81 | __u16 uid; /* The file's owner. */ | ||
82 | __u16 gid; /* The file's group. */ | ||
83 | __u32 atime; /* Last access time. */ | ||
84 | __u32 mtime; /* Last modification time. */ | ||
85 | __u32 ctime; /* Creation time. */ | ||
86 | __u32 offset; /* Where to begin to write. */ | ||
87 | __u32 dsize; /* Size of the node's data. */ | ||
88 | __u32 rsize; /* How much are going to be replaced? */ | ||
89 | __u8 nsize; /* Name length. */ | ||
90 | __u8 nlink; /* Number of links. */ | ||
91 | __u8 spare : 6; /* For future use. */ | ||
92 | __u8 rename : 1; /* Rename to a name of an already existing file? */ | ||
93 | __u8 deleted : 1; /* Has this file been deleted? */ | ||
94 | __u8 accurate; /* The inode is obsolete if accurate == 0. */ | ||
95 | __u32 dchksum; /* Checksum for the data. */ | ||
96 | __u16 nchksum; /* Checksum for the name. */ | ||
97 | __u16 chksum; /* Checksum for the raw inode. */ | ||
98 | }; | ||
99 | |||
100 | /* Define the offset of the accurate byte in struct jffs_raw_inode. */ | ||
101 | #define JFFS_RAW_INODE_ACCURATE_OFFSET (sizeof(struct jffs_raw_inode) \ | ||
102 | - 2 * sizeof(__u32) - sizeof(__u8)) | ||
103 | |||
104 | /* Define the offset of the chksum member in struct jffs_raw_inode. */ | ||
105 | #define JFFS_RAW_INODE_CHKSUM_OFFSET (sizeof(struct jffs_raw_inode) \ | ||
106 | - sizeof(__u16)) | ||
107 | |||
108 | /* Define the offset of the dchksum member in struct jffs_raw_inode. */ | ||
109 | #define JFFS_RAW_INODE_DCHKSUM_OFFSET (sizeof(struct jffs_raw_inode) \ | ||
110 | - sizeof(__u16) - sizeof(__u16) \ | ||
111 | - sizeof(__u32)) | ||
112 | |||
113 | |||
114 | /* The RAM representation of the node. The names of pointers to | ||
115 | jffs_nodes are very often just called `n' in the source code. */ | ||
116 | struct jffs_node | ||
117 | { | ||
118 | __u32 ino; /* Inode number. */ | ||
119 | __u32 version; /* Version number. */ | ||
120 | __u32 data_offset; /* Logic location of the data to insert. */ | ||
121 | __u32 data_size; /* The amount of data this node inserts. */ | ||
122 | __u32 removed_size; /* The amount of data that this node removes. */ | ||
123 | __u32 fm_offset; /* Physical location of the data in the actual | ||
124 | flash memory data chunk. */ | ||
125 | __u8 name_size; /* Size of the name. */ | ||
126 | struct jffs_fm *fm; /* Physical memory information. */ | ||
127 | struct jffs_node *version_prev; | ||
128 | struct jffs_node *version_next; | ||
129 | struct jffs_node *range_prev; | ||
130 | struct jffs_node *range_next; | ||
131 | }; | ||
132 | |||
133 | |||
134 | /* The RAM representation of a file (plain files, directories, | ||
135 | links, etc.). Pointers to jffs_files are normally named `f' | ||
136 | in the JFFS source code. */ | ||
137 | struct jffs_file | ||
138 | { | ||
139 | __u32 ino; /* Inode number. */ | ||
140 | __u32 pino; /* Parent's inode number. */ | ||
141 | __u32 mode; /* file_type, mode */ | ||
142 | __u16 uid; /* owner */ | ||
143 | __u16 gid; /* group */ | ||
144 | __u32 atime; /* Last access time. */ | ||
145 | __u32 mtime; /* Last modification time. */ | ||
146 | __u32 ctime; /* Creation time. */ | ||
147 | __u8 nsize; /* Name length. */ | ||
148 | __u8 nlink; /* Number of links. */ | ||
149 | __u8 deleted; /* Has this file been deleted? */ | ||
150 | char *name; /* The name of this file; NULL-terminated. */ | ||
151 | __u32 size; /* The total size of the file's data. */ | ||
152 | __u32 highest_version; /* The highest version number of this file. */ | ||
153 | struct jffs_control *c; | ||
154 | struct jffs_file *parent; /* Reference to the parent directory. */ | ||
155 | struct jffs_file *children; /* Always NULL for plain files. */ | ||
156 | struct jffs_file *sibling_prev; /* Siblings in the same directory. */ | ||
157 | struct jffs_file *sibling_next; | ||
158 | struct list_head hash; /* hash list. */ | ||
159 | struct jffs_node *range_head; /* The final data. */ | ||
160 | struct jffs_node *range_tail; /* The first data. */ | ||
161 | struct jffs_node *version_head; /* The youngest node. */ | ||
162 | struct jffs_node *version_tail; /* The oldest node. */ | ||
163 | }; | ||
164 | |||
165 | |||
166 | /* This is just a definition of a simple list used for keeping track of | ||
167 | files deleted due to a rename. This list is only used during the | ||
168 | mounting of the file system and only if there have been rename operations | ||
169 | earlier. */ | ||
170 | struct jffs_delete_list | ||
171 | { | ||
172 | __u32 ino; | ||
173 | struct jffs_delete_list *next; | ||
174 | }; | ||
175 | |||
176 | |||
177 | /* A struct for the overall file system control. Pointers to | ||
178 | jffs_control structs are named `c' in the source code. */ | ||
179 | struct jffs_control | ||
180 | { | ||
181 | struct super_block *sb; /* Reference to the VFS super block. */ | ||
182 | struct jffs_file *root; /* The root directory file. */ | ||
183 | struct list_head *hash; /* Hash table for finding files by ino. */ | ||
184 | struct jffs_fmcontrol *fmc; /* Flash memory control structure. */ | ||
185 | __u32 hash_len; /* The size of the hash table. */ | ||
186 | __u32 next_ino; /* Next inode number to use for new files. */ | ||
187 | __u16 building_fs; /* Is the file system being built right now? */ | ||
188 | struct jffs_delete_list *delete_list; /* Track deleted files. */ | ||
189 | pid_t thread_pid; /* GC thread's PID */ | ||
190 | struct task_struct *gc_task; /* GC task struct */ | ||
191 | struct completion gc_thread_comp; /* GC thread exit mutex */ | ||
192 | __u32 gc_minfree_threshold; /* GC trigger thresholds */ | ||
193 | __u32 gc_maxdirty_threshold; | ||
194 | }; | ||
195 | |||
196 | |||
197 | /* Used to inform about flash status. */ | ||
198 | struct jffs_flash_status | ||
199 | { | ||
200 | __u32 size; | ||
201 | __u32 used; | ||
202 | __u32 dirty; | ||
203 | __u32 begin; | ||
204 | __u32 end; | ||
205 | }; | ||
206 | |||
207 | /* This stuff could be used for finding memory leaks. */ | ||
208 | #define JFFS_MEMORY_DEBUG 0 | ||
209 | |||
210 | extern long no_jffs_node; | ||
211 | #if defined(JFFS_MEMORY_DEBUG) && JFFS_MEMORY_DEBUG | ||
212 | extern long no_jffs_control; | ||
213 | extern long no_jffs_raw_inode; | ||
214 | extern long no_jffs_node_ref; | ||
215 | extern long no_jffs_fm; | ||
216 | extern long no_jffs_fmcontrol; | ||
217 | extern long no_hash; | ||
218 | extern long no_name; | ||
219 | #define DJM(x) x | ||
220 | #else | ||
221 | #define DJM(x) | ||
222 | #endif | ||
223 | |||
224 | #endif /* __LINUX_JFFS_H__ */ | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 0ec6e28bccd2..c080f61fb024 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -142,13 +142,13 @@ static inline u64 get_jiffies_64(void) | |||
142 | * | 142 | * |
143 | * And some not so obvious. | 143 | * And some not so obvious. |
144 | * | 144 | * |
145 | * Note that we don't want to return MAX_LONG, because | 145 | * Note that we don't want to return LONG_MAX, because |
146 | * for various timeout reasons we often end up having | 146 | * for various timeout reasons we often end up having |
147 | * to wait "jiffies+1" in order to guarantee that we wait | 147 | * to wait "jiffies+1" in order to guarantee that we wait |
148 | * at _least_ "jiffies" - so "jiffies+1" had better still | 148 | * at _least_ "jiffies" - so "jiffies+1" had better still |
149 | * be positive. | 149 | * be positive. |
150 | */ | 150 | */ |
151 | #define MAX_JIFFY_OFFSET ((~0UL >> 1)-1) | 151 | #define MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1) |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * We want to do realistic conversions of time so we need to use the same | 154 | * We want to do realistic conversions of time so we need to use the same |
@@ -259,207 +259,23 @@ static inline u64 get_jiffies_64(void) | |||
259 | #endif | 259 | #endif |
260 | 260 | ||
261 | /* | 261 | /* |
262 | * Convert jiffies to milliseconds and back. | 262 | * Convert various time units to each other: |
263 | * | ||
264 | * Avoid unnecessary multiplications/divisions in the | ||
265 | * two most common HZ cases: | ||
266 | */ | ||
267 | static inline unsigned int jiffies_to_msecs(const unsigned long j) | ||
268 | { | ||
269 | #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) | ||
270 | return (MSEC_PER_SEC / HZ) * j; | ||
271 | #elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC) | ||
272 | return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); | ||
273 | #else | ||
274 | return (j * MSEC_PER_SEC) / HZ; | ||
275 | #endif | ||
276 | } | ||
277 | |||
278 | static inline unsigned int jiffies_to_usecs(const unsigned long j) | ||
279 | { | ||
280 | #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) | ||
281 | return (USEC_PER_SEC / HZ) * j; | ||
282 | #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) | ||
283 | return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); | ||
284 | #else | ||
285 | return (j * USEC_PER_SEC) / HZ; | ||
286 | #endif | ||
287 | } | ||
288 | |||
289 | static inline unsigned long msecs_to_jiffies(const unsigned int m) | ||
290 | { | ||
291 | if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) | ||
292 | return MAX_JIFFY_OFFSET; | ||
293 | #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) | ||
294 | return (m + (MSEC_PER_SEC / HZ) - 1) / (MSEC_PER_SEC / HZ); | ||
295 | #elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC) | ||
296 | return m * (HZ / MSEC_PER_SEC); | ||
297 | #else | ||
298 | return (m * HZ + MSEC_PER_SEC - 1) / MSEC_PER_SEC; | ||
299 | #endif | ||
300 | } | ||
301 | |||
302 | static inline unsigned long usecs_to_jiffies(const unsigned int u) | ||
303 | { | ||
304 | if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET)) | ||
305 | return MAX_JIFFY_OFFSET; | ||
306 | #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) | ||
307 | return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ); | ||
308 | #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) | ||
309 | return u * (HZ / USEC_PER_SEC); | ||
310 | #else | ||
311 | return (u * HZ + USEC_PER_SEC - 1) / USEC_PER_SEC; | ||
312 | #endif | ||
313 | } | ||
314 | |||
315 | /* | ||
316 | * The TICK_NSEC - 1 rounds up the value to the next resolution. Note | ||
317 | * that a remainder subtract here would not do the right thing as the | ||
318 | * resolution values don't fall on second boundries. I.e. the line: | ||
319 | * nsec -= nsec % TICK_NSEC; is NOT a correct resolution rounding. | ||
320 | * | ||
321 | * Rather, we just shift the bits off the right. | ||
322 | * | ||
323 | * The >> (NSEC_JIFFIE_SC - SEC_JIFFIE_SC) converts the scaled nsec | ||
324 | * value to a scaled second value. | ||
325 | */ | ||
326 | static __inline__ unsigned long | ||
327 | timespec_to_jiffies(const struct timespec *value) | ||
328 | { | ||
329 | unsigned long sec = value->tv_sec; | ||
330 | long nsec = value->tv_nsec + TICK_NSEC - 1; | ||
331 | |||
332 | if (sec >= MAX_SEC_IN_JIFFIES){ | ||
333 | sec = MAX_SEC_IN_JIFFIES; | ||
334 | nsec = 0; | ||
335 | } | ||
336 | return (((u64)sec * SEC_CONVERSION) + | ||
337 | (((u64)nsec * NSEC_CONVERSION) >> | ||
338 | (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; | ||
339 | |||
340 | } | ||
341 | |||
342 | static __inline__ void | ||
343 | jiffies_to_timespec(const unsigned long jiffies, struct timespec *value) | ||
344 | { | ||
345 | /* | ||
346 | * Convert jiffies to nanoseconds and separate with | ||
347 | * one divide. | ||
348 | */ | ||
349 | u64 nsec = (u64)jiffies * TICK_NSEC; | ||
350 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_nsec); | ||
351 | } | ||
352 | |||
353 | /* Same for "timeval" | ||
354 | * | ||
355 | * Well, almost. The problem here is that the real system resolution is | ||
356 | * in nanoseconds and the value being converted is in micro seconds. | ||
357 | * Also for some machines (those that use HZ = 1024, in-particular), | ||
358 | * there is a LARGE error in the tick size in microseconds. | ||
359 | |||
360 | * The solution we use is to do the rounding AFTER we convert the | ||
361 | * microsecond part. Thus the USEC_ROUND, the bits to be shifted off. | ||
362 | * Instruction wise, this should cost only an additional add with carry | ||
363 | * instruction above the way it was done above. | ||
364 | */ | ||
365 | static __inline__ unsigned long | ||
366 | timeval_to_jiffies(const struct timeval *value) | ||
367 | { | ||
368 | unsigned long sec = value->tv_sec; | ||
369 | long usec = value->tv_usec; | ||
370 | |||
371 | if (sec >= MAX_SEC_IN_JIFFIES){ | ||
372 | sec = MAX_SEC_IN_JIFFIES; | ||
373 | usec = 0; | ||
374 | } | ||
375 | return (((u64)sec * SEC_CONVERSION) + | ||
376 | (((u64)usec * USEC_CONVERSION + USEC_ROUND) >> | ||
377 | (USEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; | ||
378 | } | ||
379 | |||
380 | static __inline__ void | ||
381 | jiffies_to_timeval(const unsigned long jiffies, struct timeval *value) | ||
382 | { | ||
383 | /* | ||
384 | * Convert jiffies to nanoseconds and separate with | ||
385 | * one divide. | ||
386 | */ | ||
387 | u64 nsec = (u64)jiffies * TICK_NSEC; | ||
388 | long tv_usec; | ||
389 | |||
390 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &tv_usec); | ||
391 | tv_usec /= NSEC_PER_USEC; | ||
392 | value->tv_usec = tv_usec; | ||
393 | } | ||
394 | |||
395 | /* | ||
396 | * Convert jiffies/jiffies_64 to clock_t and back. | ||
397 | */ | 263 | */ |
398 | static inline clock_t jiffies_to_clock_t(long x) | 264 | extern unsigned int jiffies_to_msecs(const unsigned long j); |
399 | { | 265 | extern unsigned int jiffies_to_usecs(const unsigned long j); |
400 | #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 | 266 | extern unsigned long msecs_to_jiffies(const unsigned int m); |
401 | return x / (HZ / USER_HZ); | 267 | extern unsigned long usecs_to_jiffies(const unsigned int u); |
402 | #else | 268 | extern unsigned long timespec_to_jiffies(const struct timespec *value); |
403 | u64 tmp = (u64)x * TICK_NSEC; | 269 | extern void jiffies_to_timespec(const unsigned long jiffies, |
404 | do_div(tmp, (NSEC_PER_SEC / USER_HZ)); | 270 | struct timespec *value); |
405 | return (long)tmp; | 271 | extern unsigned long timeval_to_jiffies(const struct timeval *value); |
406 | #endif | 272 | extern void jiffies_to_timeval(const unsigned long jiffies, |
407 | } | 273 | struct timeval *value); |
408 | 274 | extern clock_t jiffies_to_clock_t(long x); | |
409 | static inline unsigned long clock_t_to_jiffies(unsigned long x) | 275 | extern unsigned long clock_t_to_jiffies(unsigned long x); |
410 | { | 276 | extern u64 jiffies_64_to_clock_t(u64 x); |
411 | #if (HZ % USER_HZ)==0 | 277 | extern u64 nsec_to_clock_t(u64 x); |
412 | if (x >= ~0UL / (HZ / USER_HZ)) | 278 | |
413 | return ~0UL; | 279 | #define TIMESTAMP_SIZE 30 |
414 | return x * (HZ / USER_HZ); | ||
415 | #else | ||
416 | u64 jif; | ||
417 | |||
418 | /* Don't worry about loss of precision here .. */ | ||
419 | if (x >= ~0UL / HZ * USER_HZ) | ||
420 | return ~0UL; | ||
421 | |||
422 | /* .. but do try to contain it here */ | ||
423 | jif = x * (u64) HZ; | ||
424 | do_div(jif, USER_HZ); | ||
425 | return jif; | ||
426 | #endif | ||
427 | } | ||
428 | |||
429 | static inline u64 jiffies_64_to_clock_t(u64 x) | ||
430 | { | ||
431 | #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 | ||
432 | do_div(x, HZ / USER_HZ); | ||
433 | #else | ||
434 | /* | ||
435 | * There are better ways that don't overflow early, | ||
436 | * but even this doesn't overflow in hundreds of years | ||
437 | * in 64 bits, so.. | ||
438 | */ | ||
439 | x *= TICK_NSEC; | ||
440 | do_div(x, (NSEC_PER_SEC / USER_HZ)); | ||
441 | #endif | ||
442 | return x; | ||
443 | } | ||
444 | |||
445 | static inline u64 nsec_to_clock_t(u64 x) | ||
446 | { | ||
447 | #if (NSEC_PER_SEC % USER_HZ) == 0 | ||
448 | do_div(x, (NSEC_PER_SEC / USER_HZ)); | ||
449 | #elif (USER_HZ % 512) == 0 | ||
450 | x *= USER_HZ/512; | ||
451 | do_div(x, (NSEC_PER_SEC / 512)); | ||
452 | #else | ||
453 | /* | ||
454 | * max relative error 5.7e-8 (1.8s per year) for USER_HZ <= 1024, | ||
455 | * overflow after 64.99 years. | ||
456 | * exact for HZ=60, 72, 90, 120, 144, 180, 300, 600, 900, ... | ||
457 | */ | ||
458 | x *= 9; | ||
459 | do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (USER_HZ/2)) | ||
460 | / USER_HZ)); | ||
461 | #endif | ||
462 | return x; | ||
463 | } | ||
464 | 280 | ||
465 | #endif | 281 | #endif |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 63fb18dcac30..9ddf25c21538 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -92,11 +92,6 @@ extern int cond_resched(void); | |||
92 | (__x < 0) ? -__x : __x; \ | 92 | (__x < 0) ? -__x : __x; \ |
93 | }) | 93 | }) |
94 | 94 | ||
95 | #define labs(x) ({ \ | ||
96 | long __x = (x); \ | ||
97 | (__x < 0) ? -__x : __x; \ | ||
98 | }) | ||
99 | |||
100 | extern struct atomic_notifier_head panic_notifier_list; | 95 | extern struct atomic_notifier_head panic_notifier_list; |
101 | extern long (*panic_blink)(long time); | 96 | extern long (*panic_blink)(long time); |
102 | NORET_TYPE void panic(const char * fmt, ...) | 97 | NORET_TYPE void panic(const char * fmt, ...) |
@@ -139,7 +134,8 @@ extern unsigned long long memparse(char *ptr, char **retptr); | |||
139 | extern int core_kernel_text(unsigned long addr); | 134 | extern int core_kernel_text(unsigned long addr); |
140 | extern int __kernel_text_address(unsigned long addr); | 135 | extern int __kernel_text_address(unsigned long addr); |
141 | extern int kernel_text_address(unsigned long addr); | 136 | extern int kernel_text_address(unsigned long addr); |
142 | extern int session_of_pgrp(int pgrp); | 137 | struct pid; |
138 | extern struct pid *session_of_pgrp(struct pid *pgrp); | ||
143 | 139 | ||
144 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | 140 | extern void dump_thread(struct pt_regs *regs, struct user *dump); |
145 | 141 | ||
@@ -176,6 +172,7 @@ static inline void console_verbose(void) | |||
176 | } | 172 | } |
177 | 173 | ||
178 | extern void bust_spinlocks(int yes); | 174 | extern void bust_spinlocks(int yes); |
175 | extern void wake_up_klogd(void); | ||
179 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 176 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
180 | extern int panic_timeout; | 177 | extern int panic_timeout; |
181 | extern int panic_on_oops; | 178 | extern int panic_on_oops; |
@@ -200,6 +197,7 @@ extern enum system_states { | |||
200 | #define TAINT_FORCED_RMMOD (1<<3) | 197 | #define TAINT_FORCED_RMMOD (1<<3) |
201 | #define TAINT_MACHINE_CHECK (1<<4) | 198 | #define TAINT_MACHINE_CHECK (1<<4) |
202 | #define TAINT_BAD_PAGE (1<<5) | 199 | #define TAINT_BAD_PAGE (1<<5) |
200 | #define TAINT_USER (1<<6) | ||
203 | 201 | ||
204 | extern void dump_stack(void); | 202 | extern void dump_stack(void); |
205 | 203 | ||
@@ -312,6 +310,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * | |||
312 | (void)__tmp; \ | 310 | (void)__tmp; \ |
313 | }) | 311 | }) |
314 | 312 | ||
313 | struct sysinfo; | ||
314 | extern int do_sysinfo(struct sysinfo *info); | ||
315 | |||
315 | #endif /* __KERNEL__ */ | 316 | #endif /* __KERNEL__ */ |
316 | 317 | ||
317 | #define SI_LOAD_SHIFT 16 | 318 | #define SI_LOAD_SHIFT 16 |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 48eccd865bd8..404f4464cb1a 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo) | |||
74 | * @buffer: the data to be added. | 74 | * @buffer: the data to be added. |
75 | * @len: the length of the data to be added. | 75 | * @len: the length of the data to be added. |
76 | * | 76 | * |
77 | * This function copies at most 'len' bytes from the 'buffer' into | 77 | * This function copies at most @len bytes from the @buffer into |
78 | * the FIFO depending on the free space, and returns the number of | 78 | * the FIFO depending on the free space, and returns the number of |
79 | * bytes copied. | 79 | * bytes copied. |
80 | */ | 80 | */ |
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo, | |||
99 | * @buffer: where the data must be copied. | 99 | * @buffer: where the data must be copied. |
100 | * @len: the size of the destination buffer. | 100 | * @len: the size of the destination buffer. |
101 | * | 101 | * |
102 | * This function copies at most 'len' bytes from the FIFO into the | 102 | * This function copies at most @len bytes from the FIFO into the |
103 | * 'buffer' and returns the number of copied bytes. | 103 | * @buffer and returns the number of copied bytes. |
104 | */ | 104 | */ |
105 | static inline unsigned int kfifo_get(struct kfifo *fifo, | 105 | static inline unsigned int kfifo_get(struct kfifo *fifo, |
106 | unsigned char *buffer, unsigned int len) | 106 | unsigned char *buffer, unsigned int len) |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 10f505c8431d..cc8e674ae27a 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -28,8 +28,10 @@ | |||
28 | #ifdef CONFIG_KMOD | 28 | #ifdef CONFIG_KMOD |
29 | /* modprobe exit status on success, -ve on error. Return value | 29 | /* modprobe exit status on success, -ve on error. Return value |
30 | * usually useless though. */ | 30 | * usually useless though. */ |
31 | extern void kmod_sysfs_init(void); | ||
31 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); | 32 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); |
32 | #else | 33 | #else |
34 | static inline void kmod_sysfs_init(void) {}; | ||
33 | static inline int request_module(const char * name, ...) { return -ENOSYS; } | 35 | static inline int request_module(const char * name, ...) { return -ENOSYS; } |
34 | #endif | 36 | #endif |
35 | 37 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 76538fcf2c4e..b850e0310538 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -74,9 +74,13 @@ extern void kobject_init(struct kobject *); | |||
74 | extern void kobject_cleanup(struct kobject *); | 74 | extern void kobject_cleanup(struct kobject *); |
75 | 75 | ||
76 | extern int __must_check kobject_add(struct kobject *); | 76 | extern int __must_check kobject_add(struct kobject *); |
77 | extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *); | ||
77 | extern void kobject_del(struct kobject *); | 78 | extern void kobject_del(struct kobject *); |
78 | 79 | ||
79 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 80 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
81 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | ||
82 | struct dentry *new_parent, | ||
83 | const char *new_name); | ||
80 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 84 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
81 | 85 | ||
82 | extern int __must_check kobject_register(struct kobject *); | 86 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h new file mode 100644 index 000000000000..8047d4b17bf1 --- /dev/null +++ b/include/linux/ks0108.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Filename: ks0108.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: ks0108 LCD Controller driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-31 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _KS0108_H_ | ||
26 | #define _KS0108_H_ | ||
27 | |||
28 | /* Write a byte to the data port */ | ||
29 | extern void ks0108_writedata(unsigned char byte); | ||
30 | |||
31 | /* Write a byte to the control port */ | ||
32 | extern void ks0108_writecontrol(unsigned char byte); | ||
33 | |||
34 | /* Set the controller's current display state (0..1) */ | ||
35 | extern void ks0108_displaystate(unsigned char state); | ||
36 | |||
37 | /* Set the controller's current startline (0..63) */ | ||
38 | extern void ks0108_startline(unsigned char startline); | ||
39 | |||
40 | /* Set the controller's current address (0..63) */ | ||
41 | extern void ks0108_address(unsigned char address); | ||
42 | |||
43 | /* Set the controller's current page (0..7) */ | ||
44 | extern void ks0108_page(unsigned char page); | ||
45 | |||
46 | #endif /* _KS0108_H_ */ | ||
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 611f17f79eef..c68c7ac6b232 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | |||
163 | * @add1: addend1 | 163 | * @add1: addend1 |
164 | * @add2: addend2 | 164 | * @add2: addend2 |
165 | * | 165 | * |
166 | * Returns the sum of addend1 and addend2 | 166 | * Returns the sum of @add1 and @add2. |
167 | */ | 167 | */ |
168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | 168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) |
169 | { | 169 | { |
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | |||
189 | * @kt: addend | 189 | * @kt: addend |
190 | * @nsec: the scalar nsec value to add | 190 | * @nsec: the scalar nsec value to add |
191 | * | 191 | * |
192 | * Returns the sum of kt and nsec in ktime_t format | 192 | * Returns the sum of @kt and @nsec in ktime_t format |
193 | */ | 193 | */ |
194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); | 194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); |
195 | 195 | ||
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt) | |||
246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds | 246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds |
247 | * @kt: the ktime_t variable to convert | 247 | * @kt: the ktime_t variable to convert |
248 | * | 248 | * |
249 | * Returns the scalar nanoseconds representation of kt | 249 | * Returns the scalar nanoseconds representation of @kt |
250 | */ | 250 | */ |
251 | static inline s64 ktime_to_ns(const ktime_t kt) | 251 | static inline s64 ktime_to_ns(const ktime_t kt) |
252 | { | 252 | { |
@@ -261,8 +261,7 @@ static inline s64 ktime_to_ns(const ktime_t kt) | |||
261 | * idea of the (in)accuracy of timers. Timer values are rounded up to | 261 | * idea of the (in)accuracy of timers. Timer values are rounded up to |
262 | * this resolution values. | 262 | * this resolution values. |
263 | */ | 263 | */ |
264 | #define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC } | 264 | #define KTIME_LOW_RES (ktime_t){ .tv64 = TICK_NSEC } |
265 | #define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC } | ||
266 | 265 | ||
267 | /* Get the monotonic time in timespec format: */ | 266 | /* Get the monotonic time in timespec format: */ |
268 | extern void ktime_get_ts(struct timespec *ts); | 267 | extern void ktime_get_ts(struct timespec *ts); |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 1be148f0fce4..f3604593fb76 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 2 | 14 | #define KVM_API_VERSION 3 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -65,6 +65,8 @@ struct kvm_run { | |||
65 | __u8 ready_for_interrupt_injection; | 65 | __u8 ready_for_interrupt_injection; |
66 | __u8 if_flag; | 66 | __u8 if_flag; |
67 | __u16 padding2; | 67 | __u16 padding2; |
68 | |||
69 | /* in (pre_kvm_run), out (post_kvm_run) */ | ||
68 | __u64 cr8; | 70 | __u64 cr8; |
69 | __u64 apic_base; | 71 | __u64 apic_base; |
70 | 72 | ||
@@ -185,6 +187,7 @@ struct kvm_translation { | |||
185 | __u8 valid; | 187 | __u8 valid; |
186 | __u8 writeable; | 188 | __u8 writeable; |
187 | __u8 usermode; | 189 | __u8 usermode; |
190 | __u8 pad[5]; | ||
188 | }; | 191 | }; |
189 | 192 | ||
190 | /* for KVM_INTERRUPT */ | 193 | /* for KVM_INTERRUPT */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91bb8ceef0b5..86762a9f52ba 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -31,10 +31,11 @@ | |||
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <asm/scatterlist.h> | 33 | #include <asm/scatterlist.h> |
34 | #include <asm/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/ata.h> | 35 | #include <linux/ata.h> |
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
38 | #include <linux/acpi.h> | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * Define if arch has non-standard setup. This is a _PCI_ standard | 41 | * Define if arch has non-standard setup. This is a _PCI_ standard |
@@ -54,8 +55,6 @@ | |||
54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 55 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 56 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
56 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 57 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
57 | #define ATA_ENABLE_PATA /* define to enable PATA support in some | ||
58 | * low-level drivers */ | ||
59 | 58 | ||
60 | 59 | ||
61 | /* note: prints function name for you */ | 60 | /* note: prints function name for you */ |
@@ -109,10 +108,6 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) | |||
109 | #define ATA_TAG_POISON 0xfafbfcfdU | 108 | #define ATA_TAG_POISON 0xfafbfcfdU |
110 | 109 | ||
111 | /* move to PCI layer? */ | 110 | /* move to PCI layer? */ |
112 | #define PCI_VDEVICE(vendor, device) \ | ||
113 | PCI_VENDOR_ID_##vendor, (device), \ | ||
114 | PCI_ANY_ID, PCI_ANY_ID, 0, 0 | ||
115 | |||
116 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) | 111 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) |
117 | { | 112 | { |
118 | return &pdev->dev; | 113 | return &pdev->dev; |
@@ -178,6 +173,7 @@ enum { | |||
178 | ATA_FLAG_DEBUGMSG = (1 << 13), | 173 | ATA_FLAG_DEBUGMSG = (1 << 13), |
179 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ | 174 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ |
180 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | 175 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ |
176 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ | ||
181 | 177 | ||
182 | /* The following flag belongs to ap->pflags but is kept in | 178 | /* The following flag belongs to ap->pflags but is kept in |
183 | * ap->flags because it's referenced in many LLDs and will be | 179 | * ap->flags because it's referenced in many LLDs and will be |
@@ -308,7 +304,7 @@ enum { | |||
308 | * most devices. | 304 | * most devices. |
309 | */ | 305 | */ |
310 | ATA_SPINUP_WAIT = 8000, | 306 | ATA_SPINUP_WAIT = 8000, |
311 | 307 | ||
312 | /* Horkage types. May be set by libata or controller on drives | 308 | /* Horkage types. May be set by libata or controller on drives |
313 | (some horkage may be drive/controller pair dependant */ | 309 | (some horkage may be drive/controller pair dependant */ |
314 | 310 | ||
@@ -352,21 +348,21 @@ typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); | |||
352 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); | 348 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); |
353 | 349 | ||
354 | struct ata_ioports { | 350 | struct ata_ioports { |
355 | unsigned long cmd_addr; | 351 | void __iomem *cmd_addr; |
356 | unsigned long data_addr; | 352 | void __iomem *data_addr; |
357 | unsigned long error_addr; | 353 | void __iomem *error_addr; |
358 | unsigned long feature_addr; | 354 | void __iomem *feature_addr; |
359 | unsigned long nsect_addr; | 355 | void __iomem *nsect_addr; |
360 | unsigned long lbal_addr; | 356 | void __iomem *lbal_addr; |
361 | unsigned long lbam_addr; | 357 | void __iomem *lbam_addr; |
362 | unsigned long lbah_addr; | 358 | void __iomem *lbah_addr; |
363 | unsigned long device_addr; | 359 | void __iomem *device_addr; |
364 | unsigned long status_addr; | 360 | void __iomem *status_addr; |
365 | unsigned long command_addr; | 361 | void __iomem *command_addr; |
366 | unsigned long altstatus_addr; | 362 | void __iomem *altstatus_addr; |
367 | unsigned long ctl_addr; | 363 | void __iomem *ctl_addr; |
368 | unsigned long bmdma_addr; | 364 | void __iomem *bmdma_addr; |
369 | unsigned long scr_addr; | 365 | void __iomem *scr_addr; |
370 | }; | 366 | }; |
371 | 367 | ||
372 | struct ata_probe_ent { | 368 | struct ata_probe_ent { |
@@ -385,7 +381,7 @@ struct ata_probe_ent { | |||
385 | unsigned int irq_flags; | 381 | unsigned int irq_flags; |
386 | unsigned long port_flags; | 382 | unsigned long port_flags; |
387 | unsigned long _host_flags; | 383 | unsigned long _host_flags; |
388 | void __iomem *mmio_base; | 384 | void __iomem * const *iomap; |
389 | void *private_data; | 385 | void *private_data; |
390 | 386 | ||
391 | /* port_info for the secondary port. Together with irq2, it's | 387 | /* port_info for the secondary port. Together with irq2, it's |
@@ -402,7 +398,7 @@ struct ata_host { | |||
402 | struct device *dev; | 398 | struct device *dev; |
403 | unsigned long irq; | 399 | unsigned long irq; |
404 | unsigned long irq2; | 400 | unsigned long irq2; |
405 | void __iomem *mmio_base; | 401 | void __iomem * const *iomap; |
406 | unsigned int n_ports; | 402 | unsigned int n_ports; |
407 | void *private_data; | 403 | void *private_data; |
408 | const struct ata_port_operations *ops; | 404 | const struct ata_port_operations *ops; |
@@ -431,9 +427,6 @@ struct ata_queued_cmd { | |||
431 | 427 | ||
432 | unsigned int pad_len; | 428 | unsigned int pad_len; |
433 | 429 | ||
434 | unsigned int nsect; | ||
435 | unsigned int cursect; | ||
436 | |||
437 | unsigned int nbytes; | 430 | unsigned int nbytes; |
438 | unsigned int curbytes; | 431 | unsigned int curbytes; |
439 | 432 | ||
@@ -503,6 +496,10 @@ struct ata_device { | |||
503 | /* error history */ | 496 | /* error history */ |
504 | struct ata_ering ering; | 497 | struct ata_ering ering; |
505 | unsigned int horkage; /* List of broken features */ | 498 | unsigned int horkage; /* List of broken features */ |
499 | #ifdef CONFIG_SATA_ACPI | ||
500 | /* ACPI objects info */ | ||
501 | acpi_handle obj_handle; | ||
502 | #endif | ||
506 | }; | 503 | }; |
507 | 504 | ||
508 | /* Offset into struct ata_device. Fields above it are maintained | 505 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -639,6 +636,8 @@ struct ata_port_operations { | |||
639 | 636 | ||
640 | irq_handler_t irq_handler; | 637 | irq_handler_t irq_handler; |
641 | void (*irq_clear) (struct ata_port *); | 638 | void (*irq_clear) (struct ata_port *); |
639 | u8 (*irq_on) (struct ata_port *); | ||
640 | u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq); | ||
642 | 641 | ||
643 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); | 642 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); |
644 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | 643 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, |
@@ -720,20 +719,18 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
720 | unsigned int n_ports); | 719 | unsigned int n_ports); |
721 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 720 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
722 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); | 721 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
723 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 722 | extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); |
724 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 723 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
725 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 724 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
726 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 725 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
727 | #endif /* CONFIG_PCI */ | 726 | #endif /* CONFIG_PCI */ |
728 | extern int ata_device_add(const struct ata_probe_ent *ent); | 727 | extern int ata_device_add(const struct ata_probe_ent *ent); |
729 | extern void ata_port_detach(struct ata_port *ap); | 728 | extern void ata_host_detach(struct ata_host *host); |
730 | extern void ata_host_init(struct ata_host *, struct device *, | 729 | extern void ata_host_init(struct ata_host *, struct device *, |
731 | unsigned long, const struct ata_port_operations *); | 730 | unsigned long, const struct ata_port_operations *); |
732 | extern void ata_host_remove(struct ata_host *host); | ||
733 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 731 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
734 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 732 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
735 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 733 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
736 | extern int ata_scsi_release(struct Scsi_Host *host); | ||
737 | extern void ata_sas_port_destroy(struct ata_port *); | 734 | extern void ata_sas_port_destroy(struct ata_port *); |
738 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 735 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
739 | struct ata_port_info *, struct Scsi_Host *); | 736 | struct ata_port_info *, struct Scsi_Host *); |
@@ -776,15 +773,11 @@ extern u8 ata_check_status(struct ata_port *ap); | |||
776 | extern u8 ata_altstatus(struct ata_port *ap); | 773 | extern u8 ata_altstatus(struct ata_port *ap); |
777 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 774 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
778 | extern int ata_port_start (struct ata_port *ap); | 775 | extern int ata_port_start (struct ata_port *ap); |
779 | extern void ata_port_stop (struct ata_port *ap); | ||
780 | extern void ata_host_stop (struct ata_host *host); | ||
781 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); | 776 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); |
782 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 777 | extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, |
783 | unsigned int buflen, int write_data); | 778 | unsigned int buflen, int write_data); |
784 | extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, | 779 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, |
785 | unsigned int buflen, int write_data); | 780 | unsigned int buflen, int write_data); |
786 | extern void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, | ||
787 | unsigned int buflen, int write_data); | ||
788 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 781 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
789 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 782 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
790 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 783 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -826,6 +819,10 @@ extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | |||
826 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 819 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
827 | int queue_depth); | 820 | int queue_depth); |
828 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 821 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
822 | extern u8 ata_irq_on(struct ata_port *ap); | ||
823 | extern u8 ata_dummy_irq_on(struct ata_port *ap); | ||
824 | extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
825 | extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
829 | 826 | ||
830 | /* | 827 | /* |
831 | * Timing helpers | 828 | * Timing helpers |
@@ -864,7 +861,6 @@ struct pci_bits { | |||
864 | unsigned long val; | 861 | unsigned long val; |
865 | }; | 862 | }; |
866 | 863 | ||
867 | extern void ata_pci_host_stop (struct ata_host *host); | ||
868 | extern struct ata_probe_ent * | 864 | extern struct ata_probe_ent * |
869 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 865 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
870 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 866 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
@@ -1096,10 +1092,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap) | |||
1096 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 1092 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
1097 | 1093 | ||
1098 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { | 1094 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { |
1099 | unsigned long l = ap->ioaddr.status_addr; | ||
1100 | if (ata_msg_warn(ap)) | 1095 | if (ata_msg_warn(ap)) |
1101 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", | 1096 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n", |
1102 | status, l); | 1097 | status, ap->ioaddr.status_addr); |
1103 | } | 1098 | } |
1104 | 1099 | ||
1105 | return status; | 1100 | return status; |
@@ -1149,8 +1144,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
1149 | qc->dma_dir = DMA_NONE; | 1144 | qc->dma_dir = DMA_NONE; |
1150 | qc->__sg = NULL; | 1145 | qc->__sg = NULL; |
1151 | qc->flags = 0; | 1146 | qc->flags = 0; |
1152 | qc->cursect = qc->cursg = qc->cursg_ofs = 0; | 1147 | qc->cursg = qc->cursg_ofs = 0; |
1153 | qc->nsect = 0; | ||
1154 | qc->nbytes = qc->curbytes = 0; | 1148 | qc->nbytes = qc->curbytes = 0; |
1155 | qc->n_elem = 0; | 1149 | qc->n_elem = 0; |
1156 | qc->err_mask = 0; | 1150 | qc->err_mask = 0; |
@@ -1163,51 +1157,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
1163 | qc->result_tf.feature = 0; | 1157 | qc->result_tf.feature = 0; |
1164 | } | 1158 | } |
1165 | 1159 | ||
1166 | /** | ||
1167 | * ata_irq_ack - Acknowledge a device interrupt. | ||
1168 | * @ap: Port on which interrupts are enabled. | ||
1169 | * | ||
1170 | * Wait up to 10 ms for legacy IDE device to become idle (BUSY | ||
1171 | * or BUSY+DRQ clear). Obtain dma status and port status from | ||
1172 | * device. Clear the interrupt. Return port status. | ||
1173 | * | ||
1174 | * LOCKING: | ||
1175 | */ | ||
1176 | |||
1177 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) | ||
1178 | { | ||
1179 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; | ||
1180 | u8 host_stat, post_stat, status; | ||
1181 | |||
1182 | status = ata_busy_wait(ap, bits, 1000); | ||
1183 | if (status & bits) | ||
1184 | if (ata_msg_err(ap)) | ||
1185 | printk(KERN_ERR "abnormal status 0x%X\n", status); | ||
1186 | |||
1187 | /* get controller status; clear intr, err bits */ | ||
1188 | if (ap->flags & ATA_FLAG_MMIO) { | ||
1189 | void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; | ||
1190 | host_stat = readb(mmio + ATA_DMA_STATUS); | ||
1191 | writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
1192 | mmio + ATA_DMA_STATUS); | ||
1193 | |||
1194 | post_stat = readb(mmio + ATA_DMA_STATUS); | ||
1195 | } else { | ||
1196 | host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1197 | outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
1198 | ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1199 | |||
1200 | post_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1201 | } | ||
1202 | |||
1203 | if (ata_msg_intr(ap)) | ||
1204 | printk(KERN_INFO "%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n", | ||
1205 | __FUNCTION__, | ||
1206 | host_stat, post_stat, status); | ||
1207 | |||
1208 | return status; | ||
1209 | } | ||
1210 | |||
1211 | static inline int ata_try_flush_cache(const struct ata_device *dev) | 1160 | static inline int ata_try_flush_cache(const struct ata_device *dev) |
1212 | { | 1161 | { |
1213 | return ata_id_wcache_enabled(dev->id) || | 1162 | return ata_id_wcache_enabled(dev->id) || |
@@ -1235,14 +1184,14 @@ static inline unsigned int __ac_err_mask(u8 status) | |||
1235 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) | 1184 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) |
1236 | { | 1185 | { |
1237 | ap->pad_dma = 0; | 1186 | ap->pad_dma = 0; |
1238 | ap->pad = dma_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, | 1187 | ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, |
1239 | &ap->pad_dma, GFP_KERNEL); | 1188 | &ap->pad_dma, GFP_KERNEL); |
1240 | return (ap->pad == NULL) ? -ENOMEM : 0; | 1189 | return (ap->pad == NULL) ? -ENOMEM : 0; |
1241 | } | 1190 | } |
1242 | 1191 | ||
1243 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | 1192 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) |
1244 | { | 1193 | { |
1245 | dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | 1194 | dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); |
1246 | } | 1195 | } |
1247 | 1196 | ||
1248 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | 1197 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) |
diff --git a/include/linux/list.h b/include/linux/list.h index 611059d633f4..f9d71eab05ee 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
161 | /** | 161 | /** |
162 | * list_del - deletes entry from list. | 162 | * list_del - deletes entry from list. |
163 | * @entry: the element to delete from the list. | 163 | * @entry: the element to delete from the list. |
164 | * Note: list_empty on entry does not return true after this, the entry is | 164 | * Note: list_empty() on entry does not return true after this, the entry is |
165 | * in an undefined state. | 165 | * in an undefined state. |
166 | */ | 166 | */ |
167 | #ifndef CONFIG_DEBUG_LIST | 167 | #ifndef CONFIG_DEBUG_LIST |
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry); | |||
179 | * list_del_rcu - deletes entry from list without re-initialization | 179 | * list_del_rcu - deletes entry from list without re-initialization |
180 | * @entry: the element to delete from the list. | 180 | * @entry: the element to delete from the list. |
181 | * | 181 | * |
182 | * Note: list_empty on entry does not return true after this, | 182 | * Note: list_empty() on entry does not return true after this, |
183 | * the entry is in an undefined state. It is useful for RCU based | 183 | * the entry is in an undefined state. It is useful for RCU based |
184 | * lockfree traversal. | 184 | * lockfree traversal. |
185 | * | 185 | * |
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry) | |||
209 | * list_replace - replace old entry by new one | 209 | * list_replace - replace old entry by new one |
210 | * @old : the element to be replaced | 210 | * @old : the element to be replaced |
211 | * @new : the new element to insert | 211 | * @new : the new element to insert |
212 | * Note: if 'old' was empty, it will be overwritten. | 212 | * |
213 | * If @old was empty, it will be overwritten. | ||
213 | */ | 214 | */ |
214 | static inline void list_replace(struct list_head *old, | 215 | static inline void list_replace(struct list_head *old, |
215 | struct list_head *new) | 216 | struct list_head *new) |
@@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list, | |||
360 | } | 361 | } |
361 | 362 | ||
362 | /** | 363 | /** |
364 | * list_splice_init_rcu - splice an RCU-protected list into an existing list. | ||
365 | * @list: the RCU-protected list to splice | ||
366 | * @head: the place in the list to splice the first list into | ||
367 | * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ... | ||
368 | * | ||
369 | * @head can be RCU-read traversed concurrently with this function. | ||
370 | * | ||
371 | * Note that this function blocks. | ||
372 | * | ||
373 | * Important note: the caller must take whatever action is necessary to | ||
374 | * prevent any other updates to @head. In principle, it is possible | ||
375 | * to modify the list as soon as sync() begins execution. | ||
376 | * If this sort of thing becomes necessary, an alternative version | ||
377 | * based on call_rcu() could be created. But only if -really- | ||
378 | * needed -- there is no shortage of RCU API members. | ||
379 | */ | ||
380 | static inline void list_splice_init_rcu(struct list_head *list, | ||
381 | struct list_head *head, | ||
382 | void (*sync)(void)) | ||
383 | { | ||
384 | struct list_head *first = list->next; | ||
385 | struct list_head *last = list->prev; | ||
386 | struct list_head *at = head->next; | ||
387 | |||
388 | if (list_empty(head)) | ||
389 | return; | ||
390 | |||
391 | /* "first" and "last" tracking list, so initialize it. */ | ||
392 | |||
393 | INIT_LIST_HEAD(list); | ||
394 | |||
395 | /* | ||
396 | * At this point, the list body still points to the source list. | ||
397 | * Wait for any readers to finish using the list before splicing | ||
398 | * the list body into the new list. Any new readers will see | ||
399 | * an empty list. | ||
400 | */ | ||
401 | |||
402 | sync(); | ||
403 | |||
404 | /* | ||
405 | * Readers are finished with the source list, so perform splice. | ||
406 | * The order is important if the new list is global and accessible | ||
407 | * to concurrent RCU readers. Note that RCU readers are not | ||
408 | * permitted to traverse the prev pointers without excluding | ||
409 | * this function. | ||
410 | */ | ||
411 | |||
412 | last->next = at; | ||
413 | smp_wmb(); | ||
414 | head->next = first; | ||
415 | first->prev = head; | ||
416 | at->prev = last; | ||
417 | } | ||
418 | |||
419 | /** | ||
363 | * list_entry - get the struct for this entry | 420 | * list_entry - get the struct for this entry |
364 | * @ptr: the &struct list_head pointer. | 421 | * @ptr: the &struct list_head pointer. |
365 | * @type: the type of the struct this is embedded in. | 422 | * @type: the type of the struct this is embedded in. |
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list, | |||
432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 489 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
433 | 490 | ||
434 | /** | 491 | /** |
435 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue | 492 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() |
436 | * @pos: the type * to use as a start point | 493 | * @pos: the type * to use as a start point |
437 | * @head: the head of the list | 494 | * @head: the head of the list |
438 | * @member: the name of the list_struct within the struct. | 495 | * @member: the name of the list_struct within the struct. |
439 | * | 496 | * |
440 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue. | 497 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). |
441 | */ | 498 | */ |
442 | #define list_prepare_entry(pos, head, member) \ | 499 | #define list_prepare_entry(pos, head, member) \ |
443 | ((pos) ? : list_entry(head, typeof(*pos), member)) | 500 | ((pos) ? : list_entry(head, typeof(*pos), member)) |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index ea097dddc44f..06fe93a3e916 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __LINUX_LOCKDEP_H | 8 | #ifndef __LINUX_LOCKDEP_H |
9 | #define __LINUX_LOCKDEP_H | 9 | #define __LINUX_LOCKDEP_H |
10 | 10 | ||
11 | struct task_struct; | ||
12 | |||
11 | #ifdef CONFIG_LOCKDEP | 13 | #ifdef CONFIG_LOCKDEP |
12 | 14 | ||
13 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
@@ -132,6 +134,7 @@ struct lock_list { | |||
132 | struct list_head entry; | 134 | struct list_head entry; |
133 | struct lock_class *class; | 135 | struct lock_class *class; |
134 | struct stack_trace trace; | 136 | struct stack_trace trace; |
137 | int distance; | ||
135 | }; | 138 | }; |
136 | 139 | ||
137 | /* | 140 | /* |
diff --git a/include/linux/log2.h b/include/linux/log2.h index d02e1a547a7e..57e641e19a81 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
@@ -44,6 +44,17 @@ int __ilog2_u64(u64 n) | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Determine whether some value is a power of two, where zero is | ||
48 | * *not* considered a power of two. | ||
49 | */ | ||
50 | |||
51 | static inline __attribute__((const)) | ||
52 | bool is_power_of_2(unsigned long n) | ||
53 | { | ||
54 | return (n != 0 && ((n & (n - 1)) == 0)); | ||
55 | } | ||
56 | |||
57 | /* | ||
47 | * round up to nearest power of two | 58 | * round up to nearest power of two |
48 | */ | 59 | */ |
49 | static inline __attribute__((const)) | 60 | static inline __attribute__((const)) |
@@ -141,7 +152,7 @@ unsigned long __roundup_pow_of_two(unsigned long n) | |||
141 | * roundup_pow_of_two - round the given value up to nearest power of two | 152 | * roundup_pow_of_two - round the given value up to nearest power of two |
142 | * @n - parameter | 153 | * @n - parameter |
143 | * | 154 | * |
144 | * round the given balue up to the nearest power of two | 155 | * round the given value up to the nearest power of two |
145 | * - the result is undefined when n == 0 | 156 | * - the result is undefined when n == 0 |
146 | * - this can be used to initialise global variables from constant data | 157 | * - this can be used to initialise global variables from constant data |
147 | */ | 158 | */ |
diff --git a/include/linux/magic.h b/include/linux/magic.h index b78bbf42135a..b32c8a97fcec 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | 18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ |
19 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ | 19 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ |
20 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ | 20 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ |
21 | #define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */ | ||
21 | 22 | ||
22 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ | 23 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ |
23 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ | 24 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ |
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 432b2fa24929..bdc01127dced 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -18,6 +18,16 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/spinlock.h> /* spinlock_t */ | 19 | #include <linux/spinlock.h> /* spinlock_t */ |
20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ | 20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ |
21 | |||
22 | /* Some RTCs extend the mc146818 register set to support alarms of more | ||
23 | * than 24 hours in the future; or dates that include a century code. | ||
24 | * This platform_data structure can pass this information to the driver. | ||
25 | */ | ||
26 | struct cmos_rtc_board_info { | ||
27 | u8 rtc_day_alarm; /* zero, or register index */ | ||
28 | u8 rtc_mon_alarm; /* zero, or register index */ | ||
29 | u8 rtc_century; /* zero, or register index */ | ||
30 | }; | ||
21 | #endif | 31 | #endif |
22 | 32 | ||
23 | /********************************************************************** | 33 | /********************************************************************** |
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 916e8f72c63d..9850d513ff60 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ | 25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ |
26 | 26 | ||
27 | #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) | 27 | #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) |
28 | #define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) | ||
29 | 28 | ||
30 | /* | 29 | /* |
31 | * This is the original minix inode layout on disk. | 30 | * This is the original minix inode layout on disk. |
@@ -75,9 +74,33 @@ struct minix_super_block { | |||
75 | __u32 s_zones; | 74 | __u32 s_zones; |
76 | }; | 75 | }; |
77 | 76 | ||
77 | /* | ||
78 | * V3 minix super-block data on disk | ||
79 | */ | ||
80 | struct minix3_super_block { | ||
81 | __u16 s_ninodes; | ||
82 | __u16 s_nzones; | ||
83 | __u16 s_pad0; | ||
84 | __u16 s_imap_blocks; | ||
85 | __u16 s_zmap_blocks; | ||
86 | __u16 s_firstdatazone; | ||
87 | __u16 s_log_zone_size; | ||
88 | __u16 s_pad1; | ||
89 | __u32 s_max_size; | ||
90 | __u32 s_zones; | ||
91 | __u16 s_magic; | ||
92 | __u16 s_pad2; | ||
93 | __u16 s_blocksize; | ||
94 | __u8 s_disk_version; | ||
95 | }; | ||
96 | |||
78 | struct minix_dir_entry { | 97 | struct minix_dir_entry { |
79 | __u16 inode; | 98 | __u16 inode; |
80 | char name[0]; | 99 | char name[0]; |
81 | }; | 100 | }; |
82 | 101 | ||
102 | struct minix3_dir_entry { | ||
103 | __u32 inode; | ||
104 | char name[0]; | ||
105 | }; | ||
83 | #endif | 106 | #endif |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2d2c08d5f473..a0eec16eb0bd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page) | |||
437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ | 437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ |
438 | #ifdef NODE_NOT_IN_PAGEFLAGS | 438 | #ifdef NODE_NOT_IN_PAGEFLAGS |
439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) | 439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) |
440 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ | ||
441 | SECTIONS_PGOFF : ZONES_PGOFF) | ||
440 | #else | 442 | #else |
441 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) | 443 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) |
444 | #define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \ | ||
445 | NODES_PGOFF : ZONES_PGOFF) | ||
442 | #endif | 446 | #endif |
443 | 447 | ||
444 | #if ZONES_WIDTH > 0 | 448 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) |
445 | #define ZONEID_PGSHIFT ZONES_PGSHIFT | ||
446 | #else | ||
447 | #define ZONEID_PGSHIFT NODES_PGOFF | ||
448 | #endif | ||
449 | 449 | ||
450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page) | |||
471 | */ | 471 | */ |
472 | static inline int page_zone_id(struct page *page) | 472 | static inline int page_zone_id(struct page *page) |
473 | { | 473 | { |
474 | BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK); | ||
475 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; | 474 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; |
476 | } | 475 | } |
477 | 476 | ||
@@ -638,6 +637,7 @@ static inline int page_mapped(struct page *page) | |||
638 | */ | 637 | */ |
639 | #define NOPFN_SIGBUS ((unsigned long) -1) | 638 | #define NOPFN_SIGBUS ((unsigned long) -1) |
640 | #define NOPFN_OOM ((unsigned long) -2) | 639 | #define NOPFN_OOM ((unsigned long) -2) |
640 | #define NOPFN_REFAULT ((unsigned long) -3) | ||
641 | 641 | ||
642 | /* | 642 | /* |
643 | * Different kinds of faults, as returned by handle_mm_fault(). | 643 | * Different kinds of faults, as returned by handle_mm_fault(). |
@@ -786,6 +786,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | |||
786 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 786 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
787 | 787 | ||
788 | int __set_page_dirty_nobuffers(struct page *page); | 788 | int __set_page_dirty_nobuffers(struct page *page); |
789 | int __set_page_dirty_no_writeback(struct page *page); | ||
789 | int redirty_page_for_writepage(struct writeback_control *wbc, | 790 | int redirty_page_for_writepage(struct writeback_control *wbc, |
790 | struct page *page); | 791 | struct page *page); |
791 | int FASTCALL(set_page_dirty(struct page *page)); | 792 | int FASTCALL(set_page_dirty(struct page *page)); |
@@ -1030,6 +1031,9 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **, | |||
1030 | unsigned long addr, unsigned long len, pgoff_t pgoff); | 1031 | unsigned long addr, unsigned long len, pgoff_t pgoff); |
1031 | extern void exit_mmap(struct mm_struct *); | 1032 | extern void exit_mmap(struct mm_struct *); |
1032 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | 1033 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); |
1034 | extern int install_special_mapping(struct mm_struct *mm, | ||
1035 | unsigned long addr, unsigned long len, | ||
1036 | unsigned long flags, struct page **pages); | ||
1033 | 1037 | ||
1034 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1038 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1035 | 1039 | ||
@@ -1121,6 +1125,8 @@ unsigned long vmalloc_to_pfn(void *addr); | |||
1121 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 1125 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
1122 | unsigned long pfn, unsigned long size, pgprot_t); | 1126 | unsigned long pfn, unsigned long size, pgprot_t); |
1123 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); | 1127 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); |
1128 | int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, | ||
1129 | unsigned long pfn); | ||
1124 | 1130 | ||
1125 | struct page *follow_page(struct vm_area_struct *, unsigned long address, | 1131 | struct page *follow_page(struct vm_area_struct *, unsigned long address, |
1126 | unsigned int foll_flags); | 1132 | unsigned int foll_flags); |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 3b6723dfaff3..895bc4e93039 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -1,30 +1,29 @@ | |||
1 | |||
2 | static inline void | 1 | static inline void |
3 | add_page_to_active_list(struct zone *zone, struct page *page) | 2 | add_page_to_active_list(struct zone *zone, struct page *page) |
4 | { | 3 | { |
5 | list_add(&page->lru, &zone->active_list); | 4 | list_add(&page->lru, &zone->active_list); |
6 | zone->nr_active++; | 5 | __inc_zone_state(zone, NR_ACTIVE); |
7 | } | 6 | } |
8 | 7 | ||
9 | static inline void | 8 | static inline void |
10 | add_page_to_inactive_list(struct zone *zone, struct page *page) | 9 | add_page_to_inactive_list(struct zone *zone, struct page *page) |
11 | { | 10 | { |
12 | list_add(&page->lru, &zone->inactive_list); | 11 | list_add(&page->lru, &zone->inactive_list); |
13 | zone->nr_inactive++; | 12 | __inc_zone_state(zone, NR_INACTIVE); |
14 | } | 13 | } |
15 | 14 | ||
16 | static inline void | 15 | static inline void |
17 | del_page_from_active_list(struct zone *zone, struct page *page) | 16 | del_page_from_active_list(struct zone *zone, struct page *page) |
18 | { | 17 | { |
19 | list_del(&page->lru); | 18 | list_del(&page->lru); |
20 | zone->nr_active--; | 19 | __dec_zone_state(zone, NR_ACTIVE); |
21 | } | 20 | } |
22 | 21 | ||
23 | static inline void | 22 | static inline void |
24 | del_page_from_inactive_list(struct zone *zone, struct page *page) | 23 | del_page_from_inactive_list(struct zone *zone, struct page *page) |
25 | { | 24 | { |
26 | list_del(&page->lru); | 25 | list_del(&page->lru); |
27 | zone->nr_inactive--; | 26 | __dec_zone_state(zone, NR_INACTIVE); |
28 | } | 27 | } |
29 | 28 | ||
30 | static inline void | 29 | static inline void |
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
33 | list_del(&page->lru); | 32 | list_del(&page->lru); |
34 | if (PageActive(page)) { | 33 | if (PageActive(page)) { |
35 | __ClearPageActive(page); | 34 | __ClearPageActive(page); |
36 | zone->nr_active--; | 35 | __dec_zone_state(zone, NR_ACTIVE); |
37 | } else { | 36 | } else { |
38 | zone->nr_inactive--; | 37 | __dec_zone_state(zone, NR_INACTIVE); |
39 | } | 38 | } |
40 | } | 39 | } |
41 | 40 | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index d0e6a5497614..e45712acfac5 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -71,6 +71,7 @@ struct mmc_card { | |||
71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ | 71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ |
72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ | 72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ |
73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ | 73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ |
74 | #define MMC_STATE_BLOCKADDR (1<<6) /* card uses block-addressing */ | ||
74 | u32 raw_cid[4]; /* raw card CID */ | 75 | u32 raw_cid[4]; /* raw card CID */ |
75 | u32 raw_csd[4]; /* raw card CSD */ | 76 | u32 raw_csd[4]; /* raw card CSD */ |
76 | u32 raw_scr[2]; /* raw card SCR */ | 77 | u32 raw_scr[2]; /* raw card SCR */ |
@@ -87,6 +88,7 @@ struct mmc_card { | |||
87 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) | 88 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) |
88 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 89 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
89 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | 90 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) |
91 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) | ||
90 | 92 | ||
91 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 93 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
92 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) | 94 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) |
@@ -94,6 +96,7 @@ struct mmc_card { | |||
94 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) | 96 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) |
95 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 97 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
96 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | 98 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) |
99 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | ||
97 | 100 | ||
98 | #define mmc_card_name(c) ((c)->cid.prod_name) | 101 | #define mmc_card_name(c) ((c)->cid.prod_name) |
99 | #define mmc_card_id(c) ((c)->dev.bus_id) | 102 | #define mmc_card_id(c) ((c)->dev.bus_id) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c15ae1986b98..913e5752569f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -92,8 +92,10 @@ struct mmc_host { | |||
92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
93 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ | 93 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ |
94 | unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ | 94 | unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ |
95 | unsigned short max_sectors; /* see blk_queue_max_sectors */ | ||
96 | unsigned short unused; | 95 | unsigned short unused; |
96 | unsigned int max_req_size; /* maximum number of bytes in one req */ | ||
97 | unsigned int max_blk_size; /* maximum size of one mmc block */ | ||
98 | unsigned int max_blk_count; /* maximum number of blocks in one req */ | ||
97 | 99 | ||
98 | /* private data */ | 100 | /* private data */ |
99 | struct mmc_ios ios; /* current io bus settings */ | 101 | struct mmc_ios ios; /* current io bus settings */ |
@@ -106,8 +108,9 @@ struct mmc_host { | |||
106 | struct list_head cards; /* devices attached to this host */ | 108 | struct list_head cards; /* devices attached to this host */ |
107 | 109 | ||
108 | wait_queue_head_t wq; | 110 | wait_queue_head_t wq; |
109 | spinlock_t lock; /* card_busy lock */ | 111 | spinlock_t lock; /* claimed lock */ |
110 | struct mmc_card *card_busy; /* the MMC card claiming host */ | 112 | unsigned int claimed:1; /* host exclusively claimed */ |
113 | |||
111 | struct mmc_card *card_selected; /* the selected MMC card */ | 114 | struct mmc_card *card_selected; /* the selected MMC card */ |
112 | 115 | ||
113 | struct delayed_work detect; | 116 | struct delayed_work detect; |
@@ -126,6 +129,7 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
126 | } | 129 | } |
127 | 130 | ||
128 | #define mmc_dev(x) ((x)->parent) | 131 | #define mmc_dev(x) ((x)->parent) |
132 | #define mmc_classdev(x) (&(x)->class_dev) | ||
129 | #define mmc_hostname(x) ((x)->class_dev.bus_id) | 133 | #define mmc_hostname(x) ((x)->class_dev.bus_id) |
130 | 134 | ||
131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 135 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index bcf24909d677..cdc54be804f1 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -43,6 +43,7 @@ struct mmc_command { | |||
43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
46 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | ||
46 | 47 | ||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 48 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
48 | 49 | ||
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 2dce60c43f4b..c90b6768329d 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -79,9 +79,12 @@ | |||
79 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ | 79 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ |
80 | 80 | ||
81 | /* SD commands type argument response */ | 81 | /* SD commands type argument response */ |
82 | /* class 8 */ | 82 | /* class 0 */ |
83 | /* This is basically the same command as for MMC with some quirks. */ | 83 | /* This is basically the same command as for MMC with some quirks. */ |
84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ | 84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
85 | #define SD_SEND_IF_COND 8 /* bcr [11:0] See below R7 */ | ||
86 | |||
87 | /* class 10 */ | ||
85 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ | 88 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ |
86 | 89 | ||
87 | /* Application commands */ | 90 | /* Application commands */ |
@@ -115,6 +118,14 @@ | |||
115 | */ | 118 | */ |
116 | 119 | ||
117 | /* | 120 | /* |
121 | * SD_SEND_IF_COND argument format: | ||
122 | * | ||
123 | * [31:12] Reserved (0) | ||
124 | * [11:8] Host Voltage Supply Flags | ||
125 | * [7:0] Check Pattern (0xAA) | ||
126 | */ | ||
127 | |||
128 | /* | ||
118 | MMC status in R1 | 129 | MMC status in R1 |
119 | Type | 130 | Type |
120 | e : error bit | 131 | e : error bit |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index b262f47961fb..ee9e3143df4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -47,15 +47,20 @@ struct zone_padding { | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | enum zone_stat_item { | 49 | enum zone_stat_item { |
50 | /* First 128 byte cacheline (assuming 64 bit words) */ | ||
51 | NR_FREE_PAGES, | ||
52 | NR_INACTIVE, | ||
53 | NR_ACTIVE, | ||
50 | NR_ANON_PAGES, /* Mapped anonymous pages */ | 54 | NR_ANON_PAGES, /* Mapped anonymous pages */ |
51 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. | 55 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. |
52 | only modified from process context */ | 56 | only modified from process context */ |
53 | NR_FILE_PAGES, | 57 | NR_FILE_PAGES, |
54 | NR_SLAB_RECLAIMABLE, | ||
55 | NR_SLAB_UNRECLAIMABLE, | ||
56 | NR_PAGETABLE, /* used for pagetables */ | ||
57 | NR_FILE_DIRTY, | 58 | NR_FILE_DIRTY, |
58 | NR_WRITEBACK, | 59 | NR_WRITEBACK, |
60 | /* Second 128 byte cacheline */ | ||
61 | NR_SLAB_RECLAIMABLE, | ||
62 | NR_SLAB_UNRECLAIMABLE, | ||
63 | NR_PAGETABLE, /* used for pagetables */ | ||
59 | NR_UNSTABLE_NFS, /* NFS unstable pages */ | 64 | NR_UNSTABLE_NFS, /* NFS unstable pages */ |
60 | NR_BOUNCE, | 65 | NR_BOUNCE, |
61 | NR_VMSCAN_WRITE, | 66 | NR_VMSCAN_WRITE, |
@@ -91,6 +96,7 @@ struct per_cpu_pageset { | |||
91 | #endif | 96 | #endif |
92 | 97 | ||
93 | enum zone_type { | 98 | enum zone_type { |
99 | #ifdef CONFIG_ZONE_DMA | ||
94 | /* | 100 | /* |
95 | * ZONE_DMA is used when there are devices that are not able | 101 | * ZONE_DMA is used when there are devices that are not able |
96 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we | 102 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we |
@@ -111,6 +117,7 @@ enum zone_type { | |||
111 | * <16M. | 117 | * <16M. |
112 | */ | 118 | */ |
113 | ZONE_DMA, | 119 | ZONE_DMA, |
120 | #endif | ||
114 | #ifdef CONFIG_ZONE_DMA32 | 121 | #ifdef CONFIG_ZONE_DMA32 |
115 | /* | 122 | /* |
116 | * x86_64 needs two ZONE_DMAs because it supports devices that are | 123 | * x86_64 needs two ZONE_DMAs because it supports devices that are |
@@ -147,15 +154,30 @@ enum zone_type { | |||
147 | * match the requested limits. See gfp_zone() in include/linux/gfp.h | 154 | * match the requested limits. See gfp_zone() in include/linux/gfp.h |
148 | */ | 155 | */ |
149 | 156 | ||
150 | #if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM) | 157 | /* |
158 | * Count the active zones. Note that the use of defined(X) outside | ||
159 | * #if and family is not necessarily defined so ensure we cannot use | ||
160 | * it later. Use __ZONE_COUNT to work out how many shift bits we need. | ||
161 | */ | ||
162 | #define __ZONE_COUNT ( \ | ||
163 | defined(CONFIG_ZONE_DMA) \ | ||
164 | + defined(CONFIG_ZONE_DMA32) \ | ||
165 | + 1 \ | ||
166 | + defined(CONFIG_HIGHMEM) \ | ||
167 | ) | ||
168 | #if __ZONE_COUNT < 2 | ||
169 | #define ZONES_SHIFT 0 | ||
170 | #elif __ZONE_COUNT <= 2 | ||
151 | #define ZONES_SHIFT 1 | 171 | #define ZONES_SHIFT 1 |
152 | #else | 172 | #elif __ZONE_COUNT <= 4 |
153 | #define ZONES_SHIFT 2 | 173 | #define ZONES_SHIFT 2 |
174 | #else | ||
175 | #error ZONES_SHIFT -- too many zones configured adjust calculation | ||
154 | #endif | 176 | #endif |
177 | #undef __ZONE_COUNT | ||
155 | 178 | ||
156 | struct zone { | 179 | struct zone { |
157 | /* Fields commonly accessed by the page allocator */ | 180 | /* Fields commonly accessed by the page allocator */ |
158 | unsigned long free_pages; | ||
159 | unsigned long pages_min, pages_low, pages_high; | 181 | unsigned long pages_min, pages_low, pages_high; |
160 | /* | 182 | /* |
161 | * We don't know if the memory that we're going to allocate will be freeable | 183 | * We don't know if the memory that we're going to allocate will be freeable |
@@ -197,8 +219,6 @@ struct zone { | |||
197 | struct list_head inactive_list; | 219 | struct list_head inactive_list; |
198 | unsigned long nr_scan_active; | 220 | unsigned long nr_scan_active; |
199 | unsigned long nr_scan_inactive; | 221 | unsigned long nr_scan_inactive; |
200 | unsigned long nr_active; | ||
201 | unsigned long nr_inactive; | ||
202 | unsigned long pages_scanned; /* since last reclaim */ | 222 | unsigned long pages_scanned; /* since last reclaim */ |
203 | int all_unreclaimable; /* All pages pinned */ | 223 | int all_unreclaimable; /* All pages pinned */ |
204 | 224 | ||
@@ -442,8 +462,6 @@ typedef struct pglist_data { | |||
442 | 462 | ||
443 | #include <linux/memory_hotplug.h> | 463 | #include <linux/memory_hotplug.h> |
444 | 464 | ||
445 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, | ||
446 | unsigned long *free, struct pglist_data *pgdat); | ||
447 | void get_zone_counts(unsigned long *active, unsigned long *inactive, | 465 | void get_zone_counts(unsigned long *active, unsigned long *inactive, |
448 | unsigned long *free); | 466 | unsigned long *free); |
449 | void build_all_zonelists(void); | 467 | void build_all_zonelists(void); |
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone) | |||
523 | 541 | ||
524 | static inline int is_dma(struct zone *zone) | 542 | static inline int is_dma(struct zone *zone) |
525 | { | 543 | { |
544 | #ifdef CONFIG_ZONE_DMA | ||
526 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; | 545 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; |
546 | #else | ||
547 | return 0; | ||
548 | #endif | ||
527 | } | 549 | } |
528 | 550 | ||
529 | /* These two functions are used to setup the per zone pages min values */ | 551 | /* These two functions are used to setup the per zone pages min values */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 10f771a49997..95679eb8571e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -58,6 +58,7 @@ struct module_kobject | |||
58 | { | 58 | { |
59 | struct kobject kobj; | 59 | struct kobject kobj; |
60 | struct module *mod; | 60 | struct module *mod; |
61 | struct kobject *drivers_dir; | ||
61 | }; | 62 | }; |
62 | 63 | ||
63 | /* These are either module local, or the kernel's dummy ones. */ | 64 | /* These are either module local, or the kernel's dummy ones. */ |
@@ -75,8 +76,6 @@ void sort_extable(struct exception_table_entry *start, | |||
75 | struct exception_table_entry *finish); | 76 | struct exception_table_entry *finish); |
76 | void sort_main_extable(void); | 77 | void sort_main_extable(void); |
77 | 78 | ||
78 | extern struct subsystem module_subsys; | ||
79 | |||
80 | #ifdef MODULE | 79 | #ifdef MODULE |
81 | #define MODULE_GENERIC_TABLE(gtype,name) \ | 80 | #define MODULE_GENERIC_TABLE(gtype,name) \ |
82 | extern const struct gtype##_id __mod_##gtype##_table \ | 81 | extern const struct gtype##_id __mod_##gtype##_table \ |
@@ -263,7 +262,7 @@ struct module | |||
263 | struct module_attribute *modinfo_attrs; | 262 | struct module_attribute *modinfo_attrs; |
264 | const char *version; | 263 | const char *version; |
265 | const char *srcversion; | 264 | const char *srcversion; |
266 | struct kobject *drivers_dir; | 265 | struct kobject *holders_dir; |
267 | 266 | ||
268 | /* Exported symbols */ | 267 | /* Exported symbols */ |
269 | const struct kernel_symbol *syms; | 268 | const struct kernel_symbol *syms; |
@@ -466,10 +465,6 @@ int unregister_module_notifier(struct notifier_block * nb); | |||
466 | 465 | ||
467 | extern void print_modules(void); | 466 | extern void print_modules(void); |
468 | 467 | ||
469 | struct device_driver; | ||
470 | void module_add_driver(struct module *, struct device_driver *); | ||
471 | void module_remove_driver(struct device_driver *); | ||
472 | |||
473 | #else /* !CONFIG_MODULES... */ | 468 | #else /* !CONFIG_MODULES... */ |
474 | #define EXPORT_SYMBOL(sym) | 469 | #define EXPORT_SYMBOL(sym) |
475 | #define EXPORT_SYMBOL_GPL(sym) | 470 | #define EXPORT_SYMBOL_GPL(sym) |
@@ -567,18 +562,59 @@ static inline void print_modules(void) | |||
567 | { | 562 | { |
568 | } | 563 | } |
569 | 564 | ||
565 | #endif /* CONFIG_MODULES */ | ||
566 | |||
570 | struct device_driver; | 567 | struct device_driver; |
568 | #ifdef CONFIG_SYSFS | ||
571 | struct module; | 569 | struct module; |
572 | 570 | ||
573 | static inline void module_add_driver(struct module *module, struct device_driver *driver) | 571 | extern struct subsystem module_subsys; |
572 | |||
573 | int mod_sysfs_init(struct module *mod); | ||
574 | int mod_sysfs_setup(struct module *mod, | ||
575 | struct kernel_param *kparam, | ||
576 | unsigned int num_params); | ||
577 | int module_add_modinfo_attrs(struct module *mod); | ||
578 | void module_remove_modinfo_attrs(struct module *mod); | ||
579 | |||
580 | #else /* !CONFIG_SYSFS */ | ||
581 | |||
582 | static inline int mod_sysfs_init(struct module *mod) | ||
574 | { | 583 | { |
584 | return 0; | ||
575 | } | 585 | } |
576 | 586 | ||
577 | static inline void module_remove_driver(struct device_driver *driver) | 587 | static inline int mod_sysfs_setup(struct module *mod, |
588 | struct kernel_param *kparam, | ||
589 | unsigned int num_params) | ||
578 | { | 590 | { |
591 | return 0; | ||
579 | } | 592 | } |
580 | 593 | ||
581 | #endif /* CONFIG_MODULES */ | 594 | static inline int module_add_modinfo_attrs(struct module *mod) |
595 | { | ||
596 | return 0; | ||
597 | } | ||
598 | |||
599 | static inline void module_remove_modinfo_attrs(struct module *mod) | ||
600 | { } | ||
601 | |||
602 | #endif /* CONFIG_SYSFS */ | ||
603 | |||
604 | #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) | ||
605 | |||
606 | void module_add_driver(struct module *mod, struct device_driver *drv); | ||
607 | void module_remove_driver(struct device_driver *drv); | ||
608 | |||
609 | #else /* not both CONFIG_SYSFS && CONFIG_MODULES */ | ||
610 | |||
611 | static inline void module_add_driver(struct module *mod, struct device_driver *drv) | ||
612 | { } | ||
613 | |||
614 | static inline void module_remove_driver(struct device_driver *drv) | ||
615 | { } | ||
616 | |||
617 | #endif | ||
582 | 618 | ||
583 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) | 619 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) |
584 | 620 | ||
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 4a189dadb160..c83588c8d08b 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -59,7 +59,7 @@ struct kparam_array | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* This is the fundamental function for registering boot/module | 61 | /* This is the fundamental function for registering boot/module |
62 | parameters. perm sets the visibility in driverfs: 000 means it's | 62 | parameters. perm sets the visibility in sysfs: 000 means it's |
63 | not there, read bits mean it's readable, write bits mean it's | 63 | not there, read bits mean it's readable, write bits mean it's |
64 | writable. */ | 64 | writable. */ |
65 | #define __module_param_call(prefix, name, set, get, arg, perm) \ | 65 | #define __module_param_call(prefix, name, set, get, arg, perm) \ |
@@ -169,10 +169,22 @@ extern int param_get_string(char *buffer, struct kernel_param *kp); | |||
169 | 169 | ||
170 | struct module; | 170 | struct module; |
171 | 171 | ||
172 | #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) | ||
172 | extern int module_param_sysfs_setup(struct module *mod, | 173 | extern int module_param_sysfs_setup(struct module *mod, |
173 | struct kernel_param *kparam, | 174 | struct kernel_param *kparam, |
174 | unsigned int num_params); | 175 | unsigned int num_params); |
175 | 176 | ||
176 | extern void module_param_sysfs_remove(struct module *mod); | 177 | extern void module_param_sysfs_remove(struct module *mod); |
178 | #else | ||
179 | static inline int module_param_sysfs_setup(struct module *mod, | ||
180 | struct kernel_param *kparam, | ||
181 | unsigned int num_params) | ||
182 | { | ||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | static inline void module_param_sysfs_remove(struct module *mod) | ||
187 | { } | ||
188 | #endif | ||
177 | 189 | ||
178 | #endif /* _LINUX_MODULE_PARAMS_H */ | 190 | #endif /* _LINUX_MODULE_PARAMS_H */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 1b7e178b0d84..dab69afee2fa 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -43,9 +43,8 @@ struct vfsmount { | |||
43 | struct super_block *mnt_sb; /* pointer to superblock */ | 43 | struct super_block *mnt_sb; /* pointer to superblock */ |
44 | struct list_head mnt_mounts; /* list of children, anchored here */ | 44 | struct list_head mnt_mounts; /* list of children, anchored here */ |
45 | struct list_head mnt_child; /* and going through their mnt_child */ | 45 | struct list_head mnt_child; /* and going through their mnt_child */ |
46 | atomic_t mnt_count; | ||
47 | int mnt_flags; | 46 | int mnt_flags; |
48 | int mnt_expiry_mark; /* true if marked for expiry */ | 47 | /* 4 bytes hole on 64bits arches */ |
49 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 48 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
50 | struct list_head mnt_list; | 49 | struct list_head mnt_list; |
51 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 50 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
@@ -54,6 +53,13 @@ struct vfsmount { | |||
54 | struct list_head mnt_slave; /* slave list entry */ | 53 | struct list_head mnt_slave; /* slave list entry */ |
55 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 54 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
56 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 55 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
56 | /* | ||
57 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | ||
58 | * to let these frequently modified fields in a separate cache line | ||
59 | * (so that reads of mnt_flags wont ping-pong on SMP machines) | ||
60 | */ | ||
61 | atomic_t mnt_count; | ||
62 | int mnt_expiry_mark; /* true if marked for expiry */ | ||
57 | int mnt_pinned; | 63 | int mnt_pinned; |
58 | }; | 64 | }; |
59 | 65 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 24a9ef1506b6..fa253fa73aa3 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -234,7 +234,7 @@ struct msdos_sb_info { | |||
234 | struct fat_mount_options options; | 234 | struct fat_mount_options options; |
235 | struct nls_table *nls_disk; /* Codepage used on disk */ | 235 | struct nls_table *nls_disk; /* Codepage used on disk */ |
236 | struct nls_table *nls_io; /* Charset used for input and display */ | 236 | struct nls_table *nls_io; /* Charset used for input and display */ |
237 | void *dir_ops; /* Opaque; default directory operations */ | 237 | const void *dir_ops; /* Opaque; default directory operations */ |
238 | int dir_per_block; /* dir entries per block */ | 238 | int dir_per_block; /* dir entries per block */ |
239 | int dir_per_block_bits; /* log2(dir_per_block) */ | 239 | int dir_per_block_bits; /* log2(dir_per_block) */ |
240 | 240 | ||
@@ -399,7 +399,7 @@ extern int fat_count_free_clusters(struct super_block *sb); | |||
399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, | 399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, |
400 | unsigned int cmd, unsigned long arg); | 400 | unsigned int cmd, unsigned long arg); |
401 | extern const struct file_operations fat_file_operations; | 401 | extern const struct file_operations fat_file_operations; |
402 | extern struct inode_operations fat_file_inode_operations; | 402 | extern const struct inode_operations fat_file_inode_operations; |
403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); | 403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
404 | extern void fat_truncate(struct inode *inode); | 404 | extern void fat_truncate(struct inode *inode); |
405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | 405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, |
@@ -413,7 +413,7 @@ extern struct inode *fat_build_inode(struct super_block *sb, | |||
413 | struct msdos_dir_entry *de, loff_t i_pos); | 413 | struct msdos_dir_entry *de, loff_t i_pos); |
414 | extern int fat_sync_inode(struct inode *inode); | 414 | extern int fat_sync_inode(struct inode *inode); |
415 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | 415 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, |
416 | struct inode_operations *fs_dir_inode_ops, int isvfat); | 416 | const struct inode_operations *fs_dir_inode_ops, int isvfat); |
417 | 417 | ||
418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | 418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
419 | struct inode *i2); | 419 | struct inode *i2); |
diff --git a/include/linux/msi.h b/include/linux/msi.h index c7ef94343673..74c8a2ecc9dd 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -7,11 +7,10 @@ struct msi_msg { | |||
7 | u32 data; /* 16 bits of msi message data */ | 7 | u32 data; /* 16 bits of msi message data */ |
8 | }; | 8 | }; |
9 | 9 | ||
10 | /* Heper functions */ | 10 | /* Helper functions */ |
11 | extern void mask_msi_irq(unsigned int irq); | 11 | extern void mask_msi_irq(unsigned int irq); |
12 | extern void unmask_msi_irq(unsigned int irq); | 12 | extern void unmask_msi_irq(unsigned int irq); |
13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
14 | |||
15 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 14 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
16 | 15 | ||
17 | struct msi_desc { | 16 | struct msi_desc { |
@@ -42,7 +41,7 @@ struct msi_desc { | |||
42 | /* | 41 | /* |
43 | * The arch hook for setup up msi irqs | 42 | * The arch hook for setup up msi irqs |
44 | */ | 43 | */ |
45 | int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev); | 44 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
46 | void arch_teardown_msi_irq(unsigned int irq); | 45 | void arch_teardown_msi_irq(unsigned int irq); |
47 | 46 | ||
48 | 47 | ||
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h index 1221b7c44158..fff8c53e5434 100644 --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h | |||
@@ -92,6 +92,13 @@ struct nand_bbt_descr { | |||
92 | */ | 92 | */ |
93 | #define ONENAND_BADBLOCK_POS 0 | 93 | #define ONENAND_BADBLOCK_POS 0 |
94 | 94 | ||
95 | /* | ||
96 | * Bad block scanning errors | ||
97 | */ | ||
98 | #define ONENAND_BBT_READ_ERROR 1 | ||
99 | #define ONENAND_BBT_READ_ECC_ERROR 2 | ||
100 | #define ONENAND_BBT_READ_FATAL_ERROR 4 | ||
101 | |||
95 | /** | 102 | /** |
96 | * struct bbm_info - [GENERIC] Bad Block Table data structure | 103 | * struct bbm_info - [GENERIC] Bad Block Table data structure |
97 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry | 104 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 28d461d862bd..81f3a314dd76 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -183,7 +183,7 @@ typedef union { | |||
183 | struct map_info { | 183 | struct map_info { |
184 | char *name; | 184 | char *name; |
185 | unsigned long size; | 185 | unsigned long size; |
186 | unsigned long phys; | 186 | resource_size_t phys; |
187 | #define NO_XIP (-1UL) | 187 | #define NO_XIP (-1UL) |
188 | 188 | ||
189 | void __iomem *virt; | 189 | void __iomem *virt; |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index d644e57703ad..6a8570be331b 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -85,6 +85,10 @@ typedef enum { | |||
85 | * mode = MTD_OOB_PLACE) | 85 | * mode = MTD_OOB_PLACE) |
86 | * @datbuf: data buffer - if NULL only oob data are read/written | 86 | * @datbuf: data buffer - if NULL only oob data are read/written |
87 | * @oobbuf: oob data buffer | 87 | * @oobbuf: oob data buffer |
88 | * | ||
89 | * Note, it is allowed to read more then one OOB area at one go, but not write. | ||
90 | * The interface assumes that the OOB write requests program only one page's | ||
91 | * OOB area. | ||
88 | */ | 92 | */ |
89 | struct mtd_oob_ops { | 93 | struct mtd_oob_ops { |
90 | mtd_oob_mode_t mode; | 94 | mtd_oob_mode_t mode; |
@@ -117,18 +121,6 @@ struct mtd_info { | |||
117 | u_int32_t writesize; | 121 | u_int32_t writesize; |
118 | 122 | ||
119 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) | 123 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) |
120 | u_int32_t ecctype; | ||
121 | u_int32_t eccsize; | ||
122 | |||
123 | /* | ||
124 | * Reuse some of the above unused fields in the case of NOR flash | ||
125 | * with configurable programming regions to avoid modifying the | ||
126 | * user visible structure layout/size. Only valid when the | ||
127 | * MTD_PROGRAM_REGIONS flag is set. | ||
128 | * (Maybe we should have an union for those?) | ||
129 | */ | ||
130 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize | ||
131 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype | ||
132 | 124 | ||
133 | // Kernel-only stuff starts here. | 125 | // Kernel-only stuff starts here. |
134 | char *name; | 126 | char *name; |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 2071b02f0526..97523887fe5d 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -343,6 +343,7 @@ struct nand_buffers { | |||
343 | * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about | 343 | * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about |
344 | * special functionality. See the defines for further explanation | 344 | * special functionality. See the defines for further explanation |
345 | * @badblockpos: [INTERN] position of the bad block marker in the oob area | 345 | * @badblockpos: [INTERN] position of the bad block marker in the oob area |
346 | * @cellinfo: [INTERN] MLC/multichip data from chip ident | ||
346 | * @numchips: [INTERN] number of physical chips | 347 | * @numchips: [INTERN] number of physical chips |
347 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 348 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
348 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 349 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index f775a7af3890..d8af8a95e58d 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/onenand.h | 2 | * linux/include/linux/mtd/onenand.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2006 Samsung Electronics | 4 | * Copyright (C) 2005-2007 Samsung Electronics |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -42,14 +42,10 @@ typedef enum { | |||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * struct onenand_bufferram - OneNAND BufferRAM Data | 44 | * struct onenand_bufferram - OneNAND BufferRAM Data |
45 | * @block: block address in BufferRAM | 45 | * @blockpage: block & page address in BufferRAM |
46 | * @page: page address in BufferRAM | ||
47 | * @valid: valid flag | ||
48 | */ | 46 | */ |
49 | struct onenand_bufferram { | 47 | struct onenand_bufferram { |
50 | int block; | 48 | int blockpage; |
51 | int page; | ||
52 | int valid; | ||
53 | }; | 49 | }; |
54 | 50 | ||
55 | /** | 51 | /** |
@@ -63,7 +59,6 @@ struct onenand_bufferram { | |||
63 | * partly be set to inform onenand_scan about | 59 | * partly be set to inform onenand_scan about |
64 | * @erase_shift: [INTERN] number of address bits in a block | 60 | * @erase_shift: [INTERN] number of address bits in a block |
65 | * @page_shift: [INTERN] number of address bits in a page | 61 | * @page_shift: [INTERN] number of address bits in a page |
66 | * @ppb_shift: [INTERN] number of address bits in a pages per block | ||
67 | * @page_mask: [INTERN] a page per block mask | 62 | * @page_mask: [INTERN] a page per block mask |
68 | * @bufferram_index: [INTERN] BufferRAM index | 63 | * @bufferram_index: [INTERN] BufferRAM index |
69 | * @bufferram: [INTERN] BufferRAM info | 64 | * @bufferram: [INTERN] BufferRAM info |
@@ -103,7 +98,6 @@ struct onenand_chip { | |||
103 | 98 | ||
104 | unsigned int erase_shift; | 99 | unsigned int erase_shift; |
105 | unsigned int page_shift; | 100 | unsigned int page_shift; |
106 | unsigned int ppb_shift; /* Pages per block shift */ | ||
107 | unsigned int page_mask; | 101 | unsigned int page_mask; |
108 | 102 | ||
109 | unsigned int bufferram_index; | 103 | unsigned int bufferram_index; |
@@ -150,6 +144,9 @@ struct onenand_chip { | |||
150 | #define ONENAND_SET_SYS_CFG1(v, this) \ | 144 | #define ONENAND_SET_SYS_CFG1(v, this) \ |
151 | (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) | 145 | (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) |
152 | 146 | ||
147 | #define ONENAND_IS_DDP(this) \ | ||
148 | (this->device_id & ONENAND_DEVICE_IS_DDP) | ||
149 | |||
153 | /* Check byte access in OneNAND */ | 150 | /* Check byte access in OneNAND */ |
154 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) | 151 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) |
155 | 152 | ||
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index e31c8f5d4271..af94719890e7 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * OneNAND Register header file | 4 | * OneNAND Register header file |
5 | * | 5 | * |
6 | * Copyright (C) 2005-2006 Samsung Electronics | 6 | * Copyright (C) 2005-2007 Samsung Electronics |
7 | * Kyungmin Park <kyungmin.park@samsung.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -80,9 +81,11 @@ | |||
80 | #define ONENAND_VERSION_PROCESS_SHIFT (8) | 81 | #define ONENAND_VERSION_PROCESS_SHIFT (8) |
81 | 82 | ||
82 | /* | 83 | /* |
83 | * Start Address 1 F100h (R/W) | 84 | * Start Address 1 F100h (R/W) & Start Address 2 F101h (R/W) |
84 | */ | 85 | */ |
85 | #define ONENAND_DDP_SHIFT (15) | 86 | #define ONENAND_DDP_SHIFT (15) |
87 | #define ONENAND_DDP_CHIP0 (0) | ||
88 | #define ONENAND_DDP_CHIP1 (1 << ONENAND_DDP_SHIFT) | ||
86 | 89 | ||
87 | /* | 90 | /* |
88 | * Start Address 8 F107h (R/W) | 91 | * Start Address 8 F107h (R/W) |
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index 86831e3594f6..0dc07d5f3354 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h | |||
@@ -18,9 +18,10 @@ | |||
18 | #define __LINUX_MTD_PHYSMAP__ | 18 | #define __LINUX_MTD_PHYSMAP__ |
19 | 19 | ||
20 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
21 | #include <linux/mtd/map.h> | ||
22 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
23 | 22 | ||
23 | struct map_info; | ||
24 | |||
24 | struct physmap_flash_data { | 25 | struct physmap_flash_data { |
25 | unsigned int width; | 26 | unsigned int width; |
26 | void (*set_vpp)(struct map_info *, int); | 27 | void (*set_vpp)(struct map_info *, int); |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 0ea7f89e613c..83e39eb054d3 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -204,7 +204,7 @@ void ncp_update_inode(struct inode *, struct ncp_entry_info *); | |||
204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); | 204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); |
205 | 205 | ||
206 | /* linux/fs/ncpfs/dir.c */ | 206 | /* linux/fs/ncpfs/dir.c */ |
207 | extern struct inode_operations ncp_dir_inode_operations; | 207 | extern const struct inode_operations ncp_dir_inode_operations; |
208 | extern const struct file_operations ncp_dir_operations; | 208 | extern const struct file_operations ncp_dir_operations; |
209 | int ncp_conn_logged_in(struct super_block *); | 209 | int ncp_conn_logged_in(struct super_block *); |
210 | int ncp_date_dos2unix(__le16 time, __le16 date); | 210 | int ncp_date_dos2unix(__le16 time, __le16 date); |
@@ -226,7 +226,7 @@ void ncp_lock_server(struct ncp_server *server); | |||
226 | void ncp_unlock_server(struct ncp_server *server); | 226 | void ncp_unlock_server(struct ncp_server *server); |
227 | 227 | ||
228 | /* linux/fs/ncpfs/file.c */ | 228 | /* linux/fs/ncpfs/file.c */ |
229 | extern struct inode_operations ncp_file_inode_operations; | 229 | extern const struct inode_operations ncp_file_inode_operations; |
230 | extern const struct file_operations ncp_file_operations; | 230 | extern const struct file_operations ncp_file_operations; |
231 | int ncp_make_open(struct inode *, int); | 231 | int ncp_make_open(struct inode *, int); |
232 | 232 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index f28d8a2e2c91..4db21e63d8d2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -24,7 +24,7 @@ | |||
24 | struct poll_table_struct; | 24 | struct poll_table_struct; |
25 | struct inode; | 25 | struct inode; |
26 | 26 | ||
27 | #define NPROTO 32 /* should be enough for now.. */ | 27 | #define NPROTO 33 /* should be enough for now.. */ |
28 | 28 | ||
29 | #define SYS_SOCKET 1 /* sys_socket(2) */ | 29 | #define SYS_SOCKET 1 /* sys_socket(2) */ |
30 | #define SYS_BIND 2 /* sys_bind(2) */ | 30 | #define SYS_BIND 2 /* sys_bind(2) */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fea0d9db6846..1a528548cd1d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -529,10 +529,11 @@ struct net_device | |||
529 | struct net_bridge_port *br_port; | 529 | struct net_bridge_port *br_port; |
530 | 530 | ||
531 | /* class/net/name entry */ | 531 | /* class/net/name entry */ |
532 | struct class_device class_dev; | 532 | struct device dev; |
533 | /* space for optional statistics and wireless sysfs groups */ | 533 | /* space for optional statistics and wireless sysfs groups */ |
534 | struct attribute_group *sysfs_groups[3]; | 534 | struct attribute_group *sysfs_groups[3]; |
535 | }; | 535 | }; |
536 | #define to_net_dev(d) container_of(d, struct net_device, dev) | ||
536 | 537 | ||
537 | #define NETDEV_ALIGN 32 | 538 | #define NETDEV_ALIGN 32 |
538 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 539 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
@@ -548,7 +549,7 @@ static inline void *netdev_priv(struct net_device *dev) | |||
548 | /* Set the sysfs physical device reference for the network logical device | 549 | /* Set the sysfs physical device reference for the network logical device |
549 | * if set prior to registration will cause a symlink during initialization. | 550 | * if set prior to registration will cause a symlink during initialization. |
550 | */ | 551 | */ |
551 | #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) | 552 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) |
552 | 553 | ||
553 | struct packet_type { | 554 | struct packet_type { |
554 | __be16 type; /* This is really htons(ether_type). */ | 555 | __be16 type; /* This is really htons(ether_type). */ |
@@ -588,7 +589,7 @@ extern int dev_open(struct net_device *dev); | |||
588 | extern int dev_close(struct net_device *dev); | 589 | extern int dev_close(struct net_device *dev); |
589 | extern int dev_queue_xmit(struct sk_buff *skb); | 590 | extern int dev_queue_xmit(struct sk_buff *skb); |
590 | extern int register_netdevice(struct net_device *dev); | 591 | extern int register_netdevice(struct net_device *dev); |
591 | extern int unregister_netdevice(struct net_device *dev); | 592 | extern void unregister_netdevice(struct net_device *dev); |
592 | extern void free_netdev(struct net_device *dev); | 593 | extern void free_netdev(struct net_device *dev); |
593 | extern void synchronize_net(void); | 594 | extern void synchronize_net(void); |
594 | extern int register_netdevice_notifier(struct notifier_block *nb); | 595 | extern int register_netdevice_notifier(struct notifier_block *nb); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index d4c4c5120bc0..70d3b4f1e48d 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -172,8 +172,8 @@ struct nf_logger { | |||
172 | 172 | ||
173 | /* Function to register/unregister log function. */ | 173 | /* Function to register/unregister log function. */ |
174 | int nf_log_register(int pf, struct nf_logger *logger); | 174 | int nf_log_register(int pf, struct nf_logger *logger); |
175 | int nf_log_unregister_pf(int pf); | 175 | void nf_log_unregister(struct nf_logger *logger); |
176 | void nf_log_unregister_logger(struct nf_logger *logger); | 176 | void nf_log_unregister_pf(int pf); |
177 | 177 | ||
178 | /* Calls the registered backend logging function */ | 178 | /* Calls the registered backend logging function */ |
179 | void nf_log_packet(int pf, | 179 | void nf_log_packet(int pf, |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 6328175a1c3a..43397a414cd6 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -33,6 +33,7 @@ header-y += xt_tcpmss.h | |||
33 | header-y += xt_tcpudp.h | 33 | header-y += xt_tcpudp.h |
34 | header-y += xt_SECMARK.h | 34 | header-y += xt_SECMARK.h |
35 | header-y += xt_CONNSECMARK.h | 35 | header-y += xt_CONNSECMARK.h |
36 | header-y += xt_TCPMSS.h | ||
36 | 37 | ||
37 | unifdef-y += nf_conntrack_common.h | 38 | unifdef-y += nf_conntrack_common.h |
38 | unifdef-y += nf_conntrack_ftp.h | 39 | unifdef-y += nf_conntrack_ftp.h |
diff --git a/include/linux/netfilter/nf_conntrack_sane.h b/include/linux/netfilter/nf_conntrack_sane.h new file mode 100644 index 000000000000..4767d6e23e97 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_sane.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _NF_CONNTRACK_SANE_H | ||
2 | #define _NF_CONNTRACK_SANE_H | ||
3 | /* SANE tracking. */ | ||
4 | |||
5 | #ifdef __KERNEL__ | ||
6 | |||
7 | #define SANE_PORT 6566 | ||
8 | |||
9 | enum sane_state { | ||
10 | SANE_STATE_NORMAL, | ||
11 | SANE_STATE_START_REQUESTED, | ||
12 | }; | ||
13 | |||
14 | /* This structure exists only once per master */ | ||
15 | struct nf_ct_sane_master { | ||
16 | enum sane_state state; | ||
17 | }; | ||
18 | |||
19 | #endif /* __KERNEL__ */ | ||
20 | |||
21 | #endif /* _NF_CONNTRACK_SANE_H */ | ||
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 2f4e98b90cc0..007af4c2770b 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -27,6 +27,9 @@ enum tcp_conntrack { | |||
27 | /* This sender sent FIN first */ | 27 | /* This sender sent FIN first */ |
28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 | 28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 |
29 | 29 | ||
30 | /* Be liberal in window checking */ | ||
31 | #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 | ||
32 | |||
30 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
31 | 34 | ||
32 | struct ip_ct_tcp_state { | 35 | struct ip_ct_tcp_state { |
@@ -34,7 +37,6 @@ struct ip_ct_tcp_state { | |||
34 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ | 37 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ |
35 | u_int32_t td_maxwin; /* max(win) */ | 38 | u_int32_t td_maxwin; /* max(win) */ |
36 | u_int8_t td_scale; /* window scale factor */ | 39 | u_int8_t td_scale; /* window scale factor */ |
37 | u_int8_t loose; /* used when connection picked up from the middle */ | ||
38 | u_int8_t flags; /* per direction options */ | 40 | u_int8_t flags; /* per direction options */ |
39 | }; | 41 | }; |
40 | 42 | ||
diff --git a/include/linux/netfilter/xt_TCPMSS.h b/include/linux/netfilter/xt_TCPMSS.h new file mode 100644 index 000000000000..53a292cd47f3 --- /dev/null +++ b/include/linux/netfilter/xt_TCPMSS.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _XT_TCPMSS_H | ||
2 | #define _XT_TCPMSS_H | ||
3 | |||
4 | struct xt_tcpmss_info { | ||
5 | u_int16_t mss; | ||
6 | }; | ||
7 | |||
8 | #define XT_TCPMSS_CLAMP_PMTU 0xffff | ||
9 | |||
10 | #endif /* _XT_TCPMSS_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 33581c13d947..da9274e6bf12 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -301,6 +301,12 @@ extern unsigned int ip_conntrack_htable_size; | |||
301 | extern int ip_conntrack_checksum; | 301 | extern int ip_conntrack_checksum; |
302 | 302 | ||
303 | #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) | 303 | #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) |
304 | #define CONNTRACK_STAT_INC_ATOMIC(count) \ | ||
305 | do { \ | ||
306 | local_bh_disable(); \ | ||
307 | __get_cpu_var(ip_conntrack_stat).count++; \ | ||
308 | local_bh_enable(); \ | ||
309 | } while (0) | ||
304 | 310 | ||
305 | #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS | 311 | #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS |
306 | #include <linux/notifier.h> | 312 | #include <linux/notifier.h> |
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index bdf553620ca1..bbca89aab813 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h | |||
@@ -16,6 +16,7 @@ enum ip_nat_manip_type | |||
16 | 16 | ||
17 | #define IP_NAT_RANGE_MAP_IPS 1 | 17 | #define IP_NAT_RANGE_MAP_IPS 1 |
18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 | 18 | #define IP_NAT_RANGE_PROTO_SPECIFIED 2 |
19 | #define IP_NAT_RANGE_PROTO_RANDOM 4 /* add randomness to "port" selection */ | ||
19 | 20 | ||
20 | /* NAT sequence number modifications */ | 21 | /* NAT sequence number modifications */ |
21 | struct ip_nat_seq { | 22 | struct ip_nat_seq { |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 98d566c5e32a..9527296595cd 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -272,25 +272,9 @@ ipt_get_target(struct ipt_entry *e) | |||
272 | #include <linux/init.h> | 272 | #include <linux/init.h> |
273 | extern void ipt_init(void) __init; | 273 | extern void ipt_init(void) __init; |
274 | 274 | ||
275 | #define ipt_register_target(tgt) \ | 275 | extern int ipt_register_table(struct xt_table *table, |
276 | ({ (tgt)->family = AF_INET; \ | ||
277 | xt_register_target(tgt); }) | ||
278 | #define ipt_unregister_target(tgt) xt_unregister_target(tgt) | ||
279 | |||
280 | #define ipt_register_match(mtch) \ | ||
281 | ({ (mtch)->family = AF_INET; \ | ||
282 | xt_register_match(mtch); }) | ||
283 | #define ipt_unregister_match(mtch) xt_unregister_match(mtch) | ||
284 | |||
285 | //#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl) | ||
286 | //#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl) | ||
287 | |||
288 | extern int ipt_register_table(struct ipt_table *table, | ||
289 | const struct ipt_replace *repl); | 276 | const struct ipt_replace *repl); |
290 | extern void ipt_unregister_table(struct ipt_table *table); | 277 | extern void ipt_unregister_table(struct xt_table *table); |
291 | |||
292 | /* net/sched/ipt.c: Gimme access to your targets! Gets target->me. */ | ||
293 | extern struct ipt_target *ipt_find_target(const char *name, u8 revision); | ||
294 | 278 | ||
295 | /* Standard entry. */ | 279 | /* Standard entry. */ |
296 | struct ipt_standard | 280 | struct ipt_standard |
@@ -315,7 +299,7 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb, | |||
315 | unsigned int hook, | 299 | unsigned int hook, |
316 | const struct net_device *in, | 300 | const struct net_device *in, |
317 | const struct net_device *out, | 301 | const struct net_device *out, |
318 | struct ipt_table *table); | 302 | struct xt_table *table); |
319 | 303 | ||
320 | #define IPT_ALIGN(s) XT_ALIGN(s) | 304 | #define IPT_ALIGN(s) XT_ALIGN(s) |
321 | 305 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/include/linux/netfilter_ipv4/ipt_TCPMSS.h index aadb39580cd3..7a850f945824 100644 --- a/include/linux/netfilter_ipv4/ipt_TCPMSS.h +++ b/include/linux/netfilter_ipv4/ipt_TCPMSS.h | |||
@@ -1,10 +1,9 @@ | |||
1 | #ifndef _IPT_TCPMSS_H | 1 | #ifndef _IPT_TCPMSS_H |
2 | #define _IPT_TCPMSS_H | 2 | #define _IPT_TCPMSS_H |
3 | 3 | ||
4 | struct ipt_tcpmss_info { | 4 | #include <linux/netfilter/xt_TCPMSS.h> |
5 | u_int16_t mss; | ||
6 | }; | ||
7 | 5 | ||
8 | #define IPT_TCPMSS_CLAMP_PMTU 0xffff | 6 | #define ipt_tcpmss_info xt_tcpmss_info |
7 | #define IPT_TCPMSS_CLAMP_PMTU XT_TCPMSS_CLAMP_PMTU | ||
9 | 8 | ||
10 | #endif /*_IPT_TCPMSS_H*/ | 9 | #endif /*_IPT_TCPMSS_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 4aed340401db..61aa10412fc8 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -104,6 +104,25 @@ struct ip6t_entry | |||
104 | unsigned char elems[0]; | 104 | unsigned char elems[0]; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | /* Standard entry */ | ||
108 | struct ip6t_standard | ||
109 | { | ||
110 | struct ip6t_entry entry; | ||
111 | struct ip6t_standard_target target; | ||
112 | }; | ||
113 | |||
114 | struct ip6t_error_target | ||
115 | { | ||
116 | struct ip6t_entry_target target; | ||
117 | char errorname[IP6T_FUNCTION_MAXNAMELEN]; | ||
118 | }; | ||
119 | |||
120 | struct ip6t_error | ||
121 | { | ||
122 | struct ip6t_entry entry; | ||
123 | struct ip6t_error_target target; | ||
124 | }; | ||
125 | |||
107 | /* | 126 | /* |
108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 127 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
109 | * Unlike BSD Linux inherits IP options so you don't have to use | 128 | * Unlike BSD Linux inherits IP options so you don't have to use |
@@ -286,24 +305,14 @@ ip6t_get_target(struct ip6t_entry *e) | |||
286 | #include <linux/init.h> | 305 | #include <linux/init.h> |
287 | extern void ip6t_init(void) __init; | 306 | extern void ip6t_init(void) __init; |
288 | 307 | ||
289 | #define ip6t_register_target(tgt) \ | 308 | extern int ip6t_register_table(struct xt_table *table, |
290 | ({ (tgt)->family = AF_INET6; \ | ||
291 | xt_register_target(tgt); }) | ||
292 | #define ip6t_unregister_target(tgt) xt_unregister_target(tgt) | ||
293 | |||
294 | #define ip6t_register_match(match) \ | ||
295 | ({ (match)->family = AF_INET6; \ | ||
296 | xt_register_match(match); }) | ||
297 | #define ip6t_unregister_match(match) xt_unregister_match(match) | ||
298 | |||
299 | extern int ip6t_register_table(struct ip6t_table *table, | ||
300 | const struct ip6t_replace *repl); | 309 | const struct ip6t_replace *repl); |
301 | extern void ip6t_unregister_table(struct ip6t_table *table); | 310 | extern void ip6t_unregister_table(struct xt_table *table); |
302 | extern unsigned int ip6t_do_table(struct sk_buff **pskb, | 311 | extern unsigned int ip6t_do_table(struct sk_buff **pskb, |
303 | unsigned int hook, | 312 | unsigned int hook, |
304 | const struct net_device *in, | 313 | const struct net_device *in, |
305 | const struct net_device *out, | 314 | const struct net_device *out, |
306 | struct ip6t_table *table); | 315 | struct xt_table *table); |
307 | 316 | ||
308 | /* Check for an extension */ | 317 | /* Check for an extension */ |
309 | extern int ip6t_ext_hdr(u8 nexthdr); | 318 | extern int ip6t_ext_hdr(u8 nexthdr); |
diff --git a/include/linux/netfilter_ipv6/ip6t_mh.h b/include/linux/netfilter_ipv6/ip6t_mh.h new file mode 100644 index 000000000000..b9ca9a5f74d0 --- /dev/null +++ b/include/linux/netfilter_ipv6/ip6t_mh.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _IP6T_MH_H | ||
2 | #define _IP6T_MH_H | ||
3 | |||
4 | /* MH matching stuff */ | ||
5 | struct ip6t_mh | ||
6 | { | ||
7 | u_int8_t types[2]; /* MH type range */ | ||
8 | u_int8_t invflags; /* Inverse flags */ | ||
9 | }; | ||
10 | |||
11 | /* Values for "invflags" field in struct ip6t_mh. */ | ||
12 | #define IP6T_MH_INV_TYPE 0x01 /* Invert the sense of type. */ | ||
13 | #define IP6T_MH_INV_MASK 0x01 /* All possible flags. */ | ||
14 | |||
15 | #endif /*_IP6T_MH_H*/ | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index b3b9b609ee89..2a20f488ac1b 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define NETLINK_GENERIC 16 | 23 | #define NETLINK_GENERIC 16 |
24 | /* leave room for NETLINK_DM (DM Events) */ | 24 | /* leave room for NETLINK_DM (DM Events) */ |
25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ | 25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ |
26 | #define NETLINK_ECRYPTFS 19 | ||
26 | 27 | ||
27 | #define MAX_LINKS 32 | 28 | #define MAX_LINKS 32 |
28 | 29 | ||
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index db05182ca0e8..1be5be88debe 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -105,12 +105,11 @@ struct nfs4_ace { | |||
105 | uint32_t access_mask; | 105 | uint32_t access_mask; |
106 | int whotype; | 106 | int whotype; |
107 | uid_t who; | 107 | uid_t who; |
108 | struct list_head l_ace; | ||
109 | }; | 108 | }; |
110 | 109 | ||
111 | struct nfs4_acl { | 110 | struct nfs4_acl { |
112 | uint32_t naces; | 111 | uint32_t naces; |
113 | struct list_head ace_head; | 112 | struct nfs4_ace aces[0]; |
114 | }; | 113 | }; |
115 | 114 | ||
116 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 115 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
diff --git a/include/linux/nfs4_acl.h b/include/linux/nfs4_acl.h index 22aff4d01f20..409b6e02f337 100644 --- a/include/linux/nfs4_acl.h +++ b/include/linux/nfs4_acl.h | |||
@@ -39,9 +39,12 @@ | |||
39 | 39 | ||
40 | #include <linux/posix_acl.h> | 40 | #include <linux/posix_acl.h> |
41 | 41 | ||
42 | struct nfs4_acl *nfs4_acl_new(void); | 42 | /* Maximum ACL we'll accept from client; chosen (somewhat arbitrarily) to |
43 | void nfs4_acl_free(struct nfs4_acl *); | 43 | * fit in a page: */ |
44 | int nfs4_acl_add_ace(struct nfs4_acl *, u32, u32, u32, int, uid_t); | 44 | #define NFS4_ACL_MAX 170 |
45 | |||
46 | struct nfs4_acl *nfs4_acl_new(int); | ||
47 | void nfs4_acl_add_ace(struct nfs4_acl *, u32, u32, u32, int, uid_t); | ||
45 | int nfs4_acl_get_whotype(char *, u32); | 48 | int nfs4_acl_get_whotype(char *, u32); |
46 | int nfs4_acl_write_who(int who, char *p); | 49 | int nfs4_acl_write_who(int who, char *p); |
47 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, | 50 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c5d4084773e8..47aaa2c66738 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -11,14 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/magic.h> | 12 | #include <linux/magic.h> |
13 | 13 | ||
14 | /* | ||
15 | * Enable debugging support for nfs client. | ||
16 | * Requires RPC_DEBUG. | ||
17 | */ | ||
18 | #ifdef RPC_DEBUG | ||
19 | # define NFS_DEBUG | ||
20 | #endif | ||
21 | |||
22 | /* Default timeout values */ | 14 | /* Default timeout values */ |
23 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) | 15 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) |
24 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) | 16 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) |
@@ -331,9 +323,9 @@ static inline void nfs_fattr_init(struct nfs_fattr *fattr) | |||
331 | /* | 323 | /* |
332 | * linux/fs/nfs/file.c | 324 | * linux/fs/nfs/file.c |
333 | */ | 325 | */ |
334 | extern struct inode_operations nfs_file_inode_operations; | 326 | extern const struct inode_operations nfs_file_inode_operations; |
335 | #ifdef CONFIG_NFS_V3 | 327 | #ifdef CONFIG_NFS_V3 |
336 | extern struct inode_operations nfs3_file_inode_operations; | 328 | extern const struct inode_operations nfs3_file_inode_operations; |
337 | #endif /* CONFIG_NFS_V3 */ | 329 | #endif /* CONFIG_NFS_V3 */ |
338 | extern const struct file_operations nfs_file_operations; | 330 | extern const struct file_operations nfs_file_operations; |
339 | extern const struct address_space_operations nfs_file_aops; | 331 | extern const struct address_space_operations nfs_file_aops; |
@@ -380,9 +372,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb, | |||
380 | /* | 372 | /* |
381 | * linux/fs/nfs/dir.c | 373 | * linux/fs/nfs/dir.c |
382 | */ | 374 | */ |
383 | extern struct inode_operations nfs_dir_inode_operations; | 375 | extern const struct inode_operations nfs_dir_inode_operations; |
384 | #ifdef CONFIG_NFS_V3 | 376 | #ifdef CONFIG_NFS_V3 |
385 | extern struct inode_operations nfs3_dir_inode_operations; | 377 | extern const struct inode_operations nfs3_dir_inode_operations; |
386 | #endif /* CONFIG_NFS_V3 */ | 378 | #endif /* CONFIG_NFS_V3 */ |
387 | extern const struct file_operations nfs_dir_operations; | 379 | extern const struct file_operations nfs_dir_operations; |
388 | extern struct dentry_operations nfs_dentry_operations; | 380 | extern struct dentry_operations nfs_dentry_operations; |
@@ -392,7 +384,7 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_ | |||
392 | /* | 384 | /* |
393 | * linux/fs/nfs/symlink.c | 385 | * linux/fs/nfs/symlink.c |
394 | */ | 386 | */ |
395 | extern struct inode_operations nfs_symlink_inode_operations; | 387 | extern const struct inode_operations nfs_symlink_inode_operations; |
396 | 388 | ||
397 | /* | 389 | /* |
398 | * linux/fs/nfs/sysctl.c | 390 | * linux/fs/nfs/sysctl.c |
@@ -409,8 +401,8 @@ extern void nfs_unregister_sysctl(void); | |||
409 | * linux/fs/nfs/namespace.c | 401 | * linux/fs/nfs/namespace.c |
410 | */ | 402 | */ |
411 | extern struct list_head nfs_automount_list; | 403 | extern struct list_head nfs_automount_list; |
412 | extern struct inode_operations nfs_mountpoint_inode_operations; | 404 | extern const struct inode_operations nfs_mountpoint_inode_operations; |
413 | extern struct inode_operations nfs_referral_inode_operations; | 405 | extern const struct inode_operations nfs_referral_inode_operations; |
414 | extern int nfs_mountpoint_expiry_timeout; | 406 | extern int nfs_mountpoint_expiry_timeout; |
415 | extern void nfs_release_automount_timer(void); | 407 | extern void nfs_release_automount_timer(void); |
416 | 408 | ||
@@ -567,6 +559,15 @@ extern void * nfs_root_data(void); | |||
567 | #define NFSDBG_ALL 0xFFFF | 559 | #define NFSDBG_ALL 0xFFFF |
568 | 560 | ||
569 | #ifdef __KERNEL__ | 561 | #ifdef __KERNEL__ |
562 | |||
563 | /* | ||
564 | * Enable debugging support for nfs client. | ||
565 | * Requires RPC_DEBUG. | ||
566 | */ | ||
567 | #ifdef RPC_DEBUG | ||
568 | # define NFS_DEBUG | ||
569 | #endif | ||
570 | |||
570 | # undef ifdebug | 571 | # undef ifdebug |
571 | # ifdef NFS_DEBUG | 572 | # ifdef NFS_DEBUG |
572 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) | 573 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9ee9da5e1cc9..10c26ed0db71 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -767,8 +767,8 @@ struct nfs_access_entry; | |||
767 | struct nfs_rpc_ops { | 767 | struct nfs_rpc_ops { |
768 | int version; /* Protocol version */ | 768 | int version; /* Protocol version */ |
769 | struct dentry_operations *dentry_ops; | 769 | struct dentry_operations *dentry_ops; |
770 | struct inode_operations *dir_inode_ops; | 770 | const struct inode_operations *dir_inode_ops; |
771 | struct inode_operations *file_inode_ops; | 771 | const struct inode_operations *file_inode_ops; |
772 | 772 | ||
773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, | 773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, |
774 | struct nfs_fsinfo *); | 774 | struct nfs_fsinfo *); |
@@ -784,7 +784,6 @@ struct nfs_rpc_ops { | |||
784 | int (*access) (struct inode *, struct nfs_access_entry *); | 784 | int (*access) (struct inode *, struct nfs_access_entry *); |
785 | int (*readlink)(struct inode *, struct page *, unsigned int, | 785 | int (*readlink)(struct inode *, struct page *, unsigned int, |
786 | unsigned int); | 786 | unsigned int); |
787 | int (*read) (struct nfs_read_data *); | ||
788 | int (*create) (struct inode *, struct dentry *, | 787 | int (*create) (struct inode *, struct dentry *, |
789 | struct iattr *, int, struct nameidata *); | 788 | struct iattr *, int, struct nameidata *); |
790 | int (*remove) (struct inode *, struct qstr *); | 789 | int (*remove) (struct inode *, struct qstr *); |
diff --git a/include/linux/nfsd/const.h b/include/linux/nfsd/const.h index f0cc77790527..323f8cfa060a 100644 --- a/include/linux/nfsd/const.h +++ b/include/linux/nfsd/const.h | |||
@@ -30,10 +30,6 @@ | |||
30 | 30 | ||
31 | #include <linux/sunrpc/msg_prot.h> | 31 | #include <linux/sunrpc/msg_prot.h> |
32 | 32 | ||
33 | #ifndef NFS_SUPER_MAGIC | ||
34 | # define NFS_SUPER_MAGIC 0x6969 | ||
35 | #endif | ||
36 | |||
37 | /* | 33 | /* |
38 | * Largest number of bytes we need to allocate for an NFS | 34 | * Largest number of bytes we need to allocate for an NFS |
39 | * call or reply. Used to control buffer sizes. We use | 35 | * call or reply. Used to control buffer sizes. We use |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 045e38cdbe64..9f62d6182d32 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -74,19 +74,20 @@ struct svc_export { | |||
74 | uid_t ex_anon_uid; | 74 | uid_t ex_anon_uid; |
75 | gid_t ex_anon_gid; | 75 | gid_t ex_anon_gid; |
76 | int ex_fsid; | 76 | int ex_fsid; |
77 | unsigned char * ex_uuid; /* 16 byte fsid */ | ||
77 | struct nfsd4_fs_locations ex_fslocs; | 78 | struct nfsd4_fs_locations ex_fslocs; |
78 | }; | 79 | }; |
79 | 80 | ||
80 | /* an "export key" (expkey) maps a filehandlefragement to an | 81 | /* an "export key" (expkey) maps a filehandlefragement to an |
81 | * svc_export for a given client. There can be two per export, one | 82 | * svc_export for a given client. There can be several per export, |
82 | * for type 0 (dev/ino), one for type 1 (fsid) | 83 | * for the different fsid types. |
83 | */ | 84 | */ |
84 | struct svc_expkey { | 85 | struct svc_expkey { |
85 | struct cache_head h; | 86 | struct cache_head h; |
86 | 87 | ||
87 | struct auth_domain * ek_client; | 88 | struct auth_domain * ek_client; |
88 | int ek_fsidtype; | 89 | int ek_fsidtype; |
89 | u32 ek_fsid[3]; | 90 | u32 ek_fsid[6]; |
90 | 91 | ||
91 | struct vfsmount * ek_mnt; | 92 | struct vfsmount * ek_mnt; |
92 | struct dentry * ek_dentry; | 93 | struct dentry * ek_dentry; |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 4b7c4b568f6d..72feac581aa3 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -254,18 +254,6 @@ void nfsd_lockd_shutdown(void); | |||
254 | */ | 254 | */ |
255 | extern struct timeval nfssvc_boot; | 255 | extern struct timeval nfssvc_boot; |
256 | 256 | ||
257 | static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh) | ||
258 | { | ||
259 | if (fh->fh_export->ex_flags & NFSEXP_FSID) { | ||
260 | struct vfsmount *mnt = fh->fh_export->ex_mnt; | ||
261 | if (!old_valid_dev(mnt->mnt_sb->s_dev) || | ||
262 | (reffh->fh_version == 1 && reffh->fh_fsid_type == 1)) | ||
263 | return 1; | ||
264 | } | ||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | |||
269 | #ifdef CONFIG_NFSD_V4 | 257 | #ifdef CONFIG_NFSD_V4 |
270 | 258 | ||
271 | /* before processing a COMPOUND operation, we have to check that there | 259 | /* before processing a COMPOUND operation, we have to check that there |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index d9c6c382165d..11e568ee0eeb 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -165,38 +165,91 @@ typedef struct svc_fh { | |||
165 | 165 | ||
166 | } svc_fh; | 166 | } svc_fh; |
167 | 167 | ||
168 | static inline void mk_fsid_v0(u32 *fsidv, dev_t dev, ino_t ino) | 168 | enum nfsd_fsid { |
169 | { | 169 | FSID_DEV = 0, |
170 | fsidv[0] = htonl((MAJOR(dev)<<16) | | 170 | FSID_NUM, |
171 | MINOR(dev)); | 171 | FSID_MAJOR_MINOR, |
172 | fsidv[1] = ino_t_to_u32(ino); | 172 | FSID_ENCODE_DEV, |
173 | } | 173 | FSID_UUID4_INUM, |
174 | FSID_UUID8, | ||
175 | FSID_UUID16, | ||
176 | FSID_UUID16_INUM, | ||
177 | }; | ||
174 | 178 | ||
175 | static inline void mk_fsid_v1(u32 *fsidv, u32 fsid) | 179 | enum fsid_source { |
176 | { | 180 | FSIDSOURCE_DEV, |
177 | fsidv[0] = fsid; | 181 | FSIDSOURCE_FSID, |
178 | } | 182 | FSIDSOURCE_UUID, |
183 | }; | ||
184 | extern enum fsid_source fsid_source(struct svc_fh *fhp); | ||
179 | 185 | ||
180 | static inline void mk_fsid_v2(u32 *fsidv, dev_t dev, ino_t ino) | ||
181 | { | ||
182 | fsidv[0] = htonl(MAJOR(dev)); | ||
183 | fsidv[1] = htonl(MINOR(dev)); | ||
184 | fsidv[2] = ino_t_to_u32(ino); | ||
185 | } | ||
186 | 186 | ||
187 | static inline void mk_fsid_v3(u32 *fsidv, dev_t dev, ino_t ino) | 187 | /* This might look a little large to "inline" but in all calls except |
188 | * one, 'vers' is constant so moste of the function disappears. | ||
189 | */ | ||
190 | static inline void mk_fsid(int vers, u32 *fsidv, dev_t dev, ino_t ino, | ||
191 | u32 fsid, unsigned char *uuid) | ||
188 | { | 192 | { |
189 | fsidv[0] = new_encode_dev(dev); | 193 | u32 *up; |
190 | fsidv[1] = ino_t_to_u32(ino); | 194 | switch(vers) { |
195 | case FSID_DEV: | ||
196 | fsidv[0] = htonl((MAJOR(dev)<<16) | | ||
197 | MINOR(dev)); | ||
198 | fsidv[1] = ino_t_to_u32(ino); | ||
199 | break; | ||
200 | case FSID_NUM: | ||
201 | fsidv[0] = fsid; | ||
202 | break; | ||
203 | case FSID_MAJOR_MINOR: | ||
204 | fsidv[0] = htonl(MAJOR(dev)); | ||
205 | fsidv[1] = htonl(MINOR(dev)); | ||
206 | fsidv[2] = ino_t_to_u32(ino); | ||
207 | break; | ||
208 | |||
209 | case FSID_ENCODE_DEV: | ||
210 | fsidv[0] = new_encode_dev(dev); | ||
211 | fsidv[1] = ino_t_to_u32(ino); | ||
212 | break; | ||
213 | |||
214 | case FSID_UUID4_INUM: | ||
215 | /* 4 byte fsid and inode number */ | ||
216 | up = (u32*)uuid; | ||
217 | fsidv[0] = ino_t_to_u32(ino); | ||
218 | fsidv[1] = up[0] ^ up[1] ^ up[2] ^ up[3]; | ||
219 | break; | ||
220 | |||
221 | case FSID_UUID8: | ||
222 | /* 8 byte fsid */ | ||
223 | up = (u32*)uuid; | ||
224 | fsidv[0] = up[0] ^ up[2]; | ||
225 | fsidv[1] = up[1] ^ up[3]; | ||
226 | break; | ||
227 | |||
228 | case FSID_UUID16: | ||
229 | /* 16 byte fsid - NFSv3+ only */ | ||
230 | memcpy(fsidv, uuid, 16); | ||
231 | break; | ||
232 | |||
233 | case FSID_UUID16_INUM: | ||
234 | /* 8 byte inode and 16 byte fsid */ | ||
235 | *(u64*)fsidv = (u64)ino; | ||
236 | memcpy(fsidv+2, uuid, 16); | ||
237 | break; | ||
238 | default: BUG(); | ||
239 | } | ||
191 | } | 240 | } |
192 | 241 | ||
193 | static inline int key_len(int type) | 242 | static inline int key_len(int type) |
194 | { | 243 | { |
195 | switch(type) { | 244 | switch(type) { |
196 | case 0: return 8; | 245 | case FSID_DEV: return 8; |
197 | case 1: return 4; | 246 | case FSID_NUM: return 4; |
198 | case 2: return 12; | 247 | case FSID_MAJOR_MINOR: return 12; |
199 | case 3: return 8; | 248 | case FSID_ENCODE_DEV: return 8; |
249 | case FSID_UUID4_INUM: return 8; | ||
250 | case FSID_UUID8: return 8; | ||
251 | case FSID_UUID16: return 16; | ||
252 | case FSID_UUID16_INUM: return 24; | ||
200 | default: return 0; | 253 | default: return 0; |
201 | } | 254 | } |
202 | } | 255 | } |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index acb4ed130247..29af2d5df097 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -17,8 +17,15 @@ | |||
17 | #ifdef ARCH_HAS_NMI_WATCHDOG | 17 | #ifdef ARCH_HAS_NMI_WATCHDOG |
18 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
19 | extern void touch_nmi_watchdog(void); | 19 | extern void touch_nmi_watchdog(void); |
20 | extern void acpi_nmi_disable(void); | ||
21 | extern void acpi_nmi_enable(void); | ||
20 | #else | 22 | #else |
21 | # define touch_nmi_watchdog() touch_softlockup_watchdog() | 23 | static inline void touch_nmi_watchdog(void) |
24 | { | ||
25 | touch_softlockup_watchdog(); | ||
26 | } | ||
27 | static inline void acpi_nmi_disable(void) { } | ||
28 | static inline void acpi_nmi_enable(void) { } | ||
22 | #endif | 29 | #endif |
23 | 30 | ||
24 | #ifndef trigger_all_cpu_backtrace | 31 | #ifndef trigger_all_cpu_backtrace |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index c3e255bf8594..7a8dcb82a699 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -76,8 +76,6 @@ extern struct page * find_get_page(struct address_space *mapping, | |||
76 | unsigned long index); | 76 | unsigned long index); |
77 | extern struct page * find_lock_page(struct address_space *mapping, | 77 | extern struct page * find_lock_page(struct address_space *mapping, |
78 | unsigned long index); | 78 | unsigned long index); |
79 | extern __deprecated_for_modules struct page * find_trylock_page( | ||
80 | struct address_space *mapping, unsigned long index); | ||
81 | extern struct page * find_or_create_page(struct address_space *mapping, | 79 | extern struct page * find_or_create_page(struct address_space *mapping, |
82 | unsigned long index, gfp_t gfp_mask); | 80 | unsigned long index, gfp_t gfp_mask); |
83 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 81 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index f3c617eabd8d..2c4b6842dfb9 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -167,6 +167,7 @@ struct pci_dev { | |||
167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 167 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
168 | unsigned int msi_enabled:1; | 168 | unsigned int msi_enabled:1; |
169 | unsigned int msix_enabled:1; | 169 | unsigned int msix_enabled:1; |
170 | unsigned int is_managed:1; | ||
170 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 171 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
171 | 172 | ||
172 | u32 saved_config_space[16]; /* config space saved at suspend time */ | 173 | u32 saved_config_space[16]; /* config space saved at suspend time */ |
@@ -174,6 +175,9 @@ struct pci_dev { | |||
174 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 175 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
175 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 176 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
176 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 177 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
178 | #ifdef CONFIG_PCI_MSI | ||
179 | unsigned int first_msi_irq; | ||
180 | #endif | ||
177 | }; | 181 | }; |
178 | 182 | ||
179 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) | 183 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) |
@@ -181,6 +185,11 @@ struct pci_dev { | |||
181 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 185 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
182 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 186 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
183 | 187 | ||
188 | static inline int pci_channel_offline(struct pci_dev *pdev) | ||
189 | { | ||
190 | return (pdev->error_state != pci_channel_io_normal); | ||
191 | } | ||
192 | |||
184 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | 193 | static inline struct pci_cap_saved_state *pci_find_saved_cap( |
185 | struct pci_dev *pci_dev,char cap) | 194 | struct pci_dev *pci_dev,char cap) |
186 | { | 195 | { |
@@ -463,8 +472,7 @@ extern void pci_sort_breadthfirst(void); | |||
463 | 472 | ||
464 | /* Generic PCI functions exported to card drivers */ | 473 | /* Generic PCI functions exported to card drivers */ |
465 | 474 | ||
466 | struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 475 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
467 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | ||
468 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 476 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
469 | int pci_find_capability (struct pci_dev *dev, int cap); | 477 | int pci_find_capability (struct pci_dev *dev, int cap); |
470 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 478 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
@@ -521,6 +529,14 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val | |||
521 | 529 | ||
522 | int __must_check pci_enable_device(struct pci_dev *dev); | 530 | int __must_check pci_enable_device(struct pci_dev *dev); |
523 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); | 531 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); |
532 | int __must_check pcim_enable_device(struct pci_dev *pdev); | ||
533 | void pcim_pin_device(struct pci_dev *pdev); | ||
534 | |||
535 | static inline int pci_is_managed(struct pci_dev *pdev) | ||
536 | { | ||
537 | return pdev->is_managed; | ||
538 | } | ||
539 | |||
524 | void pci_disable_device(struct pci_dev *dev); | 540 | void pci_disable_device(struct pci_dev *dev); |
525 | void pci_set_master(struct pci_dev *dev); | 541 | void pci_set_master(struct pci_dev *dev); |
526 | #define HAVE_PCI_SET_MWI | 542 | #define HAVE_PCI_SET_MWI |
@@ -533,6 +549,7 @@ void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | |||
533 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 549 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
534 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 550 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
535 | void pci_restore_bars(struct pci_dev *dev); | 551 | void pci_restore_bars(struct pci_dev *dev); |
552 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | ||
536 | 553 | ||
537 | /* ROM control related routines */ | 554 | /* ROM control related routines */ |
538 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 555 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
@@ -561,6 +578,8 @@ int __must_check pci_request_regions(struct pci_dev *, const char *); | |||
561 | void pci_release_regions(struct pci_dev *); | 578 | void pci_release_regions(struct pci_dev *); |
562 | int __must_check pci_request_region(struct pci_dev *, int, const char *); | 579 | int __must_check pci_request_region(struct pci_dev *, int, const char *); |
563 | void pci_release_region(struct pci_dev *, int); | 580 | void pci_release_region(struct pci_dev *, int); |
581 | int pci_request_selected_regions(struct pci_dev *, int, const char *); | ||
582 | void pci_release_selected_regions(struct pci_dev *, int); | ||
564 | 583 | ||
565 | /* drivers/pci/bus.c */ | 584 | /* drivers/pci/bus.c */ |
566 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 585 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
@@ -573,10 +592,11 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | |||
573 | void pci_enable_bridges(struct pci_bus *bus); | 592 | void pci_enable_bridges(struct pci_bus *bus); |
574 | 593 | ||
575 | /* Proper probing supporting hot-pluggable devices */ | 594 | /* Proper probing supporting hot-pluggable devices */ |
576 | int __must_check __pci_register_driver(struct pci_driver *, struct module *); | 595 | int __must_check __pci_register_driver(struct pci_driver *, struct module *, |
596 | const char *mod_name); | ||
577 | static inline int __must_check pci_register_driver(struct pci_driver *driver) | 597 | static inline int __must_check pci_register_driver(struct pci_driver *driver) |
578 | { | 598 | { |
579 | return __pci_register_driver(driver, THIS_MODULE); | 599 | return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
580 | } | 600 | } |
581 | 601 | ||
582 | void pci_unregister_driver(struct pci_driver *); | 602 | void pci_unregister_driver(struct pci_driver *); |
@@ -611,10 +631,6 @@ enum pci_dma_burst_strategy { | |||
611 | strategy_parameter byte boundaries */ | 631 | strategy_parameter byte boundaries */ |
612 | }; | 632 | }; |
613 | 633 | ||
614 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | ||
615 | extern struct pci_dev *isa_bridge; | ||
616 | #endif | ||
617 | |||
618 | struct msix_entry { | 634 | struct msix_entry { |
619 | u16 vector; /* kernel uses to write allocated vector */ | 635 | u16 vector; /* kernel uses to write allocated vector */ |
620 | u16 entry; /* driver uses to specify entry, OS writes */ | 636 | u16 entry; /* driver uses to specify entry, OS writes */ |
@@ -622,7 +638,6 @@ struct msix_entry { | |||
622 | 638 | ||
623 | 639 | ||
624 | #ifndef CONFIG_PCI_MSI | 640 | #ifndef CONFIG_PCI_MSI |
625 | static inline void pci_scan_msi_device(struct pci_dev *dev) {} | ||
626 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} | 641 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} |
627 | static inline void pci_disable_msi(struct pci_dev *dev) {} | 642 | static inline void pci_disable_msi(struct pci_dev *dev) {} |
628 | static inline int pci_enable_msix(struct pci_dev* dev, | 643 | static inline int pci_enable_msix(struct pci_dev* dev, |
@@ -630,7 +645,6 @@ static inline int pci_enable_msix(struct pci_dev* dev, | |||
630 | static inline void pci_disable_msix(struct pci_dev *dev) {} | 645 | static inline void pci_disable_msix(struct pci_dev *dev) {} |
631 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} | 646 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} |
632 | #else | 647 | #else |
633 | extern void pci_scan_msi_device(struct pci_dev *dev); | ||
634 | extern int pci_enable_msi(struct pci_dev *dev); | 648 | extern int pci_enable_msi(struct pci_dev *dev); |
635 | extern void pci_disable_msi(struct pci_dev *dev); | 649 | extern void pci_disable_msi(struct pci_dev *dev); |
636 | extern int pci_enable_msix(struct pci_dev* dev, | 650 | extern int pci_enable_msix(struct pci_dev* dev, |
@@ -722,8 +736,6 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
722 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } | 736 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
723 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 737 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
724 | 738 | ||
725 | #define isa_bridge ((struct pci_dev *)NULL) | ||
726 | |||
727 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | 739 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) |
728 | 740 | ||
729 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 741 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |
@@ -828,6 +840,11 @@ enum pci_fixup_pass { | |||
828 | 840 | ||
829 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 841 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
830 | 842 | ||
843 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
844 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
845 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
846 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
847 | |||
831 | extern int pci_pci_problems; | 848 | extern int pci_pci_problems; |
832 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ | 849 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ |
833 | #define PCIPCI_TRITON 2 | 850 | #define PCIPCI_TRITON 2 |
@@ -837,5 +854,8 @@ extern int pci_pci_problems; | |||
837 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ | 854 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ |
838 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ | 855 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ |
839 | 856 | ||
857 | extern unsigned long pci_cardbus_io_size; | ||
858 | extern unsigned long pci_cardbus_mem_size; | ||
859 | |||
840 | #endif /* __KERNEL__ */ | 860 | #endif /* __KERNEL__ */ |
841 | #endif /* LINUX_PCI_H */ | 861 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3d1d21035dec..600308fdf9ce 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 | 15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 |
16 | #define PCI_CLASS_STORAGE_IPI 0x0103 | 16 | #define PCI_CLASS_STORAGE_IPI 0x0103 |
17 | #define PCI_CLASS_STORAGE_RAID 0x0104 | 17 | #define PCI_CLASS_STORAGE_RAID 0x0104 |
18 | #define PCI_CLASS_STORAGE_SATA 0x0106 | ||
19 | #define PCI_CLASS_STORAGE_SATA_AHCI 0x010601 | ||
18 | #define PCI_CLASS_STORAGE_SAS 0x0107 | 20 | #define PCI_CLASS_STORAGE_SAS 0x0107 |
19 | #define PCI_CLASS_STORAGE_OTHER 0x0180 | 21 | #define PCI_CLASS_STORAGE_OTHER 0x0180 |
20 | 22 | ||
@@ -95,6 +97,7 @@ | |||
95 | 97 | ||
96 | #define PCI_BASE_CLASS_SERIAL 0x0c | 98 | #define PCI_BASE_CLASS_SERIAL 0x0c |
97 | #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 | 99 | #define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 |
100 | #define PCI_CLASS_SERIAL_FIREWIRE_OHCI 0x0c0010 | ||
98 | #define PCI_CLASS_SERIAL_ACCESS 0x0c01 | 101 | #define PCI_CLASS_SERIAL_ACCESS 0x0c01 |
99 | #define PCI_CLASS_SERIAL_SSA 0x0c02 | 102 | #define PCI_CLASS_SERIAL_SSA 0x0c02 |
100 | #define PCI_CLASS_SERIAL_USB 0x0c03 | 103 | #define PCI_CLASS_SERIAL_USB 0x0c03 |
@@ -366,6 +369,7 @@ | |||
366 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a | 369 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a |
367 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 | 370 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 |
368 | #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 | 371 | #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 |
372 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | ||
369 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 373 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
370 | 374 | ||
371 | #define PCI_VENDOR_ID_VLSI 0x1004 | 375 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -735,9 +739,11 @@ | |||
735 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 739 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
736 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 740 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
737 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | 741 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 |
742 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 | ||
738 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 | 743 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 |
739 | #define PCI_DEVICE_ID_TI_X515 0x8036 | 744 | #define PCI_DEVICE_ID_TI_X515 0x8036 |
740 | #define PCI_DEVICE_ID_TI_XX12 0x8039 | 745 | #define PCI_DEVICE_ID_TI_XX12 0x8039 |
746 | #define PCI_DEVICE_ID_TI_XX12_FM 0x803b | ||
741 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 747 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
742 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 748 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
743 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 749 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
@@ -765,6 +771,7 @@ | |||
765 | #define PCI_DEVICE_ID_TI_1510 0xac56 | 771 | #define PCI_DEVICE_ID_TI_1510 0xac56 |
766 | #define PCI_DEVICE_ID_TI_X620 0xac8d | 772 | #define PCI_DEVICE_ID_TI_X620 0xac8d |
767 | #define PCI_DEVICE_ID_TI_X420 0xac8e | 773 | #define PCI_DEVICE_ID_TI_X420 0xac8e |
774 | #define PCI_DEVICE_ID_TI_XX20_FM 0xac8f | ||
768 | 775 | ||
769 | #define PCI_VENDOR_ID_SONY 0x104d | 776 | #define PCI_VENDOR_ID_SONY 0x104d |
770 | 777 | ||
@@ -953,6 +960,7 @@ | |||
953 | #define PCI_DEVICE_ID_PLX_R753 0x1152 | 960 | #define PCI_DEVICE_ID_PLX_R753 0x1152 |
954 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 | 961 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 |
955 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 | 962 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 |
963 | #define PCI_DEVICE_ID_PLX_9030 0x9030 | ||
956 | #define PCI_DEVICE_ID_PLX_9050 0x9050 | 964 | #define PCI_DEVICE_ID_PLX_9050 0x9050 |
957 | #define PCI_DEVICE_ID_PLX_9080 0x9080 | 965 | #define PCI_DEVICE_ID_PLX_9080 0x9080 |
958 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 | 966 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 |
@@ -1451,6 +1459,7 @@ | |||
1451 | 1459 | ||
1452 | #define PCI_VENDOR_ID_TOSHIBA_2 0x102f | 1460 | #define PCI_VENDOR_ID_TOSHIBA_2 0x102f |
1453 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 | 1461 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 |
1462 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE 0x0105 | ||
1454 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 | 1463 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 |
1455 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 | 1464 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 |
1456 | 1465 | ||
@@ -1628,6 +1637,7 @@ | |||
1628 | #define PCI_VENDOR_ID_ITE 0x1283 | 1637 | #define PCI_VENDOR_ID_ITE 0x1283 |
1629 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | 1638 | #define PCI_DEVICE_ID_ITE_8211 0x8211 |
1630 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | 1639 | #define PCI_DEVICE_ID_ITE_8212 0x8212 |
1640 | #define PCI_DEVICE_ID_ITE_8213 0x8213 | ||
1631 | #define PCI_DEVICE_ID_ITE_8872 0x8872 | 1641 | #define PCI_DEVICE_ID_ITE_8872 0x8872 |
1632 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 | 1642 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 |
1633 | 1643 | ||
@@ -1688,6 +1698,8 @@ | |||
1688 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 | 1698 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 |
1689 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 | 1699 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 |
1690 | 1700 | ||
1701 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe | ||
1702 | #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 | ||
1691 | 1703 | ||
1692 | #define PCI_VENDOR_ID_SIIG 0x131f | 1704 | #define PCI_VENDOR_ID_SIIG 0x131f |
1693 | #define PCI_SUBVENDOR_ID_SIIG 0x131f | 1705 | #define PCI_SUBVENDOR_ID_SIIG 0x131f |
@@ -1803,6 +1815,9 @@ | |||
1803 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 | 1815 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 |
1804 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 | 1816 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 |
1805 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 | 1817 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 |
1818 | #define PCI_DEVICE_ID_MOXA_CP204J 0x2040 | ||
1819 | #define PCI_DEVICE_ID_MOXA_C218 0x2180 | ||
1820 | #define PCI_DEVICE_ID_MOXA_C320 0x3200 | ||
1806 | 1821 | ||
1807 | #define PCI_VENDOR_ID_CCD 0x1397 | 1822 | #define PCI_VENDOR_ID_CCD 0x1397 |
1808 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 | 1823 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 |
@@ -1971,6 +1986,7 @@ | |||
1971 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 | 1986 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 |
1972 | 1987 | ||
1973 | #define PCI_VENDOR_ID_ENE 0x1524 | 1988 | #define PCI_VENDOR_ID_ENE 0x1524 |
1989 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | ||
1974 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1990 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
1975 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1991 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
1976 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1992 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
@@ -1982,6 +1998,10 @@ | |||
1982 | 1998 | ||
1983 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 1999 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
1984 | 2000 | ||
2001 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | ||
2002 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | ||
2003 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | ||
2004 | |||
1985 | 2005 | ||
1986 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2006 | #define PCI_VENDOR_ID_SYBA 0x1592 |
1987 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2007 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
@@ -2066,6 +2086,11 @@ | |||
2066 | #define PCI_VENDOR_ID_TDI 0x192E | 2086 | #define PCI_VENDOR_ID_TDI 0x192E |
2067 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2087 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2068 | 2088 | ||
2089 | #define PCI_VENDOR_ID_PASEMI 0x1959 | ||
2090 | |||
2091 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | ||
2092 | #define PCI_DEVICE_ID_ATTANSIC_L1 0x1048 | ||
2093 | |||
2069 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2094 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2070 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2095 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
2071 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | 2096 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index 265bafab6494..d9db5f62ee48 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
@@ -251,7 +251,8 @@ struct sadb_x_sec_ctx { | |||
251 | #define SADB_X_SPDEXPIRE 21 | 251 | #define SADB_X_SPDEXPIRE 21 |
252 | #define SADB_X_SPDDELETE2 22 | 252 | #define SADB_X_SPDDELETE2 22 |
253 | #define SADB_X_NAT_T_NEW_MAPPING 23 | 253 | #define SADB_X_NAT_T_NEW_MAPPING 23 |
254 | #define SADB_MAX 23 | 254 | #define SADB_X_MIGRATE 24 |
255 | #define SADB_MAX 24 | ||
255 | 256 | ||
256 | /* Security Association flags */ | 257 | /* Security Association flags */ |
257 | #define SADB_SAFLAGS_PFS 1 | 258 | #define SADB_SAFLAGS_PFS 1 |
@@ -297,6 +298,7 @@ struct sadb_x_sec_ctx { | |||
297 | #define SADB_X_EALG_BLOWFISHCBC 7 | 298 | #define SADB_X_EALG_BLOWFISHCBC 7 |
298 | #define SADB_EALG_NULL 11 | 299 | #define SADB_EALG_NULL 11 |
299 | #define SADB_X_EALG_AESCBC 12 | 300 | #define SADB_X_EALG_AESCBC 12 |
301 | #define SADB_X_EALG_CAMELLIACBC 22 | ||
300 | #define SADB_EALG_MAX 253 /* last EALG */ | 302 | #define SADB_EALG_MAX 253 /* last EALG */ |
301 | /* private allocations should use 249-255 (RFC2407) */ | 303 | /* private allocations should use 249-255 (RFC2407) */ |
302 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ | 304 | #define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ |
diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h index a0e31adf3abe..4269de99e320 100644 --- a/include/linux/phonedev.h +++ b/include/linux/phonedev.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | struct phone_device { | 10 | struct phone_device { |
11 | struct phone_device *next; | 11 | struct phone_device *next; |
12 | struct file_operations *f_op; | 12 | const struct file_operations *f_op; |
13 | int (*open) (struct phone_device *, struct file *); | 13 | int (*open) (struct phone_device *, struct file *); |
14 | int board; /* Device private index */ | 14 | int board; /* Device private index */ |
15 | int minor; | 15 | int minor; |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 4dec047b1837..2ac27f9997dd 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -105,20 +105,6 @@ static inline pid_t pid_nr(struct pid *pid) | |||
105 | return nr; | 105 | return nr; |
106 | } | 106 | } |
107 | 107 | ||
108 | |||
109 | #define do_each_task_pid(who, type, task) \ | ||
110 | do { \ | ||
111 | struct hlist_node *pos___; \ | ||
112 | struct pid *pid___ = find_pid(who); \ | ||
113 | if (pid___ != NULL) \ | ||
114 | hlist_for_each_entry_rcu((task), pos___, \ | ||
115 | &pid___->tasks[type], pids[type].node) { | ||
116 | |||
117 | #define while_each_task_pid(who, type, task) \ | ||
118 | } \ | ||
119 | } while (0) | ||
120 | |||
121 | |||
122 | #define do_each_pid_task(pid, type, task) \ | 108 | #define do_each_pid_task(pid, type, task) \ |
123 | do { \ | 109 | do { \ |
124 | struct hlist_node *pos___; \ | 110 | struct hlist_node *pos___; \ |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index ab8a8dd8d64c..9a5226f0f169 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -352,6 +352,8 @@ struct pnp_protocol { | |||
352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) | 352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) |
353 | 353 | ||
354 | 354 | ||
355 | extern struct bus_type pnp_bus_type; | ||
356 | |||
355 | #if defined(CONFIG_PNP) | 357 | #if defined(CONFIG_PNP) |
356 | 358 | ||
357 | /* device management */ | 359 | /* device management */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 87dec8fe6de9..be4652a0545a 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -55,8 +55,8 @@ struct proc_dir_entry { | |||
55 | uid_t uid; | 55 | uid_t uid; |
56 | gid_t gid; | 56 | gid_t gid; |
57 | loff_t size; | 57 | loff_t size; |
58 | struct inode_operations * proc_iops; | 58 | const struct inode_operations *proc_iops; |
59 | const struct file_operations * proc_fops; | 59 | const struct file_operations *proc_fops; |
60 | get_info_t *get_info; | 60 | get_info_t *get_info; |
61 | struct module *owner; | 61 | struct module *owner; |
62 | struct proc_dir_entry *next, *parent, *subdir; | 62 | struct proc_dir_entry *next, *parent, *subdir; |
@@ -113,8 +113,6 @@ extern struct vfsmount *proc_mnt; | |||
113 | extern int proc_fill_super(struct super_block *,void *,int); | 113 | extern int proc_fill_super(struct super_block *,void *,int); |
114 | extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *); | 114 | extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *); |
115 | 115 | ||
116 | extern int proc_match(int, const char *,struct proc_dir_entry *); | ||
117 | |||
118 | /* | 116 | /* |
119 | * These are generic /proc routines that use the internal | 117 | * These are generic /proc routines that use the internal |
120 | * "struct proc_dir_entry" tree to traverse the filesystem. | 118 | * "struct proc_dir_entry" tree to traverse the filesystem. |
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index 0c7ac444fd35..19bc9b8b6191 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
@@ -116,8 +116,8 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock); | |||
116 | 116 | ||
117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); | 117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); |
118 | 118 | ||
119 | extern struct inode_operations qnx4_file_inode_operations; | 119 | extern const struct inode_operations qnx4_file_inode_operations; |
120 | extern struct inode_operations qnx4_dir_inode_operations; | 120 | extern const struct inode_operations qnx4_dir_inode_operations; |
121 | extern const struct file_operations qnx4_file_operations; | 121 | extern const struct file_operations qnx4_file_operations; |
122 | extern const struct file_operations qnx4_dir_operations; | 122 | extern const struct file_operations qnx4_dir_operations; |
123 | extern int qnx4_is_free(struct super_block *sb, long block); | 123 | extern int qnx4_is_free(struct super_block *sb, long block); |
diff --git a/include/linux/quota.h b/include/linux/quota.h index b8fbf26eb885..77db80a953d6 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -132,6 +132,7 @@ struct if_dqinfo { | |||
132 | 132 | ||
133 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | #include <linux/spinlock.h> | 134 | #include <linux/spinlock.h> |
135 | #include <linux/rwsem.h> | ||
135 | #include <linux/mutex.h> | 136 | #include <linux/mutex.h> |
136 | 137 | ||
137 | #include <linux/dqblk_xfs.h> | 138 | #include <linux/dqblk_xfs.h> |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index ebd42a3710b4..6db9a4c15355 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -247,6 +247,7 @@ struct bitmap { | |||
247 | 247 | ||
248 | atomic_t pending_writes; /* pending writes to the bitmap file */ | 248 | atomic_t pending_writes; /* pending writes to the bitmap file */ |
249 | wait_queue_head_t write_wait; | 249 | wait_queue_head_t write_wait; |
250 | wait_queue_head_t overflow_wait; | ||
250 | 251 | ||
251 | }; | 252 | }; |
252 | 253 | ||
diff --git a/include/linux/random.h b/include/linux/random.h index 01ad71033d65..36f125c0c603 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -63,7 +63,7 @@ extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, | |||
63 | __be16 sport, __be16 dport); | 63 | __be16 sport, __be16 dport); |
64 | 64 | ||
65 | #ifndef MODULE | 65 | #ifndef MODULE |
66 | extern struct file_operations random_fops, urandom_fops; | 66 | extern const struct file_operations random_fops, urandom_fops; |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | unsigned int get_random_int(void); | 69 | unsigned int get_random_int(void); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c3fc6caaad3f..965d5b3ea9eb 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1949,9 +1949,9 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset, | |||
1949 | #endif | 1949 | #endif |
1950 | 1950 | ||
1951 | /* dir.c */ | 1951 | /* dir.c */ |
1952 | extern struct inode_operations reiserfs_dir_inode_operations; | 1952 | extern const struct inode_operations reiserfs_dir_inode_operations; |
1953 | extern struct inode_operations reiserfs_symlink_inode_operations; | 1953 | extern const struct inode_operations reiserfs_symlink_inode_operations; |
1954 | extern struct inode_operations reiserfs_special_inode_operations; | 1954 | extern const struct inode_operations reiserfs_special_inode_operations; |
1955 | extern const struct file_operations reiserfs_dir_operations; | 1955 | extern const struct file_operations reiserfs_dir_operations; |
1956 | 1956 | ||
1957 | /* tail_conversion.c */ | 1957 | /* tail_conversion.c */ |
@@ -1963,7 +1963,7 @@ int indirect2direct(struct reiserfs_transaction_handle *, struct inode *, | |||
1963 | void reiserfs_unmap_buffer(struct buffer_head *); | 1963 | void reiserfs_unmap_buffer(struct buffer_head *); |
1964 | 1964 | ||
1965 | /* file.c */ | 1965 | /* file.c */ |
1966 | extern struct inode_operations reiserfs_file_inode_operations; | 1966 | extern const struct inode_operations reiserfs_file_inode_operations; |
1967 | extern const struct file_operations reiserfs_file_operations; | 1967 | extern const struct file_operations reiserfs_file_operations; |
1968 | extern const struct address_space_operations reiserfs_address_space_operations; | 1968 | extern const struct address_space_operations reiserfs_address_space_operations; |
1969 | 1969 | ||
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 966c35851b2e..66a96814d614 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -2,7 +2,10 @@ | |||
2 | File: linux/reiserfs_xattr.h | 2 | File: linux/reiserfs_xattr.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/xattr.h> | 5 | #ifndef _LINUX_REISERFS_XATTR_H |
6 | #define _LINUX_REISERFS_XATTR_H | ||
7 | |||
8 | #include <linux/types.h> | ||
6 | 9 | ||
7 | /* Magic value in header */ | 10 | /* Magic value in header */ |
8 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ | 11 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ |
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header { | |||
13 | }; | 16 | }; |
14 | 17 | ||
15 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | |||
16 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/list.h> | ||
22 | #include <linux/rwsem.h> | ||
23 | #include <linux/reiserfs_fs_i.h> | ||
24 | #include <linux/reiserfs_fs.h> | ||
25 | |||
26 | struct inode; | ||
27 | struct dentry; | ||
28 | struct iattr; | ||
29 | struct super_block; | ||
30 | struct nameidata; | ||
17 | 31 | ||
18 | struct reiserfs_xattr_handler { | 32 | struct reiserfs_xattr_handler { |
19 | char *prefix; | 33 | char *prefix; |
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); | |||
49 | 63 | ||
50 | extern struct reiserfs_xattr_handler user_handler; | 64 | extern struct reiserfs_xattr_handler user_handler; |
51 | extern struct reiserfs_xattr_handler trusted_handler; | 65 | extern struct reiserfs_xattr_handler trusted_handler; |
52 | #ifdef CONFIG_REISERFS_FS_SECURITY | ||
53 | extern struct reiserfs_xattr_handler security_handler; | 66 | extern struct reiserfs_xattr_handler security_handler; |
54 | #endif | ||
55 | 67 | ||
56 | int reiserfs_xattr_register_handlers(void) __init; | 68 | int reiserfs_xattr_register_handlers(void) __init; |
57 | void reiserfs_xattr_unregister_handlers(void); | 69 | void reiserfs_xattr_unregister_handlers(void); |
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) | |||
137 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | 149 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) |
138 | { | 150 | { |
139 | } | 151 | } |
140 | #endif | 152 | #endif /* CONFIG_REISERFS_FS_XATTR */ |
153 | |||
154 | #endif /* __KERNEL__ */ | ||
141 | 155 | ||
142 | #endif /* __KERNEL__ */ | 156 | #endif /* _LINUX_REISERFS_XATTR_H */ |
diff --git a/include/linux/relay.h b/include/linux/relay.h index c6a48bfc8b14..759a0f97bec2 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* | 24 | /* |
25 | * Tracks changes to rchan/rchan_buf structs | 25 | * Tracks changes to rchan/rchan_buf structs |
26 | */ | 26 | */ |
27 | #define RELAYFS_CHANNEL_VERSION 6 | 27 | #define RELAYFS_CHANNEL_VERSION 7 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Per-cpu relay channel buffer | 30 | * Per-cpu relay channel buffer |
@@ -64,6 +64,10 @@ struct rchan | |||
64 | void *private_data; /* for user-defined data */ | 64 | void *private_data; /* for user-defined data */ |
65 | size_t last_toobig; /* tried to log event > subbuf size */ | 65 | size_t last_toobig; /* tried to log event > subbuf size */ |
66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
67 | int is_global; /* One global buffer ? */ | ||
68 | struct list_head list; /* for channel list */ | ||
69 | struct dentry *parent; /* parent dentry passed to open */ | ||
70 | char base_filename[NAME_MAX]; /* saved base filename */ | ||
67 | }; | 71 | }; |
68 | 72 | ||
69 | /* | 73 | /* |
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename, | |||
162 | struct dentry *parent, | 166 | struct dentry *parent, |
163 | size_t subbuf_size, | 167 | size_t subbuf_size, |
164 | size_t n_subbufs, | 168 | size_t n_subbufs, |
165 | struct rchan_callbacks *cb); | 169 | struct rchan_callbacks *cb, |
170 | void *private_data); | ||
166 | extern void relay_close(struct rchan *chan); | 171 | extern void relay_close(struct rchan *chan); |
167 | extern void relay_flush(struct rchan *chan); | 172 | extern void relay_flush(struct rchan *chan); |
168 | extern void relay_subbufs_consumed(struct rchan *chan, | 173 | extern void relay_subbufs_consumed(struct rchan *chan, |
diff --git a/include/linux/rio.h b/include/linux/rio.h index d93857056cb9..68e3f6853fa6 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define RIO_ANY_DESTID 0xff | 26 | #define RIO_ANY_DESTID 0xff |
27 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
28 | #define RIO_INVALID_DESTID 0xffff | ||
28 | 29 | ||
29 | #define RIO_MAX_MPORT_RESOURCES 16 | 30 | #define RIO_MAX_MPORT_RESOURCES 16 |
30 | #define RIO_MAX_DEV_RESOURCES 16 | 31 | #define RIO_MAX_DEV_RESOURCES 16 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 446373535190..5053dc01fad4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -436,7 +436,7 @@ struct signal_struct { | |||
436 | 436 | ||
437 | /* job control IDs */ | 437 | /* job control IDs */ |
438 | pid_t pgrp; | 438 | pid_t pgrp; |
439 | pid_t tty_old_pgrp; | 439 | struct pid *tty_old_pgrp; |
440 | 440 | ||
441 | union { | 441 | union { |
442 | pid_t session __deprecated; | 442 | pid_t session __deprecated; |
@@ -1013,8 +1013,10 @@ struct task_struct { | |||
1013 | * to a stack based synchronous wait) if its doing sync IO. | 1013 | * to a stack based synchronous wait) if its doing sync IO. |
1014 | */ | 1014 | */ |
1015 | wait_queue_t *io_wait; | 1015 | wait_queue_t *io_wait; |
1016 | #ifdef CONFIG_TASK_XACCT | ||
1016 | /* i/o counters(bytes read/written, #syscalls */ | 1017 | /* i/o counters(bytes read/written, #syscalls */ |
1017 | u64 rchar, wchar, syscr, syscw; | 1018 | u64 rchar, wchar, syscr, syscw; |
1019 | #endif | ||
1018 | struct task_io_accounting ioac; | 1020 | struct task_io_accounting ioac; |
1019 | #if defined(CONFIG_TASK_XACCT) | 1021 | #if defined(CONFIG_TASK_XACCT) |
1020 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1022 | u64 acct_rss_mem1; /* accumulated rss usage */ |
@@ -1327,14 +1329,11 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | |||
1327 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); | 1329 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); |
1328 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 1330 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
1329 | extern int kill_pid(struct pid *pid, int sig, int priv); | 1331 | extern int kill_pid(struct pid *pid, int sig, int priv); |
1330 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | ||
1331 | extern int kill_pg_info(int, struct siginfo *, pid_t); | ||
1332 | extern void do_notify_parent(struct task_struct *, int); | 1332 | extern void do_notify_parent(struct task_struct *, int); |
1333 | extern void force_sig(int, struct task_struct *); | 1333 | extern void force_sig(int, struct task_struct *); |
1334 | extern void force_sig_specific(int, struct task_struct *); | 1334 | extern void force_sig_specific(int, struct task_struct *); |
1335 | extern int send_sig(int, struct task_struct *, int); | 1335 | extern int send_sig(int, struct task_struct *, int); |
1336 | extern void zap_other_threads(struct task_struct *p); | 1336 | extern void zap_other_threads(struct task_struct *p); |
1337 | extern int kill_pg(pid_t, int, int); | ||
1338 | extern int kill_proc(pid_t, int, int); | 1337 | extern int kill_proc(pid_t, int, int); |
1339 | extern struct sigqueue *sigqueue_alloc(void); | 1338 | extern struct sigqueue *sigqueue_alloc(void); |
1340 | extern void sigqueue_free(struct sigqueue *); | 1339 | extern void sigqueue_free(struct sigqueue *); |
@@ -1649,6 +1648,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | |||
1649 | 1648 | ||
1650 | extern void normalize_rt_tasks(void); | 1649 | extern void normalize_rt_tasks(void); |
1651 | 1650 | ||
1651 | #ifdef CONFIG_TASK_XACCT | ||
1652 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1653 | { | ||
1654 | tsk->rchar += amt; | ||
1655 | } | ||
1656 | |||
1657 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1658 | { | ||
1659 | tsk->wchar += amt; | ||
1660 | } | ||
1661 | |||
1662 | static inline void inc_syscr(struct task_struct *tsk) | ||
1663 | { | ||
1664 | tsk->syscr++; | ||
1665 | } | ||
1666 | |||
1667 | static inline void inc_syscw(struct task_struct *tsk) | ||
1668 | { | ||
1669 | tsk->syscw++; | ||
1670 | } | ||
1671 | #else | ||
1672 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1673 | { | ||
1674 | } | ||
1675 | |||
1676 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1677 | { | ||
1678 | } | ||
1679 | |||
1680 | static inline void inc_syscr(struct task_struct *tsk) | ||
1681 | { | ||
1682 | } | ||
1683 | |||
1684 | static inline void inc_syscw(struct task_struct *tsk) | ||
1685 | { | ||
1686 | } | ||
1687 | #endif | ||
1688 | |||
1652 | #endif /* __KERNEL__ */ | 1689 | #endif /* __KERNEL__ */ |
1653 | 1690 | ||
1654 | #endif | 1691 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 83cdefae9931..7f88d97575fd 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -492,7 +492,7 @@ struct request_sock; | |||
492 | * Note that the fown_struct, @fown, is never outside the context of a | 492 | * Note that the fown_struct, @fown, is never outside the context of a |
493 | * struct file, so the file structure (and associated security information) | 493 | * struct file, so the file structure (and associated security information) |
494 | * can always be obtained: | 494 | * can always be obtained: |
495 | * (struct file *)((long)fown - offsetof(struct file,f_owner)); | 495 | * container_of(fown, struct file, f_owner) |
496 | * @tsk contains the structure of task receiving signal. | 496 | * @tsk contains the structure of task receiving signal. |
497 | * @fown contains the file owner information. | 497 | * @fown contains the file owner information. |
498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. | 498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. |
@@ -2130,7 +2130,7 @@ extern int mod_reg_security (const char *name, struct security_operations *ops); | |||
2130 | extern int mod_unreg_security (const char *name, struct security_operations *ops); | 2130 | extern int mod_unreg_security (const char *name, struct security_operations *ops); |
2131 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, | 2131 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, |
2132 | struct dentry *parent, void *data, | 2132 | struct dentry *parent, void *data, |
2133 | struct file_operations *fops); | 2133 | const struct file_operations *fops); |
2134 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); | 2134 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); |
2135 | extern void securityfs_remove(struct dentry *dentry); | 2135 | extern void securityfs_remove(struct dentry *dentry); |
2136 | 2136 | ||
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 6b0648cfdffc..52c9eb9b6df2 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_SEQLOCK_H | 2 | #define __LINUX_SEQLOCK_H |
3 | /* | 3 | /* |
4 | * Reader/writer consistent mechanism without starving writers. This type of | 4 | * Reader/writer consistent mechanism without starving writers. This type of |
5 | * lock for data where the reader wants a consitent set of information | 5 | * lock for data where the reader wants a consistent set of information |
6 | * and is willing to retry if the information changes. Readers never | 6 | * and is willing to retry if the information changes. Readers never |
7 | * block but they may have to retry if a writer is in | 7 | * block but they may have to retry if a writer is in |
8 | * progress. Writers do not wait for readers. | 8 | * progress. Writers do not wait for readers. |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cf23813cbec2..586aaba91720 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -122,7 +122,7 @@ | |||
122 | /*Digi jsm */ | 122 | /*Digi jsm */ |
123 | #define PORT_JSM 69 | 123 | #define PORT_JSM 69 |
124 | 124 | ||
125 | #define PORT_IP3106 70 | 125 | #define PORT_PNX8XXX 70 |
126 | 126 | ||
127 | /* Hilscher netx */ | 127 | /* Hilscher netx */ |
128 | #define PORT_NETX 71 | 128 | #define PORT_NETX 71 |
diff --git a/include/linux/serial_ip3106.h b/include/linux/serial_ip3106.h deleted file mode 100644 index f500ac602c5c..000000000000 --- a/include/linux/serial_ip3106.h +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Embedded Alley Solutions, source@embeddedalley.com. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef _LINUX_SERIAL_IP3106_H | ||
20 | #define _LINUX_SERIAL_IP3106_H | ||
21 | |||
22 | #include <linux/serial_core.h> | ||
23 | #include <linux/device.h> | ||
24 | |||
25 | #define IP3106_NR_PORTS 2 | ||
26 | |||
27 | struct ip3106_port { | ||
28 | struct uart_port port; | ||
29 | struct timer_list timer; | ||
30 | unsigned int old_status; | ||
31 | }; | ||
32 | |||
33 | /* register offsets */ | ||
34 | #define IP3106_LCR 0 | ||
35 | #define IP3106_MCR 0x004 | ||
36 | #define IP3106_BAUD 0x008 | ||
37 | #define IP3106_CFG 0x00c | ||
38 | #define IP3106_FIFO 0x028 | ||
39 | #define IP3106_ISTAT 0xfe0 | ||
40 | #define IP3106_IEN 0xfe4 | ||
41 | #define IP3106_ICLR 0xfe8 | ||
42 | #define IP3106_ISET 0xfec | ||
43 | #define IP3106_PD 0xff4 | ||
44 | #define IP3106_MID 0xffc | ||
45 | |||
46 | #define IP3106_UART_LCR_TXBREAK (1<<30) | ||
47 | #define IP3106_UART_LCR_PAREVN 0x10000000 | ||
48 | #define IP3106_UART_LCR_PAREN 0x08000000 | ||
49 | #define IP3106_UART_LCR_2STOPB 0x04000000 | ||
50 | #define IP3106_UART_LCR_8BIT 0x01000000 | ||
51 | #define IP3106_UART_LCR_TX_RST 0x00040000 | ||
52 | #define IP3106_UART_LCR_RX_RST 0x00020000 | ||
53 | #define IP3106_UART_LCR_RX_NEXT 0x00010000 | ||
54 | |||
55 | #define IP3106_UART_MCR_SCR 0xFF000000 | ||
56 | #define IP3106_UART_MCR_DCD 0x00800000 | ||
57 | #define IP3106_UART_MCR_CTS 0x00100000 | ||
58 | #define IP3106_UART_MCR_LOOP 0x00000010 | ||
59 | #define IP3106_UART_MCR_RTS 0x00000002 | ||
60 | #define IP3106_UART_MCR_DTR 0x00000001 | ||
61 | |||
62 | #define IP3106_UART_INT_TX 0x00000080 | ||
63 | #define IP3106_UART_INT_EMPTY 0x00000040 | ||
64 | #define IP3106_UART_INT_RCVTO 0x00000020 | ||
65 | #define IP3106_UART_INT_RX 0x00000010 | ||
66 | #define IP3106_UART_INT_RXOVRN 0x00000008 | ||
67 | #define IP3106_UART_INT_FRERR 0x00000004 | ||
68 | #define IP3106_UART_INT_BREAK 0x00000002 | ||
69 | #define IP3106_UART_INT_PARITY 0x00000001 | ||
70 | #define IP3106_UART_INT_ALLRX 0x0000003F | ||
71 | #define IP3106_UART_INT_ALLTX 0x000000C0 | ||
72 | |||
73 | #define IP3106_UART_FIFO_TXFIFO 0x001F0000 | ||
74 | #define IP3106_UART_FIFO_TXFIFO_STA (0x1f<<16) | ||
75 | #define IP3106_UART_FIFO_RXBRK 0x00008000 | ||
76 | #define IP3106_UART_FIFO_RXFE 0x00004000 | ||
77 | #define IP3106_UART_FIFO_RXPAR 0x00002000 | ||
78 | #define IP3106_UART_FIFO_RXFIFO 0x00001F00 | ||
79 | #define IP3106_UART_FIFO_RBRTHR 0x000000FF | ||
80 | |||
81 | #endif | ||
diff --git a/include/linux/serial_pnx8xxx.h b/include/linux/serial_pnx8xxx.h new file mode 100644 index 000000000000..de6c19c7f340 --- /dev/null +++ b/include/linux/serial_pnx8xxx.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Embedded Alley Solutions, source@embeddedalley.com. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef _LINUX_SERIAL_PNX8XXX_H | ||
20 | #define _LINUX_SERIAL_PNX8XXX_H | ||
21 | |||
22 | #include <linux/serial_core.h> | ||
23 | #include <linux/device.h> | ||
24 | |||
25 | #define PNX8XXX_NR_PORTS 2 | ||
26 | |||
27 | struct pnx8xxx_port { | ||
28 | struct uart_port port; | ||
29 | struct timer_list timer; | ||
30 | unsigned int old_status; | ||
31 | }; | ||
32 | |||
33 | /* register offsets */ | ||
34 | #define PNX8XXX_LCR 0 | ||
35 | #define PNX8XXX_MCR 0x004 | ||
36 | #define PNX8XXX_BAUD 0x008 | ||
37 | #define PNX8XXX_CFG 0x00c | ||
38 | #define PNX8XXX_FIFO 0x028 | ||
39 | #define PNX8XXX_ISTAT 0xfe0 | ||
40 | #define PNX8XXX_IEN 0xfe4 | ||
41 | #define PNX8XXX_ICLR 0xfe8 | ||
42 | #define PNX8XXX_ISET 0xfec | ||
43 | #define PNX8XXX_PD 0xff4 | ||
44 | #define PNX8XXX_MID 0xffc | ||
45 | |||
46 | #define PNX8XXX_UART_LCR_TXBREAK (1<<30) | ||
47 | #define PNX8XXX_UART_LCR_PAREVN 0x10000000 | ||
48 | #define PNX8XXX_UART_LCR_PAREN 0x08000000 | ||
49 | #define PNX8XXX_UART_LCR_2STOPB 0x04000000 | ||
50 | #define PNX8XXX_UART_LCR_8BIT 0x01000000 | ||
51 | #define PNX8XXX_UART_LCR_TX_RST 0x00040000 | ||
52 | #define PNX8XXX_UART_LCR_RX_RST 0x00020000 | ||
53 | #define PNX8XXX_UART_LCR_RX_NEXT 0x00010000 | ||
54 | |||
55 | #define PNX8XXX_UART_MCR_SCR 0xFF000000 | ||
56 | #define PNX8XXX_UART_MCR_DCD 0x00800000 | ||
57 | #define PNX8XXX_UART_MCR_CTS 0x00100000 | ||
58 | #define PNX8XXX_UART_MCR_LOOP 0x00000010 | ||
59 | #define PNX8XXX_UART_MCR_RTS 0x00000002 | ||
60 | #define PNX8XXX_UART_MCR_DTR 0x00000001 | ||
61 | |||
62 | #define PNX8XXX_UART_INT_TX 0x00000080 | ||
63 | #define PNX8XXX_UART_INT_EMPTY 0x00000040 | ||
64 | #define PNX8XXX_UART_INT_RCVTO 0x00000020 | ||
65 | #define PNX8XXX_UART_INT_RX 0x00000010 | ||
66 | #define PNX8XXX_UART_INT_RXOVRN 0x00000008 | ||
67 | #define PNX8XXX_UART_INT_FRERR 0x00000004 | ||
68 | #define PNX8XXX_UART_INT_BREAK 0x00000002 | ||
69 | #define PNX8XXX_UART_INT_PARITY 0x00000001 | ||
70 | #define PNX8XXX_UART_INT_ALLRX 0x0000003F | ||
71 | #define PNX8XXX_UART_INT_ALLTX 0x000000C0 | ||
72 | |||
73 | #define PNX8XXX_UART_FIFO_TXFIFO 0x001F0000 | ||
74 | #define PNX8XXX_UART_FIFO_TXFIFO_STA (0x1f<<16) | ||
75 | #define PNX8XXX_UART_FIFO_RXBRK 0x00008000 | ||
76 | #define PNX8XXX_UART_FIFO_RXFE 0x00004000 | ||
77 | #define PNX8XXX_UART_FIFO_RXPAR 0x00002000 | ||
78 | #define PNX8XXX_UART_FIFO_RXFIFO 0x00001F00 | ||
79 | #define PNX8XXX_UART_FIFO_RBRTHR 0x000000FF | ||
80 | |||
81 | #endif | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index 0f478a8791a2..1ebf0455e224 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -86,6 +86,11 @@ static inline void serio_register_port(struct serio *serio) | |||
86 | void serio_unregister_port(struct serio *serio); | 86 | void serio_unregister_port(struct serio *serio); |
87 | void serio_unregister_child_port(struct serio *serio); | 87 | void serio_unregister_child_port(struct serio *serio); |
88 | 88 | ||
89 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name); | ||
90 | static inline int serio_register_driver(struct serio_driver *drv) | ||
91 | { | ||
92 | return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | ||
93 | } | ||
89 | int serio_register_driver(struct serio_driver *drv); | 94 | int serio_register_driver(struct serio_driver *drv); |
90 | void serio_unregister_driver(struct serio_driver *drv); | 95 | void serio_unregister_driver(struct serio_driver *drv); |
91 | 96 | ||
@@ -103,12 +108,6 @@ static inline void serio_drv_write_wakeup(struct serio *serio) | |||
103 | serio->drv->write_wakeup(serio); | 108 | serio->drv->write_wakeup(serio); |
104 | } | 109 | } |
105 | 110 | ||
106 | static inline void serio_cleanup(struct serio *serio) | ||
107 | { | ||
108 | if (serio->drv && serio->drv->cleanup) | ||
109 | serio->drv->cleanup(serio); | ||
110 | } | ||
111 | |||
112 | /* | 111 | /* |
113 | * Use the following functions to manipulate serio's per-port | 112 | * Use the following functions to manipulate serio's per-port |
114 | * driver-specific data. | 113 | * driver-specific data. |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 4b463e66ddea..5e4364644ed1 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -19,7 +19,9 @@ | |||
19 | struct cache_sizes { | 19 | struct cache_sizes { |
20 | size_t cs_size; | 20 | size_t cs_size; |
21 | struct kmem_cache *cs_cachep; | 21 | struct kmem_cache *cs_cachep; |
22 | #ifdef CONFIG_ZONE_DMA | ||
22 | struct kmem_cache *cs_dmacachep; | 23 | struct kmem_cache *cs_dmacachep; |
24 | #endif | ||
23 | }; | 25 | }; |
24 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
25 | 27 | ||
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
39 | __you_cannot_kmalloc_that_much(); | 41 | __you_cannot_kmalloc_that_much(); |
40 | } | 42 | } |
41 | found: | 43 | found: |
42 | return kmem_cache_alloc((flags & GFP_DMA) ? | 44 | #ifdef CONFIG_ZONE_DMA |
43 | malloc_sizes[i].cs_dmacachep : | 45 | if (flags & GFP_DMA) |
44 | malloc_sizes[i].cs_cachep, flags); | 46 | return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep, |
47 | flags); | ||
48 | #endif | ||
49 | return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags); | ||
45 | } | 50 | } |
46 | return __kmalloc(size, flags); | 51 | return __kmalloc(size, flags); |
47 | } | 52 | } |
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
62 | __you_cannot_kzalloc_that_much(); | 67 | __you_cannot_kzalloc_that_much(); |
63 | } | 68 | } |
64 | found: | 69 | found: |
65 | return kmem_cache_zalloc((flags & GFP_DMA) ? | 70 | #ifdef CONFIG_ZONE_DMA |
66 | malloc_sizes[i].cs_dmacachep : | 71 | if (flags & GFP_DMA) |
67 | malloc_sizes[i].cs_cachep, flags); | 72 | return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep, |
73 | flags); | ||
74 | #endif | ||
75 | return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags); | ||
68 | } | 76 | } |
69 | return __kzalloc(size, flags); | 77 | return __kzalloc(size, flags); |
70 | } | 78 | } |
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
88 | __you_cannot_kmalloc_that_much(); | 96 | __you_cannot_kmalloc_that_much(); |
89 | } | 97 | } |
90 | found: | 98 | found: |
91 | return kmem_cache_alloc_node((flags & GFP_DMA) ? | 99 | #ifdef CONFIG_ZONE_DMA |
92 | malloc_sizes[i].cs_dmacachep : | 100 | if (flags & GFP_DMA) |
93 | malloc_sizes[i].cs_cachep, flags, node); | 101 | return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep, |
102 | flags, node); | ||
103 | #endif | ||
104 | return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep, | ||
105 | flags, node); | ||
94 | } | 106 | } |
95 | return __kmalloc_node(size, flags, node); | 107 | return __kmalloc_node(size, flags, node); |
96 | } | 108 | } |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 92cd38efad7f..28157a36e6cc 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
18 | 18 | ||
19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
20 | 20 | ||
21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
@@ -187,7 +187,8 @@ struct ucred { | |||
187 | #define AF_LLC 26 /* Linux LLC */ | 187 | #define AF_LLC 26 /* Linux LLC */ |
188 | #define AF_TIPC 30 /* TIPC sockets */ | 188 | #define AF_TIPC 30 /* TIPC sockets */ |
189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ | 189 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ |
190 | #define AF_MAX 32 /* For now.. */ | 190 | #define AF_IUCV 32 /* IUCV sockets */ |
191 | #define AF_MAX 33 /* For now.. */ | ||
191 | 192 | ||
192 | /* Protocol families, same as address families. */ | 193 | /* Protocol families, same as address families. */ |
193 | #define PF_UNSPEC AF_UNSPEC | 194 | #define PF_UNSPEC AF_UNSPEC |
@@ -220,6 +221,7 @@ struct ucred { | |||
220 | #define PF_LLC AF_LLC | 221 | #define PF_LLC AF_LLC |
221 | #define PF_TIPC AF_TIPC | 222 | #define PF_TIPC AF_TIPC |
222 | #define PF_BLUETOOTH AF_BLUETOOTH | 223 | #define PF_BLUETOOTH AF_BLUETOOTH |
224 | #define PF_IUCV AF_IUCV | ||
223 | #define PF_MAX AF_MAX | 225 | #define PF_MAX AF_MAX |
224 | 226 | ||
225 | /* Maximum queue length specifiable by listen. */ | 227 | /* Maximum queue length specifiable by listen. */ |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index adb3dafd33e9..3387e44dfd13 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -5,9 +5,17 @@ | |||
5 | * | 5 | * |
6 | * It's OK if the min/max values are zero. | 6 | * It's OK if the min/max values are zero. |
7 | */ | 7 | */ |
8 | enum ads7846_filter { | ||
9 | ADS7846_FILTER_OK, | ||
10 | ADS7846_FILTER_REPEAT, | ||
11 | ADS7846_FILTER_IGNORE, | ||
12 | }; | ||
13 | |||
8 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
9 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846. */ |
10 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
17 | int keep_vref_on:1; /* set to keep vref on for differential | ||
18 | * measurements as well */ | ||
11 | u16 x_plate_ohms; | 19 | u16 x_plate_ohms; |
12 | u16 y_plate_ohms; | 20 | u16 y_plate_ohms; |
13 | 21 | ||
@@ -21,5 +29,9 @@ struct ads7846_platform_data { | |||
21 | u16 debounce_rep; /* additional consecutive good readings | 29 | u16 debounce_rep; /* additional consecutive good readings |
22 | * required after the first two */ | 30 | * required after the first two */ |
23 | int (*get_pendown_state)(void); | 31 | int (*get_pendown_state)(void); |
32 | int (*filter_init) (struct ads7846_platform_data *pdata, | ||
33 | void **filter_data); | ||
34 | int (*filter) (void *filter_data, int data_idx, int *val); | ||
35 | void (*filter_cleanup)(void *filter_data); | ||
24 | }; | 36 | }; |
25 | 37 | ||
diff --git a/include/linux/spi/eeprom.h b/include/linux/spi/eeprom.h new file mode 100644 index 000000000000..1085212c446e --- /dev/null +++ b/include/linux/spi/eeprom.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef __LINUX_SPI_EEPROM_H | ||
2 | #define __LINUX_SPI_EEPROM_H | ||
3 | |||
4 | /* | ||
5 | * Put one of these structures in platform_data for SPI EEPROMS handled | ||
6 | * by the "at25" driver. On SPI, most EEPROMS understand the same core | ||
7 | * command set. If you need to support EEPROMs that don't yet fit, add | ||
8 | * flags to support those protocol options. These values all come from | ||
9 | * the chip datasheets. | ||
10 | */ | ||
11 | struct spi_eeprom { | ||
12 | u32 byte_len; | ||
13 | char name[10]; | ||
14 | u16 page_size; /* for writes */ | ||
15 | u16 flags; | ||
16 | #define EE_ADDR1 0x0001 /* 8 bit addrs */ | ||
17 | #define EE_ADDR2 0x0002 /* 16 bit addrs */ | ||
18 | #define EE_ADDR3 0x0004 /* 24 bit addrs */ | ||
19 | #define EE_READONLY 0x0008 /* disallow writes */ | ||
20 | }; | ||
21 | |||
22 | #endif /* __LINUX_SPI_EEPROM_H */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 176f6e36dbfa..4f0f8c2e58a5 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struct spi_device *spi, void *state) | |||
114 | spi->controller_state = state; | 114 | spi->controller_state = state; |
115 | } | 115 | } |
116 | 116 | ||
117 | /* device driver data */ | ||
118 | |||
119 | static inline void spi_set_drvdata(struct spi_device *spi, void *data) | ||
120 | { | ||
121 | dev_set_drvdata(&spi->dev, data); | ||
122 | } | ||
123 | |||
124 | static inline void *spi_get_drvdata(struct spi_device *spi) | ||
125 | { | ||
126 | return dev_get_drvdata(&spi->dev); | ||
127 | } | ||
117 | 128 | ||
118 | struct spi_message; | 129 | struct spi_message; |
119 | 130 | ||
@@ -137,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv); | |||
137 | 148 | ||
138 | static inline void spi_unregister_driver(struct spi_driver *sdrv) | 149 | static inline void spi_unregister_driver(struct spi_driver *sdrv) |
139 | { | 150 | { |
140 | if (!sdrv) | 151 | if (sdrv) |
141 | return; | 152 | driver_unregister(&sdrv->driver); |
142 | driver_unregister(&sdrv->driver); | ||
143 | } | 153 | } |
144 | 154 | ||
145 | 155 | ||
146 | |||
147 | /** | 156 | /** |
148 | * struct spi_master - interface to SPI master controller | 157 | * struct spi_master - interface to SPI master controller |
149 | * @cdev: class interface to this driver | 158 | * @cdev: class interface to this driver |
@@ -154,7 +163,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
154 | * each slave has a chipselect signal, but it's common that not | 163 | * each slave has a chipselect signal, but it's common that not |
155 | * every chipselect is connected to a slave. | 164 | * every chipselect is connected to a slave. |
156 | * @setup: updates the device mode and clocking records used by a | 165 | * @setup: updates the device mode and clocking records used by a |
157 | * device's SPI controller; protocol code may call this. | 166 | * device's SPI controller; protocol code may call this. This |
167 | * must fail if an unrecognized or unsupported mode is requested. | ||
158 | * @transfer: adds a message to the controller's transfer queue. | 168 | * @transfer: adds a message to the controller's transfer queue. |
159 | * @cleanup: frees controller-specific state | 169 | * @cleanup: frees controller-specific state |
160 | * | 170 | * |
@@ -211,7 +221,7 @@ struct spi_master { | |||
211 | struct spi_message *mesg); | 221 | struct spi_message *mesg); |
212 | 222 | ||
213 | /* called on release() to free memory provided by spi_master */ | 223 | /* called on release() to free memory provided by spi_master */ |
214 | void (*cleanup)(const struct spi_device *spi); | 224 | void (*cleanup)(struct spi_device *spi); |
215 | }; | 225 | }; |
216 | 226 | ||
217 | static inline void *spi_master_get_devdata(struct spi_master *master) | 227 | static inline void *spi_master_get_devdata(struct spi_master *master) |
@@ -296,6 +306,16 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); | |||
296 | * shifting out three bytes with word size of sixteen or twenty bits; | 306 | * shifting out three bytes with word size of sixteen or twenty bits; |
297 | * the former uses two bytes per word, the latter uses four bytes.) | 307 | * the former uses two bytes per word, the latter uses four bytes.) |
298 | * | 308 | * |
309 | * In-memory data values are always in native CPU byte order, translated | ||
310 | * from the wire byte order (big-endian except with SPI_LSB_FIRST). So | ||
311 | * for example when bits_per_word is sixteen, buffers are 2N bytes long | ||
312 | * and hold N sixteen bit words in CPU byte order. | ||
313 | * | ||
314 | * When the word size of the SPI transfer is not a power-of-two multiple | ||
315 | * of eight bits, those in-memory words include extra bits. In-memory | ||
316 | * words are always seen by protocol drivers as right-justified, so the | ||
317 | * undefined (rx) or unused (tx) bits are always the most significant bits. | ||
318 | * | ||
299 | * All SPI transfers start with the relevant chipselect active. Normally | 319 | * All SPI transfers start with the relevant chipselect active. Normally |
300 | * it stays selected until after the last transfer in a message. Drivers | 320 | * it stays selected until after the last transfer in a message. Drivers |
301 | * can affect the chipselect signal using cs_change: | 321 | * can affect the chipselect signal using cs_change: |
@@ -453,6 +473,11 @@ static inline void spi_message_free(struct spi_message *m) | |||
453 | * changes those settings, and must be called from a context that can sleep. | 473 | * changes those settings, and must be called from a context that can sleep. |
454 | * The changes take effect the next time the device is selected and data | 474 | * The changes take effect the next time the device is selected and data |
455 | * is transferred to or from it. | 475 | * is transferred to or from it. |
476 | * | ||
477 | * Note that this call wil fail if the protocol driver specifies an option | ||
478 | * that the underlying controller or its driver does not support. For | ||
479 | * example, not all hardware supports wire transfers using nine bit words, | ||
480 | * LSB-first wire encoding, or active-high chipselects. | ||
456 | */ | 481 | */ |
457 | static inline int | 482 | static inline int |
458 | spi_setup(struct spi_device *spi) | 483 | spi_setup(struct spi_device *spi) |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 16ce178f54d7..2e8c048b9b80 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
@@ -55,7 +55,7 @@ struct spi_bitbang { | |||
55 | * methods, if you like. | 55 | * methods, if you like. |
56 | */ | 56 | */ |
57 | extern int spi_bitbang_setup(struct spi_device *spi); | 57 | extern int spi_bitbang_setup(struct spi_device *spi); |
58 | extern void spi_bitbang_cleanup(const struct spi_device *spi); | 58 | extern void spi_bitbang_cleanup(struct spi_device *spi); |
59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); | 59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); |
60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, | 60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, |
61 | struct spi_transfer *t); | 61 | struct spi_transfer *t); |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 94b767d64275..61fef376ed2e 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -228,15 +228,30 @@ do { \ | |||
228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) | 228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) |
229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) | 229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) |
230 | #else | 230 | #else |
231 | # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | 231 | # define spin_unlock(lock) \ |
232 | # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) | 232 | do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
233 | # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) | 233 | # define read_unlock(lock) \ |
234 | # define spin_unlock_irq(lock) \ | 234 | do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
235 | do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 235 | # define write_unlock(lock) \ |
236 | # define read_unlock_irq(lock) \ | 236 | do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
237 | do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 237 | # define spin_unlock_irq(lock) \ |
238 | # define write_unlock_irq(lock) \ | 238 | do { \ |
239 | do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 239 | __raw_spin_unlock(&(lock)->raw_lock); \ |
240 | __release(lock); \ | ||
241 | local_irq_enable(); \ | ||
242 | } while (0) | ||
243 | # define read_unlock_irq(lock) \ | ||
244 | do { \ | ||
245 | __raw_read_unlock(&(lock)->raw_lock); \ | ||
246 | __release(lock); \ | ||
247 | local_irq_enable(); \ | ||
248 | } while (0) | ||
249 | # define write_unlock_irq(lock) \ | ||
250 | do { \ | ||
251 | __raw_write_unlock(&(lock)->raw_lock); \ | ||
252 | __release(lock); \ | ||
253 | local_irq_enable(); \ | ||
254 | } while (0) | ||
240 | #endif | 255 | #endif |
241 | 256 | ||
242 | #define spin_unlock_irqrestore(lock, flags) \ | 257 | #define spin_unlock_irqrestore(lock, flags) \ |
diff --git a/include/linux/stat.h b/include/linux/stat.h index 679ef0d70b6b..4f8539ccff6c 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #define S_IFMT 00170000 | 12 | #define S_IFMT 00170000 |
13 | #define S_IFSOCK 0140000 | 13 | #define S_IFSOCK 0140000 |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index a1be89deb3af..c7a78eef2b4f 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -40,6 +40,7 @@ struct rpc_clnt { | |||
40 | 40 | ||
41 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 41 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
42 | cl_intr : 1,/* interruptible */ | 42 | cl_intr : 1,/* interruptible */ |
43 | cl_discrtry : 1,/* disconnect before retry */ | ||
43 | cl_autobind : 1,/* use getport() */ | 44 | cl_autobind : 1,/* use getport() */ |
44 | cl_oneshot : 1,/* dispose after use */ | 45 | cl_oneshot : 1,/* dispose after use */ |
45 | cl_dead : 1;/* abandoned */ | 46 | cl_dead : 1;/* abandoned */ |
@@ -111,6 +112,7 @@ struct rpc_create_args { | |||
111 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) | 112 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) |
112 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) | 113 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) |
113 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) | 114 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) |
115 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 6) | ||
114 | 116 | ||
115 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 117 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
116 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 118 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 60fce3c92857..b7c7307ceec6 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
@@ -78,7 +78,6 @@ void rpc_unregister_sysctl(void); | |||
78 | * module currently registers its sysctl table dynamically, the sysctl path | 78 | * module currently registers its sysctl table dynamically, the sysctl path |
79 | * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>. | 79 | * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>. |
80 | */ | 80 | */ |
81 | #define CTL_SUNRPC 7249 /* arbitrary and hopefully unused */ | ||
82 | 81 | ||
83 | enum { | 82 | enum { |
84 | CTL_RPCDEBUG = 1, | 83 | CTL_RPCDEBUG = 1, |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 8b6ce60ea057..de9fc576fa1c 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -253,7 +253,7 @@ void rpc_put_task(struct rpc_task *); | |||
253 | void rpc_exit_task(struct rpc_task *); | 253 | void rpc_exit_task(struct rpc_task *); |
254 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 254 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
255 | void rpc_killall_tasks(struct rpc_clnt *); | 255 | void rpc_killall_tasks(struct rpc_clnt *); |
256 | int rpc_execute(struct rpc_task *); | 256 | void rpc_execute(struct rpc_task *); |
257 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | 257 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); |
258 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); | 258 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); |
259 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, | 259 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64f3d60c72af..83b3c7b433aa 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define SUNRPC_SVC_H | 11 | #define SUNRPC_SVC_H |
12 | 12 | ||
13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
14 | #include <linux/in6.h> | ||
14 | #include <linux/sunrpc/types.h> | 15 | #include <linux/sunrpc/types.h> |
15 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
16 | #include <linux/sunrpc/auth.h> | 17 | #include <linux/sunrpc/auth.h> |
@@ -191,7 +192,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) | |||
191 | iov->iov_len += sizeof(__be32); | 192 | iov->iov_len += sizeof(__be32); |
192 | } | 193 | } |
193 | 194 | ||
194 | 195 | union svc_addr_u { | |
196 | struct in_addr addr; | ||
197 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
198 | struct in6_addr addr6; | ||
199 | #endif | ||
200 | }; | ||
201 | |||
195 | /* | 202 | /* |
196 | * The context of a single thread, including the request currently being | 203 | * The context of a single thread, including the request currently being |
197 | * processed. | 204 | * processed. |
@@ -200,8 +207,8 @@ struct svc_rqst { | |||
200 | struct list_head rq_list; /* idle list */ | 207 | struct list_head rq_list; /* idle list */ |
201 | struct list_head rq_all; /* all threads list */ | 208 | struct list_head rq_all; /* all threads list */ |
202 | struct svc_sock * rq_sock; /* socket */ | 209 | struct svc_sock * rq_sock; /* socket */ |
203 | struct sockaddr_in rq_addr; /* peer address */ | 210 | struct sockaddr_storage rq_addr; /* peer address */ |
204 | int rq_addrlen; | 211 | size_t rq_addrlen; |
205 | 212 | ||
206 | struct svc_serv * rq_server; /* RPC service definition */ | 213 | struct svc_serv * rq_server; /* RPC service definition */ |
207 | struct svc_pool * rq_pool; /* thread pool */ | 214 | struct svc_pool * rq_pool; /* thread pool */ |
@@ -227,8 +234,8 @@ struct svc_rqst { | |||
227 | unsigned short | 234 | unsigned short |
228 | rq_secure : 1; /* secure port */ | 235 | rq_secure : 1; /* secure port */ |
229 | 236 | ||
230 | 237 | union svc_addr_u rq_daddr; /* dest addr of request | |
231 | __be32 rq_daddr; /* dest addr of request - reply from here */ | 238 | * - reply from here */ |
232 | 239 | ||
233 | void * rq_argp; /* decoded arguments */ | 240 | void * rq_argp; /* decoded arguments */ |
234 | void * rq_resp; /* xdr'd results */ | 241 | void * rq_resp; /* xdr'd results */ |
@@ -256,6 +263,24 @@ struct svc_rqst { | |||
256 | }; | 263 | }; |
257 | 264 | ||
258 | /* | 265 | /* |
266 | * Rigorous type checking on sockaddr type conversions | ||
267 | */ | ||
268 | static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst) | ||
269 | { | ||
270 | return (struct sockaddr_in *) &rqst->rq_addr; | ||
271 | } | ||
272 | |||
273 | static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst) | ||
274 | { | ||
275 | return (struct sockaddr_in6 *) &rqst->rq_addr; | ||
276 | } | ||
277 | |||
278 | static inline struct sockaddr *svc_addr(struct svc_rqst *rqst) | ||
279 | { | ||
280 | return (struct sockaddr *) &rqst->rq_addr; | ||
281 | } | ||
282 | |||
283 | /* | ||
259 | * Check buffer bounds after decoding arguments | 284 | * Check buffer bounds after decoding arguments |
260 | */ | 285 | */ |
261 | static inline int | 286 | static inline int |
@@ -292,9 +317,10 @@ static inline void svc_free_res_pages(struct svc_rqst *rqstp) | |||
292 | 317 | ||
293 | struct svc_deferred_req { | 318 | struct svc_deferred_req { |
294 | u32 prot; /* protocol (UDP or TCP) */ | 319 | u32 prot; /* protocol (UDP or TCP) */ |
295 | struct sockaddr_in addr; | 320 | struct svc_sock *svsk; |
296 | struct svc_sock *svsk; /* where reply must go */ | 321 | struct sockaddr_storage addr; /* where reply must go */ |
297 | __be32 daddr; /* where reply must come from */ | 322 | size_t addrlen; |
323 | union svc_addr_u daddr; /* where reply must come from */ | ||
298 | struct cache_deferred_req handle; | 324 | struct cache_deferred_req handle; |
299 | int argslen; | 325 | int argslen; |
300 | __be32 args[0]; | 326 | __be32 args[0]; |
@@ -368,5 +394,8 @@ int svc_register(struct svc_serv *, int, unsigned short); | |||
368 | void svc_wake_up(struct svc_serv *); | 394 | void svc_wake_up(struct svc_serv *); |
369 | void svc_reserve(struct svc_rqst *rqstp, int space); | 395 | void svc_reserve(struct svc_rqst *rqstp, int space); |
370 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); | 396 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); |
397 | char * svc_print_addr(struct svc_rqst *, char *, size_t); | ||
398 | |||
399 | #define RPC_MAX_ADDRBUFLEN (63U) | ||
371 | 400 | ||
372 | #endif /* SUNRPC_SVC_H */ | 401 | #endif /* SUNRPC_SVC_H */ |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 98b21ad370fd..cccea0a0feb4 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -57,13 +57,16 @@ struct svc_sock { | |||
57 | 57 | ||
58 | /* cache of various info for TCP sockets */ | 58 | /* cache of various info for TCP sockets */ |
59 | void *sk_info_authunix; | 59 | void *sk_info_authunix; |
60 | |||
61 | struct sockaddr_storage sk_remote; /* remote peer's address */ | ||
62 | int sk_remotelen; /* length of address */ | ||
60 | }; | 63 | }; |
61 | 64 | ||
62 | /* | 65 | /* |
63 | * Function prototypes. | 66 | * Function prototypes. |
64 | */ | 67 | */ |
65 | int svc_makesock(struct svc_serv *, int, unsigned short); | 68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); |
66 | void svc_delete_socket(struct svc_sock *); | 69 | void svc_close_socket(struct svc_sock *); |
67 | int svc_recv(struct svc_rqst *, long); | 70 | int svc_recv(struct svc_rqst *, long); |
68 | int svc_send(struct svc_rqst *); | 71 | int svc_send(struct svc_rqst *); |
69 | void svc_drop(struct svc_rqst *); | 72 | void svc_drop(struct svc_rqst *); |
@@ -74,4 +77,11 @@ int svc_addsock(struct svc_serv *serv, | |||
74 | char *name_return, | 77 | char *name_return, |
75 | int *proto); | 78 | int *proto); |
76 | 79 | ||
80 | /* | ||
81 | * svc_makesock socket characteristics | ||
82 | */ | ||
83 | #define SVC_SOCK_DEFAULTS (0U) | ||
84 | #define SVC_SOCK_ANONYMOUS (1U << 0) /* don't register with pmap */ | ||
85 | #define SVC_SOCK_TEMPORARY (1U << 1) /* flag socket as temporary */ | ||
86 | |||
77 | #endif /* SUNRPC_SVCSOCK_H */ | 87 | #endif /* SUNRPC_SVCSOCK_H */ |
diff --git a/include/linux/svga.h b/include/linux/svga.h new file mode 100644 index 000000000000..eadb981bb37c --- /dev/null +++ b/include/linux/svga.h | |||
@@ -0,0 +1,124 @@ | |||
1 | #ifndef _LINUX_SVGA_H | ||
2 | #define _LINUX_SVGA_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/pci.h> | ||
7 | #include <video/vga.h> | ||
8 | |||
9 | /* Terminator for register set */ | ||
10 | |||
11 | #define VGA_REGSET_END_VAL 0xFF | ||
12 | #define VGA_REGSET_END {VGA_REGSET_END_VAL, 0, 0} | ||
13 | |||
14 | struct vga_regset { | ||
15 | u8 regnum; | ||
16 | u8 lowbit; | ||
17 | u8 highbit; | ||
18 | }; | ||
19 | |||
20 | /* ------------------------------------------------------------------------- */ | ||
21 | |||
22 | #define SVGA_FORMAT_END_VAL 0xFFFF | ||
23 | #define SVGA_FORMAT_END {SVGA_FORMAT_END_VAL, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 0, 0, 0, 0, 0, 0} | ||
24 | |||
25 | struct svga_fb_format { | ||
26 | /* var part */ | ||
27 | u32 bits_per_pixel; | ||
28 | struct fb_bitfield red; | ||
29 | struct fb_bitfield green; | ||
30 | struct fb_bitfield blue; | ||
31 | struct fb_bitfield transp; | ||
32 | u32 nonstd; | ||
33 | /* fix part */ | ||
34 | u32 type; | ||
35 | u32 type_aux; | ||
36 | u32 visual; | ||
37 | u32 xpanstep; | ||
38 | u32 xresstep; | ||
39 | }; | ||
40 | |||
41 | struct svga_timing_regs { | ||
42 | const struct vga_regset *h_total_regs; | ||
43 | const struct vga_regset *h_display_regs; | ||
44 | const struct vga_regset *h_blank_start_regs; | ||
45 | const struct vga_regset *h_blank_end_regs; | ||
46 | const struct vga_regset *h_sync_start_regs; | ||
47 | const struct vga_regset *h_sync_end_regs; | ||
48 | |||
49 | const struct vga_regset *v_total_regs; | ||
50 | const struct vga_regset *v_display_regs; | ||
51 | const struct vga_regset *v_blank_start_regs; | ||
52 | const struct vga_regset *v_blank_end_regs; | ||
53 | const struct vga_regset *v_sync_start_regs; | ||
54 | const struct vga_regset *v_sync_end_regs; | ||
55 | }; | ||
56 | |||
57 | struct svga_pll { | ||
58 | u16 m_min; | ||
59 | u16 m_max; | ||
60 | u16 n_min; | ||
61 | u16 n_max; | ||
62 | u16 r_min; | ||
63 | u16 r_max; /* r_max < 32 */ | ||
64 | u32 f_vco_min; | ||
65 | u32 f_vco_max; | ||
66 | u32 f_base; | ||
67 | }; | ||
68 | |||
69 | |||
70 | /* Write a value to the attribute register */ | ||
71 | |||
72 | static inline void svga_wattr(u8 index, u8 data) | ||
73 | { | ||
74 | inb(0x3DA); | ||
75 | outb(index, 0x3C0); | ||
76 | outb(data, 0x3C0); | ||
77 | } | ||
78 | |||
79 | /* Write a value to a sequence register with a mask */ | ||
80 | |||
81 | static inline void svga_wseq_mask(u8 index, u8 data, u8 mask) | ||
82 | { | ||
83 | vga_wseq(NULL, index, (data & mask) | (vga_rseq(NULL, index) & ~mask)); | ||
84 | } | ||
85 | |||
86 | /* Write a value to a CRT register with a mask */ | ||
87 | |||
88 | static inline void svga_wcrt_mask(u8 index, u8 data, u8 mask) | ||
89 | { | ||
90 | vga_wcrt(NULL, index, (data & mask) | (vga_rcrt(NULL, index) & ~mask)); | ||
91 | } | ||
92 | |||
93 | static inline int svga_primary_device(struct pci_dev *dev) | ||
94 | { | ||
95 | u16 flags; | ||
96 | pci_read_config_word(dev, PCI_COMMAND, &flags); | ||
97 | return (flags & PCI_COMMAND_IO); | ||
98 | } | ||
99 | |||
100 | |||
101 | void svga_wcrt_multi(const struct vga_regset *regset, u32 value); | ||
102 | void svga_wseq_multi(const struct vga_regset *regset, u32 value); | ||
103 | |||
104 | void svga_set_default_gfx_regs(void); | ||
105 | void svga_set_default_atc_regs(void); | ||
106 | void svga_set_default_seq_regs(void); | ||
107 | void svga_set_default_crt_regs(void); | ||
108 | void svga_set_textmode_vga_regs(void); | ||
109 | |||
110 | void svga_settile(struct fb_info *info, struct fb_tilemap *map); | ||
111 | void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area); | ||
112 | void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); | ||
113 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); | ||
114 | void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); | ||
115 | |||
116 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); | ||
117 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); | ||
118 | void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); | ||
119 | |||
120 | int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); | ||
121 | |||
122 | #endif /* __KERNEL__ */ | ||
123 | #endif /* _LINUX_SVGA_H */ | ||
124 | |||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44a6..006868881346 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * | |||
170 | extern unsigned long totalram_pages; | 170 | extern unsigned long totalram_pages; |
171 | extern unsigned long totalreserve_pages; | 171 | extern unsigned long totalreserve_pages; |
172 | extern long nr_swap_pages; | 172 | extern long nr_swap_pages; |
173 | extern unsigned int nr_free_pages(void); | ||
174 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | ||
175 | extern unsigned int nr_free_buffer_pages(void); | 173 | extern unsigned int nr_free_buffer_pages(void); |
176 | extern unsigned int nr_free_pagecache_pages(void); | 174 | extern unsigned int nr_free_pagecache_pages(void); |
177 | 175 | ||
176 | /* Definition of global_page_state not available yet */ | ||
177 | #define nr_free_pages() global_page_state(NR_FREE_PAGES) | ||
178 | |||
179 | |||
178 | /* linux/mm/swap.c */ | 180 | /* linux/mm/swap.c */ |
179 | extern void FASTCALL(lru_cache_add(struct page *)); | 181 | extern void FASTCALL(lru_cache_add(struct page *)); |
180 | extern void FASTCALL(lru_cache_add_active(struct page *)); | 182 | extern void FASTCALL(lru_cache_add_active(struct page *)); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 81480e613467..2c5fb38d9392 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -53,7 +53,6 @@ struct __sysctl_args { | |||
53 | 53 | ||
54 | /* For internal pattern-matching use only: */ | 54 | /* For internal pattern-matching use only: */ |
55 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
56 | #define CTL_ANY -1 /* Matches any name */ | ||
57 | #define CTL_NONE 0 | 56 | #define CTL_NONE 0 |
58 | #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ | 57 | #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ |
59 | #endif | 58 | #endif |
@@ -69,7 +68,13 @@ enum | |||
69 | CTL_DEV=7, /* Devices */ | 68 | CTL_DEV=7, /* Devices */ |
70 | CTL_BUS=8, /* Busses */ | 69 | CTL_BUS=8, /* Busses */ |
71 | CTL_ABI=9, /* Binary emulation */ | 70 | CTL_ABI=9, /* Binary emulation */ |
72 | CTL_CPU=10 /* CPU stuff (speed scaling, etc) */ | 71 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ |
72 | CTL_ARLAN=254, /* arlan wireless driver */ | ||
73 | CTL_APPLDATA=2120, /* s390 appldata */ | ||
74 | CTL_S390DBF=5677, /* s390 debug */ | ||
75 | CTL_SUNRPC=7249, /* sunrpc debug */ | ||
76 | CTL_PM=9899, /* frv power management */ | ||
77 | CTL_FRV=9898, /* frv specific sysctls */ | ||
73 | }; | 78 | }; |
74 | 79 | ||
75 | /* CTL_BUS names: */ | 80 | /* CTL_BUS names: */ |
@@ -202,6 +207,11 @@ enum | |||
202 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 207 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
203 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | 208 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ |
204 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ | 209 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ |
210 | |||
211 | /* s390 vm cmm sysctls */ | ||
212 | VM_CMM_PAGES=1111, | ||
213 | VM_CMM_TIMED_PAGES=1112, | ||
214 | VM_CMM_TIMEOUT=1113, | ||
205 | }; | 215 | }; |
206 | 216 | ||
207 | 217 | ||
@@ -699,7 +709,8 @@ enum { | |||
699 | NET_X25_CALL_REQUEST_TIMEOUT=2, | 709 | NET_X25_CALL_REQUEST_TIMEOUT=2, |
700 | NET_X25_RESET_REQUEST_TIMEOUT=3, | 710 | NET_X25_RESET_REQUEST_TIMEOUT=3, |
701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, | 711 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, |
702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5 | 712 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5, |
713 | NET_X25_FORWARD=6 | ||
703 | }; | 714 | }; |
704 | 715 | ||
705 | /* /proc/sys/net/token-ring */ | 716 | /* /proc/sys/net/token-ring */ |
@@ -802,6 +813,7 @@ enum | |||
802 | FS_AIO_NR=18, /* current system-wide number of aio requests */ | 813 | FS_AIO_NR=18, /* current system-wide number of aio requests */ |
803 | FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ | 814 | FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ |
804 | FS_INOTIFY=20, /* inotify submenu */ | 815 | FS_INOTIFY=20, /* inotify submenu */ |
816 | FS_OCFS2=988, /* ocfs2 */ | ||
805 | }; | 817 | }; |
806 | 818 | ||
807 | /* /proc/sys/fs/quota/ */ | 819 | /* /proc/sys/fs/quota/ */ |
@@ -912,7 +924,11 @@ enum | |||
912 | #ifdef __KERNEL__ | 924 | #ifdef __KERNEL__ |
913 | #include <linux/list.h> | 925 | #include <linux/list.h> |
914 | 926 | ||
915 | extern void sysctl_init(void); | 927 | /* For the /proc/sys support */ |
928 | struct ctl_table; | ||
929 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); | ||
930 | extern void sysctl_head_finish(struct ctl_table_header *prev); | ||
931 | extern int sysctl_perm(struct ctl_table *table, int op); | ||
916 | 932 | ||
917 | typedef struct ctl_table ctl_table; | 933 | typedef struct ctl_table ctl_table; |
918 | 934 | ||
@@ -1006,9 +1022,9 @@ struct ctl_table | |||
1006 | int maxlen; | 1022 | int maxlen; |
1007 | mode_t mode; | 1023 | mode_t mode; |
1008 | ctl_table *child; | 1024 | ctl_table *child; |
1025 | ctl_table *parent; /* Automatically set */ | ||
1009 | proc_handler *proc_handler; /* Callback for text formatting */ | 1026 | proc_handler *proc_handler; /* Callback for text formatting */ |
1010 | ctl_handler *strategy; /* Callback function for all r/w */ | 1027 | ctl_handler *strategy; /* Callback function for all r/w */ |
1011 | struct proc_dir_entry *de; /* /proc control block */ | ||
1012 | void *extra1; | 1028 | void *extra1; |
1013 | void *extra2; | 1029 | void *extra2; |
1014 | }; | 1030 | }; |
@@ -1023,8 +1039,8 @@ struct ctl_table_header | |||
1023 | struct completion *unregistering; | 1039 | struct completion *unregistering; |
1024 | }; | 1040 | }; |
1025 | 1041 | ||
1026 | struct ctl_table_header * register_sysctl_table(ctl_table * table, | 1042 | struct ctl_table_header * register_sysctl_table(ctl_table * table); |
1027 | int insert_at_head); | 1043 | |
1028 | void unregister_sysctl_table(struct ctl_table_header * table); | 1044 | void unregister_sysctl_table(struct ctl_table_header * table); |
1029 | 1045 | ||
1030 | #else /* __KERNEL__ */ | 1046 | #else /* __KERNEL__ */ |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 166a2e58c287..389ccf858d37 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -98,12 +98,16 @@ struct sysdev_attribute { | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | 100 | ||
101 | #define SYSDEV_ATTR(_name,_mode,_show,_store) \ | 101 | #define _SYSDEV_ATTR(_name,_mode,_show,_store) \ |
102 | struct sysdev_attribute attr_##_name = { \ | 102 | { \ |
103 | .attr = {.name = __stringify(_name), .mode = _mode }, \ | 103 | .attr = { .name = __stringify(_name), .mode = _mode, \ |
104 | .owner = THIS_MODULE }, \ | ||
104 | .show = _show, \ | 105 | .show = _show, \ |
105 | .store = _store, \ | 106 | .store = _store, \ |
106 | }; | 107 | } |
108 | |||
109 | #define SYSDEV_ATTR(_name,_mode,_show,_store) \ | ||
110 | struct sysdev_attribute attr_##_name = _SYSDEV_ATTR(_name,_mode,_show,_store); | ||
107 | 111 | ||
108 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | 112 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); |
109 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | 113 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 2129d1b6c874..192de3afa96b 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -11,10 +11,12 @@ | |||
11 | #define _SYSFS_H_ | 11 | #define _SYSFS_H_ |
12 | 12 | ||
13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
14 | #include <linux/list.h> | ||
14 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
15 | 16 | ||
16 | struct kobject; | 17 | struct kobject; |
17 | struct module; | 18 | struct module; |
19 | struct nameidata; | ||
18 | 20 | ||
19 | struct attribute { | 21 | struct attribute { |
20 | const char * name; | 22 | const char * name; |
@@ -88,13 +90,13 @@ struct sysfs_dirent { | |||
88 | #ifdef CONFIG_SYSFS | 90 | #ifdef CONFIG_SYSFS |
89 | 91 | ||
90 | extern int __must_check | 92 | extern int __must_check |
91 | sysfs_create_dir(struct kobject *); | 93 | sysfs_create_dir(struct kobject *, struct dentry *); |
92 | 94 | ||
93 | extern void | 95 | extern void |
94 | sysfs_remove_dir(struct kobject *); | 96 | sysfs_remove_dir(struct kobject *); |
95 | 97 | ||
96 | extern int __must_check | 98 | extern int __must_check |
97 | sysfs_rename_dir(struct kobject *, const char *new_name); | 99 | sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); |
98 | 100 | ||
99 | extern int __must_check | 101 | extern int __must_check |
100 | sysfs_move_dir(struct kobject *, struct kobject *); | 102 | sysfs_move_dir(struct kobject *, struct kobject *); |
@@ -126,11 +128,17 @@ int __must_check sysfs_create_group(struct kobject *, | |||
126 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
127 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
128 | 130 | ||
131 | |||
132 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
133 | void * (*follow_link)(struct dentry *, struct nameidata *)); | ||
134 | extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); | ||
135 | extern void sysfs_remove_shadow_dir(struct dentry *dir); | ||
136 | |||
129 | extern int __must_check sysfs_init(void); | 137 | extern int __must_check sysfs_init(void); |
130 | 138 | ||
131 | #else /* CONFIG_SYSFS */ | 139 | #else /* CONFIG_SYSFS */ |
132 | 140 | ||
133 | static inline int sysfs_create_dir(struct kobject * k) | 141 | static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) |
134 | { | 142 | { |
135 | return 0; | 143 | return 0; |
136 | } | 144 | } |
@@ -140,7 +148,9 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
140 | ; | 148 | ; |
141 | } | 149 | } |
142 | 150 | ||
143 | static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) | 151 | static inline int sysfs_rename_dir(struct kobject * k, |
152 | struct dentry *new_parent, | ||
153 | const char *new_name) | ||
144 | { | 154 | { |
145 | return 0; | 155 | return 0; |
146 | } | 156 | } |
@@ -204,6 +214,12 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | |||
204 | { | 214 | { |
205 | } | 215 | } |
206 | 216 | ||
217 | static inline int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
218 | void * (*follow_link)(struct dentry *, struct nameidata *)) | ||
219 | { | ||
220 | return 0; | ||
221 | } | ||
222 | |||
207 | static inline int __must_check sysfs_init(void) | 223 | static inline int __must_check sysfs_init(void) |
208 | { | 224 | { |
209 | return 0; | 225 | return 0; |
diff --git a/include/linux/tc.h b/include/linux/tc.h new file mode 100644 index 000000000000..f92511e57cdb --- /dev/null +++ b/include/linux/tc.h | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * Interface to the TURBOchannel related routines. | ||
3 | * | ||
4 | * Copyright (c) 1998 Harald Koerfgen | ||
5 | * Copyright (c) 2005 James Simmons | ||
6 | * Copyright (c) 2006 Maciej W. Rozycki | ||
7 | * | ||
8 | * Based on: | ||
9 | * | ||
10 | * "TURBOchannel Firmware Specification", EK-TCAAD-FS-004 | ||
11 | * | ||
12 | * from Digital Equipment Corporation. | ||
13 | * | ||
14 | * This file is subject to the terms and conditions of the GNU | ||
15 | * General Public License. See the file "COPYING" in the main | ||
16 | * directory of this archive for more details. | ||
17 | */ | ||
18 | #ifndef _LINUX_TC_H | ||
19 | #define _LINUX_TC_H | ||
20 | |||
21 | #include <linux/compiler.h> | ||
22 | #include <linux/device.h> | ||
23 | #include <linux/ioport.h> | ||
24 | #include <linux/types.h> | ||
25 | |||
26 | /* | ||
27 | * Offsets for the ROM header locations for TURBOchannel cards. | ||
28 | */ | ||
29 | #define TC_OLDCARD 0x3c0000 | ||
30 | #define TC_NEWCARD 0x000000 | ||
31 | |||
32 | #define TC_ROM_WIDTH 0x3e0 | ||
33 | #define TC_ROM_STRIDE 0x3e4 | ||
34 | #define TC_ROM_SIZE 0x3e8 | ||
35 | #define TC_SLOT_SIZE 0x3ec | ||
36 | #define TC_PATTERN0 0x3f0 | ||
37 | #define TC_PATTERN1 0x3f4 | ||
38 | #define TC_PATTERN2 0x3f8 | ||
39 | #define TC_PATTERN3 0x3fc | ||
40 | #define TC_FIRM_VER 0x400 | ||
41 | #define TC_VENDOR 0x420 | ||
42 | #define TC_MODULE 0x440 | ||
43 | #define TC_FIRM_TYPE 0x460 | ||
44 | #define TC_FLAGS 0x470 | ||
45 | #define TC_ROM_OBJECTS 0x480 | ||
46 | |||
47 | /* | ||
48 | * Information obtained through the get_tcinfo() PROM call. | ||
49 | */ | ||
50 | struct tcinfo { | ||
51 | s32 revision; /* Hardware revision level. */ | ||
52 | s32 clk_period; /* Clock period in nanoseconds. */ | ||
53 | s32 slot_size; /* Slot size in megabytes. */ | ||
54 | s32 io_timeout; /* I/O timeout in cycles. */ | ||
55 | s32 dma_range; /* DMA address range in megabytes. */ | ||
56 | s32 max_dma_burst; /* Maximum DMA burst length. */ | ||
57 | s32 parity; /* System module supports TC parity. */ | ||
58 | s32 reserved[4]; | ||
59 | }; | ||
60 | |||
61 | /* | ||
62 | * TURBOchannel bus. | ||
63 | */ | ||
64 | struct tc_bus { | ||
65 | struct list_head devices; /* List of devices on this bus. */ | ||
66 | struct resource resource[2]; /* Address space routed to this bus. */ | ||
67 | |||
68 | struct device dev; | ||
69 | char name[13]; | ||
70 | resource_size_t slot_base; | ||
71 | resource_size_t ext_slot_base; | ||
72 | resource_size_t ext_slot_size; | ||
73 | int num_tcslots; | ||
74 | struct tcinfo info; | ||
75 | }; | ||
76 | |||
77 | /* | ||
78 | * TURBOchannel device. | ||
79 | */ | ||
80 | struct tc_dev { | ||
81 | struct list_head node; /* Node in list of all TC devices. */ | ||
82 | struct tc_bus *bus; /* Bus this device is on. */ | ||
83 | struct tc_driver *driver; /* Which driver has allocated this | ||
84 | device. */ | ||
85 | struct device dev; /* Generic device interface. */ | ||
86 | struct resource resource; /* Address space of this device. */ | ||
87 | char vendor[9]; | ||
88 | char name[9]; | ||
89 | char firmware[9]; | ||
90 | int interrupt; | ||
91 | int slot; | ||
92 | }; | ||
93 | |||
94 | #define to_tc_dev(n) container_of(n, struct tc_dev, dev) | ||
95 | |||
96 | struct tc_device_id { | ||
97 | char vendor[9]; | ||
98 | char name[9]; | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * TURBOchannel driver. | ||
103 | */ | ||
104 | struct tc_driver { | ||
105 | struct list_head node; | ||
106 | const struct tc_device_id *id_table; | ||
107 | struct device_driver driver; | ||
108 | }; | ||
109 | |||
110 | #define to_tc_driver(drv) container_of(drv, struct tc_driver, driver) | ||
111 | |||
112 | /* | ||
113 | * Return TURBOchannel clock frequency in Hz. | ||
114 | */ | ||
115 | static inline unsigned long tc_get_speed(struct tc_bus *tbus) | ||
116 | { | ||
117 | return 100000 * (10000 / (unsigned long)tbus->info.clk_period); | ||
118 | } | ||
119 | |||
120 | #ifdef CONFIG_TC | ||
121 | |||
122 | extern struct bus_type tc_bus_type; | ||
123 | |||
124 | extern int tc_register_driver(struct tc_driver *tdrv); | ||
125 | extern void tc_unregister_driver(struct tc_driver *tdrv); | ||
126 | |||
127 | #else /* !CONFIG_TC */ | ||
128 | |||
129 | static inline int tc_register_driver(struct tc_driver *tdrv) { return 0; } | ||
130 | static inline void tc_unregister_driver(struct tc_driver *tdrv) { } | ||
131 | |||
132 | #endif /* CONFIG_TC */ | ||
133 | |||
134 | /* | ||
135 | * These have to be provided by the architecture. | ||
136 | */ | ||
137 | extern int tc_preadb(u8 *valp, void __iomem *addr); | ||
138 | extern int tc_bus_get_info(struct tc_bus *tbus); | ||
139 | extern void tc_device_get_irq(struct tc_dev *tdev); | ||
140 | |||
141 | #endif /* _LINUX_TC_H */ | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 3cc70d1a3504..29d3089038ab 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -316,7 +316,7 @@ struct tcp_sock { | |||
316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ | 316 | struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ |
317 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ | 317 | struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ |
318 | 318 | ||
319 | struct tcp_sack_block recv_sack_cache[4]; | 319 | struct tcp_sack_block_wire recv_sack_cache[4]; |
320 | 320 | ||
321 | /* from STCP, retrans queue hinting */ | 321 | /* from STCP, retrans queue hinting */ |
322 | struct sk_buff* lost_skb_hint; | 322 | struct sk_buff* lost_skb_hint; |
diff --git a/include/linux/tick.h b/include/linux/tick.h new file mode 100644 index 000000000000..9a7252e089b9 --- /dev/null +++ b/include/linux/tick.h | |||
@@ -0,0 +1,109 @@ | |||
1 | /* linux/include/linux/tick.h | ||
2 | * | ||
3 | * This file contains the structure definitions for tick related functions | ||
4 | * | ||
5 | */ | ||
6 | #ifndef _LINUX_TICK_H | ||
7 | #define _LINUX_TICK_H | ||
8 | |||
9 | #include <linux/clockchips.h> | ||
10 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
12 | |||
13 | enum tick_device_mode { | ||
14 | TICKDEV_MODE_PERIODIC, | ||
15 | TICKDEV_MODE_ONESHOT, | ||
16 | }; | ||
17 | |||
18 | struct tick_device { | ||
19 | struct clock_event_device *evtdev; | ||
20 | enum tick_device_mode mode; | ||
21 | }; | ||
22 | |||
23 | enum tick_nohz_mode { | ||
24 | NOHZ_MODE_INACTIVE, | ||
25 | NOHZ_MODE_LOWRES, | ||
26 | NOHZ_MODE_HIGHRES, | ||
27 | }; | ||
28 | |||
29 | /** | ||
30 | * struct tick_sched - sched tick emulation and no idle tick control/stats | ||
31 | * @sched_timer: hrtimer to schedule the periodic tick in high | ||
32 | * resolution mode | ||
33 | * @idle_tick: Store the last idle tick expiry time when the tick | ||
34 | * timer is modified for idle sleeps. This is necessary | ||
35 | * to resume the tick timer operation in the timeline | ||
36 | * when the CPU returns from idle | ||
37 | * @tick_stopped: Indicator that the idle tick has been stopped | ||
38 | * @idle_jiffies: jiffies at the entry to idle for idle time accounting | ||
39 | * @idle_calls: Total number of idle calls | ||
40 | * @idle_sleeps: Number of idle calls, where the sched tick was stopped | ||
41 | * @idle_entrytime: Time when the idle call was entered | ||
42 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | ||
43 | */ | ||
44 | struct tick_sched { | ||
45 | struct hrtimer sched_timer; | ||
46 | unsigned long check_clocks; | ||
47 | enum tick_nohz_mode nohz_mode; | ||
48 | ktime_t idle_tick; | ||
49 | int tick_stopped; | ||
50 | unsigned long idle_jiffies; | ||
51 | unsigned long idle_calls; | ||
52 | unsigned long idle_sleeps; | ||
53 | ktime_t idle_entrytime; | ||
54 | ktime_t idle_sleeptime; | ||
55 | unsigned long last_jiffies; | ||
56 | unsigned long next_jiffies; | ||
57 | ktime_t idle_expires; | ||
58 | }; | ||
59 | |||
60 | extern void __init tick_init(void); | ||
61 | extern int tick_is_oneshot_available(void); | ||
62 | extern struct tick_device *tick_get_device(int cpu); | ||
63 | |||
64 | # ifdef CONFIG_HIGH_RES_TIMERS | ||
65 | extern int tick_init_highres(void); | ||
66 | extern int tick_program_event(ktime_t expires, int force); | ||
67 | extern void tick_setup_sched_timer(void); | ||
68 | extern void tick_cancel_sched_timer(int cpu); | ||
69 | # else | ||
70 | static inline void tick_cancel_sched_timer(int cpu) { } | ||
71 | # endif /* HIGHRES */ | ||
72 | |||
73 | # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | ||
74 | extern struct tick_device *tick_get_broadcast_device(void); | ||
75 | extern cpumask_t *tick_get_broadcast_mask(void); | ||
76 | |||
77 | # ifdef CONFIG_TICK_ONESHOT | ||
78 | extern cpumask_t *tick_get_broadcast_oneshot_mask(void); | ||
79 | # endif | ||
80 | |||
81 | # endif /* BROADCAST */ | ||
82 | |||
83 | # ifdef CONFIG_TICK_ONESHOT | ||
84 | extern void tick_clock_notify(void); | ||
85 | extern int tick_check_oneshot_change(int allow_nohz); | ||
86 | extern struct tick_sched *tick_get_tick_sched(int cpu); | ||
87 | # else | ||
88 | static inline void tick_clock_notify(void) { } | ||
89 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | ||
90 | # endif | ||
91 | |||
92 | #else /* CONFIG_GENERIC_CLOCKEVENTS */ | ||
93 | static inline void tick_init(void) { } | ||
94 | static inline void tick_cancel_sched_timer(int cpu) { } | ||
95 | static inline void tick_clock_notify(void) { } | ||
96 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | ||
97 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | ||
98 | |||
99 | # ifdef CONFIG_NO_HZ | ||
100 | extern void tick_nohz_stop_sched_tick(void); | ||
101 | extern void tick_nohz_restart_sched_tick(void); | ||
102 | extern void tick_nohz_update_jiffies(void); | ||
103 | # else | ||
104 | static inline void tick_nohz_stop_sched_tick(void) { } | ||
105 | static inline void tick_nohz_restart_sched_tick(void) { } | ||
106 | static inline void tick_nohz_update_jiffies(void) { } | ||
107 | # endif /* !NO_HZ */ | ||
108 | |||
109 | #endif | ||
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index dfb8052eee5e..3deb0a6c1370 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/scatterlist.h> | 20 | #include <linux/kthread.h> |
21 | 21 | ||
22 | /* Host registers (relative to pci base address): */ | 22 | /* Host registers (relative to pci base address): */ |
23 | enum { | 23 | enum { |
@@ -62,11 +62,10 @@ enum { | |||
62 | 62 | ||
63 | 63 | ||
64 | #define TIFM_IRQ_ENABLE 0x80000000 | 64 | #define TIFM_IRQ_ENABLE 0x80000000 |
65 | #define TIFM_IRQ_SOCKMASK 0x00000001 | 65 | #define TIFM_IRQ_SOCKMASK(x) (x) |
66 | #define TIFM_IRQ_CARDMASK 0x00000100 | 66 | #define TIFM_IRQ_CARDMASK(x) ((x) << 8) |
67 | #define TIFM_IRQ_FIFOMASK 0x00010000 | 67 | #define TIFM_IRQ_FIFOMASK(x) ((x) << 16) |
68 | #define TIFM_IRQ_SETALL 0xffffffff | 68 | #define TIFM_IRQ_SETALL 0xffffffff |
69 | #define TIFM_IRQ_SETALLSOCK 0x0000000f | ||
70 | 69 | ||
71 | #define TIFM_CTRL_LED 0x00000040 | 70 | #define TIFM_CTRL_LED 0x00000040 |
72 | #define TIFM_CTRL_FAST_CLK 0x00000100 | 71 | #define TIFM_CTRL_FAST_CLK 0x00000100 |
@@ -89,10 +88,9 @@ struct tifm_dev { | |||
89 | char __iomem *addr; | 88 | char __iomem *addr; |
90 | spinlock_t lock; | 89 | spinlock_t lock; |
91 | tifm_media_id media_id; | 90 | tifm_media_id media_id; |
92 | char wq_name[KOBJ_NAME_LEN]; | 91 | unsigned int socket_id; |
93 | struct workqueue_struct *wq; | ||
94 | 92 | ||
95 | unsigned int (*signal_irq)(struct tifm_dev *sock, | 93 | void (*signal_irq)(struct tifm_dev *sock, |
96 | unsigned int sock_irq_status); | 94 | unsigned int sock_irq_status); |
97 | 95 | ||
98 | struct tifm_driver *drv; | 96 | struct tifm_driver *drv; |
@@ -103,24 +101,23 @@ struct tifm_driver { | |||
103 | tifm_media_id *id_table; | 101 | tifm_media_id *id_table; |
104 | int (*probe)(struct tifm_dev *dev); | 102 | int (*probe)(struct tifm_dev *dev); |
105 | void (*remove)(struct tifm_dev *dev); | 103 | void (*remove)(struct tifm_dev *dev); |
104 | int (*suspend)(struct tifm_dev *dev, | ||
105 | pm_message_t state); | ||
106 | int (*resume)(struct tifm_dev *dev); | ||
106 | 107 | ||
107 | struct device_driver driver; | 108 | struct device_driver driver; |
108 | }; | 109 | }; |
109 | 110 | ||
110 | struct tifm_adapter { | 111 | struct tifm_adapter { |
111 | char __iomem *addr; | 112 | char __iomem *addr; |
112 | unsigned int irq_status; | ||
113 | unsigned int insert_mask; | ||
114 | unsigned int remove_mask; | ||
115 | spinlock_t lock; | 113 | spinlock_t lock; |
114 | unsigned int irq_status; | ||
115 | unsigned int socket_change_set; | ||
116 | wait_queue_head_t change_set_notify; | ||
116 | unsigned int id; | 117 | unsigned int id; |
117 | unsigned int max_sockets; | 118 | unsigned int num_sockets; |
118 | char wq_name[KOBJ_NAME_LEN]; | ||
119 | unsigned int inhibit_new_cards; | ||
120 | struct workqueue_struct *wq; | ||
121 | struct work_struct media_inserter; | ||
122 | struct work_struct media_remover; | ||
123 | struct tifm_dev **sockets; | 119 | struct tifm_dev **sockets; |
120 | struct task_struct *media_switcher; | ||
124 | struct class_device cdev; | 121 | struct class_device cdev; |
125 | struct device *dev; | 122 | struct device *dev; |
126 | 123 | ||
@@ -130,9 +127,9 @@ struct tifm_adapter { | |||
130 | struct tifm_adapter *tifm_alloc_adapter(void); | 127 | struct tifm_adapter *tifm_alloc_adapter(void); |
131 | void tifm_free_device(struct device *dev); | 128 | void tifm_free_device(struct device *dev); |
132 | void tifm_free_adapter(struct tifm_adapter *fm); | 129 | void tifm_free_adapter(struct tifm_adapter *fm); |
133 | int tifm_add_adapter(struct tifm_adapter *fm); | 130 | int tifm_add_adapter(struct tifm_adapter *fm, int (*mediathreadfn)(void *data)); |
134 | void tifm_remove_adapter(struct tifm_adapter *fm); | 131 | void tifm_remove_adapter(struct tifm_adapter *fm); |
135 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id); | 132 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm); |
136 | int tifm_register_driver(struct tifm_driver *drv); | 133 | int tifm_register_driver(struct tifm_driver *drv); |
137 | void tifm_unregister_driver(struct tifm_driver *drv); | 134 | void tifm_unregister_driver(struct tifm_driver *drv); |
138 | void tifm_eject(struct tifm_dev *sock); | 135 | void tifm_eject(struct tifm_dev *sock); |
diff --git a/include/linux/time.h b/include/linux/time.h index a5b739967b74..8ea8dea713c7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b) | |||
46 | * lhs == rhs: return 0 | 46 | * lhs == rhs: return 0 |
47 | * lhs > rhs: return >0 | 47 | * lhs > rhs: return >0 |
48 | */ | 48 | */ |
49 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | 49 | static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) |
50 | { | 50 | { |
51 | if (lhs->tv_sec < rhs->tv_sec) | 51 | if (lhs->tv_sec < rhs->tv_sec) |
52 | return -1; | 52 | return -1; |
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | |||
55 | return lhs->tv_nsec - rhs->tv_nsec; | 55 | return lhs->tv_nsec - rhs->tv_nsec; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | 58 | static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) |
59 | { | 59 | { |
60 | if (lhs->tv_sec < rhs->tv_sec) | 60 | if (lhs->tv_sec < rhs->tv_sec) |
61 | return -1; | 61 | return -1; |
@@ -90,8 +90,9 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
90 | 90 | ||
91 | extern struct timespec xtime; | 91 | extern struct timespec xtime; |
92 | extern struct timespec wall_to_monotonic; | 92 | extern struct timespec wall_to_monotonic; |
93 | extern seqlock_t xtime_lock; | 93 | extern seqlock_t xtime_lock __attribute__((weak)); |
94 | 94 | ||
95 | extern unsigned long read_persistent_clock(void); | ||
95 | void timekeeping_init(void); | 96 | void timekeeping_init(void); |
96 | 97 | ||
97 | static inline unsigned long get_seconds(void) | 98 | static inline unsigned long get_seconds(void) |
diff --git a/include/linux/timer.h b/include/linux/timer.h index fb5edaaf0ebd..719113b652dd 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_TIMER_H | 2 | #define _LINUX_TIMER_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/ktime.h> | ||
5 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
6 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
7 | 8 | ||
@@ -15,6 +16,11 @@ struct timer_list { | |||
15 | unsigned long data; | 16 | unsigned long data; |
16 | 17 | ||
17 | struct tvec_t_base_s *base; | 18 | struct tvec_t_base_s *base; |
19 | #ifdef CONFIG_TIMER_STATS | ||
20 | void *start_site; | ||
21 | char start_comm[16]; | ||
22 | int start_pid; | ||
23 | #endif | ||
18 | }; | 24 | }; |
19 | 25 | ||
20 | extern struct tvec_t_base_s boot_tvec_bases; | 26 | extern struct tvec_t_base_s boot_tvec_bases; |
@@ -61,7 +67,65 @@ extern int del_timer(struct timer_list * timer); | |||
61 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); | 67 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); |
62 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 68 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
63 | 69 | ||
70 | /* | ||
71 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | ||
72 | * locks the timer base: | ||
73 | */ | ||
64 | extern unsigned long next_timer_interrupt(void); | 74 | extern unsigned long next_timer_interrupt(void); |
75 | /* | ||
76 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | ||
77 | * locks the timer base and does the comparison against the given | ||
78 | * jiffie. | ||
79 | */ | ||
80 | extern unsigned long get_next_timer_interrupt(unsigned long now); | ||
81 | |||
82 | /* | ||
83 | * Timer-statistics info: | ||
84 | */ | ||
85 | #ifdef CONFIG_TIMER_STATS | ||
86 | |||
87 | extern void init_timer_stats(void); | ||
88 | |||
89 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
90 | void *timerf, char * comm); | ||
91 | |||
92 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
93 | { | ||
94 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
95 | timer->function, timer->start_comm); | ||
96 | } | ||
97 | |||
98 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | ||
99 | void *addr); | ||
100 | |||
101 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | ||
102 | { | ||
103 | __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); | ||
104 | } | ||
105 | |||
106 | static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | ||
107 | { | ||
108 | timer->start_site = NULL; | ||
109 | } | ||
110 | #else | ||
111 | static inline void init_timer_stats(void) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
116 | { | ||
117 | } | ||
118 | |||
119 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | ||
124 | { | ||
125 | } | ||
126 | #endif | ||
127 | |||
128 | extern void delayed_work_timer_fn(unsigned long __data); | ||
65 | 129 | ||
66 | /** | 130 | /** |
67 | * add_timer - start a timer | 131 | * add_timer - start a timer |
@@ -96,7 +160,7 @@ static inline void add_timer(struct timer_list *timer) | |||
96 | extern void init_timers(void); | 160 | extern void init_timers(void); |
97 | extern void run_local_timers(void); | 161 | extern void run_local_timers(void); |
98 | struct hrtimer; | 162 | struct hrtimer; |
99 | extern int it_real_fn(struct hrtimer *); | 163 | extern enum hrtimer_restart it_real_fn(struct hrtimer *); |
100 | 164 | ||
101 | unsigned long __round_jiffies(unsigned long j, int cpu); | 165 | unsigned long __round_jiffies(unsigned long j, int cpu); |
102 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); | 166 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index db501dc23c29..da929dbbea2a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -255,10 +255,10 @@ struct time_interpolator { | |||
255 | u8 jitter; /* if set compensate for fluctuations */ | 255 | u8 jitter; /* if set compensate for fluctuations */ |
256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ | 256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ |
257 | void *addr; /* address of counter or function */ | 257 | void *addr; /* address of counter or function */ |
258 | u64 mask; /* mask the valid bits of the counter */ | 258 | cycles_t mask; /* mask the valid bits of the counter */ |
259 | unsigned long offset; /* nsec offset at last update of interpolator */ | 259 | unsigned long offset; /* nsec offset at last update of interpolator */ |
260 | u64 last_counter; /* counter value in units of the counter at last update */ | 260 | u64 last_counter; /* counter value in units of the counter at last update */ |
261 | u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ | 261 | cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ |
262 | u64 frequency; /* frequency in counts/second */ | 262 | u64 frequency; /* frequency in counts/second */ |
263 | long drift; /* drift in parts-per-million (or -1) */ | 263 | long drift; /* drift in parts-per-million (or -1) */ |
264 | unsigned long skips; /* skips forward */ | 264 | unsigned long skips; /* skips forward */ |
@@ -286,6 +286,13 @@ static inline void time_interpolator_update(long delta_nsec) | |||
286 | 286 | ||
287 | #define TICK_LENGTH_SHIFT 32 | 287 | #define TICK_LENGTH_SHIFT 32 |
288 | 288 | ||
289 | #ifdef CONFIG_NO_HZ | ||
290 | #define NTP_INTERVAL_FREQ (2) | ||
291 | #else | ||
292 | #define NTP_INTERVAL_FREQ (HZ) | ||
293 | #endif | ||
294 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) | ||
295 | |||
289 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | 296 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ |
290 | extern u64 current_tick_length(void); | 297 | extern u64 current_tick_length(void); |
291 | 298 | ||
diff --git a/include/linux/toshiba.h b/include/linux/toshiba.h index 916e5e3a699b..6a7c4edf0e13 100644 --- a/include/linux/toshiba.h +++ b/include/linux/toshiba.h | |||
@@ -33,4 +33,6 @@ typedef struct { | |||
33 | unsigned int edi __attribute__ ((packed)); | 33 | unsigned int edi __attribute__ ((packed)); |
34 | } SMMRegisters; | 34 | } SMMRegisters; |
35 | 35 | ||
36 | int tosh_smm(SMMRegisters *regs); | ||
37 | |||
36 | #endif | 38 | #endif |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 65cbcf22c31e..dee72b9a20fb 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -24,7 +24,27 @@ | |||
24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ | 24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ |
25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
27 | #define NR_LDISCS 16 | 27 | #define NR_LDISCS 17 |
28 | |||
29 | /* line disciplines */ | ||
30 | #define N_TTY 0 | ||
31 | #define N_SLIP 1 | ||
32 | #define N_MOUSE 2 | ||
33 | #define N_PPP 3 | ||
34 | #define N_STRIP 4 | ||
35 | #define N_AX25 5 | ||
36 | #define N_X25 6 /* X.25 async */ | ||
37 | #define N_6PACK 7 | ||
38 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
39 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
40 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
41 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
42 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | ||
43 | /* cards about SMS messages */ | ||
44 | #define N_HDLC 13 /* synchronous HDLC */ | ||
45 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
46 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
47 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | ||
28 | 48 | ||
29 | /* | 49 | /* |
30 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 50 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -177,8 +197,8 @@ struct tty_struct { | |||
177 | struct mutex termios_mutex; | 197 | struct mutex termios_mutex; |
178 | struct ktermios *termios, *termios_locked; | 198 | struct ktermios *termios, *termios_locked; |
179 | char name[64]; | 199 | char name[64]; |
180 | int pgrp; | 200 | struct pid *pgrp; |
181 | int session; | 201 | struct pid *session; |
182 | unsigned long flags; | 202 | unsigned long flags; |
183 | int count; | 203 | int count; |
184 | struct winsize winsize; | 204 | struct winsize winsize; |
@@ -283,7 +303,7 @@ extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, | |||
283 | int buflen); | 303 | int buflen); |
284 | extern void tty_write_message(struct tty_struct *tty, char *msg); | 304 | extern void tty_write_message(struct tty_struct *tty, char *msg); |
285 | 305 | ||
286 | extern int is_orphaned_pgrp(int pgrp); | 306 | extern int is_current_pgrp_orphaned(void); |
287 | extern int is_ignored(int sig); | 307 | extern int is_ignored(int sig); |
288 | extern int tty_signal(int sig, struct tty_struct *tty); | 308 | extern int tty_signal(int sig, struct tty_struct *tty); |
289 | extern void tty_hangup(struct tty_struct * tty); | 309 | extern void tty_hangup(struct tty_struct * tty); |
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty); | |||
291 | extern void tty_unhangup(struct file *filp); | 311 | extern void tty_unhangup(struct file *filp); |
292 | extern int tty_hung_up_p(struct file * filp); | 312 | extern int tty_hung_up_p(struct file * filp); |
293 | extern void do_SAK(struct tty_struct *tty); | 313 | extern void do_SAK(struct tty_struct *tty); |
314 | extern void __do_SAK(struct tty_struct *tty); | ||
294 | extern void disassociate_ctty(int priv); | 315 | extern void disassociate_ctty(int priv); |
295 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 316 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
296 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 317 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
@@ -312,7 +333,6 @@ extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
312 | 333 | ||
313 | extern dev_t tty_devnum(struct tty_struct *tty); | 334 | extern dev_t tty_devnum(struct tty_struct *tty); |
314 | extern void proc_clear_tty(struct task_struct *p); | 335 | extern void proc_clear_tty(struct task_struct *p); |
315 | extern void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); | ||
316 | extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); | 336 | extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); |
317 | extern struct tty_struct *get_current_tty(void); | 337 | extern struct tty_struct *get_current_tty(void); |
318 | 338 | ||
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 28967eda9d7b..dc2e9fe69418 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -40,13 +40,16 @@ typedef __u64 __fs64; | |||
40 | typedef __u32 __fs32; | 40 | typedef __u32 __fs32; |
41 | typedef __u16 __fs16; | 41 | typedef __u16 __fs16; |
42 | #else | 42 | #else |
43 | #include <asm/div64.h> | ||
43 | typedef __u64 __bitwise __fs64; | 44 | typedef __u64 __bitwise __fs64; |
44 | typedef __u32 __bitwise __fs32; | 45 | typedef __u32 __bitwise __fs32; |
45 | typedef __u16 __bitwise __fs16; | 46 | typedef __u16 __bitwise __fs16; |
46 | #endif | 47 | #endif |
47 | 48 | ||
49 | #ifdef __KERNEL__ | ||
48 | #include <linux/ufs_fs_i.h> | 50 | #include <linux/ufs_fs_i.h> |
49 | #include <linux/ufs_fs_sb.h> | 51 | #include <linux/ufs_fs_sb.h> |
52 | #endif | ||
50 | 53 | ||
51 | #define UFS_BBLOCK 0 | 54 | #define UFS_BBLOCK 0 |
52 | #define UFS_BBSIZE 8192 | 55 | #define UFS_BBSIZE 8192 |
@@ -261,17 +264,10 @@ typedef __u16 __bitwise __fs16; | |||
261 | */ | 264 | */ |
262 | #define ufs_inotocg(x) ((x) / uspi->s_ipg) | 265 | #define ufs_inotocg(x) ((x) / uspi->s_ipg) |
263 | #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) | 266 | #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) |
264 | #define ufs_inotofsba(x) (ufs_cgimin(ufs_inotocg(x)) + ufs_inotocgoff(x) / uspi->s_inopf) | 267 | #define ufs_inotofsba(x) (((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf) |
265 | #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) | 268 | #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) |
266 | 269 | ||
267 | /* | 270 | /* |
268 | * Give cylinder group number for a file system block. | ||
269 | * Give cylinder group block number for a file system block. | ||
270 | */ | ||
271 | #define ufs_dtog(d) ((d) / uspi->s_fpg) | ||
272 | #define ufs_dtogd(d) ((d) % uspi->s_fpg) | ||
273 | |||
274 | /* | ||
275 | * Compute the cylinder and rotational position of a cyl block addr. | 271 | * Compute the cylinder and rotational position of a cyl block addr. |
276 | */ | 272 | */ |
277 | #define ufs_cbtocylno(bno) \ | 273 | #define ufs_cbtocylno(bno) \ |
@@ -303,7 +299,7 @@ typedef __u16 __bitwise __fs16; | |||
303 | #define UFS_MAXMNTLEN 512 | 299 | #define UFS_MAXMNTLEN 512 |
304 | #define UFS2_MAXMNTLEN 468 | 300 | #define UFS2_MAXMNTLEN 468 |
305 | #define UFS2_MAXVOLLEN 32 | 301 | #define UFS2_MAXVOLLEN 32 |
306 | /* #define UFS_MAXCSBUFS 31 */ | 302 | #define UFS_MAXCSBUFS 31 |
307 | #define UFS_LINK_MAX 32000 | 303 | #define UFS_LINK_MAX 32000 |
308 | /* | 304 | /* |
309 | #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) | 305 | #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) |
@@ -721,6 +717,7 @@ struct ufs_cg_private_info { | |||
721 | __u32 c_nclusterblks; /* number of clusters this cg */ | 717 | __u32 c_nclusterblks; /* number of clusters this cg */ |
722 | }; | 718 | }; |
723 | 719 | ||
720 | |||
724 | struct ufs_sb_private_info { | 721 | struct ufs_sb_private_info { |
725 | struct ufs_buffer_head s_ubh; /* buffer containing super block */ | 722 | struct ufs_buffer_head s_ubh; /* buffer containing super block */ |
726 | struct ufs_csum_core cs_total; | 723 | struct ufs_csum_core cs_total; |
@@ -754,7 +751,7 @@ struct ufs_sb_private_info { | |||
754 | __u32 s_npsect; /* # sectors/track including spares */ | 751 | __u32 s_npsect; /* # sectors/track including spares */ |
755 | __u32 s_interleave; /* hardware sector interleave */ | 752 | __u32 s_interleave; /* hardware sector interleave */ |
756 | __u32 s_trackskew; /* sector 0 skew, per track */ | 753 | __u32 s_trackskew; /* sector 0 skew, per track */ |
757 | __u32 s_csaddr; /* blk addr of cyl grp summary area */ | 754 | __u64 s_csaddr; /* blk addr of cyl grp summary area */ |
758 | __u32 s_cssize; /* size of cyl grp summary area */ | 755 | __u32 s_cssize; /* size of cyl grp summary area */ |
759 | __u32 s_cgsize; /* cylinder group size */ | 756 | __u32 s_cgsize; /* cylinder group size */ |
760 | __u32 s_ntrak; /* tracks per cylinder */ | 757 | __u32 s_ntrak; /* tracks per cylinder */ |
@@ -789,6 +786,7 @@ struct ufs_sb_private_info { | |||
789 | 786 | ||
790 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ | 787 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ |
791 | __s32 fs_magic; /* filesystem magic */ | 788 | __s32 fs_magic; /* filesystem magic */ |
789 | unsigned int s_dirblksize; | ||
792 | }; | 790 | }; |
793 | 791 | ||
794 | /* | 792 | /* |
@@ -949,17 +947,17 @@ struct ufs_super_block_third { | |||
949 | #ifdef __KERNEL__ | 947 | #ifdef __KERNEL__ |
950 | 948 | ||
951 | /* balloc.c */ | 949 | /* balloc.c */ |
952 | extern void ufs_free_fragments (struct inode *, unsigned, unsigned); | 950 | extern void ufs_free_fragments (struct inode *, u64, unsigned); |
953 | extern void ufs_free_blocks (struct inode *, unsigned, unsigned); | 951 | extern void ufs_free_blocks (struct inode *, u64, unsigned); |
954 | extern unsigned ufs_new_fragments(struct inode *, __fs32 *, unsigned, unsigned, | 952 | extern u64 ufs_new_fragments(struct inode *, void *, u64, u64, |
955 | unsigned, int *, struct page *); | 953 | unsigned, int *, struct page *); |
956 | 954 | ||
957 | /* cylinder.c */ | 955 | /* cylinder.c */ |
958 | extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); | 956 | extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); |
959 | extern void ufs_put_cylinder (struct super_block *, unsigned); | 957 | extern void ufs_put_cylinder (struct super_block *, unsigned); |
960 | 958 | ||
961 | /* dir.c */ | 959 | /* dir.c */ |
962 | extern struct inode_operations ufs_dir_inode_operations; | 960 | extern const struct inode_operations ufs_dir_inode_operations; |
963 | extern int ufs_add_link (struct dentry *, struct inode *); | 961 | extern int ufs_add_link (struct dentry *, struct inode *); |
964 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); | 962 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); |
965 | extern int ufs_make_empty(struct inode *, struct inode *); | 963 | extern int ufs_make_empty(struct inode *, struct inode *); |
@@ -971,7 +969,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, | |||
971 | struct page *page, struct inode *inode); | 969 | struct page *page, struct inode *inode); |
972 | 970 | ||
973 | /* file.c */ | 971 | /* file.c */ |
974 | extern struct inode_operations ufs_file_inode_operations; | 972 | extern const struct inode_operations ufs_file_inode_operations; |
975 | extern const struct file_operations ufs_file_operations; | 973 | extern const struct file_operations ufs_file_operations; |
976 | 974 | ||
977 | extern const struct address_space_operations ufs_aops; | 975 | extern const struct address_space_operations ufs_aops; |
@@ -998,7 +996,7 @@ extern void ufs_error (struct super_block *, const char *, const char *, ...) __ | |||
998 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 996 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); |
999 | 997 | ||
1000 | /* symlink.c */ | 998 | /* symlink.c */ |
1001 | extern struct inode_operations ufs_fast_symlink_inode_operations; | 999 | extern const struct inode_operations ufs_fast_symlink_inode_operations; |
1002 | 1000 | ||
1003 | /* truncate.c */ | 1001 | /* truncate.c */ |
1004 | extern int ufs_truncate (struct inode *, loff_t); | 1002 | extern int ufs_truncate (struct inode *, loff_t); |
@@ -1013,6 +1011,22 @@ static inline struct ufs_inode_info *UFS_I(struct inode *inode) | |||
1013 | return container_of(inode, struct ufs_inode_info, vfs_inode); | 1011 | return container_of(inode, struct ufs_inode_info, vfs_inode); |
1014 | } | 1012 | } |
1015 | 1013 | ||
1014 | /* | ||
1015 | * Give cylinder group number for a file system block. | ||
1016 | * Give cylinder group block number for a file system block. | ||
1017 | */ | ||
1018 | /* #define ufs_dtog(d) ((d) / uspi->s_fpg) */ | ||
1019 | static inline u64 ufs_dtog(struct ufs_sb_private_info * uspi, u64 b) | ||
1020 | { | ||
1021 | do_div(b, uspi->s_fpg); | ||
1022 | return b; | ||
1023 | } | ||
1024 | /* #define ufs_dtogd(d) ((d) % uspi->s_fpg) */ | ||
1025 | static inline u32 ufs_dtogd(struct ufs_sb_private_info * uspi, u64 b) | ||
1026 | { | ||
1027 | return do_div(b, uspi->s_fpg); | ||
1028 | } | ||
1029 | |||
1016 | #endif /* __KERNEL__ */ | 1030 | #endif /* __KERNEL__ */ |
1017 | 1031 | ||
1018 | #endif /* __LINUX_UFS_FS_H */ | 1032 | #endif /* __LINUX_UFS_FS_H */ |
diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h index f50ce3b0cd52..6496caa82f9e 100644 --- a/include/linux/ufs_fs_i.h +++ b/include/linux/ufs_fs_i.h | |||
@@ -20,13 +20,12 @@ struct ufs_inode_info { | |||
20 | __fs64 u2_i_data[15]; | 20 | __fs64 u2_i_data[15]; |
21 | } i_u1; | 21 | } i_u1; |
22 | __u32 i_flags; | 22 | __u32 i_flags; |
23 | __u32 i_gen; | ||
24 | __u32 i_shadow; | 23 | __u32 i_shadow; |
25 | __u32 i_unused1; | 24 | __u32 i_unused1; |
26 | __u32 i_unused2; | 25 | __u32 i_unused2; |
27 | __u32 i_oeftflag; | 26 | __u32 i_oeftflag; |
28 | __u16 i_osync; | 27 | __u16 i_osync; |
29 | __u32 i_lastfrag; | 28 | __u64 i_lastfrag; |
30 | __u32 i_dir_start_lookup; | 29 | __u32 i_dir_start_lookup; |
31 | struct inode vfs_inode; | 30 | struct inode vfs_inode; |
32 | }; | 31 | }; |
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index 8ff13c160f3d..e114c93fc578 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h | |||
@@ -21,7 +21,6 @@ | |||
21 | struct ufs_sb_private_info; | 21 | struct ufs_sb_private_info; |
22 | struct ufs_cg_private_info; | 22 | struct ufs_cg_private_info; |
23 | struct ufs_csum; | 23 | struct ufs_csum; |
24 | #define UFS_MAXCSBUFS 31 | ||
25 | 24 | ||
26 | struct ufs_sb_info { | 25 | struct ufs_sb_info { |
27 | struct ufs_sb_private_info * s_uspi; | 26 | struct ufs_sb_private_info * s_uspi; |
diff --git a/include/linux/usb.h b/include/linux/usb.h index aab5b1b72021..a8e8d1ecebb1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_USB_H | 2 | #define __LINUX_USB_H |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | 4 | #include <linux/mod_devicetable.h> |
5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
6 | 6 | ||
7 | #define USB_MAJOR 180 | 7 | #define USB_MAJOR 180 |
8 | #define USB_DEVICE_MAJOR 189 | 8 | #define USB_DEVICE_MAJOR 189 |
@@ -107,7 +107,8 @@ enum usb_interface_condition { | |||
107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
108 | * capability during autosuspend. | 108 | * capability during autosuspend. |
109 | * @dev: driver model's view of this device | 109 | * @dev: driver model's view of this device |
110 | * @class_dev: driver model's class view of this device. | 110 | * @usb_dev: if an interface is bound to the USB major, this will point |
111 | * to the sysfs representation for that device. | ||
111 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | 112 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not |
112 | * allowed unless the counter is 0. | 113 | * allowed unless the counter is 0. |
113 | * | 114 | * |
@@ -152,7 +153,7 @@ struct usb_interface { | |||
152 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 153 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
153 | 154 | ||
154 | struct device dev; /* interface specific device info */ | 155 | struct device dev; /* interface specific device info */ |
155 | struct class_device *class_dev; | 156 | struct device *usb_dev; /* pointer to the usb class's device, if any */ |
156 | int pm_usage_cnt; /* usage counter for autosuspend */ | 157 | int pm_usage_cnt; /* usage counter for autosuspend */ |
157 | }; | 158 | }; |
158 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 159 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
@@ -372,7 +373,7 @@ struct usb_device { | |||
372 | char *serial; /* iSerialNumber string, if present */ | 373 | char *serial; /* iSerialNumber string, if present */ |
373 | 374 | ||
374 | struct list_head filelist; | 375 | struct list_head filelist; |
375 | struct class_device *class_dev; | 376 | struct device *usbfs_dev; |
376 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 377 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
377 | 378 | ||
378 | /* | 379 | /* |
@@ -475,6 +476,8 @@ extern void usb_driver_release_interface(struct usb_driver *driver, | |||
475 | struct usb_interface *iface); | 476 | struct usb_interface *iface); |
476 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, | 477 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, |
477 | const struct usb_device_id *id); | 478 | const struct usb_device_id *id); |
479 | extern int usb_match_one_id(struct usb_interface *interface, | ||
480 | const struct usb_device_id *id); | ||
478 | 481 | ||
479 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, | 482 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, |
480 | int minor); | 483 | int minor); |
@@ -554,6 +557,18 @@ static inline int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *e | |||
554 | } | 557 | } |
555 | 558 | ||
556 | /** | 559 | /** |
560 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
561 | * @epd: endpoint to be checked | ||
562 | * | ||
563 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
564 | */ | ||
565 | static inline int usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) | ||
566 | { | ||
567 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
568 | USB_ENDPOINT_XFER_CONTROL); | ||
569 | } | ||
570 | |||
571 | /** | ||
557 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | 572 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type |
558 | * @epd: endpoint to be checked | 573 | * @epd: endpoint to be checked |
559 | * | 574 | * |
@@ -723,11 +738,21 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
723 | 738 | ||
724 | /* ----------------------------------------------------------------------- */ | 739 | /* ----------------------------------------------------------------------- */ |
725 | 740 | ||
741 | /* Stuff for dynamic usb ids */ | ||
726 | struct usb_dynids { | 742 | struct usb_dynids { |
727 | spinlock_t lock; | 743 | spinlock_t lock; |
728 | struct list_head list; | 744 | struct list_head list; |
729 | }; | 745 | }; |
730 | 746 | ||
747 | struct usb_dynid { | ||
748 | struct list_head node; | ||
749 | struct usb_device_id id; | ||
750 | }; | ||
751 | |||
752 | extern ssize_t usb_store_new_id(struct usb_dynids *dynids, | ||
753 | struct device_driver *driver, | ||
754 | const char *buf, size_t count); | ||
755 | |||
731 | /** | 756 | /** |
732 | * struct usbdrv_wrap - wrapper for driver-model structure | 757 | * struct usbdrv_wrap - wrapper for driver-model structure |
733 | * @driver: The driver-model core driver structure. | 758 | * @driver: The driver-model core driver structure. |
@@ -868,10 +893,11 @@ struct usb_class_driver { | |||
868 | * use these in module_init()/module_exit() | 893 | * use these in module_init()/module_exit() |
869 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) | 894 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
870 | */ | 895 | */ |
871 | extern int usb_register_driver(struct usb_driver *, struct module *); | 896 | extern int usb_register_driver(struct usb_driver *, struct module *, |
897 | const char *); | ||
872 | static inline int usb_register(struct usb_driver *driver) | 898 | static inline int usb_register(struct usb_driver *driver) |
873 | { | 899 | { |
874 | return usb_register_driver(driver, THIS_MODULE); | 900 | return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
875 | } | 901 | } |
876 | extern void usb_deregister(struct usb_driver *); | 902 | extern void usb_deregister(struct usb_driver *); |
877 | 903 | ||
@@ -909,7 +935,7 @@ struct usb_iso_packet_descriptor { | |||
909 | unsigned int offset; | 935 | unsigned int offset; |
910 | unsigned int length; /* expected length */ | 936 | unsigned int length; /* expected length */ |
911 | unsigned int actual_length; | 937 | unsigned int actual_length; |
912 | unsigned int status; | 938 | int status; |
913 | }; | 939 | }; |
914 | 940 | ||
915 | struct urb; | 941 | struct urb; |
@@ -1085,7 +1111,6 @@ struct urb | |||
1085 | struct kref kref; /* reference count of the URB */ | 1111 | struct kref kref; /* reference count of the URB */ |
1086 | spinlock_t lock; /* lock for the URB */ | 1112 | spinlock_t lock; /* lock for the URB */ |
1087 | void *hcpriv; /* private data for host controller */ | 1113 | void *hcpriv; /* private data for host controller */ |
1088 | int bandwidth; /* bandwidth for INT/ISO request */ | ||
1089 | atomic_t use_count; /* concurrent submissions counter */ | 1114 | atomic_t use_count; /* concurrent submissions counter */ |
1090 | u8 reject; /* submissions will fail */ | 1115 | u8 reject; /* submissions will fail */ |
1091 | 1116 | ||
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild new file mode 100644 index 000000000000..43f160cfe003 --- /dev/null +++ b/include/linux/usb/Kbuild | |||
@@ -0,0 +1,5 @@ | |||
1 | unifdef-y += audio.h | ||
2 | unifdef-y += cdc.h | ||
3 | unifdef-y += ch9.h | ||
4 | unifdef-y += midi.h | ||
5 | |||
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index ba617c372455..956edf3bbecb 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -73,6 +73,13 @@ struct usb_cdc_acm_descriptor { | |||
73 | __u8 bmCapabilities; | 73 | __u8 bmCapabilities; |
74 | } __attribute__ ((packed)); | 74 | } __attribute__ ((packed)); |
75 | 75 | ||
76 | /* capabilities from 5.2.3.3 */ | ||
77 | |||
78 | #define USB_CDC_COMM_FEATURE 0x01 | ||
79 | #define USB_CDC_CAP_LINE 0x02 | ||
80 | #define USB_CDC_CAP_BRK 0x04 | ||
81 | #define USB_CDC_CAP_NOTIFY 0x08 | ||
82 | |||
76 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ | 83 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ |
77 | struct usb_cdc_union_desc { | 84 | struct usb_cdc_union_desc { |
78 | __u8 bLength; | 85 | __u8 bLength; |
diff --git a/include/linux/usb_ch9.h b/include/linux/usb/ch9.h index c720d107ff29..245c72531228 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -224,6 +224,7 @@ struct usb_device_descriptor { | |||
224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ | 224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ |
225 | #define USB_CLASS_VIDEO 0x0e | 225 | #define USB_CLASS_VIDEO 0x0e |
226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 | 226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 |
227 | #define USB_CLASS_MISC 0xef | ||
227 | #define USB_CLASS_APP_SPEC 0xfe | 228 | #define USB_CLASS_APP_SPEC 0xfe |
228 | #define USB_CLASS_VENDOR_SPEC 0xff | 229 | #define USB_CLASS_VENDOR_SPEC 0xff |
229 | 230 | ||
@@ -366,7 +367,7 @@ struct usb_debug_descriptor { | |||
366 | /* bulk endpoints with 8 byte maxpacket */ | 367 | /* bulk endpoints with 8 byte maxpacket */ |
367 | __u8 bDebugInEndpoint; | 368 | __u8 bDebugInEndpoint; |
368 | __u8 bDebugOutEndpoint; | 369 | __u8 bDebugOutEndpoint; |
369 | }; | 370 | } __attribute__((packed)); |
370 | 371 | ||
371 | /*-------------------------------------------------------------------------*/ | 372 | /*-------------------------------------------------------------------------*/ |
372 | 373 | ||
@@ -395,7 +396,7 @@ struct usb_security_descriptor { | |||
395 | 396 | ||
396 | __le16 wTotalLength; | 397 | __le16 wTotalLength; |
397 | __u8 bNumEncryptionTypes; | 398 | __u8 bNumEncryptionTypes; |
398 | }; | 399 | } __attribute__((packed)); |
399 | 400 | ||
400 | /*-------------------------------------------------------------------------*/ | 401 | /*-------------------------------------------------------------------------*/ |
401 | 402 | ||
@@ -409,7 +410,7 @@ struct usb_key_descriptor { | |||
409 | __u8 tTKID[3]; | 410 | __u8 tTKID[3]; |
410 | __u8 bReserved; | 411 | __u8 bReserved; |
411 | __u8 bKeyData[0]; | 412 | __u8 bKeyData[0]; |
412 | }; | 413 | } __attribute__((packed)); |
413 | 414 | ||
414 | /*-------------------------------------------------------------------------*/ | 415 | /*-------------------------------------------------------------------------*/ |
415 | 416 | ||
@@ -425,7 +426,7 @@ struct usb_encryption_descriptor { | |||
425 | #define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */ | 426 | #define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */ |
426 | __u8 bEncryptionValue; /* use in SET_ENCRYPTION */ | 427 | __u8 bEncryptionValue; /* use in SET_ENCRYPTION */ |
427 | __u8 bAuthKeyIndex; | 428 | __u8 bAuthKeyIndex; |
428 | }; | 429 | } __attribute__((packed)); |
429 | 430 | ||
430 | 431 | ||
431 | /*-------------------------------------------------------------------------*/ | 432 | /*-------------------------------------------------------------------------*/ |
@@ -437,7 +438,7 @@ struct usb_bos_descriptor { | |||
437 | 438 | ||
438 | __le16 wTotalLength; | 439 | __le16 wTotalLength; |
439 | __u8 bNumDeviceCaps; | 440 | __u8 bNumDeviceCaps; |
440 | }; | 441 | } __attribute__((packed)); |
441 | 442 | ||
442 | /*-------------------------------------------------------------------------*/ | 443 | /*-------------------------------------------------------------------------*/ |
443 | 444 | ||
@@ -446,7 +447,7 @@ struct usb_dev_cap_header { | |||
446 | __u8 bLength; | 447 | __u8 bLength; |
447 | __u8 bDescriptorType; | 448 | __u8 bDescriptorType; |
448 | __u8 bDevCapabilityType; | 449 | __u8 bDevCapabilityType; |
449 | }; | 450 | } __attribute__((packed)); |
450 | 451 | ||
451 | #define USB_CAP_TYPE_WIRELESS_USB 1 | 452 | #define USB_CAP_TYPE_WIRELESS_USB 1 |
452 | 453 | ||
@@ -474,7 +475,7 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */ | |||
474 | __u8 bmFFITXPowerInfo; /* FFI power levels */ | 475 | __u8 bmFFITXPowerInfo; /* FFI power levels */ |
475 | __le16 bmBandGroup; | 476 | __le16 bmBandGroup; |
476 | __u8 bReserved; | 477 | __u8 bReserved; |
477 | }; | 478 | } __attribute__((packed)); |
478 | 479 | ||
479 | /*-------------------------------------------------------------------------*/ | 480 | /*-------------------------------------------------------------------------*/ |
480 | 481 | ||
@@ -495,7 +496,7 @@ struct usb_wireless_ep_comp_descriptor { | |||
495 | #define USB_ENDPOINT_SWITCH_NO 0 | 496 | #define USB_ENDPOINT_SWITCH_NO 0 |
496 | #define USB_ENDPOINT_SWITCH_SWITCH 1 | 497 | #define USB_ENDPOINT_SWITCH_SWITCH 1 |
497 | #define USB_ENDPOINT_SWITCH_SCALE 2 | 498 | #define USB_ENDPOINT_SWITCH_SCALE 2 |
498 | }; | 499 | } __attribute__((packed)); |
499 | 500 | ||
500 | /*-------------------------------------------------------------------------*/ | 501 | /*-------------------------------------------------------------------------*/ |
501 | 502 | ||
@@ -511,7 +512,7 @@ struct usb_handshake { | |||
511 | __u8 CDID[16]; | 512 | __u8 CDID[16]; |
512 | __u8 nonce[16]; | 513 | __u8 nonce[16]; |
513 | __u8 MIC[8]; | 514 | __u8 MIC[8]; |
514 | }; | 515 | } __attribute__((packed)); |
515 | 516 | ||
516 | /*-------------------------------------------------------------------------*/ | 517 | /*-------------------------------------------------------------------------*/ |
517 | 518 | ||
@@ -523,7 +524,7 @@ struct usb_connection_context { | |||
523 | __u8 CHID[16]; /* persistent host id */ | 524 | __u8 CHID[16]; /* persistent host id */ |
524 | __u8 CDID[16]; /* device id (unique w/in host context) */ | 525 | __u8 CDID[16]; /* device id (unique w/in host context) */ |
525 | __u8 CK[16]; /* connection key */ | 526 | __u8 CK[16]; /* connection key */ |
526 | }; | 527 | } __attribute__((packed)); |
527 | 528 | ||
528 | /*-------------------------------------------------------------------------*/ | 529 | /*-------------------------------------------------------------------------*/ |
529 | 530 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 10f99e5f1a97..32acbae28d24 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -54,6 +54,8 @@ | |||
54 | * @write_wait: a wait_queue_head_t used by the port. | 54 | * @write_wait: a wait_queue_head_t used by the port. |
55 | * @work: work queue entry for the line discipline waking up. | 55 | * @work: work queue entry for the line discipline waking up. |
56 | * @open_count: number of times this port has been opened. | 56 | * @open_count: number of times this port has been opened. |
57 | * @throttled: nonzero if the read urb is inactive to throttle the device | ||
58 | * @throttle_req: nonzero if the tty wants to throttle us | ||
57 | * | 59 | * |
58 | * This structure is used by the usb-serial core and drivers for the specific | 60 | * This structure is used by the usb-serial core and drivers for the specific |
59 | * ports of a device. | 61 | * ports of a device. |
@@ -88,6 +90,8 @@ struct usb_serial_port { | |||
88 | wait_queue_head_t write_wait; | 90 | wait_queue_head_t write_wait; |
89 | struct work_struct work; | 91 | struct work_struct work; |
90 | int open_count; | 92 | int open_count; |
93 | char throttled; | ||
94 | char throttle_req; | ||
91 | struct device dev; | 95 | struct device dev; |
92 | }; | 96 | }; |
93 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) | 97 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) |
@@ -179,6 +183,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
179 | * memory structure allocation at this point in time. | 183 | * memory structure allocation at this point in time. |
180 | * @shutdown: pointer to the driver's shutdown function. This will be | 184 | * @shutdown: pointer to the driver's shutdown function. This will be |
181 | * called when the device is removed from the system. | 185 | * called when the device is removed from the system. |
186 | * @usb_driver: pointer to the struct usb_driver that controls this | ||
187 | * device. This is necessary to allow dynamic ids to be added to | ||
188 | * the driver from sysfs. | ||
182 | * | 189 | * |
183 | * This structure is defines a USB Serial driver. It provides all of | 190 | * This structure is defines a USB Serial driver. It provides all of |
184 | * the information that the USB serial core code needs. If the function | 191 | * the information that the USB serial core code needs. If the function |
@@ -202,6 +209,8 @@ struct usb_serial_driver { | |||
202 | 209 | ||
203 | struct list_head driver_list; | 210 | struct list_head driver_list; |
204 | struct device_driver driver; | 211 | struct device_driver driver; |
212 | struct usb_driver *usb_driver; | ||
213 | struct usb_dynids dynids; | ||
205 | 214 | ||
206 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); | 215 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); |
207 | int (*attach) (struct usb_serial *serial); | 216 | int (*attach) (struct usb_serial *serial); |
@@ -264,6 +273,8 @@ extern int usb_serial_generic_write_room (struct usb_serial_port *port); | |||
264 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); | 273 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); |
265 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); | 274 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); |
266 | extern void usb_serial_generic_write_bulk_callback (struct urb *urb); | 275 | extern void usb_serial_generic_write_bulk_callback (struct urb *urb); |
276 | extern void usb_serial_generic_throttle (struct usb_serial_port *port); | ||
277 | extern void usb_serial_generic_unthrottle (struct usb_serial_port *port); | ||
267 | extern void usb_serial_generic_shutdown (struct usb_serial *serial); | 278 | extern void usb_serial_generic_shutdown (struct usb_serial *serial); |
268 | extern int usb_serial_generic_register (int debug); | 279 | extern int usb_serial_generic_register (int debug); |
269 | extern void usb_serial_generic_deregister (void); | 280 | extern void usb_serial_generic_deregister (void); |
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb_gadgetfs.h index b53d6ae8e55e..8086d5a9b94e 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb_gadgetfs.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #include <asm/types.h> | 2 | #include <asm/types.h> |
3 | #include <asm/ioctl.h> | 3 | #include <asm/ioctl.h> |
4 | 4 | ||
5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Filesystem based user-mode API to USB Gadget controller hardware | 8 | * Filesystem based user-mode API to USB Gadget controller hardware |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 2ae76fe52ff7..1b792b9286ba 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -46,7 +46,9 @@ | |||
46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ | 46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ |
47 | /* Sets max_sectors to 64 */ \ | 47 | /* Sets max_sectors to 64 */ \ |
48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | 48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ |
49 | /* Don't claim device */ | 49 | /* Don't claim device */ \ |
50 | US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ | ||
51 | /* sometimes sizes is too big */ | ||
50 | 52 | ||
51 | #define US_FLAG(name, value) US_FL_##name = value , | 53 | #define US_FLAG(name, value) US_FL_##name = value , |
52 | enum { US_DO_ALL_FLAGS }; | 54 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 617d8a1c59ae..342dd5a7e8bb 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -159,9 +159,9 @@ struct usbdevfs_ioctl32 { | |||
159 | #define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) | 159 | #define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) |
160 | #define USBDEVFS_DISCARDURB _IO('U', 11) | 160 | #define USBDEVFS_DISCARDURB _IO('U', 11) |
161 | #define USBDEVFS_REAPURB _IOW('U', 12, void *) | 161 | #define USBDEVFS_REAPURB _IOW('U', 12, void *) |
162 | #define USBDEVFS_REAPURB32 _IOW('U', 12, u32) | 162 | #define USBDEVFS_REAPURB32 _IOW('U', 12, __u32) |
163 | #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) | 163 | #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) |
164 | #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32) | 164 | #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32) |
165 | #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) | 165 | #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) |
166 | #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) | 166 | #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) |
167 | #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) | 167 | #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) |
diff --git a/include/linux/video_output.h b/include/linux/video_output.h new file mode 100644 index 000000000000..e63e0c03ee0d --- /dev/null +++ b/include/linux/video_output.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2006 Luming Yu <luming.yu@intel.com> | ||
4 | * | ||
5 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along | ||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
20 | * | ||
21 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
22 | */ | ||
23 | #ifndef _LINUX_VIDEO_OUTPUT_H | ||
24 | #define _LINUX_VIDEO_OUTPUT_H | ||
25 | #include <linux/device.h> | ||
26 | struct output_device; | ||
27 | struct output_properties { | ||
28 | int (*set_state)(struct output_device *); | ||
29 | int (*get_status)(struct output_device *); | ||
30 | }; | ||
31 | struct output_device { | ||
32 | int request_state; | ||
33 | struct output_properties *props; | ||
34 | struct class_device class_dev; | ||
35 | }; | ||
36 | #define to_output_device(obj) container_of(obj, struct output_device, class_dev) | ||
37 | struct output_device *video_output_register(const char *name, | ||
38 | struct device *dev, | ||
39 | void *devdata, | ||
40 | struct output_properties *op); | ||
41 | void video_output_unregister(struct output_device *dev); | ||
42 | #endif | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5e9803ed17fc..acb1f105870c 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -3,20 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/mm.h> | ||
6 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | #ifdef CONFIG_VM_EVENT_COUNTERS | 10 | #ifdef CONFIG_ZONE_DMA |
10 | /* | 11 | #define DMA_ZONE(xx) xx##_DMA, |
11 | * Light weight per cpu counter implementation. | 12 | #else |
12 | * | 13 | #define DMA_ZONE(xx) |
13 | * Counters should only be incremented. You need to set EMBEDDED | 14 | #endif |
14 | * to disable VM_EVENT_COUNTERS. Things like procps (vmstat, | ||
15 | * top, etc) use /proc/vmstat and depend on these counters. | ||
16 | * | ||
17 | * Counters are handled completely inline. On many platforms the code | ||
18 | * generated will simply be the increment of a global address. | ||
19 | */ | ||
20 | 15 | ||
21 | #ifdef CONFIG_ZONE_DMA32 | 16 | #ifdef CONFIG_ZONE_DMA32 |
22 | #define DMA32_ZONE(xx) xx##_DMA32, | 17 | #define DMA32_ZONE(xx) xx##_DMA32, |
@@ -30,7 +25,7 @@ | |||
30 | #define HIGHMEM_ZONE(xx) | 25 | #define HIGHMEM_ZONE(xx) |
31 | #endif | 26 | #endif |
32 | 27 | ||
33 | #define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | 28 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) |
34 | 29 | ||
35 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 30 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
36 | FOR_ALL_ZONES(PGALLOC), | 31 | FOR_ALL_ZONES(PGALLOC), |
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
45 | NR_VM_EVENT_ITEMS | 40 | NR_VM_EVENT_ITEMS |
46 | }; | 41 | }; |
47 | 42 | ||
43 | #ifdef CONFIG_VM_EVENT_COUNTERS | ||
44 | /* | ||
45 | * Light weight per cpu counter implementation. | ||
46 | * | ||
47 | * Counters should only be incremented and no critical kernel component | ||
48 | * should rely on the counter values. | ||
49 | * | ||
50 | * Counters are handled completely inline. On many platforms the code | ||
51 | * generated will simply be the increment of a global address. | ||
52 | */ | ||
53 | |||
48 | struct vm_event_state { | 54 | struct vm_event_state { |
49 | unsigned long event[NR_VM_EVENT_ITEMS]; | 55 | unsigned long event[NR_VM_EVENT_ITEMS]; |
50 | }; | 56 | }; |
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu) | |||
85 | #else | 91 | #else |
86 | 92 | ||
87 | /* Disable counters */ | 93 | /* Disable counters */ |
88 | #define get_cpu_vm_events(e) 0L | 94 | static inline void count_vm_event(enum vm_event_item item) |
89 | #define count_vm_event(e) do { } while (0) | 95 | { |
90 | #define count_vm_events(e,d) do { } while (0) | 96 | } |
91 | #define __count_vm_event(e) do { } while (0) | 97 | static inline void count_vm_events(enum vm_event_item item, long delta) |
92 | #define __count_vm_events(e,d) do { } while (0) | 98 | { |
93 | #define vm_events_fold_cpu(x) do { } while (0) | 99 | } |
100 | static inline void __count_vm_event(enum vm_event_item item) | ||
101 | { | ||
102 | } | ||
103 | static inline void __count_vm_events(enum vm_event_item item, long delta) | ||
104 | { | ||
105 | } | ||
106 | static inline void all_vm_events(unsigned long *ret) | ||
107 | { | ||
108 | } | ||
109 | static inline void vm_events_fold_cpu(int cpu) | ||
110 | { | ||
111 | } | ||
94 | 112 | ||
95 | #endif /* CONFIG_VM_EVENT_COUNTERS */ | 113 | #endif /* CONFIG_VM_EVENT_COUNTERS */ |
96 | 114 | ||
97 | #define __count_zone_vm_events(item, zone, delta) \ | 115 | #define __count_zone_vm_events(item, zone, delta) \ |
98 | __count_vm_events(item##_DMA + zone_idx(zone), delta) | 116 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ |
117 | zone_idx(zone), delta) | ||
99 | 118 | ||
100 | /* | 119 | /* |
101 | * Zone based page accounting with per cpu differentials. | 120 | * Zone based page accounting with per cpu differentials. |
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node, | |||
142 | struct zone *zones = NODE_DATA(node)->node_zones; | 161 | struct zone *zones = NODE_DATA(node)->node_zones; |
143 | 162 | ||
144 | return | 163 | return |
164 | #ifdef CONFIG_ZONE_DMA | ||
165 | zone_page_state(&zones[ZONE_DMA], item) + | ||
166 | #endif | ||
145 | #ifdef CONFIG_ZONE_DMA32 | 167 | #ifdef CONFIG_ZONE_DMA32 |
146 | zone_page_state(&zones[ZONE_DMA32], item) + | 168 | zone_page_state(&zones[ZONE_DMA32], item) + |
147 | #endif | 169 | #endif |
148 | zone_page_state(&zones[ZONE_NORMAL], item) + | ||
149 | #ifdef CONFIG_HIGHMEM | 170 | #ifdef CONFIG_HIGHMEM |
150 | zone_page_state(&zones[ZONE_HIGHMEM], item) + | 171 | zone_page_state(&zones[ZONE_HIGHMEM], item) + |
151 | #endif | 172 | #endif |
152 | zone_page_state(&zones[ZONE_DMA], item); | 173 | zone_page_state(&zones[ZONE_NORMAL], item); |
153 | } | 174 | } |
154 | 175 | ||
155 | extern void zone_statistics(struct zonelist *, struct zone *); | 176 | extern void zone_statistics(struct zonelist *, struct zone *); |
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item); | |||
186 | void dec_zone_page_state(struct page *, enum zone_stat_item); | 207 | void dec_zone_page_state(struct page *, enum zone_stat_item); |
187 | 208 | ||
188 | extern void inc_zone_state(struct zone *, enum zone_stat_item); | 209 | extern void inc_zone_state(struct zone *, enum zone_stat_item); |
210 | extern void __inc_zone_state(struct zone *, enum zone_stat_item); | ||
211 | extern void dec_zone_state(struct zone *, enum zone_stat_item); | ||
212 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); | ||
189 | 213 | ||
190 | void refresh_cpu_vm_stats(int); | 214 | void refresh_cpu_vm_stats(int); |
191 | void refresh_vm_stats(void); | 215 | void refresh_vm_stats(void); |
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page, | |||
214 | __inc_zone_state(page_zone(page), item); | 238 | __inc_zone_state(page_zone(page), item); |
215 | } | 239 | } |
216 | 240 | ||
241 | static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) | ||
242 | { | ||
243 | atomic_long_dec(&zone->vm_stat[item]); | ||
244 | atomic_long_dec(&vm_stat[item]); | ||
245 | } | ||
246 | |||
217 | static inline void __dec_zone_page_state(struct page *page, | 247 | static inline void __dec_zone_page_state(struct page *page, |
218 | enum zone_stat_item item) | 248 | enum zone_stat_item item) |
219 | { | 249 | { |
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 2cd05013edfc..3add87465b1f 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h | |||
@@ -516,9 +516,6 @@ struct wan_device { | |||
516 | /* Public functions available for device drivers */ | 516 | /* Public functions available for device drivers */ |
517 | extern int register_wan_device(struct wan_device *wandev); | 517 | extern int register_wan_device(struct wan_device *wandev); |
518 | extern int unregister_wan_device(char *name); | 518 | extern int unregister_wan_device(char *name); |
519 | __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev); | ||
520 | int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, | ||
521 | unsigned short type); | ||
522 | 519 | ||
523 | /* Proc interface functions. These must not be called by the drivers! */ | 520 | /* Proc interface functions. These must not be called by the drivers! */ |
524 | extern int wanrouter_proc_init(void); | 521 | extern int wanrouter_proc_init(void); |
@@ -527,11 +524,6 @@ extern int wanrouter_proc_add(struct wan_device *wandev); | |||
527 | extern int wanrouter_proc_delete(struct wan_device *wandev); | 524 | extern int wanrouter_proc_delete(struct wan_device *wandev); |
528 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); | 525 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); |
529 | 526 | ||
530 | extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
531 | extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
532 | |||
533 | |||
534 | |||
535 | /* Public Data */ | 527 | /* Public Data */ |
536 | /* list of registered devices */ | 528 | /* list of registered devices */ |
537 | extern struct wan_device *wanrouter_router_devlist; | 529 | extern struct wan_device *wanrouter_router_devlist; |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 0e7f1e20ea45..def131a5ac70 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ | 13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ |
14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ | 14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
16 | /* Namespaces */ | 20 | /* Namespaces */ |
17 | #define XATTR_OS2_PREFIX "os2." | 21 | #define XATTR_OS2_PREFIX "os2." |
18 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) | 22 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) |
@@ -29,6 +33,8 @@ | |||
29 | #define XATTR_USER_PREFIX "user." | 33 | #define XATTR_USER_PREFIX "user." |
30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 34 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) |
31 | 35 | ||
36 | struct inode; | ||
37 | struct dentry; | ||
32 | 38 | ||
33 | struct xattr_handler { | 39 | struct xattr_handler { |
34 | char *prefix; | 40 | char *prefix; |
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz | |||
50 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); | 56 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); |
51 | int generic_removexattr(struct dentry *dentry, const char *name); | 57 | int generic_removexattr(struct dentry *dentry, const char *name); |
52 | 58 | ||
59 | #endif /* __KERNEL__ */ | ||
60 | |||
53 | #endif /* _LINUX_XATTR_H */ | 61 | #endif /* _LINUX_XATTR_H */ |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 9529ea1ae392..15ca89e9961b 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -178,6 +178,9 @@ enum { | |||
178 | XFRM_MSG_REPORT, | 178 | XFRM_MSG_REPORT, |
179 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT | 179 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT |
180 | 180 | ||
181 | XFRM_MSG_MIGRATE, | ||
182 | #define XFRM_MSG_MIGRATE XFRM_MSG_MIGRATE | ||
183 | |||
181 | __XFRM_MSG_MAX | 184 | __XFRM_MSG_MAX |
182 | }; | 185 | }; |
183 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | 186 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) |
@@ -256,6 +259,7 @@ enum xfrm_attr_type_t { | |||
256 | XFRMA_COADDR, /* xfrm_address_t */ | 259 | XFRMA_COADDR, /* xfrm_address_t */ |
257 | XFRMA_LASTUSED, | 260 | XFRMA_LASTUSED, |
258 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ | 261 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ |
262 | XFRMA_MIGRATE, | ||
259 | __XFRMA_MAX | 263 | __XFRMA_MAX |
260 | 264 | ||
261 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 265 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
@@ -351,6 +355,19 @@ struct xfrm_user_report { | |||
351 | struct xfrm_selector sel; | 355 | struct xfrm_selector sel; |
352 | }; | 356 | }; |
353 | 357 | ||
358 | struct xfrm_user_migrate { | ||
359 | xfrm_address_t old_daddr; | ||
360 | xfrm_address_t old_saddr; | ||
361 | xfrm_address_t new_daddr; | ||
362 | xfrm_address_t new_saddr; | ||
363 | __u8 proto; | ||
364 | __u8 mode; | ||
365 | __u16 reserved; | ||
366 | __u32 reqid; | ||
367 | __u16 old_family; | ||
368 | __u16 new_family; | ||
369 | }; | ||
370 | |||
354 | #ifndef __KERNEL__ | 371 | #ifndef __KERNEL__ |
355 | /* backwards compatibility for userspace */ | 372 | /* backwards compatibility for userspace */ |
356 | #define XFRMGRP_ACQUIRE 1 | 373 | #define XFRMGRP_ACQUIRE 1 |
@@ -375,6 +392,8 @@ enum xfrm_nlgroups { | |||
375 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS | 392 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS |
376 | XFRMNLGRP_REPORT, | 393 | XFRMNLGRP_REPORT, |
377 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT | 394 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT |
395 | XFRMNLGRP_MIGRATE, | ||
396 | #define XFRMNLGRP_MIGRATE XFRMNLGRP_MIGRATE | ||
378 | __XFRMNLGRP_MAX | 397 | __XFRMNLGRP_MAX |
379 | }; | 398 | }; |
380 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) | 399 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) |