diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-02-10 01:26:32 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-02-10 01:26:32 -0500 |
commit | b22364c8eec89e6b0c081a237f3b6348df87796f (patch) | |
tree | 233a923281fb640106465d076997ff511efb6edf /include/linux | |
parent | 2c8dc071517ec2843869024dc82be2e246f41064 (diff) | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux')
197 files changed, 3127 insertions, 1989 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index e618b25b5add..683513e310de 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 |
@@ -61,7 +62,6 @@ header-y += fd.h | |||
61 | header-y += fdreg.h | 62 | header-y += fdreg.h |
62 | header-y += fib_rules.h | 63 | header-y += fib_rules.h |
63 | header-y += fuse.h | 64 | header-y += fuse.h |
64 | header-y += futex.h | ||
65 | header-y += genetlink.h | 65 | header-y += genetlink.h |
66 | header-y += gen_stats.h | 66 | header-y += gen_stats.h |
67 | header-y += gigaset_dev.h | 67 | header-y += gigaset_dev.h |
@@ -70,7 +70,6 @@ header-y += hysdn_if.h | |||
70 | header-y += i2c-dev.h | 70 | header-y += i2c-dev.h |
71 | header-y += i8k.h | 71 | header-y += i8k.h |
72 | header-y += icmp.h | 72 | header-y += icmp.h |
73 | header-y += if_addr.h | ||
74 | header-y += if_arcnet.h | 73 | header-y += if_arcnet.h |
75 | header-y += if_arp.h | 74 | header-y += if_arp.h |
76 | header-y += if_bonding.h | 75 | header-y += if_bonding.h |
@@ -80,7 +79,6 @@ header-y += if_fddi.h | |||
80 | header-y += if.h | 79 | header-y += if.h |
81 | header-y += if_hippi.h | 80 | header-y += if_hippi.h |
82 | header-y += if_infiniband.h | 81 | header-y += if_infiniband.h |
83 | header-y += if_link.h | ||
84 | header-y += if_packet.h | 82 | header-y += if_packet.h |
85 | header-y += if_plip.h | 83 | header-y += if_plip.h |
86 | header-y += if_ppp.h | 84 | header-y += if_ppp.h |
@@ -120,7 +118,6 @@ header-y += nfs4_mount.h | |||
120 | header-y += nfs_mount.h | 118 | header-y += nfs_mount.h |
121 | header-y += oom.h | 119 | header-y += oom.h |
122 | header-y += param.h | 120 | header-y += param.h |
123 | header-y += pci_ids.h | ||
124 | header-y += pci_regs.h | 121 | header-y += pci_regs.h |
125 | header-y += personality.h | 122 | header-y += personality.h |
126 | header-y += pfkeyv2.h | 123 | header-y += pfkeyv2.h |
@@ -131,7 +128,6 @@ header-y += posix_types.h | |||
131 | header-y += ppdev.h | 128 | header-y += ppdev.h |
132 | header-y += prctl.h | 129 | header-y += prctl.h |
133 | header-y += ps2esdi.h | 130 | header-y += ps2esdi.h |
134 | header-y += qic117.h | ||
135 | header-y += qnxtypes.h | 131 | header-y += qnxtypes.h |
136 | header-y += quotaio_v1.h | 132 | header-y += quotaio_v1.h |
137 | header-y += quotaio_v2.h | 133 | header-y += quotaio_v2.h |
@@ -139,7 +135,6 @@ header-y += radeonfb.h | |||
139 | header-y += raw.h | 135 | header-y += raw.h |
140 | header-y += resource.h | 136 | header-y += resource.h |
141 | header-y += rose.h | 137 | header-y += rose.h |
142 | header-y += sctp.h | ||
143 | header-y += smbno.h | 138 | header-y += smbno.h |
144 | header-y += snmp.h | 139 | header-y += snmp.h |
145 | header-y += sockios.h | 140 | header-y += sockios.h |
@@ -163,7 +158,6 @@ header-y += vt.h | |||
163 | header-y += wireless.h | 158 | header-y += wireless.h |
164 | header-y += xattr.h | 159 | header-y += xattr.h |
165 | header-y += x25.h | 160 | header-y += x25.h |
166 | header-y += zorro_ids.h | ||
167 | 161 | ||
168 | unifdef-y += acct.h | 162 | unifdef-y += acct.h |
169 | unifdef-y += adb.h | 163 | unifdef-y += adb.h |
@@ -203,6 +197,7 @@ unifdef-y += fb.h | |||
203 | unifdef-y += fcntl.h | 197 | unifdef-y += fcntl.h |
204 | unifdef-y += filter.h | 198 | unifdef-y += filter.h |
205 | unifdef-y += flat.h | 199 | unifdef-y += flat.h |
200 | unifdef-y += futex.h | ||
206 | unifdef-y += fs.h | 201 | unifdef-y += fs.h |
207 | unifdef-y += gameport.h | 202 | unifdef-y += gameport.h |
208 | unifdef-y += generic_serial.h | 203 | unifdef-y += generic_serial.h |
@@ -217,6 +212,7 @@ unifdef-y += hpet.h | |||
217 | unifdef-y += i2c.h | 212 | unifdef-y += i2c.h |
218 | unifdef-y += i2o-dev.h | 213 | unifdef-y += i2o-dev.h |
219 | unifdef-y += icmpv6.h | 214 | unifdef-y += icmpv6.h |
215 | unifdef-y += if_addr.h | ||
220 | unifdef-y += if_bridge.h | 216 | unifdef-y += if_bridge.h |
221 | unifdef-y += if_ec.h | 217 | unifdef-y += if_ec.h |
222 | unifdef-y += if_eql.h | 218 | unifdef-y += if_eql.h |
@@ -224,6 +220,7 @@ unifdef-y += if_ether.h | |||
224 | unifdef-y += if_fddi.h | 220 | unifdef-y += if_fddi.h |
225 | unifdef-y += if_frad.h | 221 | unifdef-y += if_frad.h |
226 | unifdef-y += if_ltalk.h | 222 | unifdef-y += if_ltalk.h |
223 | unifdef-y += if_link.h | ||
227 | unifdef-y += if_pppox.h | 224 | unifdef-y += if_pppox.h |
228 | unifdef-y += if_shaper.h | 225 | unifdef-y += if_shaper.h |
229 | unifdef-y += if_tr.h | 226 | unifdef-y += if_tr.h |
@@ -330,7 +327,6 @@ unifdef-y += udp.h | |||
330 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
331 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
332 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
333 | unifdef-y += usb_ch9.h | ||
334 | unifdef-y += usbdevice_fs.h | 330 | unifdef-y += usbdevice_fs.h |
335 | unifdef-y += user.h | 331 | unifdef-y += user.h |
336 | unifdef-y += utsname.h | 332 | unifdef-y += utsname.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 2b0c955590fe..815f1fb4ce21 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -47,171 +47,12 @@ enum acpi_irq_model_id { | |||
47 | ACPI_IRQ_MODEL_PIC = 0, | 47 | ACPI_IRQ_MODEL_PIC = 0, |
48 | ACPI_IRQ_MODEL_IOAPIC, | 48 | ACPI_IRQ_MODEL_IOAPIC, |
49 | ACPI_IRQ_MODEL_IOSAPIC, | 49 | ACPI_IRQ_MODEL_IOSAPIC, |
50 | ACPI_IRQ_MODEL_PLATFORM, | ||
50 | ACPI_IRQ_MODEL_COUNT | 51 | ACPI_IRQ_MODEL_COUNT |
51 | }; | 52 | }; |
52 | 53 | ||
53 | extern enum acpi_irq_model_id acpi_irq_model; | 54 | extern enum acpi_irq_model_id acpi_irq_model; |
54 | 55 | ||
55 | |||
56 | /* Root System Description Pointer (RSDP) */ | ||
57 | |||
58 | struct acpi_table_rsdp { | ||
59 | char signature[8]; | ||
60 | u8 checksum; | ||
61 | char oem_id[6]; | ||
62 | u8 revision; | ||
63 | u32 rsdt_address; | ||
64 | } __attribute__ ((packed)); | ||
65 | |||
66 | struct acpi20_table_rsdp { | ||
67 | char signature[8]; | ||
68 | u8 checksum; | ||
69 | char oem_id[6]; | ||
70 | u8 revision; | ||
71 | u32 rsdt_address; | ||
72 | u32 length; | ||
73 | u64 xsdt_address; | ||
74 | u8 ext_checksum; | ||
75 | u8 reserved[3]; | ||
76 | } __attribute__ ((packed)); | ||
77 | |||
78 | typedef struct { | ||
79 | u8 type; | ||
80 | u8 length; | ||
81 | } __attribute__ ((packed)) acpi_table_entry_header; | ||
82 | |||
83 | /* Root System Description Table (RSDT) */ | ||
84 | |||
85 | struct acpi_table_rsdt { | ||
86 | struct acpi_table_header header; | ||
87 | u32 entry[8]; | ||
88 | } __attribute__ ((packed)); | ||
89 | |||
90 | /* Extended System Description Table (XSDT) */ | ||
91 | |||
92 | struct acpi_table_xsdt { | ||
93 | struct acpi_table_header header; | ||
94 | u64 entry[1]; | ||
95 | } __attribute__ ((packed)); | ||
96 | |||
97 | /* Fixed ACPI Description Table (FADT) */ | ||
98 | |||
99 | struct acpi_table_fadt { | ||
100 | struct acpi_table_header header; | ||
101 | u32 facs_addr; | ||
102 | u32 dsdt_addr; | ||
103 | /* ... */ | ||
104 | } __attribute__ ((packed)); | ||
105 | |||
106 | /* Multiple APIC Description Table (MADT) */ | ||
107 | |||
108 | struct acpi_table_madt { | ||
109 | struct acpi_table_header header; | ||
110 | u32 lapic_address; | ||
111 | struct { | ||
112 | u32 pcat_compat:1; | ||
113 | u32 reserved:31; | ||
114 | } flags; | ||
115 | } __attribute__ ((packed)); | ||
116 | |||
117 | enum acpi_madt_entry_id { | ||
118 | ACPI_MADT_LAPIC = 0, | ||
119 | ACPI_MADT_IOAPIC, | ||
120 | ACPI_MADT_INT_SRC_OVR, | ||
121 | ACPI_MADT_NMI_SRC, | ||
122 | ACPI_MADT_LAPIC_NMI, | ||
123 | ACPI_MADT_LAPIC_ADDR_OVR, | ||
124 | ACPI_MADT_IOSAPIC, | ||
125 | ACPI_MADT_LSAPIC, | ||
126 | ACPI_MADT_PLAT_INT_SRC, | ||
127 | ACPI_MADT_ENTRY_COUNT | ||
128 | }; | ||
129 | |||
130 | typedef struct { | ||
131 | u16 polarity:2; | ||
132 | u16 trigger:2; | ||
133 | u16 reserved:12; | ||
134 | } __attribute__ ((packed)) acpi_interrupt_flags; | ||
135 | |||
136 | struct acpi_table_lapic { | ||
137 | acpi_table_entry_header header; | ||
138 | u8 acpi_id; | ||
139 | u8 id; | ||
140 | struct { | ||
141 | u32 enabled:1; | ||
142 | u32 reserved:31; | ||
143 | } flags; | ||
144 | } __attribute__ ((packed)); | ||
145 | |||
146 | struct acpi_table_ioapic { | ||
147 | acpi_table_entry_header header; | ||
148 | u8 id; | ||
149 | u8 reserved; | ||
150 | u32 address; | ||
151 | u32 global_irq_base; | ||
152 | } __attribute__ ((packed)); | ||
153 | |||
154 | struct acpi_table_int_src_ovr { | ||
155 | acpi_table_entry_header header; | ||
156 | u8 bus; | ||
157 | u8 bus_irq; | ||
158 | u32 global_irq; | ||
159 | acpi_interrupt_flags flags; | ||
160 | } __attribute__ ((packed)); | ||
161 | |||
162 | struct acpi_table_nmi_src { | ||
163 | acpi_table_entry_header header; | ||
164 | acpi_interrupt_flags flags; | ||
165 | u32 global_irq; | ||
166 | } __attribute__ ((packed)); | ||
167 | |||
168 | struct acpi_table_lapic_nmi { | ||
169 | acpi_table_entry_header header; | ||
170 | u8 acpi_id; | ||
171 | acpi_interrupt_flags flags; | ||
172 | u8 lint; | ||
173 | } __attribute__ ((packed)); | ||
174 | |||
175 | struct acpi_table_lapic_addr_ovr { | ||
176 | acpi_table_entry_header header; | ||
177 | u8 reserved[2]; | ||
178 | u64 address; | ||
179 | } __attribute__ ((packed)); | ||
180 | |||
181 | struct acpi_table_iosapic { | ||
182 | acpi_table_entry_header header; | ||
183 | u8 id; | ||
184 | u8 reserved; | ||
185 | u32 global_irq_base; | ||
186 | u64 address; | ||
187 | } __attribute__ ((packed)); | ||
188 | |||
189 | struct acpi_table_lsapic { | ||
190 | acpi_table_entry_header header; | ||
191 | u8 acpi_id; | ||
192 | u8 id; | ||
193 | u8 eid; | ||
194 | u8 reserved[3]; | ||
195 | struct { | ||
196 | u32 enabled:1; | ||
197 | u32 reserved:31; | ||
198 | } flags; | ||
199 | } __attribute__ ((packed)); | ||
200 | |||
201 | struct acpi_table_plat_int_src { | ||
202 | acpi_table_entry_header header; | ||
203 | acpi_interrupt_flags flags; | ||
204 | u8 type; /* See acpi_interrupt_type */ | ||
205 | u8 id; | ||
206 | u8 eid; | ||
207 | u8 iosapic_vector; | ||
208 | u32 global_irq; | ||
209 | struct { | ||
210 | u32 cpei_override_flag:1; | ||
211 | u32 reserved:31; | ||
212 | } plint_flags; | ||
213 | } __attribute__ ((packed)); | ||
214 | |||
215 | enum acpi_interrupt_id { | 56 | enum acpi_interrupt_id { |
216 | ACPI_INTERRUPT_PMI = 1, | 57 | ACPI_INTERRUPT_PMI = 1, |
217 | ACPI_INTERRUPT_INIT, | 58 | ACPI_INTERRUPT_INIT, |
@@ -221,89 +62,6 @@ enum acpi_interrupt_id { | |||
221 | 62 | ||
222 | #define ACPI_SPACE_MEM 0 | 63 | #define ACPI_SPACE_MEM 0 |
223 | 64 | ||
224 | struct acpi_gen_regaddr { | ||
225 | u8 space_id; | ||
226 | u8 bit_width; | ||
227 | u8 bit_offset; | ||
228 | u8 resv; | ||
229 | u32 addrl; | ||
230 | u32 addrh; | ||
231 | } __attribute__ ((packed)); | ||
232 | |||
233 | struct acpi_table_hpet { | ||
234 | struct acpi_table_header header; | ||
235 | u32 id; | ||
236 | struct acpi_gen_regaddr addr; | ||
237 | u8 number; | ||
238 | u16 min_tick; | ||
239 | u8 page_protect; | ||
240 | } __attribute__ ((packed)); | ||
241 | |||
242 | /* | ||
243 | * Simple Boot Flags | ||
244 | * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx | ||
245 | */ | ||
246 | struct acpi_table_sbf | ||
247 | { | ||
248 | u8 sbf_signature[4]; | ||
249 | u32 sbf_len; | ||
250 | u8 sbf_revision; | ||
251 | u8 sbf_csum; | ||
252 | u8 sbf_oemid[6]; | ||
253 | u8 sbf_oemtable[8]; | ||
254 | u8 sbf_revdata[4]; | ||
255 | u8 sbf_creator[4]; | ||
256 | u8 sbf_crearev[4]; | ||
257 | u8 sbf_cmos; | ||
258 | u8 sbf_spare[3]; | ||
259 | } __attribute__ ((packed)); | ||
260 | |||
261 | /* | ||
262 | * System Resource Affinity Table (SRAT) | ||
263 | * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx | ||
264 | */ | ||
265 | |||
266 | struct acpi_table_srat { | ||
267 | struct acpi_table_header header; | ||
268 | u32 table_revision; | ||
269 | u64 reserved; | ||
270 | } __attribute__ ((packed)); | ||
271 | |||
272 | enum acpi_srat_entry_id { | ||
273 | ACPI_SRAT_PROCESSOR_AFFINITY = 0, | ||
274 | ACPI_SRAT_MEMORY_AFFINITY, | ||
275 | ACPI_SRAT_ENTRY_COUNT | ||
276 | }; | ||
277 | |||
278 | struct acpi_table_processor_affinity { | ||
279 | acpi_table_entry_header header; | ||
280 | u8 proximity_domain; | ||
281 | u8 apic_id; | ||
282 | struct { | ||
283 | u32 enabled:1; | ||
284 | u32 reserved:31; | ||
285 | } flags; | ||
286 | u8 lsapic_eid; | ||
287 | u8 reserved[7]; | ||
288 | } __attribute__ ((packed)); | ||
289 | |||
290 | struct acpi_table_memory_affinity { | ||
291 | acpi_table_entry_header header; | ||
292 | u8 proximity_domain; | ||
293 | u8 reserved1[5]; | ||
294 | u32 base_addr_lo; | ||
295 | u32 base_addr_hi; | ||
296 | u32 length_lo; | ||
297 | u32 length_hi; | ||
298 | u32 memory_type; /* See acpi_address_range_id */ | ||
299 | struct { | ||
300 | u32 enabled:1; | ||
301 | u32 hot_pluggable:1; | ||
302 | u32 reserved:30; | ||
303 | } flags; | ||
304 | u64 reserved2; | ||
305 | } __attribute__ ((packed)); | ||
306 | |||
307 | enum acpi_address_range_id { | 65 | enum acpi_address_range_id { |
308 | ACPI_ADDRESS_RANGE_MEMORY = 1, | 66 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
309 | ACPI_ADDRESS_RANGE_RESERVED = 2, | 67 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
@@ -312,84 +70,12 @@ enum acpi_address_range_id { | |||
312 | ACPI_ADDRESS_RANGE_COUNT | 70 | ACPI_ADDRESS_RANGE_COUNT |
313 | }; | 71 | }; |
314 | 72 | ||
315 | /* | ||
316 | * System Locality Information Table (SLIT) | ||
317 | * see http://devresource.hp.com/devresource/docs/techpapers/ia64/slit.pdf | ||
318 | */ | ||
319 | |||
320 | struct acpi_table_slit { | ||
321 | struct acpi_table_header header; | ||
322 | u64 localities; | ||
323 | u8 entry[1]; /* real size = localities^2 */ | ||
324 | } __attribute__ ((packed)); | ||
325 | |||
326 | /* Smart Battery Description Table (SBST) */ | ||
327 | |||
328 | struct acpi_table_sbst { | ||
329 | struct acpi_table_header header; | ||
330 | u32 warning; /* Warn user */ | ||
331 | u32 low; /* Critical sleep */ | ||
332 | u32 critical; /* Critical shutdown */ | ||
333 | } __attribute__ ((packed)); | ||
334 | |||
335 | /* Embedded Controller Boot Resources Table (ECDT) */ | ||
336 | |||
337 | struct acpi_table_ecdt { | ||
338 | struct acpi_table_header header; | ||
339 | struct acpi_generic_address ec_control; | ||
340 | struct acpi_generic_address ec_data; | ||
341 | u32 uid; | ||
342 | u8 gpe_bit; | ||
343 | char ec_id[0]; | ||
344 | } __attribute__ ((packed)); | ||
345 | |||
346 | /* PCI MMCONFIG */ | ||
347 | |||
348 | /* Defined in PCI Firmware Specification 3.0 */ | ||
349 | struct acpi_table_mcfg_config { | ||
350 | u32 base_address; | ||
351 | u32 base_reserved; | ||
352 | u16 pci_segment_group_number; | ||
353 | u8 start_bus_number; | ||
354 | u8 end_bus_number; | ||
355 | u8 reserved[4]; | ||
356 | } __attribute__ ((packed)); | ||
357 | struct acpi_table_mcfg { | ||
358 | struct acpi_table_header header; | ||
359 | u8 reserved[8]; | ||
360 | struct acpi_table_mcfg_config config[0]; | ||
361 | } __attribute__ ((packed)); | ||
362 | 73 | ||
363 | /* Table Handlers */ | 74 | /* Table Handlers */ |
364 | 75 | ||
365 | enum acpi_table_id { | 76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); |
366 | ACPI_TABLE_UNKNOWN = 0, | ||
367 | ACPI_APIC, | ||
368 | ACPI_BOOT, | ||
369 | ACPI_DBGP, | ||
370 | ACPI_DSDT, | ||
371 | ACPI_ECDT, | ||
372 | ACPI_ETDT, | ||
373 | ACPI_FADT, | ||
374 | ACPI_FACS, | ||
375 | ACPI_OEMX, | ||
376 | ACPI_PSDT, | ||
377 | ACPI_SBST, | ||
378 | ACPI_SLIT, | ||
379 | ACPI_SPCR, | ||
380 | ACPI_SRAT, | ||
381 | ACPI_SSDT, | ||
382 | ACPI_SPMI, | ||
383 | ACPI_HPET, | ||
384 | ACPI_MCFG, | ||
385 | ACPI_TABLE_COUNT | ||
386 | }; | ||
387 | |||
388 | typedef int (*acpi_table_handler) (unsigned long phys_addr, unsigned long size); | ||
389 | |||
390 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; | ||
391 | 77 | ||
392 | typedef int (*acpi_madt_entry_handler) (acpi_table_entry_header *header, const unsigned long end); | 78 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
393 | 79 | ||
394 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 80 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
395 | unsigned long acpi_find_rsdp (void); | 81 | unsigned long acpi_find_rsdp (void); |
@@ -398,14 +84,12 @@ int acpi_boot_table_init (void); | |||
398 | int acpi_numa_init (void); | 84 | int acpi_numa_init (void); |
399 | 85 | ||
400 | int acpi_table_init (void); | 86 | int acpi_table_init (void); |
401 | int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler); | 87 | int acpi_table_parse (char *id, acpi_table_handler handler); |
402 | int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header); | 88 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
403 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 89 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
404 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 90 | int acpi_parse_mcfg (struct acpi_table_header *header); |
405 | int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size); | 91 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
406 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | 92 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); |
407 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); | ||
408 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | ||
409 | 93 | ||
410 | /* the following four functions are architecture-dependent */ | 94 | /* the following four functions are architecture-dependent */ |
411 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT | 95 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT |
@@ -416,8 +100,8 @@ void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | |||
416 | #define acpi_numa_arch_fixup() do {} while (0) | 100 | #define acpi_numa_arch_fixup() do {} while (0) |
417 | #else | 101 | #else |
418 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 102 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
419 | void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); | 103 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
420 | void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); | 104 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
421 | void acpi_numa_arch_fixup(void); | 105 | void acpi_numa_arch_fixup(void); |
422 | #endif | 106 | #endif |
423 | 107 | ||
@@ -432,7 +116,7 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | |||
432 | 116 | ||
433 | extern int acpi_mp_config; | 117 | extern int acpi_mp_config; |
434 | 118 | ||
435 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 119 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
436 | extern int pci_mmcfg_config_num; | 120 | extern int pci_mmcfg_config_num; |
437 | 121 | ||
438 | extern int sbf_port; | 122 | extern int sbf_port; |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 3372ec6bf53a..a30ef13c9e62 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -105,6 +105,7 @@ struct kiocb { | |||
105 | wait_queue_t ki_wait; | 105 | wait_queue_t ki_wait; |
106 | loff_t ki_pos; | 106 | loff_t ki_pos; |
107 | 107 | ||
108 | atomic_t ki_bio_count; /* num bio used for this iocb */ | ||
108 | void *private; | 109 | void *private; |
109 | /* State that we remember to be able to restart/retry */ | 110 | /* State that we remember to be able to restart/retry */ |
110 | unsigned short ki_opcode; | 111 | unsigned short ki_opcode; |
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..18e401ff7eaf 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) \ |
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/backlight.h b/include/linux/backlight.h index 75e91f5b6a04..a5cf1beacb44 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -54,7 +54,7 @@ struct backlight_device { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | extern struct backlight_device *backlight_device_register(const char *name, | 56 | extern struct backlight_device *backlight_device_register(const char *name, |
57 | void *devdata, struct backlight_properties *bp); | 57 | struct device *dev,void *devdata,struct backlight_properties *bp); |
58 | extern void backlight_device_unregister(struct backlight_device *bd); | 58 | extern void backlight_device_unregister(struct backlight_device *bd); |
59 | 59 | ||
60 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) | 60 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 092dbd0e7658..08daf3272c02 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -309,6 +309,7 @@ extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, | |||
309 | gfp_t); | 309 | gfp_t); |
310 | extern void bio_set_pages_dirty(struct bio *bio); | 310 | extern void bio_set_pages_dirty(struct bio *bio); |
311 | extern void bio_check_pages_dirty(struct bio *bio); | 311 | extern void bio_check_pages_dirty(struct bio *bio); |
312 | extern void bio_release_pages(struct bio *bio); | ||
312 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); | 313 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); |
313 | extern int bio_uncopy_user(struct bio *); | 314 | extern int bio_uncopy_user(struct bio *); |
314 | void zero_fill_bio(struct bio *bio); | 315 | void zero_fill_bio(struct bio *bio); |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 5d1eabcde5d5..638165f571da 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -31,9 +31,8 @@ static inline unsigned long hweight_long(unsigned long w) | |||
31 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); | 31 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); |
32 | } | 32 | } |
33 | 33 | ||
34 | /* | 34 | /** |
35 | * rol32 - rotate a 32-bit value left | 35 | * rol32 - rotate a 32-bit value left |
36 | * | ||
37 | * @word: value to rotate | 36 | * @word: value to rotate |
38 | * @shift: bits to roll | 37 | * @shift: bits to roll |
39 | */ | 38 | */ |
@@ -42,9 +41,8 @@ static inline __u32 rol32(__u32 word, unsigned int shift) | |||
42 | return (word << shift) | (word >> (32 - shift)); | 41 | return (word << shift) | (word >> (32 - shift)); |
43 | } | 42 | } |
44 | 43 | ||
45 | /* | 44 | /** |
46 | * ror32 - rotate a 32-bit value right | 45 | * ror32 - rotate a 32-bit value right |
47 | * | ||
48 | * @word: value to rotate | 46 | * @word: value to rotate |
49 | * @shift: bits to roll | 47 | * @shift: bits to roll |
50 | */ | 48 | */ |
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h new file mode 100644 index 000000000000..05e540d6963a --- /dev/null +++ b/include/linux/bitrev.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _LINUX_BITREV_H | ||
2 | #define _LINUX_BITREV_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | extern u8 const byte_rev_table[256]; | ||
7 | |||
8 | static inline u8 bitrev8(u8 byte) | ||
9 | { | ||
10 | return byte_rev_table[byte]; | ||
11 | } | ||
12 | |||
13 | extern u32 bitrev32(u32 in); | ||
14 | |||
15 | #endif /* _LINUX_BITREV_H */ | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e1c7286165ff..36a6eacefe20 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -331,10 +331,6 @@ struct request_pm_state | |||
331 | 331 | ||
332 | #include <linux/elevator.h> | 332 | #include <linux/elevator.h> |
333 | 333 | ||
334 | typedef int (merge_request_fn) (request_queue_t *, struct request *, | ||
335 | struct bio *); | ||
336 | typedef int (merge_requests_fn) (request_queue_t *, struct request *, | ||
337 | struct request *); | ||
338 | typedef void (request_fn_proc) (request_queue_t *q); | 334 | typedef void (request_fn_proc) (request_queue_t *q); |
339 | typedef int (make_request_fn) (request_queue_t *q, struct bio *bio); | 335 | typedef int (make_request_fn) (request_queue_t *q, struct bio *bio); |
340 | typedef int (prep_rq_fn) (request_queue_t *, struct request *); | 336 | typedef int (prep_rq_fn) (request_queue_t *, struct request *); |
@@ -342,7 +338,6 @@ typedef void (unplug_fn) (request_queue_t *); | |||
342 | 338 | ||
343 | struct bio_vec; | 339 | struct bio_vec; |
344 | typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *); | 340 | typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *); |
345 | typedef void (activity_fn) (void *data, int rw); | ||
346 | typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); | 341 | typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); |
347 | typedef void (prepare_flush_fn) (request_queue_t *, struct request *); | 342 | typedef void (prepare_flush_fn) (request_queue_t *, struct request *); |
348 | typedef void (softirq_done_fn)(struct request *); | 343 | typedef void (softirq_done_fn)(struct request *); |
@@ -377,14 +372,10 @@ struct request_queue | |||
377 | struct request_list rq; | 372 | struct request_list rq; |
378 | 373 | ||
379 | request_fn_proc *request_fn; | 374 | request_fn_proc *request_fn; |
380 | merge_request_fn *back_merge_fn; | ||
381 | merge_request_fn *front_merge_fn; | ||
382 | merge_requests_fn *merge_requests_fn; | ||
383 | make_request_fn *make_request_fn; | 375 | make_request_fn *make_request_fn; |
384 | prep_rq_fn *prep_rq_fn; | 376 | prep_rq_fn *prep_rq_fn; |
385 | unplug_fn *unplug_fn; | 377 | unplug_fn *unplug_fn; |
386 | merge_bvec_fn *merge_bvec_fn; | 378 | merge_bvec_fn *merge_bvec_fn; |
387 | activity_fn *activity_fn; | ||
388 | issue_flush_fn *issue_flush_fn; | 379 | issue_flush_fn *issue_flush_fn; |
389 | prepare_flush_fn *prepare_flush_fn; | 380 | prepare_flush_fn *prepare_flush_fn; |
390 | softirq_done_fn *softirq_done_fn; | 381 | softirq_done_fn *softirq_done_fn; |
@@ -411,8 +402,6 @@ struct request_queue | |||
411 | */ | 402 | */ |
412 | void *queuedata; | 403 | void *queuedata; |
413 | 404 | ||
414 | void *activity_data; | ||
415 | |||
416 | /* | 405 | /* |
417 | * queue needs bounce pages for pages above this limit | 406 | * queue needs bounce pages for pages above this limit |
418 | */ | 407 | */ |
@@ -653,6 +642,11 @@ extern int sg_scsi_ioctl(struct file *, struct request_queue *, | |||
653 | struct gendisk *, struct scsi_ioctl_command __user *); | 642 | struct gendisk *, struct scsi_ioctl_command __user *); |
654 | 643 | ||
655 | /* | 644 | /* |
645 | * Temporary export, until SCSI gets fixed up. | ||
646 | */ | ||
647 | extern int ll_back_merge_fn(request_queue_t *, struct request *, struct bio *); | ||
648 | |||
649 | /* | ||
656 | * A queue has just exitted congestion. Note this in the global counter of | 650 | * A queue has just exitted congestion. Note this in the global counter of |
657 | * congested queues, and wake up anyone who was waiting for requests to be | 651 | * congested queues, and wake up anyone who was waiting for requests to be |
658 | * put back. | 652 | * put back. |
@@ -677,9 +671,8 @@ extern void blk_sync_queue(struct request_queue *q); | |||
677 | extern void __blk_stop_queue(request_queue_t *q); | 671 | extern void __blk_stop_queue(request_queue_t *q); |
678 | extern void blk_run_queue(request_queue_t *); | 672 | extern void blk_run_queue(request_queue_t *); |
679 | extern void blk_start_queueing(request_queue_t *); | 673 | extern void blk_start_queueing(request_queue_t *); |
680 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); | ||
681 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long); | 674 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long); |
682 | extern int blk_rq_unmap_user(struct request *); | 675 | extern int blk_rq_unmap_user(struct bio *); |
683 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); | 676 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); |
684 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, | 677 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, |
685 | struct sg_iovec *, int, unsigned int); | 678 | struct sg_iovec *, int, unsigned int); |
diff --git a/include/linux/bug.h b/include/linux/bug.h new file mode 100644 index 000000000000..42aa0a54b6f4 --- /dev/null +++ b/include/linux/bug.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef _LINUX_BUG_H | ||
2 | #define _LINUX_BUG_H | ||
3 | |||
4 | #include <linux/module.h> | ||
5 | #include <asm/bug.h> | ||
6 | |||
7 | enum bug_trap_type { | ||
8 | BUG_TRAP_TYPE_NONE = 0, | ||
9 | BUG_TRAP_TYPE_WARN = 1, | ||
10 | BUG_TRAP_TYPE_BUG = 2, | ||
11 | }; | ||
12 | |||
13 | #ifdef CONFIG_GENERIC_BUG | ||
14 | #include <asm-generic/bug.h> | ||
15 | |||
16 | static inline int is_warning_bug(const struct bug_entry *bug) | ||
17 | { | ||
18 | return bug->flags & BUGFLAG_WARNING; | ||
19 | } | ||
20 | |||
21 | const struct bug_entry *find_bug(unsigned long bugaddr); | ||
22 | |||
23 | enum bug_trap_type report_bug(unsigned long bug_addr); | ||
24 | |||
25 | int module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | ||
26 | struct module *); | ||
27 | void module_bug_cleanup(struct module *); | ||
28 | |||
29 | /* These are defined by the architecture */ | ||
30 | int is_valid_bugaddr(unsigned long addr); | ||
31 | |||
32 | #else /* !CONFIG_GENERIC_BUG */ | ||
33 | |||
34 | static inline enum bug_trap_type report_bug(unsigned long bug_addr) | ||
35 | { | ||
36 | return BUG_TRAP_TYPE_BUG; | ||
37 | } | ||
38 | static inline int module_bug_finalize(const Elf_Ehdr *hdr, | ||
39 | const Elf_Shdr *sechdrs, | ||
40 | struct module *mod) | ||
41 | { | ||
42 | return 0; | ||
43 | } | ||
44 | static inline void module_bug_cleanup(struct module *mod) {} | ||
45 | |||
46 | #endif /* CONFIG_GENERIC_BUG */ | ||
47 | #endif /* _LINUX_BUG_H */ | ||
diff --git a/include/linux/cdev.h b/include/linux/cdev.h index f309b00e986e..1e29b13d0062 100644 --- a/include/linux/cdev.h +++ b/include/linux/cdev.h | |||
@@ -6,6 +6,10 @@ | |||
6 | #include <linux/kdev_t.h> | 6 | #include <linux/kdev_t.h> |
7 | #include <linux/list.h> | 7 | #include <linux/list.h> |
8 | 8 | ||
9 | struct file_operations; | ||
10 | struct inode; | ||
11 | struct module; | ||
12 | |||
9 | struct cdev { | 13 | struct cdev { |
10 | struct kobject kobj; | 14 | struct kobject kobj; |
11 | struct module *owner; | 15 | struct module *owner; |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index d852024ed095..1622d23a8dc3 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -159,7 +159,7 @@ static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles) | |||
159 | * Unless you're the timekeeping code, you should not be using this! | 159 | * Unless you're the timekeeping code, you should not be using this! |
160 | */ | 160 | */ |
161 | static inline void clocksource_calculate_interval(struct clocksource *c, | 161 | static inline void clocksource_calculate_interval(struct clocksource *c, |
162 | unsigned long length_nsec) | 162 | unsigned long length_nsec) |
163 | { | 163 | { |
164 | u64 tmp; | 164 | u64 tmp; |
165 | 165 | ||
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index be512cc98791..4c2632a8d31b 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -64,7 +64,7 @@ void coda_sysctl_clean(void); | |||
64 | 64 | ||
65 | #define CODA_ALLOC(ptr, cast, size) do { \ | 65 | #define CODA_ALLOC(ptr, cast, size) do { \ |
66 | if (size < PAGE_SIZE) \ | 66 | if (size < PAGE_SIZE) \ |
67 | ptr = (cast)kmalloc((unsigned long) size, GFP_KERNEL); \ | 67 | ptr = kmalloc((unsigned long) size, GFP_KERNEL); \ |
68 | else \ | 68 | else \ |
69 | ptr = (cast)vmalloc((unsigned long) size); \ | 69 | ptr = (cast)vmalloc((unsigned long) size); \ |
70 | if (!ptr) \ | 70 | if (!ptr) \ |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 538423d4a865..aca66984aafd 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -40,7 +40,7 @@ extern void __chk_io_ptr(void __iomem *); | |||
40 | #error no compiler-gcc.h file for this gcc version | 40 | #error no compiler-gcc.h file for this gcc version |
41 | #elif __GNUC__ == 4 | 41 | #elif __GNUC__ == 4 |
42 | # include <linux/compiler-gcc4.h> | 42 | # include <linux/compiler-gcc4.h> |
43 | #elif __GNUC__ == 3 | 43 | #elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2 |
44 | # include <linux/compiler-gcc3.h> | 44 | # include <linux/compiler-gcc3.h> |
45 | #else | 45 | #else |
46 | # error Sorry, your compiler is too old/not recognized. | 46 | # error Sorry, your compiler is too old/not recognized. |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index a7f015027535..fef6f3d0a4a7 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -160,31 +160,6 @@ struct configfs_group_operations { | |||
160 | void (*drop_item)(struct config_group *group, struct config_item *item); | 160 | void (*drop_item)(struct config_group *group, struct config_item *item); |
161 | }; | 161 | }; |
162 | 162 | ||
163 | |||
164 | |||
165 | /** | ||
166 | * Use these macros to make defining attributes easier. See include/linux/device.h | ||
167 | * for examples.. | ||
168 | */ | ||
169 | |||
170 | #if 0 | ||
171 | #define __ATTR(_name,_mode,_show,_store) { \ | ||
172 | .attr = {.ca_name = __stringify(_name), .ca_mode = _mode, .ca_owner = THIS_MODULE }, \ | ||
173 | .show = _show, \ | ||
174 | .store = _store, \ | ||
175 | } | ||
176 | |||
177 | #define __ATTR_RO(_name) { \ | ||
178 | .attr = { .ca_name = __stringify(_name), .ca_mode = 0444, .ca_owner = THIS_MODULE }, \ | ||
179 | .show = _name##_show, \ | ||
180 | } | ||
181 | |||
182 | #define __ATTR_NULL { .attr = { .name = NULL } } | ||
183 | |||
184 | #define attr_name(_attr) (_attr).attr.name | ||
185 | #endif | ||
186 | |||
187 | |||
188 | struct configfs_subsystem { | 163 | struct configfs_subsystem { |
189 | struct config_group su_group; | 164 | struct config_group su_group; |
190 | struct semaphore su_sem; | 165 | struct semaphore su_sem; |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 3ea1cd58de97..10eb56b2940a 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -133,7 +133,7 @@ struct cn_callback_data { | |||
133 | struct cn_callback_entry { | 133 | struct cn_callback_entry { |
134 | struct list_head callback_entry; | 134 | struct list_head callback_entry; |
135 | struct cn_callback *cb; | 135 | struct cn_callback *cb; |
136 | struct delayed_work work; | 136 | struct work_struct work; |
137 | struct cn_queue_dev *pdev; | 137 | struct cn_queue_dev *pdev; |
138 | 138 | ||
139 | struct cn_callback_id id; | 139 | struct cn_callback_id id; |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4ea39fee99c7..7f008f6bfdc3 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -172,6 +172,8 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, | |||
172 | unsigned int relation); | 172 | unsigned int relation); |
173 | 173 | ||
174 | 174 | ||
175 | extern int cpufreq_driver_getavg(struct cpufreq_policy *policy); | ||
176 | |||
175 | int cpufreq_register_governor(struct cpufreq_governor *governor); | 177 | int cpufreq_register_governor(struct cpufreq_governor *governor); |
176 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); | 178 | void cpufreq_unregister_governor(struct cpufreq_governor *governor); |
177 | 179 | ||
@@ -204,6 +206,7 @@ struct cpufreq_driver { | |||
204 | unsigned int (*get) (unsigned int cpu); | 206 | unsigned int (*get) (unsigned int cpu); |
205 | 207 | ||
206 | /* optional */ | 208 | /* optional */ |
209 | unsigned int (*getavg) (unsigned int cpu); | ||
207 | int (*exit) (struct cpufreq_policy *policy); | 210 | int (*exit) (struct cpufreq_policy *policy); |
208 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); | 211 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
209 | int (*resume) (struct cpufreq_policy *policy); | 212 | int (*resume) (struct cpufreq_policy *policy); |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 8821e1f75b44..fd404416f31c 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -30,10 +30,19 @@ void cpuset_update_task_memory_state(void); | |||
30 | nodes_subset((nodes), current->mems_allowed) | 30 | nodes_subset((nodes), current->mems_allowed) |
31 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); | 31 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); |
32 | 32 | ||
33 | extern int __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); | 33 | extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask); |
34 | static int inline cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) | 34 | extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask); |
35 | |||
36 | static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | ||
37 | { | ||
38 | return number_of_cpusets <= 1 || | ||
39 | __cpuset_zone_allowed_softwall(z, gfp_mask); | ||
40 | } | ||
41 | |||
42 | static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | ||
35 | { | 43 | { |
36 | return number_of_cpusets <= 1 || __cpuset_zone_allowed(z, gfp_mask); | 44 | return number_of_cpusets <= 1 || |
45 | __cpuset_zone_allowed_hardwall(z, gfp_mask); | ||
37 | } | 46 | } |
38 | 47 | ||
39 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | 48 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); |
@@ -46,7 +55,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | |||
46 | extern int cpuset_memory_pressure_enabled; | 55 | extern int cpuset_memory_pressure_enabled; |
47 | extern void __cpuset_memory_pressure_bump(void); | 56 | extern void __cpuset_memory_pressure_bump(void); |
48 | 57 | ||
49 | extern const struct file_operations proc_cpuset_operations; | 58 | extern struct file_operations proc_cpuset_operations; |
50 | 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); |
51 | 60 | ||
52 | extern void cpuset_lock(void); | 61 | extern void cpuset_lock(void); |
@@ -94,7 +103,12 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) | |||
94 | return 1; | 103 | return 1; |
95 | } | 104 | } |
96 | 105 | ||
97 | static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) | 106 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) |
107 | { | ||
108 | return 1; | ||
109 | } | ||
110 | |||
111 | static inline int cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | ||
98 | { | 112 | { |
99 | return 1; | 113 | return 1; |
100 | } | 114 | } |
diff --git a/include/linux/crc32.h b/include/linux/crc32.h index 56c0645789a9..e20dd1f9b40a 100644 --- a/include/linux/crc32.h +++ b/include/linux/crc32.h | |||
@@ -6,10 +6,10 @@ | |||
6 | #define _LINUX_CRC32_H | 6 | #define _LINUX_CRC32_H |
7 | 7 | ||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/bitrev.h> | ||
9 | 10 | ||
10 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); | 11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); |
11 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); | 12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); |
12 | extern u32 bitreverse(u32 in); | ||
13 | 13 | ||
14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length) | 14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length) |
15 | 15 | ||
@@ -21,7 +21,7 @@ extern u32 bitreverse(u32 in); | |||
21 | * is in bit nr 0], thus it must be reversed before use. Except for | 21 | * is in bit nr 0], thus it must be reversed before use. Except for |
22 | * nics that bit swap the result internally... | 22 | * nics that bit swap the result internally... |
23 | */ | 23 | */ |
24 | #define ether_crc(length, data) bitreverse(crc32_le(~0, data, length)) | 24 | #define ether_crc(length, data) bitrev32(crc32_le(~0, data, length)) |
25 | #define ether_crc_le(length, data) crc32_le(~0, data, length) | 25 | #define ether_crc_le(length, data) crc32_le(~0, data, length) |
26 | 26 | ||
27 | #endif /* _LINUX_CRC32_H */ | 27 | #endif /* _LINUX_CRC32_H */ |
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/dccp.h b/include/linux/dccp.h index ed6cc8962d87..1cb054bd93f2 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -176,20 +176,20 @@ enum { | |||
176 | }; | 176 | }; |
177 | 177 | ||
178 | /* DCCP features (RFC 4340 section 6.4) */ | 178 | /* DCCP features (RFC 4340 section 6.4) */ |
179 | enum { | 179 | enum { |
180 | DCCPF_RESERVED = 0, | 180 | DCCPF_RESERVED = 0, |
181 | DCCPF_CCID = 1, | 181 | DCCPF_CCID = 1, |
182 | DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */ | 182 | DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */ |
183 | DCCPF_SEQUENCE_WINDOW = 3, | 183 | DCCPF_SEQUENCE_WINDOW = 3, |
184 | DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */ | 184 | DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */ |
185 | DCCPF_ACK_RATIO = 5, | 185 | DCCPF_ACK_RATIO = 5, |
186 | DCCPF_SEND_ACK_VECTOR = 6, | 186 | DCCPF_SEND_ACK_VECTOR = 6, |
187 | DCCPF_SEND_NDP_COUNT = 7, | 187 | DCCPF_SEND_NDP_COUNT = 7, |
188 | DCCPF_MIN_CSUM_COVER = 8, | 188 | DCCPF_MIN_CSUM_COVER = 8, |
189 | DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */ | 189 | DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */ |
190 | /* 10-127 reserved */ | 190 | /* 10-127 reserved */ |
191 | DCCPF_MIN_CCID_SPECIFIC = 128, | 191 | DCCPF_MIN_CCID_SPECIFIC = 128, |
192 | DCCPF_MAX_CCID_SPECIFIC = 255, | 192 | DCCPF_MAX_CCID_SPECIFIC = 255, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | /* this structure is argument to DCCP_SOCKOPT_CHANGE_X */ | 195 | /* this structure is argument to DCCP_SOCKOPT_CHANGE_X */ |
@@ -427,7 +427,7 @@ struct dccp_service_list { | |||
427 | }; | 427 | }; |
428 | 428 | ||
429 | #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) | 429 | #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) |
430 | #define DCCP_SERVICE_CODE_IS_ABSENT 0 | 430 | #define DCCP_SERVICE_CODE_IS_ABSENT 0 |
431 | 431 | ||
432 | static inline int dccp_list_has_service(const struct dccp_service_list *sl, | 432 | static inline int dccp_list_has_service(const struct dccp_service_list *sl, |
433 | const __be32 service) | 433 | const __be32 service) |
@@ -436,7 +436,7 @@ static inline int dccp_list_has_service(const struct dccp_service_list *sl, | |||
436 | u32 i = sl->dccpsl_nr; | 436 | u32 i = sl->dccpsl_nr; |
437 | while (i--) | 437 | while (i--) |
438 | if (sl->dccpsl_list[i] == service) | 438 | if (sl->dccpsl_list[i] == service) |
439 | return 1; | 439 | return 1; |
440 | } | 440 | } |
441 | return 0; | 441 | return 0; |
442 | } | 442 | } |
@@ -511,7 +511,7 @@ struct dccp_sock { | |||
511 | __u8 dccps_hc_tx_insert_options:1; | 511 | __u8 dccps_hc_tx_insert_options:1; |
512 | struct timer_list dccps_xmit_timer; | 512 | struct timer_list dccps_xmit_timer; |
513 | }; | 513 | }; |
514 | 514 | ||
515 | static inline struct dccp_sock *dccp_sk(const struct sock *sk) | 515 | static inline struct dccp_sock *dccp_sk(const struct sock *sk) |
516 | { | 516 | { |
517 | return (struct dccp_sock *)sk; | 517 | return (struct dccp_sock *)sk; |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index a1c10b0c4cf0..1678a5de7013 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -24,7 +24,7 @@ extern int debug_locks_off(void); | |||
24 | int __ret = 0; \ | 24 | int __ret = 0; \ |
25 | \ | 25 | \ |
26 | if (unlikely(c)) { \ | 26 | if (unlikely(c)) { \ |
27 | if (debug_locks_silent || debug_locks_off()) \ | 27 | if (debug_locks_off() && !debug_locks_silent) \ |
28 | WARN_ON(1); \ | 28 | WARN_ON(1); \ |
29 | __ret = 1; \ | 29 | __ret = 1; \ |
30 | } \ | 30 | } \ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 03ef41c1eaac..499f5373e213 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -39,7 +39,8 @@ typedef void (*dm_dtr_fn) (struct dm_target *ti); | |||
39 | * The map function must return: | 39 | * The map function must return: |
40 | * < 0: error | 40 | * < 0: error |
41 | * = 0: The target will handle the io by resubmitting it later | 41 | * = 0: The target will handle the io by resubmitting it later |
42 | * > 0: simple remap complete | 42 | * = 1: simple remap complete |
43 | * = 2: The target wants to push back the io | ||
43 | */ | 44 | */ |
44 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | 45 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, |
45 | union map_info *map_context); | 46 | union map_info *map_context); |
@@ -50,6 +51,7 @@ typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | |||
50 | * 0 : ended successfully | 51 | * 0 : ended successfully |
51 | * 1 : for some reason the io has still not completed (eg, | 52 | * 1 : for some reason the io has still not completed (eg, |
52 | * multipath target might want to requeue a failed io). | 53 | * multipath target might want to requeue a failed io). |
54 | * 2 : The target wants to push back the io | ||
53 | */ | 55 | */ |
54 | typedef int (*dm_endio_fn) (struct dm_target *ti, | 56 | typedef int (*dm_endio_fn) (struct dm_target *ti, |
55 | struct bio *bio, int error, | 57 | struct bio *bio, int error, |
@@ -173,7 +175,7 @@ void *dm_get_mdptr(struct mapped_device *md); | |||
173 | /* | 175 | /* |
174 | * A device can still be used while suspended, but I/O is deferred. | 176 | * A device can still be used while suspended, but I/O is deferred. |
175 | */ | 177 | */ |
176 | int dm_suspend(struct mapped_device *md, int with_lockfs); | 178 | int dm_suspend(struct mapped_device *md, unsigned suspend_flags); |
177 | int dm_resume(struct mapped_device *md); | 179 | int dm_resume(struct mapped_device *md); |
178 | 180 | ||
179 | /* | 181 | /* |
@@ -188,6 +190,7 @@ int dm_wait_event(struct mapped_device *md, int event_nr); | |||
188 | const char *dm_device_name(struct mapped_device *md); | 190 | const char *dm_device_name(struct mapped_device *md); |
189 | struct gendisk *dm_disk(struct mapped_device *md); | 191 | struct gendisk *dm_disk(struct mapped_device *md); |
190 | int dm_suspended(struct mapped_device *md); | 192 | int dm_suspended(struct mapped_device *md); |
193 | int dm_noflush_suspending(struct dm_target *ti); | ||
191 | 194 | ||
192 | /* | 195 | /* |
193 | * Geometry functions. | 196 | * Geometry functions. |
diff --git a/include/linux/device.h b/include/linux/device.h index 49ab53ce92dc..26e4692f2d1a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -126,6 +126,7 @@ struct device_driver { | |||
126 | struct klist_node knode_bus; | 126 | struct klist_node knode_bus; |
127 | 127 | ||
128 | struct module * owner; | 128 | struct module * owner; |
129 | const char * mod_name; /* used for built-in modules */ | ||
129 | 130 | ||
130 | int (*probe) (struct device * dev); | 131 | int (*probe) (struct device * dev); |
131 | int (*remove) (struct device * dev); | 132 | int (*remove) (struct device * dev); |
@@ -327,6 +328,13 @@ extern struct class_device *class_device_create(struct class *cls, | |||
327 | __attribute__((format(printf,5,6))); | 328 | __attribute__((format(printf,5,6))); |
328 | extern void class_device_destroy(struct class *cls, dev_t devt); | 329 | extern void class_device_destroy(struct class *cls, dev_t devt); |
329 | 330 | ||
331 | struct device_type { | ||
332 | struct device_attribute *attrs; | ||
333 | int (*uevent)(struct device *dev, char **envp, int num_envp, | ||
334 | char *buffer, int buffer_size); | ||
335 | void (*release)(struct device *dev); | ||
336 | }; | ||
337 | |||
330 | /* interface for exporting device attributes */ | 338 | /* interface for exporting device attributes */ |
331 | struct device_attribute { | 339 | struct device_attribute { |
332 | struct attribute attr; | 340 | struct attribute attr; |
@@ -346,6 +354,41 @@ extern int __must_check device_create_bin_file(struct device *dev, | |||
346 | struct bin_attribute *attr); | 354 | struct bin_attribute *attr); |
347 | extern void device_remove_bin_file(struct device *dev, | 355 | extern void device_remove_bin_file(struct device *dev, |
348 | struct bin_attribute *attr); | 356 | struct bin_attribute *attr); |
357 | |||
358 | /* device resource management */ | ||
359 | typedef void (*dr_release_t)(struct device *dev, void *res); | ||
360 | typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); | ||
361 | |||
362 | #ifdef CONFIG_DEBUG_DEVRES | ||
363 | extern void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, | ||
364 | const char *name); | ||
365 | #define devres_alloc(release, size, gfp) \ | ||
366 | __devres_alloc(release, size, gfp, #release) | ||
367 | #else | ||
368 | extern void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp); | ||
369 | #endif | ||
370 | extern void devres_free(void *res); | ||
371 | extern void devres_add(struct device *dev, void *res); | ||
372 | extern void * devres_find(struct device *dev, dr_release_t release, | ||
373 | dr_match_t match, void *match_data); | ||
374 | extern void * devres_get(struct device *dev, void *new_res, | ||
375 | dr_match_t match, void *match_data); | ||
376 | extern void * devres_remove(struct device *dev, dr_release_t release, | ||
377 | dr_match_t match, void *match_data); | ||
378 | extern int devres_destroy(struct device *dev, dr_release_t release, | ||
379 | dr_match_t match, void *match_data); | ||
380 | |||
381 | /* devres group */ | ||
382 | extern void * __must_check devres_open_group(struct device *dev, void *id, | ||
383 | gfp_t gfp); | ||
384 | extern void devres_close_group(struct device *dev, void *id); | ||
385 | extern void devres_remove_group(struct device *dev, void *id); | ||
386 | extern int devres_release_group(struct device *dev, void *id); | ||
387 | |||
388 | /* managed kzalloc/kfree for device drivers, no kmalloc, always use kzalloc */ | ||
389 | extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); | ||
390 | extern void devm_kfree(struct device *dev, void *p); | ||
391 | |||
349 | struct device { | 392 | struct device { |
350 | struct klist klist_children; | 393 | struct klist klist_children; |
351 | struct klist_node knode_parent; /* node in sibling list */ | 394 | struct klist_node knode_parent; /* node in sibling list */ |
@@ -355,6 +398,7 @@ struct device { | |||
355 | 398 | ||
356 | struct kobject kobj; | 399 | struct kobject kobj; |
357 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 400 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
401 | struct device_type *type; | ||
358 | unsigned is_registered:1; | 402 | unsigned is_registered:1; |
359 | struct device_attribute uevent_attr; | 403 | struct device_attribute uevent_attr; |
360 | struct device_attribute *devt_attr; | 404 | struct device_attribute *devt_attr; |
@@ -388,11 +432,15 @@ struct device { | |||
388 | /* arch specific additions */ | 432 | /* arch specific additions */ |
389 | struct dev_archdata archdata; | 433 | struct dev_archdata archdata; |
390 | 434 | ||
435 | spinlock_t devres_lock; | ||
436 | struct list_head devres_head; | ||
437 | |||
391 | /* class_device migration path */ | 438 | /* class_device migration path */ |
392 | struct list_head node; | 439 | struct list_head node; |
393 | struct class *class; /* optional*/ | 440 | struct class *class; |
394 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 441 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
395 | struct attribute_group **groups; /* optional groups */ | 442 | struct attribute_group **groups; /* optional groups */ |
443 | int uevent_suppress; | ||
396 | 444 | ||
397 | void (*release)(struct device * dev); | 445 | void (*release)(struct device * dev); |
398 | }; | 446 | }; |
@@ -433,6 +481,8 @@ static inline int device_is_registered(struct device *dev) | |||
433 | return dev->is_registered; | 481 | return dev->is_registered; |
434 | } | 482 | } |
435 | 483 | ||
484 | void driver_init(void); | ||
485 | |||
436 | /* | 486 | /* |
437 | * High level routines for use by the bus drivers | 487 | * High level routines for use by the bus drivers |
438 | */ | 488 | */ |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 8853fc4d1c5e..b93486107821 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -285,9 +285,9 @@ typedef char ioctl_struct[308]; | |||
285 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 285 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
286 | 286 | ||
287 | #define DM_VERSION_MAJOR 4 | 287 | #define DM_VERSION_MAJOR 4 |
288 | #define DM_VERSION_MINOR 10 | 288 | #define DM_VERSION_MINOR 11 |
289 | #define DM_VERSION_PATCHLEVEL 0 | 289 | #define DM_VERSION_PATCHLEVEL 0 |
290 | #define DM_VERSION_EXTRA "-ioctl (2006-09-14)" | 290 | #define DM_VERSION_EXTRA "-ioctl (2006-10-12)" |
291 | 291 | ||
292 | /* Status bits */ | 292 | /* Status bits */ |
293 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 293 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
@@ -323,4 +323,9 @@ typedef char ioctl_struct[308]; | |||
323 | */ | 323 | */ |
324 | #define DM_SKIP_LOCKFS_FLAG (1 << 10) /* In */ | 324 | #define DM_SKIP_LOCKFS_FLAG (1 << 10) /* In */ |
325 | 325 | ||
326 | /* | ||
327 | * Set this to suspend without flushing queued ios. | ||
328 | */ | ||
329 | #define DM_NOFLUSH_FLAG (1 << 11) /* In */ | ||
330 | |||
326 | #endif /* _LINUX_DM_IOCTL_H */ | 331 | #endif /* _LINUX_DM_IOCTL_H */ |
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/efi.h b/include/linux/efi.h index df1c91855f0e..f8ebd7c1ddb3 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -301,7 +301,7 @@ extern int __init efi_uart_console_only (void); | |||
301 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 301 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
302 | struct resource *data_resource); | 302 | struct resource *data_resource); |
303 | extern unsigned long efi_get_time(void); | 303 | extern unsigned long efi_get_time(void); |
304 | extern int __init efi_set_rtc_mmss(unsigned long nowtime); | 304 | extern int efi_set_rtc_mmss(unsigned long nowtime); |
305 | extern int is_available_memory(efi_memory_desc_t * md); | 305 | extern int is_available_memory(efi_memory_desc_t * md); |
306 | extern struct efi_memory_map memmap; | 306 | extern struct efi_memory_map memmap; |
307 | 307 | ||
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/elevator.h b/include/linux/elevator.h index a24931d24404..e88fcbc77f8f 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -12,6 +12,8 @@ typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struc | |||
12 | 12 | ||
13 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int); | 13 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int); |
14 | 14 | ||
15 | typedef int (elevator_allow_merge_fn) (request_queue_t *, struct request *, struct bio *); | ||
16 | |||
15 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); | 17 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); |
16 | 18 | ||
17 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); | 19 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); |
@@ -33,6 +35,7 @@ struct elevator_ops | |||
33 | elevator_merge_fn *elevator_merge_fn; | 35 | elevator_merge_fn *elevator_merge_fn; |
34 | elevator_merged_fn *elevator_merged_fn; | 36 | elevator_merged_fn *elevator_merged_fn; |
35 | elevator_merge_req_fn *elevator_merge_req_fn; | 37 | elevator_merge_req_fn *elevator_merge_req_fn; |
38 | elevator_allow_merge_fn *elevator_allow_merge_fn; | ||
36 | 39 | ||
37 | elevator_dispatch_fn *elevator_dispatch_fn; | 40 | elevator_dispatch_fn *elevator_dispatch_fn; |
38 | elevator_add_req_fn *elevator_add_req_fn; | 41 | elevator_add_req_fn *elevator_add_req_fn; |
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h new file mode 100644 index 000000000000..32368c4f0326 --- /dev/null +++ b/include/linux/fault-inject.h | |||
@@ -0,0 +1,84 @@ | |||
1 | #ifndef _LINUX_FAULT_INJECT_H | ||
2 | #define _LINUX_FAULT_INJECT_H | ||
3 | |||
4 | #ifdef CONFIG_FAULT_INJECTION | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | #include <linux/debugfs.h> | ||
8 | #include <asm/atomic.h> | ||
9 | |||
10 | /* | ||
11 | * For explanation of the elements of this struct, see | ||
12 | * Documentation/fault-injection/fault-injection.txt | ||
13 | */ | ||
14 | struct fault_attr { | ||
15 | unsigned long probability; | ||
16 | unsigned long interval; | ||
17 | atomic_t times; | ||
18 | atomic_t space; | ||
19 | unsigned long verbose; | ||
20 | u32 task_filter; | ||
21 | unsigned long stacktrace_depth; | ||
22 | unsigned long require_start; | ||
23 | unsigned long require_end; | ||
24 | unsigned long reject_start; | ||
25 | unsigned long reject_end; | ||
26 | |||
27 | unsigned long count; | ||
28 | |||
29 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | ||
30 | |||
31 | struct { | ||
32 | struct dentry *dir; | ||
33 | |||
34 | struct dentry *probability_file; | ||
35 | struct dentry *interval_file; | ||
36 | struct dentry *times_file; | ||
37 | struct dentry *space_file; | ||
38 | struct dentry *verbose_file; | ||
39 | struct dentry *task_filter_file; | ||
40 | struct dentry *stacktrace_depth_file; | ||
41 | struct dentry *require_start_file; | ||
42 | struct dentry *require_end_file; | ||
43 | struct dentry *reject_start_file; | ||
44 | struct dentry *reject_end_file; | ||
45 | } dentries; | ||
46 | |||
47 | #endif | ||
48 | }; | ||
49 | |||
50 | #define FAULT_ATTR_INITIALIZER { \ | ||
51 | .interval = 1, \ | ||
52 | .times = ATOMIC_INIT(1), \ | ||
53 | .require_end = ULONG_MAX, \ | ||
54 | .stacktrace_depth = 32, \ | ||
55 | .verbose = 2, \ | ||
56 | } | ||
57 | |||
58 | #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER | ||
59 | int setup_fault_attr(struct fault_attr *attr, char *str); | ||
60 | void should_fail_srandom(unsigned long entropy); | ||
61 | bool should_fail(struct fault_attr *attr, ssize_t size); | ||
62 | |||
63 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | ||
64 | |||
65 | int init_fault_attr_dentries(struct fault_attr *attr, const char *name); | ||
66 | void cleanup_fault_attr_dentries(struct fault_attr *attr); | ||
67 | |||
68 | #else /* CONFIG_FAULT_INJECTION_DEBUG_FS */ | ||
69 | |||
70 | static inline int init_fault_attr_dentries(struct fault_attr *attr, | ||
71 | const char *name) | ||
72 | { | ||
73 | return -ENODEV; | ||
74 | } | ||
75 | |||
76 | static inline void cleanup_fault_attr_dentries(struct fault_attr *attr) | ||
77 | { | ||
78 | } | ||
79 | |||
80 | #endif /* CONFIG_FAULT_INJECTION_DEBUG_FS */ | ||
81 | |||
82 | #endif /* CONFIG_FAULT_INJECTION */ | ||
83 | |||
84 | #endif /* _LINUX_FAULT_INJECT_H */ | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index fa23e0671bb3..64177ec9a019 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -929,8 +929,6 @@ extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max) | |||
929 | #define FB_MODE_IS_FIRST 16 | 929 | #define FB_MODE_IS_FIRST 16 |
930 | #define FB_MODE_IS_FROM_VAR 32 | 930 | #define FB_MODE_IS_FROM_VAR 32 |
931 | 931 | ||
932 | extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, | ||
933 | const struct fb_info *fb_info); | ||
934 | extern int fbmon_dpms(const struct fb_info *fb_info); | 932 | extern int fbmon_dpms(const struct fb_info *fb_info); |
935 | extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, | 933 | extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, |
936 | struct fb_info *info); | 934 | struct fb_info *info); |
@@ -970,11 +968,11 @@ extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, | |||
970 | /* drivers/video/fbcmap.c */ | 968 | /* drivers/video/fbcmap.c */ |
971 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 969 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
972 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); | 970 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); |
973 | extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to); | 971 | extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to); |
974 | extern int fb_cmap_to_user(struct fb_cmap *from, struct fb_cmap_user *to); | 972 | extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to); |
975 | extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); | 973 | extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); |
976 | extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); | 974 | extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); |
977 | extern struct fb_cmap *fb_default_cmap(int len); | 975 | extern const struct fb_cmap *fb_default_cmap(int len); |
978 | extern void fb_invert_cmaps(void); | 976 | extern void fb_invert_cmaps(void); |
979 | 977 | ||
980 | struct fb_videomode { | 978 | struct fb_videomode { |
diff --git a/include/linux/file.h b/include/linux/file.h index 6e77b9177f9e..a59001e9ea58 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -26,19 +26,12 @@ struct embedded_fd_set { | |||
26 | unsigned long fds_bits[1]; | 26 | unsigned long fds_bits[1]; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | /* | ||
30 | * More than this number of fds: we use a separately allocated fd_set | ||
31 | */ | ||
32 | #define EMBEDDED_FD_SET_SIZE (BITS_PER_BYTE * sizeof(struct embedded_fd_set)) | ||
33 | |||
34 | struct fdtable { | 29 | struct fdtable { |
35 | unsigned int max_fds; | 30 | unsigned int max_fds; |
36 | int max_fdset; | ||
37 | struct file ** fd; /* current fd array */ | 31 | struct file ** fd; /* current fd array */ |
38 | fd_set *close_on_exec; | 32 | fd_set *close_on_exec; |
39 | fd_set *open_fds; | 33 | fd_set *open_fds; |
40 | struct rcu_head rcu; | 34 | struct rcu_head rcu; |
41 | struct files_struct *free_files; | ||
42 | struct fdtable *next; | 35 | struct fdtable *next; |
43 | }; | 36 | }; |
44 | 37 | ||
@@ -83,16 +76,15 @@ extern int get_unused_fd(void); | |||
83 | extern void FASTCALL(put_unused_fd(unsigned int fd)); | 76 | extern void FASTCALL(put_unused_fd(unsigned int fd)); |
84 | struct kmem_cache; | 77 | struct kmem_cache; |
85 | 78 | ||
86 | extern struct file ** alloc_fd_array(int); | ||
87 | extern void free_fd_array(struct file **, int); | ||
88 | |||
89 | extern fd_set *alloc_fdset(int); | ||
90 | extern void free_fdset(fd_set *, int); | ||
91 | |||
92 | extern int expand_files(struct files_struct *, int nr); | 79 | extern int expand_files(struct files_struct *, int nr); |
93 | extern void free_fdtable(struct fdtable *fdt); | 80 | extern void free_fdtable_rcu(struct rcu_head *rcu); |
94 | extern void __init files_defer_init(void); | 81 | extern void __init files_defer_init(void); |
95 | 82 | ||
83 | static inline void free_fdtable(struct fdtable *fdt) | ||
84 | { | ||
85 | call_rcu(&fdt->rcu, free_fdtable_rcu); | ||
86 | } | ||
87 | |||
96 | static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd) | 88 | static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd) |
97 | { | 89 | { |
98 | struct file * file = NULL; | 90 | struct file * file = NULL; |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 6e05e3e7ce39..5e75e26d4787 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -1,5 +1,7 @@ | |||
1 | /* Freezer declarations */ | 1 | /* Freezer declarations */ |
2 | 2 | ||
3 | #include <linux/sched.h> | ||
4 | |||
3 | #ifdef CONFIG_PM | 5 | #ifdef CONFIG_PM |
4 | /* | 6 | /* |
5 | * Check if a process has been frozen | 7 | * Check if a process has been frozen |
@@ -14,16 +16,15 @@ static inline int frozen(struct task_struct *p) | |||
14 | */ | 16 | */ |
15 | static inline int freezing(struct task_struct *p) | 17 | static inline int freezing(struct task_struct *p) |
16 | { | 18 | { |
17 | return p->flags & PF_FREEZE; | 19 | return test_tsk_thread_flag(p, TIF_FREEZE); |
18 | } | 20 | } |
19 | 21 | ||
20 | /* | 22 | /* |
21 | * Request that a process be frozen | 23 | * Request that a process be frozen |
22 | * FIXME: SMP problem. We may not modify other process' flags! | ||
23 | */ | 24 | */ |
24 | static inline void freeze(struct task_struct *p) | 25 | static inline void freeze(struct task_struct *p) |
25 | { | 26 | { |
26 | p->flags |= PF_FREEZE; | 27 | set_tsk_thread_flag(p, TIF_FREEZE); |
27 | } | 28 | } |
28 | 29 | ||
29 | /* | 30 | /* |
@@ -31,7 +32,7 @@ static inline void freeze(struct task_struct *p) | |||
31 | */ | 32 | */ |
32 | static inline void do_not_freeze(struct task_struct *p) | 33 | static inline void do_not_freeze(struct task_struct *p) |
33 | { | 34 | { |
34 | p->flags &= ~PF_FREEZE; | 35 | clear_tsk_thread_flag(p, TIF_FREEZE); |
35 | } | 36 | } |
36 | 37 | ||
37 | /* | 38 | /* |
@@ -52,7 +53,9 @@ static inline int thaw_process(struct task_struct *p) | |||
52 | */ | 53 | */ |
53 | static inline void frozen_process(struct task_struct *p) | 54 | static inline void frozen_process(struct task_struct *p) |
54 | { | 55 | { |
55 | p->flags = (p->flags & ~PF_FREEZE) | PF_FROZEN; | 56 | p->flags |= PF_FROZEN; |
57 | wmb(); | ||
58 | clear_tsk_thread_flag(p, TIF_FREEZE); | ||
56 | } | 59 | } |
57 | 60 | ||
58 | extern void refrigerator(void); | 61 | extern void refrigerator(void); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 70b99fbb560b..1410e5330c8d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -120,6 +120,7 @@ extern int dir_notify_enable; | |||
120 | #define MS_PRIVATE (1<<18) /* change to private */ | 120 | #define MS_PRIVATE (1<<18) /* change to private */ |
121 | #define MS_SLAVE (1<<19) /* change to slave */ | 121 | #define MS_SLAVE (1<<19) /* change to slave */ |
122 | #define MS_SHARED (1<<20) /* change to shared */ | 122 | #define MS_SHARED (1<<20) /* change to shared */ |
123 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | ||
123 | #define MS_ACTIVE (1<<30) | 124 | #define MS_ACTIVE (1<<30) |
124 | #define MS_NOUSER (1<<31) | 125 | #define MS_NOUSER (1<<31) |
125 | 126 | ||
@@ -269,6 +270,7 @@ extern int dir_notify_enable; | |||
269 | #include <linux/types.h> | 270 | #include <linux/types.h> |
270 | #include <linux/kdev_t.h> | 271 | #include <linux/kdev_t.h> |
271 | #include <linux/dcache.h> | 272 | #include <linux/dcache.h> |
273 | #include <linux/namei.h> | ||
272 | #include <linux/stat.h> | 274 | #include <linux/stat.h> |
273 | #include <linux/cache.h> | 275 | #include <linux/cache.h> |
274 | #include <linux/kobject.h> | 276 | #include <linux/kobject.h> |
@@ -424,6 +426,7 @@ struct address_space_operations { | |||
424 | /* migrate the contents of a page to the specified target */ | 426 | /* migrate the contents of a page to the specified target */ |
425 | int (*migratepage) (struct address_space *, | 427 | int (*migratepage) (struct address_space *, |
426 | struct page *, struct page *); | 428 | struct page *, struct page *); |
429 | int (*launder_page) (struct page *); | ||
427 | }; | 430 | }; |
428 | 431 | ||
429 | struct backing_dev_info; | 432 | struct backing_dev_info; |
@@ -456,7 +459,7 @@ struct block_device { | |||
456 | struct inode * bd_inode; /* will die */ | 459 | struct inode * bd_inode; /* will die */ |
457 | int bd_openers; | 460 | int bd_openers; |
458 | struct mutex bd_mutex; /* open/close mutex */ | 461 | struct mutex bd_mutex; /* open/close mutex */ |
459 | struct mutex bd_mount_mutex; /* mount mutex */ | 462 | struct semaphore bd_mount_sem; |
460 | struct list_head bd_inodes; | 463 | struct list_head bd_inodes; |
461 | void * bd_holder; | 464 | void * bd_holder; |
462 | int bd_holders; | 465 | int bd_holders; |
@@ -482,21 +485,6 @@ struct block_device { | |||
482 | }; | 485 | }; |
483 | 486 | ||
484 | /* | 487 | /* |
485 | * bdev->bd_mutex nesting subclasses for the lock validator: | ||
486 | * | ||
487 | * 0: normal | ||
488 | * 1: 'whole' | ||
489 | * 2: 'partition' | ||
490 | */ | ||
491 | enum bdev_bd_mutex_lock_class | ||
492 | { | ||
493 | BD_MUTEX_NORMAL, | ||
494 | BD_MUTEX_WHOLE, | ||
495 | BD_MUTEX_PARTITION | ||
496 | }; | ||
497 | |||
498 | |||
499 | /* | ||
500 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache | 488 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache |
501 | * radix trees | 489 | * radix trees |
502 | */ | 490 | */ |
@@ -726,8 +714,9 @@ struct file { | |||
726 | struct list_head fu_list; | 714 | struct list_head fu_list; |
727 | struct rcu_head fu_rcuhead; | 715 | struct rcu_head fu_rcuhead; |
728 | } f_u; | 716 | } f_u; |
729 | struct dentry *f_dentry; | 717 | struct path f_path; |
730 | struct vfsmount *f_vfsmnt; | 718 | #define f_dentry f_path.dentry |
719 | #define f_vfsmnt f_path.mnt | ||
731 | const struct file_operations *f_op; | 720 | const struct file_operations *f_op; |
732 | atomic_t f_count; | 721 | atomic_t f_count; |
733 | unsigned int f_flags; | 722 | unsigned int f_flags; |
@@ -1239,7 +1228,7 @@ extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); | |||
1239 | static inline void file_accessed(struct file *file) | 1228 | static inline void file_accessed(struct file *file) |
1240 | { | 1229 | { |
1241 | if (!(file->f_flags & O_NOATIME)) | 1230 | if (!(file->f_flags & O_NOATIME)) |
1242 | touch_atime(file->f_vfsmnt, file->f_dentry); | 1231 | touch_atime(file->f_path.mnt, file->f_path.dentry); |
1243 | } | 1232 | } |
1244 | 1233 | ||
1245 | int sync_inode(struct inode *inode, struct writeback_control *wbc); | 1234 | int sync_inode(struct inode *inode, struct writeback_control *wbc); |
@@ -1499,7 +1488,6 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
1499 | extern void bd_forget(struct inode *inode); | 1488 | extern void bd_forget(struct inode *inode); |
1500 | extern void bdput(struct block_device *); | 1489 | extern void bdput(struct block_device *); |
1501 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1490 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1502 | extern struct block_device *open_partition_by_devnum(dev_t, unsigned); | ||
1503 | extern const struct address_space_operations def_blk_aops; | 1491 | extern const struct address_space_operations def_blk_aops; |
1504 | #else | 1492 | #else |
1505 | static inline void bd_forget(struct inode *inode) {} | 1493 | static inline void bd_forget(struct inode *inode) {} |
@@ -1517,7 +1505,6 @@ extern int blkdev_driver_ioctl(struct inode *inode, struct file *file, | |||
1517 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 1505 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
1518 | extern int blkdev_get(struct block_device *, mode_t, unsigned); | 1506 | extern int blkdev_get(struct block_device *, mode_t, unsigned); |
1519 | extern int blkdev_put(struct block_device *); | 1507 | extern int blkdev_put(struct block_device *); |
1520 | extern int blkdev_put_partition(struct block_device *); | ||
1521 | extern int bd_claim(struct block_device *, void *); | 1508 | extern int bd_claim(struct block_device *, void *); |
1522 | extern void bd_release(struct block_device *); | 1509 | extern void bd_release(struct block_device *); |
1523 | #ifdef CONFIG_SYSFS | 1510 | #ifdef CONFIG_SYSFS |
@@ -1632,7 +1619,7 @@ static inline void put_write_access(struct inode * inode) | |||
1632 | static inline void allow_write_access(struct file *file) | 1619 | static inline void allow_write_access(struct file *file) |
1633 | { | 1620 | { |
1634 | if (file) | 1621 | if (file) |
1635 | atomic_inc(&file->f_dentry->d_inode->i_writecount); | 1622 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); |
1636 | } | 1623 | } |
1637 | extern int do_pipe(int *); | 1624 | extern int do_pipe(int *); |
1638 | extern struct file *create_read_pipe(struct file *f); | 1625 | extern struct file *create_read_pipe(struct file *f); |
diff --git a/include/linux/fs_stack.h b/include/linux/fs_stack.h new file mode 100644 index 000000000000..bb516ceeefc9 --- /dev/null +++ b/include/linux/fs_stack.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _LINUX_FS_STACK_H | ||
2 | #define _LINUX_FS_STACK_H | ||
3 | |||
4 | /* This file defines generic functions used primarily by stackable | ||
5 | * filesystems; none of these functions require i_mutex to be held. | ||
6 | */ | ||
7 | |||
8 | #include <linux/fs.h> | ||
9 | |||
10 | /* externs for fs/stack.c */ | ||
11 | extern void fsstack_copy_attr_all(struct inode *dest, const struct inode *src, | ||
12 | int (*get_nlinks)(struct inode *)); | ||
13 | |||
14 | extern void fsstack_copy_inode_size(struct inode *dst, const struct inode *src); | ||
15 | |||
16 | /* inlines */ | ||
17 | static inline void fsstack_copy_attr_atime(struct inode *dest, | ||
18 | const struct inode *src) | ||
19 | { | ||
20 | dest->i_atime = src->i_atime; | ||
21 | } | ||
22 | |||
23 | static inline void fsstack_copy_attr_times(struct inode *dest, | ||
24 | const struct inode *src) | ||
25 | { | ||
26 | dest->i_atime = src->i_atime; | ||
27 | dest->i_mtime = src->i_mtime; | ||
28 | dest->i_ctime = src->i_ctime; | ||
29 | } | ||
30 | |||
31 | #endif /* _LINUX_FS_STACK_H */ | ||
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 3da29e2d524a..abb64c437f6f 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _FSL_DEVICE_H_ | 19 | #define _FSL_DEVICE_H_ |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/phy.h> | ||
22 | 23 | ||
23 | /* | 24 | /* |
24 | * Some conventions on how we handle peripherals on Freescale chips | 25 | * Some conventions on how we handle peripherals on Freescale chips |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index d4f219ffaa5d..dfc4e4f68da4 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -164,7 +164,7 @@ static inline void fsnotify_open(struct dentry *dentry) | |||
164 | */ | 164 | */ |
165 | static inline void fsnotify_close(struct file *file) | 165 | static inline void fsnotify_close(struct file *file) |
166 | { | 166 | { |
167 | struct dentry *dentry = file->f_dentry; | 167 | struct dentry *dentry = file->f_path.dentry; |
168 | struct inode *inode = dentry->d_inode; | 168 | struct inode *inode = dentry->d_inode; |
169 | const char *name = dentry->d_name.name; | 169 | const char *name = dentry->d_name.name; |
170 | mode_t mode = file->f_mode; | 170 | mode_t mode = file->f_mode; |
diff --git a/include/linux/futex.h b/include/linux/futex.h index d097b5b72bc6..3f153b4e156c 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -93,6 +93,7 @@ struct robust_list_head { | |||
93 | */ | 93 | */ |
94 | #define ROBUST_LIST_LIMIT 2048 | 94 | #define ROBUST_LIST_LIMIT 2048 |
95 | 95 | ||
96 | #ifdef __KERNEL__ | ||
96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, | 97 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, |
97 | u32 __user *uaddr2, u32 val2, u32 val3); | 98 | u32 __user *uaddr2, u32 val2, u32 val3); |
98 | 99 | ||
@@ -110,6 +111,7 @@ static inline void exit_pi_state_list(struct task_struct *curr) | |||
110 | { | 111 | { |
111 | } | 112 | } |
112 | #endif | 113 | #endif |
114 | #endif /* __KERNEL__ */ | ||
113 | 115 | ||
114 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ | 116 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ |
115 | #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ | 117 | #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 2cdba0c23957..afad95272841 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -105,7 +105,7 @@ static inline void gameport_set_phys(struct gameport *gameport, | |||
105 | 105 | ||
106 | static inline struct gameport *gameport_allocate_port(void) | 106 | static inline struct gameport *gameport_allocate_port(void) |
107 | { | 107 | { |
108 | struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); | 108 | struct gameport *gameport = kzalloc(sizeof(struct gameport), GFP_KERNEL); |
109 | 109 | ||
110 | return gameport; | 110 | return gameport; |
111 | } | 111 | } |
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index e25384561955..5412da28fa47 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h | |||
@@ -91,7 +91,7 @@ void gs_hangup(struct tty_struct *tty); | |||
91 | int gs_block_til_ready(void *port, struct file *filp); | 91 | int gs_block_til_ready(void *port, struct file *filp); |
92 | void gs_close(struct tty_struct *tty, struct file *filp); | 92 | void gs_close(struct tty_struct *tty, struct file *filp); |
93 | void gs_set_termios (struct tty_struct * tty, | 93 | void gs_set_termios (struct tty_struct * tty, |
94 | struct termios * old_termios); | 94 | struct ktermios * old_termios); |
95 | int gs_init_port(struct gs_port *port); | 95 | int gs_init_port(struct gs_port *port); |
96 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); | 96 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); |
97 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); | 97 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 41f276fdd185..0a022b2f63fc 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -83,6 +83,9 @@ struct hd_struct { | |||
83 | struct kobject *holder_dir; | 83 | struct kobject *holder_dir; |
84 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ | 84 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ |
85 | int policy, partno; | 85 | int policy, partno; |
86 | #ifdef CONFIG_FAIL_MAKE_REQUEST | ||
87 | int make_it_fail; | ||
88 | #endif | ||
86 | }; | 89 | }; |
87 | 90 | ||
88 | #define GENHD_FL_REMOVABLE 1 | 91 | #define GENHD_FL_REMOVABLE 1 |
@@ -90,6 +93,7 @@ struct hd_struct { | |||
90 | #define GENHD_FL_CD 8 | 93 | #define GENHD_FL_CD 8 |
91 | #define GENHD_FL_UP 16 | 94 | #define GENHD_FL_UP 16 |
92 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 95 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
96 | #define GENHD_FL_FAIL 64 | ||
93 | 97 | ||
94 | struct disk_stats { | 98 | struct disk_stats { |
95 | unsigned long sectors[2]; /* READs and WRITEs */ | 99 | unsigned long sectors[2]; /* READs and WRITEs */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 00c314aedab7..063799ea6be0 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 | ||
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 2b54eac738ea..818c6afc1091 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h | |||
@@ -60,13 +60,15 @@ | |||
60 | #define TAG_MASK 0xf8 | 60 | #define TAG_MASK 0xf8 |
61 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
62 | 62 | ||
63 | #include <linux/types.h> | ||
64 | |||
63 | /* | 65 | /* |
64 | * Command Header sizes for IOCTL commands | 66 | * Command Header sizes for IOCTL commands |
65 | */ | 67 | */ |
66 | 68 | ||
67 | #define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(u8)) | 69 | #define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(__u8)) |
68 | #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(u8)) | 70 | #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(__u8)) |
69 | #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(u8)) | 71 | #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(__u8)) |
70 | 72 | ||
71 | #define IDE_DRIVE_TASK_INVALID -1 | 73 | #define IDE_DRIVE_TASK_INVALID -1 |
72 | #define IDE_DRIVE_TASK_NO_DATA 0 | 74 | #define IDE_DRIVE_TASK_NO_DATA 0 |
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h new file mode 100644 index 000000000000..50d568ec178a --- /dev/null +++ b/include/linux/hid-debug.h | |||
@@ -0,0 +1,45 @@ | |||
1 | #ifndef __HID_DEBUG_H | ||
2 | #define __HID_DEBUG_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (c) 2007 Jiri Kosina | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
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 | #ifdef CONFIG_HID_DEBUG | ||
26 | |||
27 | void hid_dump_input(struct hid_usage *, __s32); | ||
28 | void hid_dump_device(struct hid_device *); | ||
29 | void hid_dump_field(struct hid_field *, int); | ||
30 | void hid_resolv_usage(unsigned); | ||
31 | void hid_resolv_event(__u8, __u16); | ||
32 | |||
33 | #else | ||
34 | |||
35 | #define hid_dump_input(a,b) do { } while (0) | ||
36 | #define hid_dump_device(c) do { } while (0) | ||
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) | ||
40 | |||
41 | #endif /* CONFIG_HID_DEBUG */ | ||
42 | |||
43 | |||
44 | #endif | ||
45 | |||
diff --git a/include/linux/hid.h b/include/linux/hid.h new file mode 100644 index 000000000000..d26b08f461f2 --- /dev/null +++ b/include/linux/hid.h | |||
@@ -0,0 +1,521 @@ | |||
1 | #ifndef __HID_H | ||
2 | #define __HID_H | ||
3 | |||
4 | /* | ||
5 | * $Id: hid.h,v 1.24 2001/12/27 10:37:41 vojtech Exp $ | ||
6 | * | ||
7 | * Copyright (c) 1999 Andreas Gal | ||
8 | * Copyright (c) 2000-2001 Vojtech Pavlik | ||
9 | * Copyright (c) 2006 Jiri Kosina | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | * GNU General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
26 | * | ||
27 | * Should you need to contact me, the author, you can do so either by | ||
28 | * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail: | ||
29 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | ||
30 | */ | ||
31 | |||
32 | #include <linux/types.h> | ||
33 | #include <linux/slab.h> | ||
34 | #include <linux/list.h> | ||
35 | #include <linux/timer.h> | ||
36 | #include <linux/workqueue.h> | ||
37 | #include <linux/input.h> | ||
38 | |||
39 | /* | ||
40 | * USB HID (Human Interface Device) interface class code | ||
41 | */ | ||
42 | |||
43 | #define USB_INTERFACE_CLASS_HID 3 | ||
44 | |||
45 | /* | ||
46 | * USB HID interface subclass and protocol codes | ||
47 | */ | ||
48 | |||
49 | #define USB_INTERFACE_SUBCLASS_BOOT 1 | ||
50 | #define USB_INTERFACE_PROTOCOL_KEYBOARD 1 | ||
51 | #define USB_INTERFACE_PROTOCOL_MOUSE 2 | ||
52 | |||
53 | /* | ||
54 | * HID class requests | ||
55 | */ | ||
56 | |||
57 | #define HID_REQ_GET_REPORT 0x01 | ||
58 | #define HID_REQ_GET_IDLE 0x02 | ||
59 | #define HID_REQ_GET_PROTOCOL 0x03 | ||
60 | #define HID_REQ_SET_REPORT 0x09 | ||
61 | #define HID_REQ_SET_IDLE 0x0A | ||
62 | #define HID_REQ_SET_PROTOCOL 0x0B | ||
63 | |||
64 | /* | ||
65 | * HID class descriptor types | ||
66 | */ | ||
67 | |||
68 | #define HID_DT_HID (USB_TYPE_CLASS | 0x01) | ||
69 | #define HID_DT_REPORT (USB_TYPE_CLASS | 0x02) | ||
70 | #define HID_DT_PHYSICAL (USB_TYPE_CLASS | 0x03) | ||
71 | |||
72 | /* | ||
73 | * We parse each description item into this structure. Short items data | ||
74 | * values are expanded to 32-bit signed int, long items contain a pointer | ||
75 | * into the data area. | ||
76 | */ | ||
77 | |||
78 | struct hid_item { | ||
79 | unsigned format; | ||
80 | __u8 size; | ||
81 | __u8 type; | ||
82 | __u8 tag; | ||
83 | union { | ||
84 | __u8 u8; | ||
85 | __s8 s8; | ||
86 | __u16 u16; | ||
87 | __s16 s16; | ||
88 | __u32 u32; | ||
89 | __s32 s32; | ||
90 | __u8 *longdata; | ||
91 | } data; | ||
92 | }; | ||
93 | |||
94 | /* | ||
95 | * HID report item format | ||
96 | */ | ||
97 | |||
98 | #define HID_ITEM_FORMAT_SHORT 0 | ||
99 | #define HID_ITEM_FORMAT_LONG 1 | ||
100 | |||
101 | /* | ||
102 | * Special tag indicating long items | ||
103 | */ | ||
104 | |||
105 | #define HID_ITEM_TAG_LONG 15 | ||
106 | |||
107 | /* | ||
108 | * HID report descriptor item type (prefix bit 2,3) | ||
109 | */ | ||
110 | |||
111 | #define HID_ITEM_TYPE_MAIN 0 | ||
112 | #define HID_ITEM_TYPE_GLOBAL 1 | ||
113 | #define HID_ITEM_TYPE_LOCAL 2 | ||
114 | #define HID_ITEM_TYPE_RESERVED 3 | ||
115 | |||
116 | /* | ||
117 | * HID report descriptor main item tags | ||
118 | */ | ||
119 | |||
120 | #define HID_MAIN_ITEM_TAG_INPUT 8 | ||
121 | #define HID_MAIN_ITEM_TAG_OUTPUT 9 | ||
122 | #define HID_MAIN_ITEM_TAG_FEATURE 11 | ||
123 | #define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10 | ||
124 | #define HID_MAIN_ITEM_TAG_END_COLLECTION 12 | ||
125 | |||
126 | /* | ||
127 | * HID report descriptor main item contents | ||
128 | */ | ||
129 | |||
130 | #define HID_MAIN_ITEM_CONSTANT 0x001 | ||
131 | #define HID_MAIN_ITEM_VARIABLE 0x002 | ||
132 | #define HID_MAIN_ITEM_RELATIVE 0x004 | ||
133 | #define HID_MAIN_ITEM_WRAP 0x008 | ||
134 | #define HID_MAIN_ITEM_NONLINEAR 0x010 | ||
135 | #define HID_MAIN_ITEM_NO_PREFERRED 0x020 | ||
136 | #define HID_MAIN_ITEM_NULL_STATE 0x040 | ||
137 | #define HID_MAIN_ITEM_VOLATILE 0x080 | ||
138 | #define HID_MAIN_ITEM_BUFFERED_BYTE 0x100 | ||
139 | |||
140 | /* | ||
141 | * HID report descriptor collection item types | ||
142 | */ | ||
143 | |||
144 | #define HID_COLLECTION_PHYSICAL 0 | ||
145 | #define HID_COLLECTION_APPLICATION 1 | ||
146 | #define HID_COLLECTION_LOGICAL 2 | ||
147 | |||
148 | /* | ||
149 | * HID report descriptor global item tags | ||
150 | */ | ||
151 | |||
152 | #define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0 | ||
153 | #define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1 | ||
154 | #define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2 | ||
155 | #define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3 | ||
156 | #define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4 | ||
157 | #define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5 | ||
158 | #define HID_GLOBAL_ITEM_TAG_UNIT 6 | ||
159 | #define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7 | ||
160 | #define HID_GLOBAL_ITEM_TAG_REPORT_ID 8 | ||
161 | #define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9 | ||
162 | #define HID_GLOBAL_ITEM_TAG_PUSH 10 | ||
163 | #define HID_GLOBAL_ITEM_TAG_POP 11 | ||
164 | |||
165 | /* | ||
166 | * HID report descriptor local item tags | ||
167 | */ | ||
168 | |||
169 | #define HID_LOCAL_ITEM_TAG_USAGE 0 | ||
170 | #define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1 | ||
171 | #define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2 | ||
172 | #define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3 | ||
173 | #define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4 | ||
174 | #define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5 | ||
175 | #define HID_LOCAL_ITEM_TAG_STRING_INDEX 7 | ||
176 | #define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8 | ||
177 | #define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9 | ||
178 | #define HID_LOCAL_ITEM_TAG_DELIMITER 10 | ||
179 | |||
180 | /* | ||
181 | * HID usage tables | ||
182 | */ | ||
183 | |||
184 | #define HID_USAGE_PAGE 0xffff0000 | ||
185 | |||
186 | #define HID_UP_UNDEFINED 0x00000000 | ||
187 | #define HID_UP_GENDESK 0x00010000 | ||
188 | #define HID_UP_SIMULATION 0x00020000 | ||
189 | #define HID_UP_KEYBOARD 0x00070000 | ||
190 | #define HID_UP_LED 0x00080000 | ||
191 | #define HID_UP_BUTTON 0x00090000 | ||
192 | #define HID_UP_ORDINAL 0x000a0000 | ||
193 | #define HID_UP_CONSUMER 0x000c0000 | ||
194 | #define HID_UP_DIGITIZER 0x000d0000 | ||
195 | #define HID_UP_PID 0x000f0000 | ||
196 | #define HID_UP_HPVENDOR 0xff7f0000 | ||
197 | #define HID_UP_MSVENDOR 0xff000000 | ||
198 | #define HID_UP_CUSTOM 0x00ff0000 | ||
199 | #define HID_UP_LOGIVENDOR 0xffbc0000 | ||
200 | |||
201 | #define HID_USAGE 0x0000ffff | ||
202 | |||
203 | #define HID_GD_POINTER 0x00010001 | ||
204 | #define HID_GD_MOUSE 0x00010002 | ||
205 | #define HID_GD_JOYSTICK 0x00010004 | ||
206 | #define HID_GD_GAMEPAD 0x00010005 | ||
207 | #define HID_GD_KEYBOARD 0x00010006 | ||
208 | #define HID_GD_KEYPAD 0x00010007 | ||
209 | #define HID_GD_MULTIAXIS 0x00010008 | ||
210 | #define HID_GD_X 0x00010030 | ||
211 | #define HID_GD_Y 0x00010031 | ||
212 | #define HID_GD_Z 0x00010032 | ||
213 | #define HID_GD_RX 0x00010033 | ||
214 | #define HID_GD_RY 0x00010034 | ||
215 | #define HID_GD_RZ 0x00010035 | ||
216 | #define HID_GD_SLIDER 0x00010036 | ||
217 | #define HID_GD_DIAL 0x00010037 | ||
218 | #define HID_GD_WHEEL 0x00010038 | ||
219 | #define HID_GD_HATSWITCH 0x00010039 | ||
220 | #define HID_GD_BUFFER 0x0001003a | ||
221 | #define HID_GD_BYTECOUNT 0x0001003b | ||
222 | #define HID_GD_MOTION 0x0001003c | ||
223 | #define HID_GD_START 0x0001003d | ||
224 | #define HID_GD_SELECT 0x0001003e | ||
225 | #define HID_GD_VX 0x00010040 | ||
226 | #define HID_GD_VY 0x00010041 | ||
227 | #define HID_GD_VZ 0x00010042 | ||
228 | #define HID_GD_VBRX 0x00010043 | ||
229 | #define HID_GD_VBRY 0x00010044 | ||
230 | #define HID_GD_VBRZ 0x00010045 | ||
231 | #define HID_GD_VNO 0x00010046 | ||
232 | #define HID_GD_FEATURE 0x00010047 | ||
233 | #define HID_GD_UP 0x00010090 | ||
234 | #define HID_GD_DOWN 0x00010091 | ||
235 | #define HID_GD_RIGHT 0x00010092 | ||
236 | #define HID_GD_LEFT 0x00010093 | ||
237 | |||
238 | /* | ||
239 | * HID report types --- Ouch! HID spec says 1 2 3! | ||
240 | */ | ||
241 | |||
242 | #define HID_INPUT_REPORT 0 | ||
243 | #define HID_OUTPUT_REPORT 1 | ||
244 | #define HID_FEATURE_REPORT 2 | ||
245 | |||
246 | /* | ||
247 | * HID device quirks. | ||
248 | */ | ||
249 | |||
250 | #define HID_QUIRK_INVERT 0x00000001 | ||
251 | #define HID_QUIRK_NOTOUCH 0x00000002 | ||
252 | #define HID_QUIRK_IGNORE 0x00000004 | ||
253 | #define HID_QUIRK_NOGET 0x00000008 | ||
254 | #define HID_QUIRK_HIDDEV 0x00000010 | ||
255 | #define HID_QUIRK_BADPAD 0x00000020 | ||
256 | #define HID_QUIRK_MULTI_INPUT 0x00000040 | ||
257 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x00000080 | ||
258 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 | ||
259 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 | ||
260 | #define HID_QUIRK_MIGHTYMOUSE 0x00000400 | ||
261 | #define HID_QUIRK_CYMOTION 0x00000800 | ||
262 | #define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 | ||
263 | #define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 | ||
264 | #define HID_QUIRK_INVERT_HWHEEL 0x00004000 | ||
265 | #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00008000 | ||
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 | ||
270 | |||
271 | /* | ||
272 | * This is the global environment of the parser. This information is | ||
273 | * persistent for main-items. The global environment can be saved and | ||
274 | * restored with PUSH/POP statements. | ||
275 | */ | ||
276 | |||
277 | struct hid_global { | ||
278 | unsigned usage_page; | ||
279 | __s32 logical_minimum; | ||
280 | __s32 logical_maximum; | ||
281 | __s32 physical_minimum; | ||
282 | __s32 physical_maximum; | ||
283 | __s32 unit_exponent; | ||
284 | unsigned unit; | ||
285 | unsigned report_id; | ||
286 | unsigned report_size; | ||
287 | unsigned report_count; | ||
288 | }; | ||
289 | |||
290 | /* | ||
291 | * This is the local environment. It is persistent up the next main-item. | ||
292 | */ | ||
293 | |||
294 | #define HID_MAX_DESCRIPTOR_SIZE 4096 | ||
295 | #define HID_MAX_USAGES 1024 | ||
296 | #define HID_DEFAULT_NUM_COLLECTIONS 16 | ||
297 | |||
298 | struct hid_local { | ||
299 | unsigned usage[HID_MAX_USAGES]; /* usage array */ | ||
300 | unsigned collection_index[HID_MAX_USAGES]; /* collection index array */ | ||
301 | unsigned usage_index; | ||
302 | unsigned usage_minimum; | ||
303 | unsigned delimiter_depth; | ||
304 | unsigned delimiter_branch; | ||
305 | }; | ||
306 | |||
307 | /* | ||
308 | * This is the collection stack. We climb up the stack to determine | ||
309 | * application and function of each field. | ||
310 | */ | ||
311 | |||
312 | struct hid_collection { | ||
313 | unsigned type; | ||
314 | unsigned usage; | ||
315 | unsigned level; | ||
316 | }; | ||
317 | |||
318 | struct hid_usage { | ||
319 | unsigned hid; /* hid usage code */ | ||
320 | unsigned collection_index; /* index into collection array */ | ||
321 | /* hidinput data */ | ||
322 | __u16 code; /* input driver code */ | ||
323 | __u8 type; /* input driver type */ | ||
324 | __s8 hat_min; /* hat switch fun */ | ||
325 | __s8 hat_max; /* ditto */ | ||
326 | __s8 hat_dir; /* ditto */ | ||
327 | }; | ||
328 | |||
329 | struct hid_input; | ||
330 | |||
331 | struct hid_field { | ||
332 | unsigned physical; /* physical usage for this field */ | ||
333 | unsigned logical; /* logical usage for this field */ | ||
334 | unsigned application; /* application usage for this field */ | ||
335 | struct hid_usage *usage; /* usage table for this function */ | ||
336 | unsigned maxusage; /* maximum usage index */ | ||
337 | unsigned flags; /* main-item flags (i.e. volatile,array,constant) */ | ||
338 | unsigned report_offset; /* bit offset in the report */ | ||
339 | unsigned report_size; /* size of this field in the report */ | ||
340 | unsigned report_count; /* number of this field in the report */ | ||
341 | unsigned report_type; /* (input,output,feature) */ | ||
342 | __s32 *value; /* last known value(s) */ | ||
343 | __s32 logical_minimum; | ||
344 | __s32 logical_maximum; | ||
345 | __s32 physical_minimum; | ||
346 | __s32 physical_maximum; | ||
347 | __s32 unit_exponent; | ||
348 | unsigned unit; | ||
349 | struct hid_report *report; /* associated report */ | ||
350 | unsigned index; /* index into report->field[] */ | ||
351 | /* hidinput data */ | ||
352 | struct hid_input *hidinput; /* associated input structure */ | ||
353 | __u16 dpad; /* dpad input code */ | ||
354 | }; | ||
355 | |||
356 | #define HID_MAX_FIELDS 64 | ||
357 | |||
358 | struct hid_report { | ||
359 | struct list_head list; | ||
360 | unsigned id; /* id of this report */ | ||
361 | unsigned type; /* report type */ | ||
362 | struct hid_field *field[HID_MAX_FIELDS]; /* fields of the report */ | ||
363 | unsigned maxfield; /* maximum valid field index */ | ||
364 | unsigned size; /* size of the report (bits) */ | ||
365 | struct hid_device *device; /* associated device */ | ||
366 | }; | ||
367 | |||
368 | struct hid_report_enum { | ||
369 | unsigned numbered; | ||
370 | struct list_head report_list; | ||
371 | struct hid_report *report_id_hash[256]; | ||
372 | }; | ||
373 | |||
374 | #define HID_REPORT_TYPES 3 | ||
375 | |||
376 | #define HID_MIN_BUFFER_SIZE 64 /* make sure there is at least a packet size of space */ | ||
377 | #define HID_MAX_BUFFER_SIZE 4096 /* 4kb */ | ||
378 | #define HID_CONTROL_FIFO_SIZE 256 /* to init devices with >100 reports */ | ||
379 | #define HID_OUTPUT_FIFO_SIZE 64 | ||
380 | |||
381 | struct hid_control_fifo { | ||
382 | unsigned char dir; | ||
383 | struct hid_report *report; | ||
384 | }; | ||
385 | |||
386 | #define HID_CLAIMED_INPUT 1 | ||
387 | #define HID_CLAIMED_HIDDEV 2 | ||
388 | |||
389 | #define HID_CTRL_RUNNING 1 | ||
390 | #define HID_OUT_RUNNING 2 | ||
391 | #define HID_IN_RUNNING 3 | ||
392 | #define HID_RESET_PENDING 4 | ||
393 | #define HID_SUSPENDED 5 | ||
394 | #define HID_CLEAR_HALT 6 | ||
395 | |||
396 | struct hid_input { | ||
397 | struct list_head list; | ||
398 | struct hid_report *report; | ||
399 | struct input_dev *input; | ||
400 | }; | ||
401 | |||
402 | struct hid_device { /* device report descriptor */ | ||
403 | __u8 *rdesc; | ||
404 | unsigned rsize; | ||
405 | struct hid_collection *collection; /* List of HID collections */ | ||
406 | unsigned collection_size; /* Number of allocated hid_collections */ | ||
407 | unsigned maxcollection; /* Number of parsed collections */ | ||
408 | unsigned maxapplication; /* Number of applications */ | ||
409 | unsigned short bus; /* BUS ID */ | ||
410 | unsigned short vendor; /* Vendor ID */ | ||
411 | unsigned short product; /* Product ID */ | ||
412 | unsigned version; /* HID version */ | ||
413 | unsigned country; /* HID country */ | ||
414 | struct hid_report_enum report_enum[HID_REPORT_TYPES]; | ||
415 | |||
416 | struct device *dev; /* device */ | ||
417 | |||
418 | unsigned claimed; /* Claimed by hidinput, hiddev? */ | ||
419 | unsigned quirks; /* Various quirks the device can pull on us */ | ||
420 | |||
421 | struct list_head inputs; /* The list of inputs */ | ||
422 | void *hiddev; /* The hiddev structure */ | ||
423 | int minor; /* Hiddev minor number */ | ||
424 | |||
425 | wait_queue_head_t wait; /* For sleeping */ | ||
426 | |||
427 | int open; /* is the device open by anyone? */ | ||
428 | char name[128]; /* Device name */ | ||
429 | char phys[64]; /* Device physical location */ | ||
430 | char uniq[64]; /* Device unique identifier (serial #) */ | ||
431 | |||
432 | void *driver_data; | ||
433 | |||
434 | /* device-specific function pointers */ | ||
435 | int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int); | ||
436 | int (*hid_open) (struct hid_device *); | ||
437 | void (*hid_close) (struct hid_device *); | ||
438 | |||
439 | /* hiddev event handler */ | ||
440 | void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field, | ||
441 | struct hid_usage *, __s32); | ||
442 | void (*hiddev_report_event) (struct hid_device *, struct hid_report *); | ||
443 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | ||
444 | unsigned long pb_pressed_fn[NBITS(KEY_MAX)]; | ||
445 | unsigned long pb_pressed_numlock[NBITS(KEY_MAX)]; | ||
446 | #endif | ||
447 | }; | ||
448 | |||
449 | #define HID_GLOBAL_STACK_SIZE 4 | ||
450 | #define HID_COLLECTION_STACK_SIZE 4 | ||
451 | |||
452 | struct hid_parser { | ||
453 | struct hid_global global; | ||
454 | struct hid_global global_stack[HID_GLOBAL_STACK_SIZE]; | ||
455 | unsigned global_stack_ptr; | ||
456 | struct hid_local local; | ||
457 | unsigned collection_stack[HID_COLLECTION_STACK_SIZE]; | ||
458 | unsigned collection_stack_ptr; | ||
459 | struct hid_device *device; | ||
460 | }; | ||
461 | |||
462 | struct hid_class_descriptor { | ||
463 | __u8 bDescriptorType; | ||
464 | __u16 wDescriptorLength; | ||
465 | } __attribute__ ((packed)); | ||
466 | |||
467 | struct hid_descriptor { | ||
468 | __u8 bLength; | ||
469 | __u8 bDescriptorType; | ||
470 | __u16 bcdHID; | ||
471 | __u8 bCountryCode; | ||
472 | __u8 bNumDescriptors; | ||
473 | |||
474 | struct hid_class_descriptor desc[1]; | ||
475 | } __attribute__ ((packed)); | ||
476 | |||
477 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ | ||
478 | /* We ignore a few input applications that are not widely used */ | ||
479 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | ||
480 | |||
481 | /* HID core API */ | ||
482 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | ||
483 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); | ||
484 | extern int hidinput_connect(struct hid_device *); | ||
485 | extern void hidinput_disconnect(struct hid_device *); | ||
486 | |||
487 | int hid_set_field(struct hid_field *, unsigned, __s32); | ||
488 | int hid_input_report(struct hid_device *, int type, u8 *, int, int); | ||
489 | int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); | ||
490 | void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt); | ||
491 | void hid_output_report(struct hid_report *report, __u8 *data); | ||
492 | void hid_free_device(struct hid_device *device); | ||
493 | struct hid_device *hid_parse_report(__u8 *start, unsigned size); | ||
494 | |||
495 | #ifdef CONFIG_HID_FF | ||
496 | int hid_ff_init(struct hid_device *hid); | ||
497 | |||
498 | int hid_lgff_init(struct hid_device *hid); | ||
499 | int hid_plff_init(struct hid_device *hid); | ||
500 | int hid_tmff_init(struct hid_device *hid); | ||
501 | int hid_zpff_init(struct hid_device *hid); | ||
502 | #ifdef CONFIG_HID_PID | ||
503 | int hid_pidff_init(struct hid_device *hid); | ||
504 | #else | ||
505 | static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; } | ||
506 | #endif | ||
507 | |||
508 | #else | ||
509 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } | ||
510 | #endif | ||
511 | #ifdef DEBUG | ||
512 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | ||
513 | __FILE__ , ## arg) | ||
514 | #else | ||
515 | #define dbg(format, arg...) do {} while (0) | ||
516 | #endif | ||
517 | |||
518 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | ||
519 | __FILE__ , ## arg) | ||
520 | #endif | ||
521 | |||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 3d8768b619e9..645d440807c2 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <asm/cacheflush.h> | 8 | #include <asm/cacheflush.h> |
9 | 9 | ||
10 | #ifndef ARCH_HAS_FLUSH_ANON_PAGE | 10 | #ifndef ARCH_HAS_FLUSH_ANON_PAGE |
11 | static inline void flush_anon_page(struct page *page, unsigned long vmaddr) | 11 | static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) |
12 | { | 12 | { |
13 | } | 13 | } |
14 | #endif | 14 | #endif |
@@ -96,7 +96,10 @@ static inline void memclear_highpage_flush(struct page *page, unsigned int offse | |||
96 | kunmap_atomic(kaddr, KM_USER0); | 96 | kunmap_atomic(kaddr, KM_USER0); |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr) | 99 | #ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE |
100 | |||
101 | static inline void copy_user_highpage(struct page *to, struct page *from, | ||
102 | unsigned long vaddr, struct vm_area_struct *vma) | ||
100 | { | 103 | { |
101 | char *vfrom, *vto; | 104 | char *vfrom, *vto; |
102 | 105 | ||
@@ -109,6 +112,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from, unsign | |||
109 | smp_wmb(); | 112 | smp_wmb(); |
110 | } | 113 | } |
111 | 114 | ||
115 | #endif | ||
116 | |||
112 | static inline void copy_highpage(struct page *to, struct page *from) | 117 | static inline void copy_highpage(struct page *to, struct page *from) |
113 | { | 118 | { |
114 | char *vfrom, *vto; | 119 | char *vfrom, *vto; |
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index c8f8df25c7e0..937da70cb4c4 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h | |||
@@ -26,9 +26,9 @@ | |||
26 | 26 | ||
27 | /* --- Defines for bit-adapters --------------------------------------- */ | 27 | /* --- Defines for bit-adapters --------------------------------------- */ |
28 | /* | 28 | /* |
29 | * This struct contains the hw-dependent functions of bit-style adapters to | 29 | * This struct contains the hw-dependent functions of bit-style adapters to |
30 | * manipulate the line states, and to init any hw-specific features. This is | 30 | * manipulate the line states, and to init any hw-specific features. This is |
31 | * only used if you have more than one hw-type of adapter running. | 31 | * only used if you have more than one hw-type of adapter running. |
32 | */ | 32 | */ |
33 | struct i2c_algo_bit_data { | 33 | struct i2c_algo_bit_data { |
34 | void *data; /* private data for lowlevel routines */ | 34 | void *data; /* private data for lowlevel routines */ |
@@ -44,6 +44,5 @@ struct i2c_algo_bit_data { | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | int i2c_bit_add_bus(struct i2c_adapter *); | 46 | int i2c_bit_add_bus(struct i2c_adapter *); |
47 | int i2c_bit_del_bus(struct i2c_adapter *); | ||
48 | 47 | ||
49 | #endif /* _LINUX_I2C_ALGO_BIT_H */ | 48 | #endif /* _LINUX_I2C_ALGO_BIT_H */ |
diff --git a/include/linux/i2c-algo-ite.h b/include/linux/i2c-algo-ite.h deleted file mode 100644 index 0073fe96c76e..000000000000 --- a/include/linux/i2c-algo-ite.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* ------------------------------------------------------------------------- */ | ||
2 | /* i2c-algo-ite.h i2c driver algorithms for ITE IIC adapters */ | ||
3 | /* ------------------------------------------------------------------------- */ | ||
4 | /* Copyright (C) 1995-97 Simon G. Vogl | ||
5 | 1998-99 Hans Berglund | ||
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 | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; if not, write to the Free Software | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
20 | /* ------------------------------------------------------------------------- */ | ||
21 | |||
22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | ||
23 | Frodo Looijaard <frodol@dds.nl> */ | ||
24 | |||
25 | /* Modifications by MontaVista Software, 2001 | ||
26 | Changes made to support the ITE IIC peripheral */ | ||
27 | |||
28 | |||
29 | #ifndef I2C_ALGO_ITE_H | ||
30 | #define I2C_ALGO_ITE_H 1 | ||
31 | |||
32 | #include <linux/types.h> | ||
33 | |||
34 | /* Example of a sequential read request: | ||
35 | struct i2c_iic_msg s_msg; | ||
36 | |||
37 | s_msg.addr=device_address; | ||
38 | s_msg.len=length; | ||
39 | s_msg.buf=buffer; | ||
40 | s_msg.waddr=word_address; | ||
41 | ioctl(file,I2C_SREAD, &s_msg); | ||
42 | */ | ||
43 | #define I2C_SREAD 0x780 /* SREAD ioctl command */ | ||
44 | |||
45 | struct i2c_iic_msg { | ||
46 | __u16 addr; /* device address */ | ||
47 | __u16 waddr; /* word address */ | ||
48 | short len; /* msg length */ | ||
49 | char *buf; /* pointer to msg data */ | ||
50 | }; | ||
51 | |||
52 | #ifdef __KERNEL__ | ||
53 | struct i2c_adapter; | ||
54 | |||
55 | struct i2c_algo_iic_data { | ||
56 | void *data; /* private data for lolevel routines */ | ||
57 | void (*setiic) (void *data, int ctl, int val); | ||
58 | int (*getiic) (void *data, int ctl); | ||
59 | int (*getown) (void *data); | ||
60 | int (*getclock) (void *data); | ||
61 | void (*waitforpin) (void); | ||
62 | |||
63 | /* local settings */ | ||
64 | int udelay; | ||
65 | int mdelay; | ||
66 | int timeout; | ||
67 | }; | ||
68 | |||
69 | int i2c_iic_add_bus(struct i2c_adapter *); | ||
70 | int i2c_iic_del_bus(struct i2c_adapter *); | ||
71 | #endif /* __KERNEL__ */ | ||
72 | #endif /* I2C_ALGO_ITE_H */ | ||
diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h index 226693e0d88b..fce47c051bb1 100644 --- a/include/linux/i2c-algo-pca.h +++ b/include/linux/i2c-algo-pca.h | |||
@@ -10,6 +10,5 @@ struct i2c_algo_pca_data { | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | int i2c_pca_add_bus(struct i2c_adapter *); | 12 | int i2c_pca_add_bus(struct i2c_adapter *); |
13 | int i2c_pca_del_bus(struct i2c_adapter *); | ||
14 | 13 | ||
15 | #endif /* _LINUX_I2C_ALGO_PCA_H */ | 14 | #endif /* _LINUX_I2C_ALGO_PCA_H */ |
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h index 9908f3fc4839..994eb86f882c 100644 --- a/include/linux/i2c-algo-pcf.h +++ b/include/linux/i2c-algo-pcf.h | |||
@@ -31,7 +31,7 @@ struct i2c_algo_pcf_data { | |||
31 | int (*getpcf) (void *data, int ctl); | 31 | int (*getpcf) (void *data, int ctl); |
32 | int (*getown) (void *data); | 32 | int (*getown) (void *data); |
33 | int (*getclock) (void *data); | 33 | int (*getclock) (void *data); |
34 | void (*waitforpin) (void); | 34 | void (*waitforpin) (void); |
35 | 35 | ||
36 | /* local settings */ | 36 | /* local settings */ |
37 | int udelay; | 37 | int udelay; |
@@ -39,6 +39,5 @@ struct i2c_algo_pcf_data { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | int i2c_pcf_add_bus(struct i2c_adapter *); | 41 | int i2c_pcf_add_bus(struct i2c_adapter *); |
42 | int i2c_pcf_del_bus(struct i2c_adapter *); | ||
43 | 42 | ||
44 | #endif /* _LINUX_I2C_ALGO_PCF_H */ | 43 | #endif /* _LINUX_I2C_ALGO_PCF_H */ |
diff --git a/include/linux/i2c-algo-sgi.h b/include/linux/i2c-algo-sgi.h index 4a0113d64064..3b7715024e69 100644 --- a/include/linux/i2c-algo-sgi.h +++ b/include/linux/i2c-algo-sgi.h | |||
@@ -22,6 +22,5 @@ struct i2c_algo_sgi_data { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | int i2c_sgi_add_bus(struct i2c_adapter *); | 24 | int i2c_sgi_add_bus(struct i2c_adapter *); |
25 | int i2c_sgi_del_bus(struct i2c_adapter *); | ||
26 | 25 | ||
27 | #endif /* I2C_ALGO_SGI_H */ | 26 | #endif /* I2C_ALGO_SGI_H */ |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 0a8f750cbede..6e7ec4c76178 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ------------------------------------------------------------------------- */ | 1 | /* ------------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* i2c-id.h - identifier values for i2c drivers and adapters */ | 3 | /* i2c-id.h - identifier values for i2c drivers and adapters */ |
4 | /* */ | 4 | /* */ |
5 | /* ------------------------------------------------------------------------- */ | 5 | /* ------------------------------------------------------------------------- */ |
6 | /* Copyright (C) 1995-1999 Simon G. Vogl | 6 | /* Copyright (C) 1995-1999 Simon G. Vogl |
7 | 7 | ||
@@ -40,10 +40,10 @@ | |||
40 | #define I2C_DRIVERID_SAA7120 11 /* video encoder */ | 40 | #define I2C_DRIVERID_SAA7120 11 /* video encoder */ |
41 | #define I2C_DRIVERID_SAA7121 12 /* video encoder */ | 41 | #define I2C_DRIVERID_SAA7121 12 /* video encoder */ |
42 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ | 42 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ |
43 | #define I2C_DRIVERID_CH7003 14 /* digital pc to tv encoder */ | 43 | #define I2C_DRIVERID_CH7003 14 /* digital pc to tv encoder */ |
44 | #define I2C_DRIVERID_PCF8574A 15 /* i2c expander - 8 bit in/out */ | 44 | #define I2C_DRIVERID_PCF8574A 15 /* i2c expander - 8 bit in/out */ |
45 | #define I2C_DRIVERID_PCF8582C 16 /* eeprom */ | 45 | #define I2C_DRIVERID_PCF8582C 16 /* eeprom */ |
46 | #define I2C_DRIVERID_AT24Cxx 17 /* eeprom 1/2/4/8/16 K */ | 46 | #define I2C_DRIVERID_AT24Cxx 17 /* eeprom 1/2/4/8/16 K */ |
47 | #define I2C_DRIVERID_TEA6300 18 /* audio mixer */ | 47 | #define I2C_DRIVERID_TEA6300 18 /* audio mixer */ |
48 | #define I2C_DRIVERID_BT829 19 /* pc to tv encoder */ | 48 | #define I2C_DRIVERID_BT829 19 /* pc to tv encoder */ |
49 | #define I2C_DRIVERID_TDA9850 20 /* audio mixer */ | 49 | #define I2C_DRIVERID_TDA9850 20 /* audio mixer */ |
@@ -82,9 +82,8 @@ | |||
82 | #define I2C_DRIVERID_STM41T00 52 /* real time clock */ | 82 | #define I2C_DRIVERID_STM41T00 52 /* real time clock */ |
83 | #define I2C_DRIVERID_UDA1342 53 /* UDA1342 audio codec */ | 83 | #define I2C_DRIVERID_UDA1342 53 /* UDA1342 audio codec */ |
84 | #define I2C_DRIVERID_ADV7170 54 /* video encoder */ | 84 | #define I2C_DRIVERID_ADV7170 54 /* video encoder */ |
85 | #define I2C_DRIVERID_RADEON 55 /* I2C bus on Radeon boards */ | ||
86 | #define I2C_DRIVERID_MAX1617 56 /* temp sensor */ | 85 | #define I2C_DRIVERID_MAX1617 56 /* temp sensor */ |
87 | #define I2C_DRIVERID_SAA7191 57 /* video encoder */ | 86 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ |
88 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ | 87 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ |
89 | #define I2C_DRIVERID_BT832 59 /* CMOS camera video processor */ | 88 | #define I2C_DRIVERID_BT832 59 /* CMOS camera video processor */ |
90 | #define I2C_DRIVERID_TDA9887 60 /* TDA988x IF-PLL demodulator */ | 89 | #define I2C_DRIVERID_TDA9887 60 /* TDA988x IF-PLL demodulator */ |
@@ -116,6 +115,8 @@ | |||
116 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 115 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
117 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 116 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
118 | #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 */ | ||
119 | 120 | ||
120 | #define I2C_DRIVERID_I2CDEV 900 | 121 | #define I2C_DRIVERID_I2CDEV 900 |
121 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 122 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
@@ -132,7 +133,6 @@ | |||
132 | #define I2C_DRIVERID_ADM1021 1008 | 133 | #define I2C_DRIVERID_ADM1021 1008 |
133 | #define I2C_DRIVERID_ADM9240 1009 | 134 | #define I2C_DRIVERID_ADM9240 1009 |
134 | #define I2C_DRIVERID_LTC1710 1010 | 135 | #define I2C_DRIVERID_LTC1710 1010 |
135 | #define I2C_DRIVERID_ICSPLL 1012 | ||
136 | #define I2C_DRIVERID_BT869 1013 | 136 | #define I2C_DRIVERID_BT869 1013 |
137 | #define I2C_DRIVERID_MAXILIFE 1014 | 137 | #define I2C_DRIVERID_MAXILIFE 1014 |
138 | #define I2C_DRIVERID_MATORB 1015 | 138 | #define I2C_DRIVERID_MATORB 1015 |
@@ -144,7 +144,6 @@ | |||
144 | #define I2C_DRIVERID_MTP008 1023 | 144 | #define I2C_DRIVERID_MTP008 1023 |
145 | #define I2C_DRIVERID_DS1621 1024 | 145 | #define I2C_DRIVERID_DS1621 1024 |
146 | #define I2C_DRIVERID_ADM1024 1025 | 146 | #define I2C_DRIVERID_ADM1024 1025 |
147 | #define I2C_DRIVERID_IT87 1026 | ||
148 | #define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */ | 147 | #define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */ |
149 | #define I2C_DRIVERID_FSCPOS 1028 | 148 | #define I2C_DRIVERID_FSCPOS 1028 |
150 | #define I2C_DRIVERID_FSCSCY 1029 | 149 | #define I2C_DRIVERID_FSCSCY 1029 |
@@ -159,12 +158,13 @@ | |||
159 | #define I2C_DRIVERID_ASB100 1043 | 158 | #define I2C_DRIVERID_ASB100 1043 |
160 | #define I2C_DRIVERID_FSCHER 1046 | 159 | #define I2C_DRIVERID_FSCHER 1046 |
161 | #define I2C_DRIVERID_W83L785TS 1047 | 160 | #define I2C_DRIVERID_W83L785TS 1047 |
161 | #define I2C_DRIVERID_OV7670 1048 /* Omnivision 7670 camera */ | ||
162 | 162 | ||
163 | /* | 163 | /* |
164 | * ---- Adapter types ---------------------------------------------------- | 164 | * ---- Adapter types ---------------------------------------------------- |
165 | */ | 165 | */ |
166 | 166 | ||
167 | /* --- Bit algorithm adapters */ | 167 | /* --- Bit algorithm adapters */ |
168 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ | 168 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ |
169 | #define I2C_HW_B_SER 0x010002 /* Serial line interface */ | 169 | #define I2C_HW_B_SER 0x010002 /* Serial line interface */ |
170 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | 170 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ |
@@ -212,9 +212,6 @@ | |||
212 | /* --- MPC8xx PowerPC adapters */ | 212 | /* --- MPC8xx PowerPC adapters */ |
213 | #define I2C_HW_MPC8XX_EPON 0x110000 /* Eponymous MPC8xx I2C adapter */ | 213 | #define I2C_HW_MPC8XX_EPON 0x110000 /* Eponymous MPC8xx I2C adapter */ |
214 | 214 | ||
215 | /* --- ITE based algorithms */ | ||
216 | #define I2C_HW_I_IIC 0x080000 /* controller on the ITE */ | ||
217 | |||
218 | /* --- PowerPC on-chip adapters */ | 215 | /* --- PowerPC on-chip adapters */ |
219 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ | 216 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ |
220 | 217 | ||
@@ -250,6 +247,7 @@ | |||
250 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | 247 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ |
251 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ | 248 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ |
252 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ | 249 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ |
250 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | ||
253 | 251 | ||
254 | /* --- ISA pseudo-adapter */ | 252 | /* --- ISA pseudo-adapter */ |
255 | #define I2C_HW_ISA 0x050000 | 253 | #define I2C_HW_ISA 0x050000 |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h new file mode 100644 index 000000000000..e6e9c814da61 --- /dev/null +++ b/include/linux/i2c-pnx.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Header file for I2C support on PNX010x/4008. | ||
3 | * | ||
4 | * Author: Dennis Kovalev <dkovalev@ru.mvista.com> | ||
5 | * | ||
6 | * 2004-2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __I2C_PNX_H__ | ||
13 | #define __I2C_PNX_H__ | ||
14 | |||
15 | #include <asm/arch/i2c.h> | ||
16 | |||
17 | struct i2c_pnx_mif { | ||
18 | int ret; /* Return value */ | ||
19 | int mode; /* Interface mode */ | ||
20 | struct completion complete; /* I/O completion */ | ||
21 | struct timer_list timer; /* Timeout */ | ||
22 | char * buf; /* Data buffer */ | ||
23 | int len; /* Length of data buffer */ | ||
24 | }; | ||
25 | |||
26 | struct i2c_pnx_algo_data { | ||
27 | u32 base; | ||
28 | u32 ioaddr; | ||
29 | int irq; | ||
30 | struct i2c_pnx_mif mif; | ||
31 | int last; | ||
32 | }; | ||
33 | |||
34 | struct i2c_pnx_data { | ||
35 | int (*suspend) (struct platform_device *pdev, pm_message_t state); | ||
36 | int (*resume) (struct platform_device *pdev); | ||
37 | u32 (*calculate_input_freq) (struct platform_device *pdev); | ||
38 | int (*set_clock_run) (struct platform_device *pdev); | ||
39 | int (*set_clock_stop) (struct platform_device *pdev); | ||
40 | struct i2c_adapter *adapter; | ||
41 | }; | ||
42 | |||
43 | #endif /* __I2C_PNX_H__ */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 9b5d04768c2c..71e50d3e492f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ------------------------------------------------------------------------- */ | 1 | /* ------------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* i2c.h - definitions for the i2c-bus interface */ | 3 | /* i2c.h - definitions for the i2c-bus interface */ |
4 | /* */ | 4 | /* */ |
5 | /* ------------------------------------------------------------------------- */ | 5 | /* ------------------------------------------------------------------------- */ |
6 | /* Copyright (C) 1995-2000 Simon G. Vogl | 6 | /* Copyright (C) 1995-2000 Simon G. Vogl |
7 | 7 | ||
@@ -27,7 +27,7 @@ | |||
27 | #define _LINUX_I2C_H | 27 | #define _LINUX_I2C_H |
28 | 28 | ||
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/i2c-id.h> | 32 | #include <linux/i2c-id.h> |
33 | #include <linux/mod_devicetable.h> | 33 | #include <linux/mod_devicetable.h> |
@@ -53,8 +53,8 @@ union i2c_smbus_data; | |||
53 | 53 | ||
54 | /* | 54 | /* |
55 | * The master routines are the ones normally used to transmit data to devices | 55 | * The master routines are the ones normally used to transmit data to devices |
56 | * on a bus (or read from them). Apart from two basic transfer functions to | 56 | * on a bus (or read from them). Apart from two basic transfer functions to |
57 | * transmit one message at a time, a more complex version can be used to | 57 | * transmit one message at a time, a more complex version can be used to |
58 | * transmit an arbitrary number of messages without interruption. | 58 | * transmit an arbitrary number of messages without interruption. |
59 | */ | 59 | */ |
60 | extern int i2c_master_send(struct i2c_client *,const char* ,int); | 60 | extern int i2c_master_send(struct i2c_client *,const char* ,int); |
@@ -67,10 +67,10 @@ extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) | |||
67 | 67 | ||
68 | /* This is the very generalized SMBus access routine. You probably do not | 68 | /* This is the very generalized SMBus access routine. You probably do not |
69 | want to use this, though; one of the functions below may be much easier, | 69 | want to use this, though; one of the functions below may be much easier, |
70 | and probably just as fast. | 70 | and probably just as fast. |
71 | Note that we use i2c_adapter here, because you do not need a specific | 71 | Note that we use i2c_adapter here, because you do not need a specific |
72 | smbus adapter to call this function. */ | 72 | smbus adapter to call this function. */ |
73 | extern s32 i2c_smbus_xfer (struct i2c_adapter * adapter, u16 addr, | 73 | extern s32 i2c_smbus_xfer (struct i2c_adapter * adapter, u16 addr, |
74 | unsigned short flags, | 74 | unsigned short flags, |
75 | char read_write, u8 command, int size, | 75 | char read_write, u8 command, int size, |
76 | union i2c_smbus_data * data); | 76 | union i2c_smbus_data * data); |
@@ -112,14 +112,14 @@ struct i2c_driver { | |||
112 | 112 | ||
113 | /* Notifies the driver that a new bus has appeared. This routine | 113 | /* Notifies the driver that a new bus has appeared. This routine |
114 | * can be used by the driver to test if the bus meets its conditions | 114 | * can be used by the driver to test if the bus meets its conditions |
115 | * & seek for the presence of the chip(s) it supports. If found, it | 115 | * & seek for the presence of the chip(s) it supports. If found, it |
116 | * registers the client(s) that are on the bus to the i2c admin. via | 116 | * registers the client(s) that are on the bus to the i2c admin. via |
117 | * i2c_attach_client. | 117 | * i2c_attach_client. |
118 | */ | 118 | */ |
119 | int (*attach_adapter)(struct i2c_adapter *); | 119 | int (*attach_adapter)(struct i2c_adapter *); |
120 | int (*detach_adapter)(struct i2c_adapter *); | 120 | int (*detach_adapter)(struct i2c_adapter *); |
121 | 121 | ||
122 | /* tells the driver that a client is about to be deleted & gives it | 122 | /* tells the driver that a client is about to be deleted & gives it |
123 | * the chance to remove its private data. Also, if the client struct | 123 | * the chance to remove its private data. Also, if the client struct |
124 | * has been dynamically allocated by the driver in the function above, | 124 | * has been dynamically allocated by the driver in the function above, |
125 | * it must be freed here. | 125 | * it must be freed here. |
@@ -139,13 +139,13 @@ struct i2c_driver { | |||
139 | #define I2C_NAME_SIZE 50 | 139 | #define I2C_NAME_SIZE 50 |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * i2c_client identifies a single device (i.e. chip) that is connected to an | 142 | * i2c_client identifies a single device (i.e. chip) that is connected to an |
143 | * i2c bus. The behaviour is defined by the routines of the driver. This | 143 | * i2c bus. The behaviour is defined by the routines of the driver. This |
144 | * function is mainly used for lookup & other admin. functions. | 144 | * function is mainly used for lookup & other admin. functions. |
145 | */ | 145 | */ |
146 | struct i2c_client { | 146 | struct i2c_client { |
147 | unsigned int flags; /* div., see below */ | 147 | unsigned int flags; /* div., see below */ |
148 | unsigned short addr; /* chip address - NOTE: 7bit */ | 148 | unsigned short addr; /* chip address - NOTE: 7bit */ |
149 | /* addresses are stored in the */ | 149 | /* addresses are stored in the */ |
150 | /* _LOWER_ 7 bits */ | 150 | /* _LOWER_ 7 bits */ |
151 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 151 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
@@ -182,14 +182,14 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
182 | */ | 182 | */ |
183 | struct i2c_algorithm { | 183 | struct i2c_algorithm { |
184 | /* If an adapter algorithm can't do I2C-level access, set master_xfer | 184 | /* If an adapter algorithm can't do I2C-level access, set master_xfer |
185 | to NULL. If an adapter algorithm can do SMBus access, set | 185 | to NULL. If an adapter algorithm can do SMBus access, set |
186 | smbus_xfer. If set to NULL, the SMBus protocol is simulated | 186 | smbus_xfer. If set to NULL, the SMBus protocol is simulated |
187 | using common I2C messages */ | 187 | using common I2C messages */ |
188 | /* master_xfer should return the number of messages successfully | 188 | /* master_xfer should return the number of messages successfully |
189 | processed, or a negative value on error */ | 189 | processed, or a negative value on error */ |
190 | int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, | 190 | int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, |
191 | int num); | 191 | int num); |
192 | int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, | 192 | int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, |
193 | unsigned short flags, char read_write, | 193 | unsigned short flags, char read_write, |
194 | u8 command, int size, union i2c_smbus_data * data); | 194 | u8 command, int size, union i2c_smbus_data * data); |
195 | 195 | ||
@@ -216,6 +216,7 @@ struct i2c_adapter { | |||
216 | int (*client_unregister)(struct i2c_client *); | 216 | int (*client_unregister)(struct i2c_client *); |
217 | 217 | ||
218 | /* data fields that are valid for all devices */ | 218 | /* data fields that are valid for all devices */ |
219 | u8 level; /* nesting level for lockdep */ | ||
219 | struct mutex bus_lock; | 220 | struct mutex bus_lock; |
220 | struct mutex clist_lock; | 221 | struct mutex clist_lock; |
221 | 222 | ||
@@ -316,7 +317,7 @@ extern int i2c_check_addr (struct i2c_adapter *adapter, int addr); | |||
316 | * It will only call found_proc if some client is connected at the | 317 | * It will only call found_proc if some client is connected at the |
317 | * specific address (unless a 'force' matched); | 318 | * specific address (unless a 'force' matched); |
318 | */ | 319 | */ |
319 | extern int i2c_probe(struct i2c_adapter *adapter, | 320 | extern int i2c_probe(struct i2c_adapter *adapter, |
320 | struct i2c_client_address_data *address_data, | 321 | struct i2c_client_address_data *address_data, |
321 | int (*found_proc) (struct i2c_adapter *, int, int)); | 322 | int (*found_proc) (struct i2c_adapter *, int, int)); |
322 | 323 | ||
@@ -352,15 +353,15 @@ static inline int i2c_adapter_id(struct i2c_adapter *adap) | |||
352 | */ | 353 | */ |
353 | struct i2c_msg { | 354 | struct i2c_msg { |
354 | __u16 addr; /* slave address */ | 355 | __u16 addr; /* slave address */ |
355 | __u16 flags; | 356 | __u16 flags; |
356 | #define I2C_M_TEN 0x10 /* we have a ten bit chip address */ | 357 | #define I2C_M_TEN 0x10 /* we have a ten bit chip address */ |
357 | #define I2C_M_RD 0x01 | 358 | #define I2C_M_RD 0x01 |
358 | #define I2C_M_NOSTART 0x4000 | 359 | #define I2C_M_NOSTART 0x4000 |
359 | #define I2C_M_REV_DIR_ADDR 0x2000 | 360 | #define I2C_M_REV_DIR_ADDR 0x2000 |
360 | #define I2C_M_IGNORE_NAK 0x1000 | 361 | #define I2C_M_IGNORE_NAK 0x1000 |
361 | #define I2C_M_NO_RD_ACK 0x0800 | 362 | #define I2C_M_NO_RD_ACK 0x0800 |
362 | __u16 len; /* msg length */ | 363 | __u16 len; /* msg length */ |
363 | __u8 *buf; /* pointer to msg data */ | 364 | __u8 *buf; /* pointer to msg data */ |
364 | }; | 365 | }; |
365 | 366 | ||
366 | /* To determine what functionality is present */ | 367 | /* To determine what functionality is present */ |
@@ -370,16 +371,16 @@ struct i2c_msg { | |||
370 | #define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ | 371 | #define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ |
371 | #define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */ | 372 | #define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */ |
372 | #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */ | 373 | #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */ |
373 | #define I2C_FUNC_SMBUS_QUICK 0x00010000 | 374 | #define I2C_FUNC_SMBUS_QUICK 0x00010000 |
374 | #define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 | 375 | #define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 |
375 | #define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000 | 376 | #define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000 |
376 | #define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000 | 377 | #define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000 |
377 | #define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000 | 378 | #define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000 |
378 | #define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000 | 379 | #define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000 |
379 | #define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000 | 380 | #define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000 |
380 | #define I2C_FUNC_SMBUS_PROC_CALL 0x00800000 | 381 | #define I2C_FUNC_SMBUS_PROC_CALL 0x00800000 |
381 | #define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000 | 382 | #define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000 |
382 | #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 | 383 | #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 |
383 | #define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */ | 384 | #define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */ |
384 | #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ | 385 | #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ |
385 | #define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */ | 386 | #define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */ |
@@ -406,10 +407,10 @@ struct i2c_msg { | |||
406 | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ | 407 | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ |
407 | I2C_FUNC_SMBUS_I2C_BLOCK) | 408 | I2C_FUNC_SMBUS_I2C_BLOCK) |
408 | 409 | ||
409 | /* | 410 | /* |
410 | * Data for SMBus Messages | 411 | * Data for SMBus Messages |
411 | */ | 412 | */ |
412 | #define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */ | 413 | #define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */ |
413 | union i2c_smbus_data { | 414 | union i2c_smbus_data { |
414 | __u8 byte; | 415 | __u8 byte; |
415 | __u16 word; | 416 | __u16 word; |
@@ -421,11 +422,11 @@ union i2c_smbus_data { | |||
421 | #define I2C_SMBUS_READ 1 | 422 | #define I2C_SMBUS_READ 1 |
422 | #define I2C_SMBUS_WRITE 0 | 423 | #define I2C_SMBUS_WRITE 0 |
423 | 424 | ||
424 | /* SMBus transaction types (size parameter in the above functions) | 425 | /* SMBus transaction types (size parameter in the above functions) |
425 | Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */ | 426 | Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */ |
426 | #define I2C_SMBUS_QUICK 0 | 427 | #define I2C_SMBUS_QUICK 0 |
427 | #define I2C_SMBUS_BYTE 1 | 428 | #define I2C_SMBUS_BYTE 1 |
428 | #define I2C_SMBUS_BYTE_DATA 2 | 429 | #define I2C_SMBUS_BYTE_DATA 2 |
429 | #define I2C_SMBUS_WORD_DATA 3 | 430 | #define I2C_SMBUS_WORD_DATA 3 |
430 | #define I2C_SMBUS_PROC_CALL 4 | 431 | #define I2C_SMBUS_PROC_CALL 4 |
431 | #define I2C_SMBUS_BLOCK_DATA 5 | 432 | #define I2C_SMBUS_BLOCK_DATA 5 |
@@ -434,15 +435,15 @@ union i2c_smbus_data { | |||
434 | 435 | ||
435 | 436 | ||
436 | /* ----- commands for the ioctl like i2c_command call: | 437 | /* ----- commands for the ioctl like i2c_command call: |
437 | * note that additional calls are defined in the algorithm and hw | 438 | * note that additional calls are defined in the algorithm and hw |
438 | * dependent layers - these can be listed here, or see the | 439 | * dependent layers - these can be listed here, or see the |
439 | * corresponding header files. | 440 | * corresponding header files. |
440 | */ | 441 | */ |
441 | /* -> bit-adapter specific ioctls */ | 442 | /* -> bit-adapter specific ioctls */ |
442 | #define I2C_RETRIES 0x0701 /* number of times a device address */ | 443 | #define I2C_RETRIES 0x0701 /* number of times a device address */ |
443 | /* should be polled when not */ | 444 | /* should be polled when not */ |
444 | /* acknowledging */ | 445 | /* acknowledging */ |
445 | #define I2C_TIMEOUT 0x0702 /* set timeout - call with int */ | 446 | #define I2C_TIMEOUT 0x0702 /* set timeout - call with int */ |
446 | 447 | ||
447 | 448 | ||
448 | /* this is for i2c-dev.c */ | 449 | /* this is for i2c-dev.c */ |
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h index c2519df1b6dc..a0b23dd45239 100644 --- a/include/linux/i2o-dev.h +++ b/include/linux/i2o-dev.h | |||
@@ -24,12 +24,13 @@ | |||
24 | #define MAX_I2O_CONTROLLERS 32 | 24 | #define MAX_I2O_CONTROLLERS 32 |
25 | 25 | ||
26 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
27 | #include <linux/types.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * I2O Control IOCTLs and structures | 30 | * I2O Control IOCTLs and structures |
30 | */ | 31 | */ |
31 | #define I2O_MAGIC_NUMBER 'i' | 32 | #define I2O_MAGIC_NUMBER 'i' |
32 | #define I2OGETIOPS _IOR(I2O_MAGIC_NUMBER,0,u8[MAX_I2O_CONTROLLERS]) | 33 | #define I2OGETIOPS _IOR(I2O_MAGIC_NUMBER,0,__u8[MAX_I2O_CONTROLLERS]) |
33 | #define I2OHRTGET _IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct) | 34 | #define I2OHRTGET _IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct) |
34 | #define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct) | 35 | #define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct) |
35 | #define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget) | 36 | #define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget) |
@@ -37,7 +38,7 @@ | |||
37 | #define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer) | 38 | #define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer) |
38 | #define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer) | 39 | #define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer) |
39 | #define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer) | 40 | #define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer) |
40 | #define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,u32) | 41 | #define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,__u32) |
41 | #define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html) | 42 | #define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html) |
42 | #define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id) | 43 | #define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id) |
43 | #define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info) | 44 | #define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 9c2050293f17..04e0fa97ac99 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 */ |
@@ -637,6 +645,9 @@ typedef struct ide_drive_s { | |||
637 | 645 | ||
638 | int lun; /* logical unit */ | 646 | int lun; /* logical unit */ |
639 | int crc_count; /* crc counter to reduce drive speed */ | 647 | int crc_count; /* crc counter to reduce drive speed */ |
648 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
649 | struct ide_acpi_drive_link *acpidata; | ||
650 | #endif | ||
640 | struct list_head list; | 651 | struct list_head list; |
641 | struct device gendev; | 652 | struct device gendev; |
642 | struct completion gendev_rel_comp; /* to deal with device release() */ | 653 | struct completion gendev_rel_comp; /* to deal with device release() */ |
@@ -796,6 +807,7 @@ typedef struct hwif_s { | |||
796 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 807 | 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 */ | 808 | 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 */ | 809 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ |
810 | unsigned atapi_irq_bogon : 1; /* Generates spurious DMA interrupts in PIO mode */ | ||
799 | 811 | ||
800 | struct device gendev; | 812 | struct device gendev; |
801 | struct completion gendev_rel_comp; /* To deal with device release() */ | 813 | struct completion gendev_rel_comp; /* To deal with device release() */ |
@@ -804,7 +816,9 @@ typedef struct hwif_s { | |||
804 | 816 | ||
805 | unsigned dma; | 817 | unsigned dma; |
806 | 818 | ||
807 | void (*led_act)(void *data, int rw); | 819 | #ifdef CONFIG_BLK_DEV_IDEACPI |
820 | struct ide_acpi_hwif_link *acpidata; | ||
821 | #endif | ||
808 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 822 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
809 | 823 | ||
810 | /* | 824 | /* |
@@ -1193,8 +1207,8 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1193 | extern int ideprobe_init(void); | 1207 | extern int ideprobe_init(void); |
1194 | 1208 | ||
1195 | extern void ide_scan_pcibus(int scan_direction) __init; | 1209 | extern void ide_scan_pcibus(int scan_direction) __init; |
1196 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner); | 1210 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1197 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE) | 1211 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1198 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1212 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); |
1199 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1213 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); |
1200 | 1214 | ||
@@ -1299,6 +1313,18 @@ static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | |||
1299 | static inline void ide_release_dma(ide_hwif_t *drive) {;} | 1313 | static inline void ide_release_dma(ide_hwif_t *drive) {;} |
1300 | #endif | 1314 | #endif |
1301 | 1315 | ||
1316 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
1317 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | ||
1318 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | ||
1319 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | ||
1320 | extern void ide_acpi_init(ide_hwif_t *hwif); | ||
1321 | #else | ||
1322 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | ||
1323 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | ||
1324 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | ||
1325 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | ||
1326 | #endif | ||
1327 | |||
1302 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); | 1328 | extern int ide_hwif_request_regions(ide_hwif_t *hwif); |
1303 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); | 1329 | extern void ide_hwif_release_regions(ide_hwif_t* hwif); |
1304 | extern void ide_unregister (unsigned int index); | 1330 | extern void ide_unregister (unsigned int index); |
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index dbe8f6120a40..d557e4ce9b6b 100644 --- a/include/linux/if_addr.h +++ b/include/linux/if_addr.h | |||
@@ -52,4 +52,10 @@ struct ifa_cacheinfo | |||
52 | __u32 tstamp; /* updated timestamp, hundredths of seconds */ | 52 | __u32 tstamp; /* updated timestamp, hundredths of seconds */ |
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* backwards compatibility for userspace */ | ||
56 | #ifndef __KERNEL__ | ||
57 | #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) | ||
58 | #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) | ||
59 | #endif | ||
60 | |||
55 | #endif | 61 | #endif |
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h index e0a150046208..4aba6b0ad41c 100644 --- a/include/linux/if_fddi.h +++ b/include/linux/if_fddi.h | |||
@@ -103,6 +103,8 @@ struct fddihdr | |||
103 | } __attribute__ ((packed)); | 103 | } __attribute__ ((packed)); |
104 | 104 | ||
105 | #ifdef __KERNEL__ | 105 | #ifdef __KERNEL__ |
106 | #include <linux/netdevice.h> | ||
107 | |||
106 | /* Define FDDI statistics structure */ | 108 | /* Define FDDI statistics structure */ |
107 | struct fddi_statistics { | 109 | struct fddi_statistics { |
108 | 110 | ||
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index e963a077e6f5..35ed3b5467f3 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -82,6 +82,12 @@ enum | |||
82 | 82 | ||
83 | #define IFLA_MAX (__IFLA_MAX - 1) | 83 | #define IFLA_MAX (__IFLA_MAX - 1) |
84 | 84 | ||
85 | /* backwards compatibility for userspace */ | ||
86 | #ifndef __KERNEL__ | ||
87 | #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) | ||
88 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) | ||
89 | #endif | ||
90 | |||
85 | /* ifi_flags. | 91 | /* ifi_flags. |
86 | 92 | ||
87 | IFF_* flags. | 93 | IFF_* flags. |
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/if_tunnel.h b/include/linux/if_tunnel.h index 8de079ba1107..660b5010c2d9 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _IF_TUNNEL_H_ | 1 | #ifndef _IF_TUNNEL_H_ |
2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) | 6 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
5 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 7 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
6 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) | 8 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) |
diff --git a/include/linux/init.h b/include/linux/init.h index 5eb5d24b7680..5a593a1dec1e 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -111,6 +111,7 @@ extern void setup_arch(char **); | |||
111 | #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s) | 111 | #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s) |
112 | #define fs_initcall(fn) __define_initcall("5",fn,5) | 112 | #define fs_initcall(fn) __define_initcall("5",fn,5) |
113 | #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s) | 113 | #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s) |
114 | #define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs) | ||
114 | #define device_initcall(fn) __define_initcall("6",fn,6) | 115 | #define device_initcall(fn) __define_initcall("6",fn,6) |
115 | #define device_initcall_sync(fn) __define_initcall("6s",fn,6s) | 116 | #define device_initcall_sync(fn) __define_initcall("6s",fn,6s) |
116 | #define late_initcall(fn) __define_initcall("7",fn,7) | 117 | #define late_initcall(fn) __define_initcall("7",fn,7) |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 733790d4f7db..6383d2d83bb0 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -7,16 +7,15 @@ | |||
7 | #include <linux/utsname.h> | 7 | #include <linux/utsname.h> |
8 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
9 | #include <linux/ipc.h> | 9 | #include <linux/ipc.h> |
10 | #include <linux/pid_namespace.h> | ||
10 | 11 | ||
11 | #define INIT_FDTABLE \ | 12 | #define INIT_FDTABLE \ |
12 | { \ | 13 | { \ |
13 | .max_fds = NR_OPEN_DEFAULT, \ | 14 | .max_fds = NR_OPEN_DEFAULT, \ |
14 | .max_fdset = EMBEDDED_FD_SET_SIZE, \ | ||
15 | .fd = &init_files.fd_array[0], \ | 15 | .fd = &init_files.fd_array[0], \ |
16 | .close_on_exec = (fd_set *)&init_files.close_on_exec_init, \ | 16 | .close_on_exec = (fd_set *)&init_files.close_on_exec_init, \ |
17 | .open_fds = (fd_set *)&init_files.open_fds_init, \ | 17 | .open_fds = (fd_set *)&init_files.open_fds_init, \ |
18 | .rcu = RCU_HEAD_INIT, \ | 18 | .rcu = RCU_HEAD_INIT, \ |
19 | .free_files = NULL, \ | ||
20 | .next = NULL, \ | 19 | .next = NULL, \ |
21 | } | 20 | } |
22 | 21 | ||
@@ -57,25 +56,27 @@ | |||
57 | .cpu_vm_mask = CPU_MASK_ALL, \ | 56 | .cpu_vm_mask = CPU_MASK_ALL, \ |
58 | } | 57 | } |
59 | 58 | ||
60 | #define INIT_SIGNALS(sig) { \ | 59 | #define INIT_SIGNALS(sig) { \ |
61 | .count = ATOMIC_INIT(1), \ | 60 | .count = ATOMIC_INIT(1), \ |
62 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ | 61 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ |
63 | .shared_pending = { \ | 62 | .shared_pending = { \ |
64 | .list = LIST_HEAD_INIT(sig.shared_pending.list), \ | 63 | .list = LIST_HEAD_INIT(sig.shared_pending.list), \ |
65 | .signal = {{0}}}, \ | 64 | .signal = {{0}}}, \ |
66 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ | 65 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ |
67 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
68 | .rlim = INIT_RLIMITS, \ | 67 | .rlim = INIT_RLIMITS, \ |
69 | .pgrp = 1, \ | 68 | .pgrp = 1, \ |
70 | .session = 1, \ | 69 | .tty_old_pgrp = 0, \ |
70 | { .__session = 1}, \ | ||
71 | } | 71 | } |
72 | 72 | ||
73 | extern struct nsproxy init_nsproxy; | 73 | extern struct nsproxy init_nsproxy; |
74 | #define INIT_NSPROXY(nsproxy) { \ | 74 | #define INIT_NSPROXY(nsproxy) { \ |
75 | .pid_ns = &init_pid_ns, \ | ||
75 | .count = ATOMIC_INIT(1), \ | 76 | .count = ATOMIC_INIT(1), \ |
76 | .nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \ | 77 | .nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \ |
77 | .uts_ns = &init_uts_ns, \ | 78 | .uts_ns = &init_uts_ns, \ |
78 | .namespace = NULL, \ | 79 | .mnt_ns = NULL, \ |
79 | INIT_IPC_NS(ipc_ns) \ | 80 | INIT_IPC_NS(ipc_ns) \ |
80 | } | 81 | } |
81 | 82 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 4e61158b06a0..bde65c8a3519 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -491,6 +491,21 @@ struct input_absinfo { | |||
491 | #define KEY_DIGITS 0x19d | 491 | #define KEY_DIGITS 0x19d |
492 | #define KEY_TEEN 0x19e | 492 | #define KEY_TEEN 0x19e |
493 | #define KEY_TWEN 0x19f | 493 | #define KEY_TWEN 0x19f |
494 | #define KEY_VIDEOPHONE 0x1a0 | ||
495 | #define KEY_GAMES 0x1a1 | ||
496 | #define KEY_ZOOMIN 0x1a2 | ||
497 | #define KEY_ZOOMOUT 0x1a3 | ||
498 | #define KEY_ZOOMRESET 0x1a4 | ||
499 | #define KEY_WORDPROCESSOR 0x1a5 | ||
500 | #define KEY_EDITOR 0x1a6 | ||
501 | #define KEY_SPREADSHEET 0x1a7 | ||
502 | #define KEY_GRAPHICSEDITOR 0x1a8 | ||
503 | #define KEY_PRESENTATION 0x1a9 | ||
504 | #define KEY_DATABASE 0x1aa | ||
505 | #define KEY_NEWS 0x1ab | ||
506 | #define KEY_VOICEMAIL 0x1ac | ||
507 | #define KEY_ADDRESSBOOK 0x1ad | ||
508 | #define KEY_MESSENGER 0x1ae | ||
494 | 509 | ||
495 | #define KEY_DEL_EOL 0x1c0 | 510 | #define KEY_DEL_EOL 0x1c0 |
496 | #define KEY_DEL_EOS 0x1c1 | 511 | #define KEY_DEL_EOS 0x1c1 |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index de7593f4e895..5a8ba0b8ccba 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> |
@@ -83,6 +84,11 @@ extern int request_irq(unsigned int, irq_handler_t handler, | |||
83 | unsigned long, const char *, void *); | 84 | unsigned long, const char *, void *); |
84 | extern void free_irq(unsigned int, void *); | 85 | extern void free_irq(unsigned int, void *); |
85 | 86 | ||
87 | extern int devm_request_irq(struct device *dev, unsigned int irq, | ||
88 | irq_handler_t handler, unsigned long irqflags, | ||
89 | const char *devname, void *dev_id); | ||
90 | extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); | ||
91 | |||
86 | /* | 92 | /* |
87 | * On lockdep we dont want to enable hardirqs in hardirq | 93 | * On lockdep we dont want to enable hardirqs in hardirq |
88 | * context. Use local_irq_enable_in_hardirq() to annotate | 94 | * context. Use local_irq_enable_in_hardirq() to annotate |
@@ -231,7 +237,8 @@ enum | |||
231 | NET_TX_SOFTIRQ, | 237 | NET_TX_SOFTIRQ, |
232 | NET_RX_SOFTIRQ, | 238 | NET_RX_SOFTIRQ, |
233 | BLOCK_SOFTIRQ, | 239 | BLOCK_SOFTIRQ, |
234 | TASKLET_SOFTIRQ | 240 | TASKLET_SOFTIRQ, |
241 | SCHED_SOFTIRQ, | ||
235 | }; | 242 | }; |
236 | 243 | ||
237 | /* softirq mask and active fields moved to irq_cpustat_t in | 244 | /* softirq mask and active fields moved to irq_cpustat_t in |
diff --git a/include/linux/io.h b/include/linux/io.h index 81877ea39309..9e419ebfc98b 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -22,12 +22,33 @@ | |||
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 | |||
46 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
47 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
48 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
49 | |||
50 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
51 | |||
31 | /** | 52 | /** |
32 | * check_signature - find BIOS signatures | 53 | * check_signature - find BIOS signatures |
33 | * @io_addr: mmio address to check | 54 | * @io_addr: mmio address to check |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index cf8696d4a138..6859a3b14088 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -91,6 +91,9 @@ struct resource_list { | |||
91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ | 91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ |
92 | #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ | 92 | #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ |
93 | 93 | ||
94 | /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ | ||
95 | #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ | ||
96 | |||
94 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 97 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
95 | extern struct resource ioport_resource; | 98 | extern struct resource ioport_resource; |
96 | extern struct resource iomem_resource; | 99 | extern struct resource iomem_resource; |
@@ -134,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s, | |||
134 | { | 137 | { |
135 | return __check_region(&ioport_resource, s, n); | 138 | return __check_region(&ioport_resource, s, n); |
136 | } | 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 | |||
137 | #endif /* _LINUX_IOPORT_H */ | 160 | #endif /* _LINUX_IOPORT_H */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 52fc4052a0ae..5504b671357f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -68,6 +68,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ | 68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ |
69 | 69 | ||
70 | struct proc_dir_entry; | 70 | struct proc_dir_entry; |
71 | struct msi_desc; | ||
71 | 72 | ||
72 | /** | 73 | /** |
73 | * struct irq_chip - hardware interrupt chip descriptor | 74 | * struct irq_chip - hardware interrupt chip descriptor |
@@ -148,6 +149,7 @@ struct irq_chip { | |||
148 | struct irq_desc { | 149 | struct irq_desc { |
149 | irq_flow_handler_t handle_irq; | 150 | irq_flow_handler_t handle_irq; |
150 | struct irq_chip *chip; | 151 | struct irq_chip *chip; |
152 | struct msi_desc *msi_desc; | ||
151 | void *handler_data; | 153 | void *handler_data; |
152 | void *chip_data; | 154 | void *chip_data; |
153 | struct irqaction *action; /* IRQ action list */ | 155 | struct irqaction *action; /* IRQ action list */ |
@@ -373,10 +375,12 @@ extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | |||
373 | extern int set_irq_data(unsigned int irq, void *data); | 375 | extern int set_irq_data(unsigned int irq, void *data); |
374 | extern int set_irq_chip_data(unsigned int irq, void *data); | 376 | extern int set_irq_chip_data(unsigned int irq, void *data); |
375 | extern int set_irq_type(unsigned int irq, unsigned int type); | 377 | extern int set_irq_type(unsigned int irq, unsigned int type); |
378 | extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | ||
376 | 379 | ||
377 | #define get_irq_chip(irq) (irq_desc[irq].chip) | 380 | #define get_irq_chip(irq) (irq_desc[irq].chip) |
378 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) | 381 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) |
379 | #define get_irq_data(irq) (irq_desc[irq].handler_data) | 382 | #define get_irq_data(irq) (irq_desc[irq].handler_data) |
383 | #define get_irq_msi(irq) (irq_desc[irq].msi_desc) | ||
380 | 384 | ||
381 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 385 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
382 | 386 | ||
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 62991148d5a5..3c7875b7ab5b 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
@@ -511,8 +511,8 @@ typedef struct modem_info { | |||
511 | #endif | 511 | #endif |
512 | struct tty_struct *tty; /* Pointer to corresponding tty */ | 512 | struct tty_struct *tty; /* Pointer to corresponding tty */ |
513 | atemu emu; /* AT-emulator data */ | 513 | atemu emu; /* AT-emulator data */ |
514 | struct termios normal_termios; /* For saving termios structs */ | 514 | struct ktermios normal_termios; /* For saving termios structs */ |
515 | struct termios callout_termios; | 515 | struct ktermios callout_termios; |
516 | wait_queue_head_t open_wait, close_wait; | 516 | wait_queue_head_t open_wait, close_wait; |
517 | struct semaphore write_sem; | 517 | struct semaphore write_sem; |
518 | spinlock_t readlock; | 518 | spinlock_t readlock; |
@@ -525,8 +525,8 @@ typedef struct _isdn_modem { | |||
525 | int refcount; /* Number of opens */ | 525 | int refcount; /* Number of opens */ |
526 | struct tty_driver *tty_modem; /* tty-device */ | 526 | struct tty_driver *tty_modem; /* tty-device */ |
527 | struct tty_struct *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */ | 527 | struct tty_struct *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */ |
528 | struct termios *modem_termios[ISDN_MAX_CHANNELS]; | 528 | struct ktermios *modem_termios[ISDN_MAX_CHANNELS]; |
529 | struct termios *modem_termios_locked[ISDN_MAX_CHANNELS]; | 529 | struct ktermios *modem_termios_locked[ISDN_MAX_CHANNELS]; |
530 | modem_info info[ISDN_MAX_CHANNELS]; /* Private data */ | 530 | modem_info info[ISDN_MAX_CHANNELS]; /* Private data */ |
531 | } isdn_modem_t; | 531 | } isdn_modem_t; |
532 | 532 | ||
diff --git a/include/linux/istallion.h b/include/linux/istallion.h index b55e2a035605..106a5e85e5c4 100644 --- a/include/linux/istallion.h +++ b/include/linux/istallion.h | |||
@@ -49,13 +49,13 @@ | |||
49 | * communication with the slave board will always be on a per port | 49 | * communication with the slave board will always be on a per port |
50 | * basis. | 50 | * basis. |
51 | */ | 51 | */ |
52 | typedef struct { | 52 | struct stliport { |
53 | unsigned long magic; | 53 | unsigned long magic; |
54 | int portnr; | 54 | unsigned int portnr; |
55 | int panelnr; | 55 | unsigned int panelnr; |
56 | int brdnr; | 56 | unsigned int brdnr; |
57 | unsigned long state; | 57 | unsigned long state; |
58 | int devnr; | 58 | unsigned int devnr; |
59 | int flags; | 59 | int flags; |
60 | int baud_base; | 60 | int baud_base; |
61 | int custom_divisor; | 61 | int custom_divisor; |
@@ -72,7 +72,7 @@ typedef struct { | |||
72 | wait_queue_head_t close_wait; | 72 | wait_queue_head_t close_wait; |
73 | wait_queue_head_t raw_wait; | 73 | wait_queue_head_t raw_wait; |
74 | struct work_struct tqhangup; | 74 | struct work_struct tqhangup; |
75 | asysigs_t asig; | 75 | struct asysigs asig; |
76 | unsigned long addr; | 76 | unsigned long addr; |
77 | unsigned long rxoffset; | 77 | unsigned long rxoffset; |
78 | unsigned long txoffset; | 78 | unsigned long txoffset; |
@@ -83,31 +83,31 @@ typedef struct { | |||
83 | unsigned char reqbit; | 83 | unsigned char reqbit; |
84 | unsigned char portidx; | 84 | unsigned char portidx; |
85 | unsigned char portbit; | 85 | unsigned char portbit; |
86 | } stliport_t; | 86 | }; |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * Use a structure of function pointers to do board level operations. | 89 | * Use a structure of function pointers to do board level operations. |
90 | * These include, enable/disable, paging shared memory, interrupting, etc. | 90 | * These include, enable/disable, paging shared memory, interrupting, etc. |
91 | */ | 91 | */ |
92 | typedef struct stlibrd { | 92 | struct stlibrd { |
93 | unsigned long magic; | 93 | unsigned long magic; |
94 | int brdnr; | 94 | unsigned int brdnr; |
95 | int brdtype; | 95 | unsigned int brdtype; |
96 | int state; | 96 | unsigned int state; |
97 | int nrpanels; | 97 | unsigned int nrpanels; |
98 | int nrports; | 98 | unsigned int nrports; |
99 | int nrdevs; | 99 | unsigned int nrdevs; |
100 | unsigned int iobase; | 100 | unsigned int iobase; |
101 | int iosize; | 101 | int iosize; |
102 | unsigned long memaddr; | 102 | unsigned long memaddr; |
103 | void __iomem *membase; | 103 | void __iomem *membase; |
104 | int memsize; | 104 | unsigned long memsize; |
105 | int pagesize; | 105 | int pagesize; |
106 | int hostoffset; | 106 | int hostoffset; |
107 | int slaveoffset; | 107 | int slaveoffset; |
108 | int bitsize; | 108 | int bitsize; |
109 | int enabval; | 109 | int enabval; |
110 | int panels[STL_MAXPANELS]; | 110 | unsigned int panels[STL_MAXPANELS]; |
111 | int panelids[STL_MAXPANELS]; | 111 | int panelids[STL_MAXPANELS]; |
112 | void (*init)(struct stlibrd *brdp); | 112 | void (*init)(struct stlibrd *brdp); |
113 | void (*enable)(struct stlibrd *brdp); | 113 | void (*enable)(struct stlibrd *brdp); |
@@ -116,8 +116,8 @@ typedef struct stlibrd { | |||
116 | void __iomem *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line); | 116 | void __iomem *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line); |
117 | void (*intr)(struct stlibrd *brdp); | 117 | void (*intr)(struct stlibrd *brdp); |
118 | void (*reset)(struct stlibrd *brdp); | 118 | void (*reset)(struct stlibrd *brdp); |
119 | stliport_t *ports[STL_MAXPORTS]; | 119 | struct stliport *ports[STL_MAXPORTS]; |
120 | } stlibrd_t; | 120 | }; |
121 | 121 | ||
122 | 122 | ||
123 | /* | 123 | /* |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 6738283ac385..63fb18dcac30 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -13,10 +13,12 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/compiler.h> | 14 | #include <linux/compiler.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/log2.h> | ||
16 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
17 | #include <asm/bug.h> | 18 | #include <asm/bug.h> |
18 | 19 | ||
19 | extern const char linux_banner[]; | 20 | extern const char linux_banner[]; |
21 | extern const char linux_proc_banner[]; | ||
20 | 22 | ||
21 | #define INT_MAX ((int)(~0U>>1)) | 23 | #define INT_MAX ((int)(~0U>>1)) |
22 | #define INT_MIN (-INT_MAX - 1) | 24 | #define INT_MIN (-INT_MAX - 1) |
@@ -157,20 +159,6 @@ static inline int printk(const char *s, ...) { return 0; } | |||
157 | 159 | ||
158 | unsigned long int_sqrt(unsigned long); | 160 | unsigned long int_sqrt(unsigned long); |
159 | 161 | ||
160 | static inline int __attribute_pure__ long_log2(unsigned long x) | ||
161 | { | ||
162 | int r = 0; | ||
163 | for (x >>= 1; x > 0; x >>= 1) | ||
164 | r++; | ||
165 | return r; | ||
166 | } | ||
167 | |||
168 | static inline unsigned long | ||
169 | __attribute_const__ roundup_pow_of_two(unsigned long x) | ||
170 | { | ||
171 | return 1UL << fls_long(x - 1); | ||
172 | } | ||
173 | |||
174 | extern int printk_ratelimit(void); | 162 | extern int printk_ratelimit(void); |
175 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | 163 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); |
176 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 164 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index d1c8d28fa92e..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 *); |
@@ -265,8 +269,8 @@ extern int __must_check subsys_create_file(struct subsystem * , | |||
265 | struct subsys_attribute *); | 269 | struct subsys_attribute *); |
266 | 270 | ||
267 | #if defined(CONFIG_HOTPLUG) | 271 | #if defined(CONFIG_HOTPLUG) |
268 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 272 | int kobject_uevent(struct kobject *kobj, enum kobject_action action); |
269 | void kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | 273 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, |
270 | char *envp[]); | 274 | char *envp[]); |
271 | 275 | ||
272 | int add_uevent_var(char **envp, int num_envp, int *cur_index, | 276 | int add_uevent_var(char **envp, int num_envp, int *cur_index, |
@@ -274,11 +278,12 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index, | |||
274 | const char *format, ...) | 278 | const char *format, ...) |
275 | __attribute__((format (printf, 7, 8))); | 279 | __attribute__((format (printf, 7, 8))); |
276 | #else | 280 | #else |
277 | static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } | 281 | static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action) |
278 | static inline void kobject_uevent_env(struct kobject *kobj, | 282 | { return 0; } |
283 | static inline int kobject_uevent_env(struct kobject *kobj, | ||
279 | enum kobject_action action, | 284 | enum kobject_action action, |
280 | char *envp[]) | 285 | char *envp[]) |
281 | { } | 286 | { return 0; } |
282 | 287 | ||
283 | static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, | 288 | static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, |
284 | char *buffer, int buffer_size, int *cur_len, | 289 | char *buffer, int buffer_size, int *cur_len, |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h new file mode 100644 index 000000000000..1be148f0fce4 --- /dev/null +++ b/include/linux/kvm.h | |||
@@ -0,0 +1,240 @@ | |||
1 | #ifndef __LINUX_KVM_H | ||
2 | #define __LINUX_KVM_H | ||
3 | |||
4 | /* | ||
5 | * Userspace interface for /dev/kvm - kernel based virtual machine | ||
6 | * | ||
7 | * Note: this interface is considered experimental and may change without | ||
8 | * notice. | ||
9 | */ | ||
10 | |||
11 | #include <asm/types.h> | ||
12 | #include <linux/ioctl.h> | ||
13 | |||
14 | #define KVM_API_VERSION 2 | ||
15 | |||
16 | /* | ||
17 | * Architectural interrupt line count, and the size of the bitmap needed | ||
18 | * to hold them. | ||
19 | */ | ||
20 | #define KVM_NR_INTERRUPTS 256 | ||
21 | #define KVM_IRQ_BITMAP_SIZE_BYTES ((KVM_NR_INTERRUPTS + 7) / 8) | ||
22 | #define KVM_IRQ_BITMAP_SIZE(type) (KVM_IRQ_BITMAP_SIZE_BYTES / sizeof(type)) | ||
23 | |||
24 | |||
25 | /* for KVM_CREATE_MEMORY_REGION */ | ||
26 | struct kvm_memory_region { | ||
27 | __u32 slot; | ||
28 | __u32 flags; | ||
29 | __u64 guest_phys_addr; | ||
30 | __u64 memory_size; /* bytes */ | ||
31 | }; | ||
32 | |||
33 | /* for kvm_memory_region::flags */ | ||
34 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL | ||
35 | |||
36 | |||
37 | #define KVM_EXIT_TYPE_FAIL_ENTRY 1 | ||
38 | #define KVM_EXIT_TYPE_VM_EXIT 2 | ||
39 | |||
40 | enum kvm_exit_reason { | ||
41 | KVM_EXIT_UNKNOWN = 0, | ||
42 | KVM_EXIT_EXCEPTION = 1, | ||
43 | KVM_EXIT_IO = 2, | ||
44 | KVM_EXIT_CPUID = 3, | ||
45 | KVM_EXIT_DEBUG = 4, | ||
46 | KVM_EXIT_HLT = 5, | ||
47 | KVM_EXIT_MMIO = 6, | ||
48 | KVM_EXIT_IRQ_WINDOW_OPEN = 7, | ||
49 | KVM_EXIT_SHUTDOWN = 8, | ||
50 | }; | ||
51 | |||
52 | /* for KVM_RUN */ | ||
53 | struct kvm_run { | ||
54 | /* in */ | ||
55 | __u32 vcpu; | ||
56 | __u32 emulated; /* skip current instruction */ | ||
57 | __u32 mmio_completed; /* mmio request completed */ | ||
58 | __u8 request_interrupt_window; | ||
59 | __u8 padding1[3]; | ||
60 | |||
61 | /* out */ | ||
62 | __u32 exit_type; | ||
63 | __u32 exit_reason; | ||
64 | __u32 instruction_length; | ||
65 | __u8 ready_for_interrupt_injection; | ||
66 | __u8 if_flag; | ||
67 | __u16 padding2; | ||
68 | __u64 cr8; | ||
69 | __u64 apic_base; | ||
70 | |||
71 | union { | ||
72 | /* KVM_EXIT_UNKNOWN */ | ||
73 | struct { | ||
74 | __u32 hardware_exit_reason; | ||
75 | } hw; | ||
76 | /* KVM_EXIT_EXCEPTION */ | ||
77 | struct { | ||
78 | __u32 exception; | ||
79 | __u32 error_code; | ||
80 | } ex; | ||
81 | /* KVM_EXIT_IO */ | ||
82 | struct { | ||
83 | #define KVM_EXIT_IO_IN 0 | ||
84 | #define KVM_EXIT_IO_OUT 1 | ||
85 | __u8 direction; | ||
86 | __u8 size; /* bytes */ | ||
87 | __u8 string; | ||
88 | __u8 string_down; | ||
89 | __u8 rep; | ||
90 | __u8 pad; | ||
91 | __u16 port; | ||
92 | __u64 count; | ||
93 | union { | ||
94 | __u64 address; | ||
95 | __u32 value; | ||
96 | }; | ||
97 | } io; | ||
98 | struct { | ||
99 | } debug; | ||
100 | /* KVM_EXIT_MMIO */ | ||
101 | struct { | ||
102 | __u64 phys_addr; | ||
103 | __u8 data[8]; | ||
104 | __u32 len; | ||
105 | __u8 is_write; | ||
106 | } mmio; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | /* for KVM_GET_REGS and KVM_SET_REGS */ | ||
111 | struct kvm_regs { | ||
112 | /* in */ | ||
113 | __u32 vcpu; | ||
114 | __u32 padding; | ||
115 | |||
116 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ | ||
117 | __u64 rax, rbx, rcx, rdx; | ||
118 | __u64 rsi, rdi, rsp, rbp; | ||
119 | __u64 r8, r9, r10, r11; | ||
120 | __u64 r12, r13, r14, r15; | ||
121 | __u64 rip, rflags; | ||
122 | }; | ||
123 | |||
124 | struct kvm_segment { | ||
125 | __u64 base; | ||
126 | __u32 limit; | ||
127 | __u16 selector; | ||
128 | __u8 type; | ||
129 | __u8 present, dpl, db, s, l, g, avl; | ||
130 | __u8 unusable; | ||
131 | __u8 padding; | ||
132 | }; | ||
133 | |||
134 | struct kvm_dtable { | ||
135 | __u64 base; | ||
136 | __u16 limit; | ||
137 | __u16 padding[3]; | ||
138 | }; | ||
139 | |||
140 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ | ||
141 | struct kvm_sregs { | ||
142 | /* in */ | ||
143 | __u32 vcpu; | ||
144 | __u32 padding; | ||
145 | |||
146 | /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */ | ||
147 | struct kvm_segment cs, ds, es, fs, gs, ss; | ||
148 | struct kvm_segment tr, ldt; | ||
149 | struct kvm_dtable gdt, idt; | ||
150 | __u64 cr0, cr2, cr3, cr4, cr8; | ||
151 | __u64 efer; | ||
152 | __u64 apic_base; | ||
153 | __u64 interrupt_bitmap[KVM_IRQ_BITMAP_SIZE(__u64)]; | ||
154 | }; | ||
155 | |||
156 | struct kvm_msr_entry { | ||
157 | __u32 index; | ||
158 | __u32 reserved; | ||
159 | __u64 data; | ||
160 | }; | ||
161 | |||
162 | /* for KVM_GET_MSRS and KVM_SET_MSRS */ | ||
163 | struct kvm_msrs { | ||
164 | __u32 vcpu; | ||
165 | __u32 nmsrs; /* number of msrs in entries */ | ||
166 | |||
167 | struct kvm_msr_entry entries[0]; | ||
168 | }; | ||
169 | |||
170 | /* for KVM_GET_MSR_INDEX_LIST */ | ||
171 | struct kvm_msr_list { | ||
172 | __u32 nmsrs; /* number of msrs in entries */ | ||
173 | __u32 indices[0]; | ||
174 | }; | ||
175 | |||
176 | /* for KVM_TRANSLATE */ | ||
177 | struct kvm_translation { | ||
178 | /* in */ | ||
179 | __u64 linear_address; | ||
180 | __u32 vcpu; | ||
181 | __u32 padding; | ||
182 | |||
183 | /* out */ | ||
184 | __u64 physical_address; | ||
185 | __u8 valid; | ||
186 | __u8 writeable; | ||
187 | __u8 usermode; | ||
188 | }; | ||
189 | |||
190 | /* for KVM_INTERRUPT */ | ||
191 | struct kvm_interrupt { | ||
192 | /* in */ | ||
193 | __u32 vcpu; | ||
194 | __u32 irq; | ||
195 | }; | ||
196 | |||
197 | struct kvm_breakpoint { | ||
198 | __u32 enabled; | ||
199 | __u32 padding; | ||
200 | __u64 address; | ||
201 | }; | ||
202 | |||
203 | /* for KVM_DEBUG_GUEST */ | ||
204 | struct kvm_debug_guest { | ||
205 | /* int */ | ||
206 | __u32 vcpu; | ||
207 | __u32 enabled; | ||
208 | struct kvm_breakpoint breakpoints[4]; | ||
209 | __u32 singlestep; | ||
210 | }; | ||
211 | |||
212 | /* for KVM_GET_DIRTY_LOG */ | ||
213 | struct kvm_dirty_log { | ||
214 | __u32 slot; | ||
215 | __u32 padding; | ||
216 | union { | ||
217 | void __user *dirty_bitmap; /* one bit per page */ | ||
218 | __u64 padding; | ||
219 | }; | ||
220 | }; | ||
221 | |||
222 | #define KVMIO 0xAE | ||
223 | |||
224 | #define KVM_GET_API_VERSION _IO(KVMIO, 1) | ||
225 | #define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) | ||
226 | #define KVM_GET_REGS _IOWR(KVMIO, 3, struct kvm_regs) | ||
227 | #define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) | ||
228 | #define KVM_GET_SREGS _IOWR(KVMIO, 5, struct kvm_sregs) | ||
229 | #define KVM_SET_SREGS _IOW(KVMIO, 6, struct kvm_sregs) | ||
230 | #define KVM_TRANSLATE _IOWR(KVMIO, 7, struct kvm_translation) | ||
231 | #define KVM_INTERRUPT _IOW(KVMIO, 8, struct kvm_interrupt) | ||
232 | #define KVM_DEBUG_GUEST _IOW(KVMIO, 9, struct kvm_debug_guest) | ||
233 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 10, struct kvm_memory_region) | ||
234 | #define KVM_CREATE_VCPU _IOW(KVMIO, 11, int /* vcpu_slot */) | ||
235 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log) | ||
236 | #define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs) | ||
237 | #define KVM_SET_MSRS _IOWR(KVMIO, 14, struct kvm_msrs) | ||
238 | #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list) | ||
239 | |||
240 | #endif | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index ab2754830322..596e0c18887d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -31,7 +31,7 @@ | |||
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> |
@@ -54,8 +54,6 @@ | |||
54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 54 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 55 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
56 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 56 | #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 | 57 | ||
60 | 58 | ||
61 | /* note: prints function name for you */ | 59 | /* note: prints function name for you */ |
@@ -109,10 +107,6 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) | |||
109 | #define ATA_TAG_POISON 0xfafbfcfdU | 107 | #define ATA_TAG_POISON 0xfafbfcfdU |
110 | 108 | ||
111 | /* move to PCI layer? */ | 109 | /* 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) | 110 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) |
117 | { | 111 | { |
118 | return &pdev->dev; | 112 | return &pdev->dev; |
@@ -177,6 +171,7 @@ enum { | |||
177 | * Register FIS clearing BSY */ | 171 | * Register FIS clearing BSY */ |
178 | ATA_FLAG_DEBUGMSG = (1 << 13), | 172 | ATA_FLAG_DEBUGMSG = (1 << 13), |
179 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ | 173 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ |
174 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | ||
180 | 175 | ||
181 | /* The following flag belongs to ap->pflags but is kept in | 176 | /* The following flag belongs to ap->pflags but is kept in |
182 | * ap->flags because it's referenced in many LLDs and will be | 177 | * ap->flags because it's referenced in many LLDs and will be |
@@ -307,7 +302,7 @@ enum { | |||
307 | * most devices. | 302 | * most devices. |
308 | */ | 303 | */ |
309 | ATA_SPINUP_WAIT = 8000, | 304 | ATA_SPINUP_WAIT = 8000, |
310 | 305 | ||
311 | /* Horkage types. May be set by libata or controller on drives | 306 | /* Horkage types. May be set by libata or controller on drives |
312 | (some horkage may be drive/controller pair dependant */ | 307 | (some horkage may be drive/controller pair dependant */ |
313 | 308 | ||
@@ -351,21 +346,21 @@ typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); | |||
351 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); | 346 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); |
352 | 347 | ||
353 | struct ata_ioports { | 348 | struct ata_ioports { |
354 | unsigned long cmd_addr; | 349 | void __iomem *cmd_addr; |
355 | unsigned long data_addr; | 350 | void __iomem *data_addr; |
356 | unsigned long error_addr; | 351 | void __iomem *error_addr; |
357 | unsigned long feature_addr; | 352 | void __iomem *feature_addr; |
358 | unsigned long nsect_addr; | 353 | void __iomem *nsect_addr; |
359 | unsigned long lbal_addr; | 354 | void __iomem *lbal_addr; |
360 | unsigned long lbam_addr; | 355 | void __iomem *lbam_addr; |
361 | unsigned long lbah_addr; | 356 | void __iomem *lbah_addr; |
362 | unsigned long device_addr; | 357 | void __iomem *device_addr; |
363 | unsigned long status_addr; | 358 | void __iomem *status_addr; |
364 | unsigned long command_addr; | 359 | void __iomem *command_addr; |
365 | unsigned long altstatus_addr; | 360 | void __iomem *altstatus_addr; |
366 | unsigned long ctl_addr; | 361 | void __iomem *ctl_addr; |
367 | unsigned long bmdma_addr; | 362 | void __iomem *bmdma_addr; |
368 | unsigned long scr_addr; | 363 | void __iomem *scr_addr; |
369 | }; | 364 | }; |
370 | 365 | ||
371 | struct ata_probe_ent { | 366 | struct ata_probe_ent { |
@@ -384,7 +379,7 @@ struct ata_probe_ent { | |||
384 | unsigned int irq_flags; | 379 | unsigned int irq_flags; |
385 | unsigned long port_flags; | 380 | unsigned long port_flags; |
386 | unsigned long _host_flags; | 381 | unsigned long _host_flags; |
387 | void __iomem *mmio_base; | 382 | void __iomem * const *iomap; |
388 | void *private_data; | 383 | void *private_data; |
389 | 384 | ||
390 | /* port_info for the secondary port. Together with irq2, it's | 385 | /* port_info for the secondary port. Together with irq2, it's |
@@ -401,7 +396,7 @@ struct ata_host { | |||
401 | struct device *dev; | 396 | struct device *dev; |
402 | unsigned long irq; | 397 | unsigned long irq; |
403 | unsigned long irq2; | 398 | unsigned long irq2; |
404 | void __iomem *mmio_base; | 399 | void __iomem * const *iomap; |
405 | unsigned int n_ports; | 400 | unsigned int n_ports; |
406 | void *private_data; | 401 | void *private_data; |
407 | const struct ata_port_operations *ops; | 402 | const struct ata_port_operations *ops; |
@@ -430,9 +425,6 @@ struct ata_queued_cmd { | |||
430 | 425 | ||
431 | unsigned int pad_len; | 426 | unsigned int pad_len; |
432 | 427 | ||
433 | unsigned int nsect; | ||
434 | unsigned int cursect; | ||
435 | |||
436 | unsigned int nbytes; | 428 | unsigned int nbytes; |
437 | unsigned int curbytes; | 429 | unsigned int curbytes; |
438 | 430 | ||
@@ -612,11 +604,11 @@ struct ata_port_operations { | |||
612 | void (*dev_select)(struct ata_port *ap, unsigned int device); | 604 | void (*dev_select)(struct ata_port *ap, unsigned int device); |
613 | 605 | ||
614 | void (*phy_reset) (struct ata_port *ap); /* obsolete */ | 606 | void (*phy_reset) (struct ata_port *ap); /* obsolete */ |
615 | void (*set_mode) (struct ata_port *ap); | 607 | int (*set_mode) (struct ata_port *ap, struct ata_device **r_failed_dev); |
616 | 608 | ||
617 | void (*post_set_mode) (struct ata_port *ap); | 609 | void (*post_set_mode) (struct ata_port *ap); |
618 | 610 | ||
619 | int (*check_atapi_dma) (struct ata_queued_cmd *qc); | 611 | int (*check_atapi_dma) (struct ata_queued_cmd *qc); |
620 | 612 | ||
621 | void (*bmdma_setup) (struct ata_queued_cmd *qc); | 613 | void (*bmdma_setup) (struct ata_queued_cmd *qc); |
622 | void (*bmdma_start) (struct ata_queued_cmd *qc); | 614 | void (*bmdma_start) (struct ata_queued_cmd *qc); |
@@ -638,6 +630,8 @@ struct ata_port_operations { | |||
638 | 630 | ||
639 | irq_handler_t irq_handler; | 631 | irq_handler_t irq_handler; |
640 | void (*irq_clear) (struct ata_port *); | 632 | void (*irq_clear) (struct ata_port *); |
633 | u8 (*irq_on) (struct ata_port *); | ||
634 | u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq); | ||
641 | 635 | ||
642 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); | 636 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); |
643 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | 637 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, |
@@ -719,20 +713,18 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
719 | unsigned int n_ports); | 713 | unsigned int n_ports); |
720 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 714 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
721 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); | 715 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
722 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 716 | extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev); |
723 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); | 717 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
724 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 718 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
725 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 719 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
726 | #endif /* CONFIG_PCI */ | 720 | #endif /* CONFIG_PCI */ |
727 | extern int ata_device_add(const struct ata_probe_ent *ent); | 721 | extern int ata_device_add(const struct ata_probe_ent *ent); |
728 | extern void ata_port_detach(struct ata_port *ap); | 722 | extern void ata_host_detach(struct ata_host *host); |
729 | extern void ata_host_init(struct ata_host *, struct device *, | 723 | extern void ata_host_init(struct ata_host *, struct device *, |
730 | unsigned long, const struct ata_port_operations *); | 724 | unsigned long, const struct ata_port_operations *); |
731 | extern void ata_host_remove(struct ata_host *host); | ||
732 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 725 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
733 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 726 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
734 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 727 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
735 | extern int ata_scsi_release(struct Scsi_Host *host); | ||
736 | extern void ata_sas_port_destroy(struct ata_port *); | 728 | extern void ata_sas_port_destroy(struct ata_port *); |
737 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 729 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
738 | struct ata_port_info *, struct Scsi_Host *); | 730 | struct ata_port_info *, struct Scsi_Host *); |
@@ -775,15 +767,11 @@ extern u8 ata_check_status(struct ata_port *ap); | |||
775 | extern u8 ata_altstatus(struct ata_port *ap); | 767 | extern u8 ata_altstatus(struct ata_port *ap); |
776 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 768 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
777 | extern int ata_port_start (struct ata_port *ap); | 769 | extern int ata_port_start (struct ata_port *ap); |
778 | extern void ata_port_stop (struct ata_port *ap); | ||
779 | extern void ata_host_stop (struct ata_host *host); | ||
780 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); | 770 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance); |
781 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 771 | extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf, |
782 | unsigned int buflen, int write_data); | 772 | unsigned int buflen, int write_data); |
783 | extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, | 773 | extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, |
784 | unsigned int buflen, int write_data); | 774 | unsigned int buflen, int write_data); |
785 | extern void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, | ||
786 | unsigned int buflen, int write_data); | ||
787 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 775 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
788 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 776 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
789 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 777 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -825,6 +813,10 @@ extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | |||
825 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 813 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
826 | int queue_depth); | 814 | int queue_depth); |
827 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 815 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
816 | extern u8 ata_irq_on(struct ata_port *ap); | ||
817 | extern u8 ata_dummy_irq_on(struct ata_port *ap); | ||
818 | extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
819 | extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq); | ||
828 | 820 | ||
829 | /* | 821 | /* |
830 | * Timing helpers | 822 | * Timing helpers |
@@ -863,7 +855,6 @@ struct pci_bits { | |||
863 | unsigned long val; | 855 | unsigned long val; |
864 | }; | 856 | }; |
865 | 857 | ||
866 | extern void ata_pci_host_stop (struct ata_host *host); | ||
867 | extern struct ata_probe_ent * | 858 | extern struct ata_probe_ent * |
868 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 859 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
869 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 860 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
@@ -1053,6 +1044,8 @@ static inline void ata_pause(struct ata_port *ap) | |||
1053 | /** | 1044 | /** |
1054 | * ata_busy_wait - Wait for a port status register | 1045 | * ata_busy_wait - Wait for a port status register |
1055 | * @ap: Port to wait for. | 1046 | * @ap: Port to wait for. |
1047 | * @bits: bits that must be clear | ||
1048 | * @max: number of 10uS waits to perform | ||
1056 | * | 1049 | * |
1057 | * Waits up to max*10 microseconds for the selected bits in the port's | 1050 | * Waits up to max*10 microseconds for the selected bits in the port's |
1058 | * status register to be cleared. | 1051 | * status register to be cleared. |
@@ -1093,10 +1086,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap) | |||
1093 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 1086 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
1094 | 1087 | ||
1095 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { | 1088 | if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { |
1096 | unsigned long l = ap->ioaddr.status_addr; | ||
1097 | if (ata_msg_warn(ap)) | 1089 | if (ata_msg_warn(ap)) |
1098 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", | 1090 | printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n", |
1099 | status, l); | 1091 | status, ap->ioaddr.status_addr); |
1100 | } | 1092 | } |
1101 | 1093 | ||
1102 | return status; | 1094 | return status; |
@@ -1143,12 +1135,14 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) | |||
1143 | 1135 | ||
1144 | static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | 1136 | static inline void ata_qc_reinit(struct ata_queued_cmd *qc) |
1145 | { | 1137 | { |
1138 | qc->dma_dir = DMA_NONE; | ||
1146 | qc->__sg = NULL; | 1139 | qc->__sg = NULL; |
1147 | qc->flags = 0; | 1140 | qc->flags = 0; |
1148 | qc->cursect = qc->cursg = qc->cursg_ofs = 0; | 1141 | qc->cursg = qc->cursg_ofs = 0; |
1149 | qc->nsect = 0; | ||
1150 | qc->nbytes = qc->curbytes = 0; | 1142 | qc->nbytes = qc->curbytes = 0; |
1143 | qc->n_elem = 0; | ||
1151 | qc->err_mask = 0; | 1144 | qc->err_mask = 0; |
1145 | qc->pad_len = 0; | ||
1152 | 1146 | ||
1153 | ata_tf_init(qc->dev, &qc->tf); | 1147 | ata_tf_init(qc->dev, &qc->tf); |
1154 | 1148 | ||
@@ -1157,51 +1151,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
1157 | qc->result_tf.feature = 0; | 1151 | qc->result_tf.feature = 0; |
1158 | } | 1152 | } |
1159 | 1153 | ||
1160 | /** | ||
1161 | * ata_irq_ack - Acknowledge a device interrupt. | ||
1162 | * @ap: Port on which interrupts are enabled. | ||
1163 | * | ||
1164 | * Wait up to 10 ms for legacy IDE device to become idle (BUSY | ||
1165 | * or BUSY+DRQ clear). Obtain dma status and port status from | ||
1166 | * device. Clear the interrupt. Return port status. | ||
1167 | * | ||
1168 | * LOCKING: | ||
1169 | */ | ||
1170 | |||
1171 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) | ||
1172 | { | ||
1173 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; | ||
1174 | u8 host_stat, post_stat, status; | ||
1175 | |||
1176 | status = ata_busy_wait(ap, bits, 1000); | ||
1177 | if (status & bits) | ||
1178 | if (ata_msg_err(ap)) | ||
1179 | printk(KERN_ERR "abnormal status 0x%X\n", status); | ||
1180 | |||
1181 | /* get controller status; clear intr, err bits */ | ||
1182 | if (ap->flags & ATA_FLAG_MMIO) { | ||
1183 | void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; | ||
1184 | host_stat = readb(mmio + ATA_DMA_STATUS); | ||
1185 | writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
1186 | mmio + ATA_DMA_STATUS); | ||
1187 | |||
1188 | post_stat = readb(mmio + ATA_DMA_STATUS); | ||
1189 | } else { | ||
1190 | host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1191 | outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR, | ||
1192 | ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1193 | |||
1194 | post_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); | ||
1195 | } | ||
1196 | |||
1197 | if (ata_msg_intr(ap)) | ||
1198 | printk(KERN_INFO "%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n", | ||
1199 | __FUNCTION__, | ||
1200 | host_stat, post_stat, status); | ||
1201 | |||
1202 | return status; | ||
1203 | } | ||
1204 | |||
1205 | static inline int ata_try_flush_cache(const struct ata_device *dev) | 1154 | static inline int ata_try_flush_cache(const struct ata_device *dev) |
1206 | { | 1155 | { |
1207 | return ata_id_wcache_enabled(dev->id) || | 1156 | return ata_id_wcache_enabled(dev->id) || |
@@ -1229,14 +1178,14 @@ static inline unsigned int __ac_err_mask(u8 status) | |||
1229 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) | 1178 | static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) |
1230 | { | 1179 | { |
1231 | ap->pad_dma = 0; | 1180 | ap->pad_dma = 0; |
1232 | ap->pad = dma_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, | 1181 | ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, |
1233 | &ap->pad_dma, GFP_KERNEL); | 1182 | &ap->pad_dma, GFP_KERNEL); |
1234 | return (ap->pad == NULL) ? -ENOMEM : 0; | 1183 | return (ap->pad == NULL) ? -ENOMEM : 0; |
1235 | } | 1184 | } |
1236 | 1185 | ||
1237 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) | 1186 | static inline void ata_pad_free(struct ata_port *ap, struct device *dev) |
1238 | { | 1187 | { |
1239 | dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); | 1188 | dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); |
1240 | } | 1189 | } |
1241 | 1190 | ||
1242 | static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | 1191 | 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 a9c90287c0ff..611059d633f4 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -227,13 +227,13 @@ static inline void list_replace_init(struct list_head *old, | |||
227 | INIT_LIST_HEAD(old); | 227 | INIT_LIST_HEAD(old); |
228 | } | 228 | } |
229 | 229 | ||
230 | /* | 230 | /** |
231 | * list_replace_rcu - replace old entry by new one | 231 | * list_replace_rcu - replace old entry by new one |
232 | * @old : the element to be replaced | 232 | * @old : the element to be replaced |
233 | * @new : the new element to insert | 233 | * @new : the new element to insert |
234 | * | 234 | * |
235 | * The old entry will be replaced with the new entry atomically. | 235 | * The @old entry will be replaced with the @new entry atomically. |
236 | * Note: 'old' should not be empty. | 236 | * Note: @old should not be empty. |
237 | */ | 237 | */ |
238 | static inline void list_replace_rcu(struct list_head *old, | 238 | static inline void list_replace_rcu(struct list_head *old, |
239 | struct list_head *new) | 239 | struct list_head *new) |
@@ -680,12 +680,12 @@ static inline void hlist_del_init(struct hlist_node *n) | |||
680 | } | 680 | } |
681 | } | 681 | } |
682 | 682 | ||
683 | /* | 683 | /** |
684 | * hlist_replace_rcu - replace old entry by new one | 684 | * hlist_replace_rcu - replace old entry by new one |
685 | * @old : the element to be replaced | 685 | * @old : the element to be replaced |
686 | * @new : the new element to insert | 686 | * @new : the new element to insert |
687 | * | 687 | * |
688 | * The old entry will be replaced with the new entry atomically. | 688 | * The @old entry will be replaced with the @new entry atomically. |
689 | */ | 689 | */ |
690 | static inline void hlist_replace_rcu(struct hlist_node *old, | 690 | static inline void hlist_replace_rcu(struct hlist_node *old, |
691 | struct hlist_node *new) | 691 | struct hlist_node *new) |
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index aa50d89eacd7..246de1d84a26 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -23,7 +23,7 @@ struct svc_rqst; | |||
23 | * This is the set of functions for lockd->nfsd communication | 23 | * This is the set of functions for lockd->nfsd communication |
24 | */ | 24 | */ |
25 | struct nlmsvc_binding { | 25 | struct nlmsvc_binding { |
26 | u32 (*fopen)(struct svc_rqst *, | 26 | __be32 (*fopen)(struct svc_rqst *, |
27 | struct nfs_fh *, | 27 | struct nfs_fh *, |
28 | struct file **); | 28 | struct file **); |
29 | void (*fclose)(struct file *); | 29 | void (*fclose)(struct file *); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 8c39654549d8..ac25b5649c59 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -191,7 +191,7 @@ __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); | |||
191 | unsigned long nlmsvc_retry_blocked(void); | 191 | unsigned long nlmsvc_retry_blocked(void); |
192 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 192 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
193 | nlm_host_match_fn_t match); | 193 | nlm_host_match_fn_t match); |
194 | void nlmsvc_grant_reply(struct nlm_cookie *, u32); | 194 | void nlmsvc_grant_reply(struct nlm_cookie *, __be32); |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * File handling for the server personality | 197 | * File handling for the server personality |
@@ -206,7 +206,7 @@ void nlmsvc_invalidate_all(void); | |||
206 | static __inline__ struct inode * | 206 | static __inline__ struct inode * |
207 | nlmsvc_file_inode(struct nlm_file *file) | 207 | nlmsvc_file_inode(struct nlm_file *file) |
208 | { | 208 | { |
209 | return file->f_file->f_dentry->d_inode; | 209 | return file->f_file->f_path.dentry->d_inode; |
210 | } | 210 | } |
211 | 211 | ||
212 | /* | 212 | /* |
diff --git a/include/linux/lockd/sm_inter.h b/include/linux/lockd/sm_inter.h index fc61d40964da..22a645828f26 100644 --- a/include/linux/lockd/sm_inter.h +++ b/include/linux/lockd/sm_inter.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * Arguments for all calls to statd | 24 | * Arguments for all calls to statd |
25 | */ | 25 | */ |
26 | struct nsm_args { | 26 | struct nsm_args { |
27 | u32 addr; /* remote address */ | 27 | __be32 addr; /* remote address */ |
28 | u32 prog; /* RPC callback info */ | 28 | u32 prog; /* RPC callback info */ |
29 | u32 vers; | 29 | u32 vers; |
30 | u32 proc; | 30 | u32 proc; |
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index 29e7d9fc9dad..83a1f9f6237b 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h | |||
@@ -69,7 +69,7 @@ typedef struct nlm_args nlm_args; | |||
69 | */ | 69 | */ |
70 | struct nlm_res { | 70 | struct nlm_res { |
71 | struct nlm_cookie cookie; | 71 | struct nlm_cookie cookie; |
72 | u32 status; | 72 | __be32 status; |
73 | struct nlm_lock lock; | 73 | struct nlm_lock lock; |
74 | }; | 74 | }; |
75 | 75 | ||
@@ -80,9 +80,9 @@ struct nlm_reboot { | |||
80 | char * mon; | 80 | char * mon; |
81 | int len; | 81 | int len; |
82 | u32 state; | 82 | u32 state; |
83 | u32 addr; | 83 | __be32 addr; |
84 | u32 vers; | 84 | __be32 vers; |
85 | u32 proto; | 85 | __be32 proto; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | /* | 88 | /* |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 498bfbd3b4e1..ea097dddc44f 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -281,15 +281,25 @@ struct lock_class_key { }; | |||
281 | #if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS) | 281 | #if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS) |
282 | extern void early_init_irq_lock_class(void); | 282 | extern void early_init_irq_lock_class(void); |
283 | #else | 283 | #else |
284 | # define early_init_irq_lock_class() do { } while (0) | 284 | static inline void early_init_irq_lock_class(void) |
285 | { | ||
286 | } | ||
285 | #endif | 287 | #endif |
286 | 288 | ||
287 | #ifdef CONFIG_TRACE_IRQFLAGS | 289 | #ifdef CONFIG_TRACE_IRQFLAGS |
288 | extern void early_boot_irqs_off(void); | 290 | extern void early_boot_irqs_off(void); |
289 | extern void early_boot_irqs_on(void); | 291 | extern void early_boot_irqs_on(void); |
292 | extern void print_irqtrace_events(struct task_struct *curr); | ||
290 | #else | 293 | #else |
291 | # define early_boot_irqs_off() do { } while (0) | 294 | static inline void early_boot_irqs_off(void) |
292 | # define early_boot_irqs_on() do { } while (0) | 295 | { |
296 | } | ||
297 | static inline void early_boot_irqs_on(void) | ||
298 | { | ||
299 | } | ||
300 | static inline void print_irqtrace_events(struct task_struct *curr) | ||
301 | { | ||
302 | } | ||
293 | #endif | 303 | #endif |
294 | 304 | ||
295 | /* | 305 | /* |
diff --git a/include/linux/log2.h b/include/linux/log2.h new file mode 100644 index 000000000000..99922bedfcc9 --- /dev/null +++ b/include/linux/log2.h | |||
@@ -0,0 +1,168 @@ | |||
1 | /* Integer base 2 logarithm calculation | ||
2 | * | ||
3 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_LOG2_H | ||
13 | #define _LINUX_LOG2_H | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/bitops.h> | ||
17 | |||
18 | /* | ||
19 | * deal with unrepresentable constant logarithms | ||
20 | */ | ||
21 | extern __attribute__((const, noreturn)) | ||
22 | int ____ilog2_NaN(void); | ||
23 | |||
24 | /* | ||
25 | * non-constant log of base 2 calculators | ||
26 | * - the arch may override these in asm/bitops.h if they can be implemented | ||
27 | * more efficiently than using fls() and fls64() | ||
28 | * - the arch is not required to handle n==0 if implementing the fallback | ||
29 | */ | ||
30 | #ifndef CONFIG_ARCH_HAS_ILOG2_U32 | ||
31 | static inline __attribute__((const)) | ||
32 | int __ilog2_u32(u32 n) | ||
33 | { | ||
34 | return fls(n) - 1; | ||
35 | } | ||
36 | #endif | ||
37 | |||
38 | #ifndef CONFIG_ARCH_HAS_ILOG2_U64 | ||
39 | static inline __attribute__((const)) | ||
40 | int __ilog2_u64(u64 n) | ||
41 | { | ||
42 | return fls64(n) - 1; | ||
43 | } | ||
44 | #endif | ||
45 | |||
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 | /* | ||
58 | * round up to nearest power of two | ||
59 | */ | ||
60 | static inline __attribute__((const)) | ||
61 | unsigned long __roundup_pow_of_two(unsigned long n) | ||
62 | { | ||
63 | return 1UL << fls_long(n - 1); | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * ilog2 - log of base 2 of 32-bit or a 64-bit unsigned value | ||
68 | * @n - parameter | ||
69 | * | ||
70 | * constant-capable log of base 2 calculation | ||
71 | * - this can be used to initialise global variables from constant data, hence | ||
72 | * the massive ternary operator construction | ||
73 | * | ||
74 | * selects the appropriately-sized optimised version depending on sizeof(n) | ||
75 | */ | ||
76 | #define ilog2(n) \ | ||
77 | ( \ | ||
78 | __builtin_constant_p(n) ? ( \ | ||
79 | (n) < 1 ? ____ilog2_NaN() : \ | ||
80 | (n) & (1ULL << 63) ? 63 : \ | ||
81 | (n) & (1ULL << 62) ? 62 : \ | ||
82 | (n) & (1ULL << 61) ? 61 : \ | ||
83 | (n) & (1ULL << 60) ? 60 : \ | ||
84 | (n) & (1ULL << 59) ? 59 : \ | ||
85 | (n) & (1ULL << 58) ? 58 : \ | ||
86 | (n) & (1ULL << 57) ? 57 : \ | ||
87 | (n) & (1ULL << 56) ? 56 : \ | ||
88 | (n) & (1ULL << 55) ? 55 : \ | ||
89 | (n) & (1ULL << 54) ? 54 : \ | ||
90 | (n) & (1ULL << 53) ? 53 : \ | ||
91 | (n) & (1ULL << 52) ? 52 : \ | ||
92 | (n) & (1ULL << 51) ? 51 : \ | ||
93 | (n) & (1ULL << 50) ? 50 : \ | ||
94 | (n) & (1ULL << 49) ? 49 : \ | ||
95 | (n) & (1ULL << 48) ? 48 : \ | ||
96 | (n) & (1ULL << 47) ? 47 : \ | ||
97 | (n) & (1ULL << 46) ? 46 : \ | ||
98 | (n) & (1ULL << 45) ? 45 : \ | ||
99 | (n) & (1ULL << 44) ? 44 : \ | ||
100 | (n) & (1ULL << 43) ? 43 : \ | ||
101 | (n) & (1ULL << 42) ? 42 : \ | ||
102 | (n) & (1ULL << 41) ? 41 : \ | ||
103 | (n) & (1ULL << 40) ? 40 : \ | ||
104 | (n) & (1ULL << 39) ? 39 : \ | ||
105 | (n) & (1ULL << 38) ? 38 : \ | ||
106 | (n) & (1ULL << 37) ? 37 : \ | ||
107 | (n) & (1ULL << 36) ? 36 : \ | ||
108 | (n) & (1ULL << 35) ? 35 : \ | ||
109 | (n) & (1ULL << 34) ? 34 : \ | ||
110 | (n) & (1ULL << 33) ? 33 : \ | ||
111 | (n) & (1ULL << 32) ? 32 : \ | ||
112 | (n) & (1ULL << 31) ? 31 : \ | ||
113 | (n) & (1ULL << 30) ? 30 : \ | ||
114 | (n) & (1ULL << 29) ? 29 : \ | ||
115 | (n) & (1ULL << 28) ? 28 : \ | ||
116 | (n) & (1ULL << 27) ? 27 : \ | ||
117 | (n) & (1ULL << 26) ? 26 : \ | ||
118 | (n) & (1ULL << 25) ? 25 : \ | ||
119 | (n) & (1ULL << 24) ? 24 : \ | ||
120 | (n) & (1ULL << 23) ? 23 : \ | ||
121 | (n) & (1ULL << 22) ? 22 : \ | ||
122 | (n) & (1ULL << 21) ? 21 : \ | ||
123 | (n) & (1ULL << 20) ? 20 : \ | ||
124 | (n) & (1ULL << 19) ? 19 : \ | ||
125 | (n) & (1ULL << 18) ? 18 : \ | ||
126 | (n) & (1ULL << 17) ? 17 : \ | ||
127 | (n) & (1ULL << 16) ? 16 : \ | ||
128 | (n) & (1ULL << 15) ? 15 : \ | ||
129 | (n) & (1ULL << 14) ? 14 : \ | ||
130 | (n) & (1ULL << 13) ? 13 : \ | ||
131 | (n) & (1ULL << 12) ? 12 : \ | ||
132 | (n) & (1ULL << 11) ? 11 : \ | ||
133 | (n) & (1ULL << 10) ? 10 : \ | ||
134 | (n) & (1ULL << 9) ? 9 : \ | ||
135 | (n) & (1ULL << 8) ? 8 : \ | ||
136 | (n) & (1ULL << 7) ? 7 : \ | ||
137 | (n) & (1ULL << 6) ? 6 : \ | ||
138 | (n) & (1ULL << 5) ? 5 : \ | ||
139 | (n) & (1ULL << 4) ? 4 : \ | ||
140 | (n) & (1ULL << 3) ? 3 : \ | ||
141 | (n) & (1ULL << 2) ? 2 : \ | ||
142 | (n) & (1ULL << 1) ? 1 : \ | ||
143 | (n) & (1ULL << 0) ? 0 : \ | ||
144 | ____ilog2_NaN() \ | ||
145 | ) : \ | ||
146 | (sizeof(n) <= 4) ? \ | ||
147 | __ilog2_u32(n) : \ | ||
148 | __ilog2_u64(n) \ | ||
149 | ) | ||
150 | |||
151 | /** | ||
152 | * roundup_pow_of_two - round the given value up to nearest power of two | ||
153 | * @n - parameter | ||
154 | * | ||
155 | * round the given balue up to the nearest power of two | ||
156 | * - the result is undefined when n == 0 | ||
157 | * - this can be used to initialise global variables from constant data | ||
158 | */ | ||
159 | #define roundup_pow_of_two(n) \ | ||
160 | ( \ | ||
161 | __builtin_constant_p(n) ? ( \ | ||
162 | (n == 1) ? 0 : \ | ||
163 | (1UL << (ilog2((n) - 1) + 1)) \ | ||
164 | ) : \ | ||
165 | __roundup_pow_of_two(n) \ | ||
166 | ) | ||
167 | |||
168 | #endif /* _LINUX_LOG2_H */ | ||
diff --git a/include/linux/magic.h b/include/linux/magic.h index 156c40fc664e..b78bbf42135a 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #define ADFS_SUPER_MAGIC 0xadf5 | 4 | #define ADFS_SUPER_MAGIC 0xadf5 |
5 | #define AFFS_SUPER_MAGIC 0xadff | 5 | #define AFFS_SUPER_MAGIC 0xadff |
6 | #define AFS_SUPER_MAGIC 0x5346414F | ||
6 | #define AUTOFS_SUPER_MAGIC 0x0187 | 7 | #define AUTOFS_SUPER_MAGIC 0x0187 |
7 | #define CODA_SUPER_MAGIC 0x73757245 | 8 | #define CODA_SUPER_MAGIC 0x73757245 |
8 | #define EFS_SUPER_MAGIC 0x414A53 | 9 | #define EFS_SUPER_MAGIC 0x414A53 |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a17b147c61e7..bb793a4c8e9e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -168,6 +168,7 @@ extern unsigned int kobjsize(const void *objp); | |||
168 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 168 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
169 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ | 169 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ |
170 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ | 170 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ |
171 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ | ||
171 | 172 | ||
172 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ | 173 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ |
173 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS | 174 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS |
@@ -978,7 +979,8 @@ extern int early_pfn_to_nid(unsigned long pfn); | |||
978 | #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ | 979 | #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ |
979 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ | 980 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ |
980 | extern void set_dma_reserve(unsigned long new_dma_reserve); | 981 | extern void set_dma_reserve(unsigned long new_dma_reserve); |
981 | extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); | 982 | extern void memmap_init_zone(unsigned long, int, unsigned long, |
983 | unsigned long, enum memmap_context); | ||
982 | extern void setup_per_zone_pages_min(void); | 984 | extern void setup_per_zone_pages_min(void); |
983 | extern void mem_init(void); | 985 | extern void mem_init(void); |
984 | extern void show_mem(void); | 986 | extern void show_mem(void); |
@@ -1028,6 +1030,9 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **, | |||
1028 | unsigned long addr, unsigned long len, pgoff_t pgoff); | 1030 | unsigned long addr, unsigned long len, pgoff_t pgoff); |
1029 | extern void exit_mmap(struct mm_struct *); | 1031 | extern void exit_mmap(struct mm_struct *); |
1030 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | 1032 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); |
1033 | extern int install_special_mapping(struct mm_struct *mm, | ||
1034 | unsigned long addr, unsigned long len, | ||
1035 | unsigned long flags, struct page **pages); | ||
1031 | 1036 | ||
1032 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1037 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1033 | 1038 | ||
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 a3594dfd6963..cdc54be804f1 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -42,7 +42,8 @@ struct mmc_command { | |||
42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
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) | 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 e339a7345f25..b262f47961fb 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -450,9 +450,13 @@ void build_all_zonelists(void); | |||
450 | void wakeup_kswapd(struct zone *zone, int order); | 450 | void wakeup_kswapd(struct zone *zone, int order); |
451 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | 451 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, |
452 | int classzone_idx, int alloc_flags); | 452 | int classzone_idx, int alloc_flags); |
453 | 453 | enum memmap_context { | |
454 | MEMMAP_EARLY, | ||
455 | MEMMAP_HOTPLUG, | ||
456 | }; | ||
454 | extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, | 457 | extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, |
455 | unsigned long size); | 458 | unsigned long size, |
459 | enum memmap_context context); | ||
456 | 460 | ||
457 | #ifdef CONFIG_HAVE_MEMORY_PRESENT | 461 | #ifdef CONFIG_HAVE_MEMORY_PRESENT |
458 | void memory_present(int nid, unsigned long start, unsigned long end); | 462 | void memory_present(int nid, unsigned long start, unsigned long end); |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h new file mode 100644 index 000000000000..4af0b1fc282a --- /dev/null +++ b/include/linux/mnt_namespace.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef _NAMESPACE_H_ | ||
2 | #define _NAMESPACE_H_ | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <linux/mount.h> | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/nsproxy.h> | ||
8 | |||
9 | struct mnt_namespace { | ||
10 | atomic_t count; | ||
11 | struct vfsmount * root; | ||
12 | struct list_head list; | ||
13 | wait_queue_head_t poll; | ||
14 | int event; | ||
15 | }; | ||
16 | |||
17 | extern int copy_mnt_ns(int, struct task_struct *); | ||
18 | extern void __put_mnt_ns(struct mnt_namespace *ns); | ||
19 | extern struct mnt_namespace *dup_mnt_ns(struct task_struct *, | ||
20 | struct fs_struct *); | ||
21 | |||
22 | static inline void put_mnt_ns(struct mnt_namespace *ns) | ||
23 | { | ||
24 | if (atomic_dec_and_lock(&ns->count, &vfsmount_lock)) | ||
25 | /* releases vfsmount_lock */ | ||
26 | __put_mnt_ns(ns); | ||
27 | } | ||
28 | |||
29 | static inline void exit_mnt_ns(struct task_struct *p) | ||
30 | { | ||
31 | struct mnt_namespace *ns = p->nsproxy->mnt_ns; | ||
32 | if (ns) | ||
33 | put_mnt_ns(ns); | ||
34 | } | ||
35 | |||
36 | static inline void get_mnt_ns(struct mnt_namespace *ns) | ||
37 | { | ||
38 | atomic_inc(&ns->count); | ||
39 | } | ||
40 | |||
41 | #endif | ||
42 | #endif | ||
diff --git a/include/linux/module.h b/include/linux/module.h index d33df2408e05..419d3ef293dd 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. */ |
@@ -263,7 +264,7 @@ struct module | |||
263 | struct module_attribute *modinfo_attrs; | 264 | struct module_attribute *modinfo_attrs; |
264 | const char *version; | 265 | const char *version; |
265 | const char *srcversion; | 266 | const char *srcversion; |
266 | struct kobject *drivers_dir; | 267 | struct kobject *holders_dir; |
267 | 268 | ||
268 | /* Exported symbols */ | 269 | /* Exported symbols */ |
269 | const struct kernel_symbol *syms; | 270 | const struct kernel_symbol *syms; |
@@ -319,6 +320,13 @@ struct module | |||
319 | 320 | ||
320 | unsigned int taints; /* same bits as kernel:tainted */ | 321 | unsigned int taints; /* same bits as kernel:tainted */ |
321 | 322 | ||
323 | #ifdef CONFIG_GENERIC_BUG | ||
324 | /* Support for BUG */ | ||
325 | struct list_head bug_list; | ||
326 | struct bug_entry *bug_table; | ||
327 | unsigned num_bugs; | ||
328 | #endif | ||
329 | |||
322 | #ifdef CONFIG_MODULE_UNLOAD | 330 | #ifdef CONFIG_MODULE_UNLOAD |
323 | /* Reference counts */ | 331 | /* Reference counts */ |
324 | struct module_ref ref[NR_CPUS]; | 332 | struct module_ref ref[NR_CPUS]; |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 403d1a97c512..1b7e178b0d84 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -20,13 +20,14 @@ | |||
20 | struct super_block; | 20 | struct super_block; |
21 | struct vfsmount; | 21 | struct vfsmount; |
22 | struct dentry; | 22 | struct dentry; |
23 | struct namespace; | 23 | struct mnt_namespace; |
24 | 24 | ||
25 | #define MNT_NOSUID 0x01 | 25 | #define MNT_NOSUID 0x01 |
26 | #define MNT_NODEV 0x02 | 26 | #define MNT_NODEV 0x02 |
27 | #define MNT_NOEXEC 0x04 | 27 | #define MNT_NOEXEC 0x04 |
28 | #define MNT_NOATIME 0x08 | 28 | #define MNT_NOATIME 0x08 |
29 | #define MNT_NODIRATIME 0x10 | 29 | #define MNT_NODIRATIME 0x10 |
30 | #define MNT_RELATIME 0x20 | ||
30 | 31 | ||
31 | #define MNT_SHRINKABLE 0x100 | 32 | #define MNT_SHRINKABLE 0x100 |
32 | 33 | ||
@@ -52,7 +53,7 @@ struct vfsmount { | |||
52 | struct list_head mnt_slave_list;/* list of slave mounts */ | 53 | struct list_head mnt_slave_list;/* list of slave mounts */ |
53 | struct list_head mnt_slave; /* slave list entry */ | 54 | struct list_head mnt_slave; /* slave list entry */ |
54 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 55 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
55 | struct namespace *mnt_namespace; /* containing namespace */ | 56 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
56 | int mnt_pinned; | 57 | int mnt_pinned; |
57 | }; | 58 | }; |
58 | 59 | ||
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/blktrans.h b/include/linux/mtd/blktrans.h index 72fc68c5ee96..9a6e2f953cba 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -24,7 +24,6 @@ struct mtd_blktrans_dev { | |||
24 | struct mtd_info *mtd; | 24 | struct mtd_info *mtd; |
25 | struct mutex lock; | 25 | struct mutex lock; |
26 | int devnum; | 26 | int devnum; |
27 | int blksize; | ||
28 | unsigned long size; | 27 | unsigned long size; |
29 | int readonly; | 28 | int readonly; |
30 | void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */ | 29 | void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */ |
@@ -36,6 +35,8 @@ struct mtd_blktrans_ops { | |||
36 | char *name; | 35 | char *name; |
37 | int major; | 36 | int major; |
38 | int part_bits; | 37 | int part_bits; |
38 | int blksize; | ||
39 | int blkshift; | ||
39 | 40 | ||
40 | /* Access functions */ | 41 | /* Access functions */ |
41 | int (*readsect)(struct mtd_blktrans_dev *dev, | 42 | int (*readsect)(struct mtd_blktrans_dev *dev, |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 94a443d45258..d644e57703ad 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #define MTD_CHAR_MAJOR 90 | 24 | #define MTD_CHAR_MAJOR 90 |
25 | #define MTD_BLOCK_MAJOR 31 | 25 | #define MTD_BLOCK_MAJOR 31 |
26 | #define MAX_MTD_DEVICES 16 | 26 | #define MAX_MTD_DEVICES 32 |
27 | 27 | ||
28 | #define MTD_ERASE_PENDING 0x01 | 28 | #define MTD_ERASE_PENDING 0x01 |
29 | #define MTD_ERASING 0x02 | 29 | #define MTD_ERASING 0x02 |
@@ -75,15 +75,12 @@ typedef enum { | |||
75 | * struct mtd_oob_ops - oob operation operands | 75 | * struct mtd_oob_ops - oob operation operands |
76 | * @mode: operation mode | 76 | * @mode: operation mode |
77 | * | 77 | * |
78 | * @len: number of bytes to write/read. When a data buffer is given | 78 | * @len: number of data bytes to write/read |
79 | * (datbuf != NULL) this is the number of data bytes. When | ||
80 | * no data buffer is available this is the number of oob bytes. | ||
81 | * | 79 | * |
82 | * @retlen: number of bytes written/read. When a data buffer is given | 80 | * @retlen: number of data bytes written/read |
83 | * (datbuf != NULL) this is the number of data bytes. When | ||
84 | * no data buffer is available this is the number of oob bytes. | ||
85 | * | 81 | * |
86 | * @ooblen: number of oob bytes per page | 82 | * @ooblen: number of oob bytes to write/read |
83 | * @oobretlen: number of oob bytes written/read | ||
87 | * @ooboffs: offset of oob data in the oob area (only relevant when | 84 | * @ooboffs: offset of oob data in the oob area (only relevant when |
88 | * mode = MTD_OOB_PLACE) | 85 | * mode = MTD_OOB_PLACE) |
89 | * @datbuf: data buffer - if NULL only oob data are read/written | 86 | * @datbuf: data buffer - if NULL only oob data are read/written |
@@ -94,6 +91,7 @@ struct mtd_oob_ops { | |||
94 | size_t len; | 91 | size_t len; |
95 | size_t retlen; | 92 | size_t retlen; |
96 | size_t ooblen; | 93 | size_t ooblen; |
94 | size_t oobretlen; | ||
97 | uint32_t ooboffs; | 95 | uint32_t ooboffs; |
98 | uint8_t *datbuf; | 96 | uint8_t *datbuf; |
99 | uint8_t *oobbuf; | 97 | uint8_t *oobbuf; |
@@ -202,11 +200,20 @@ struct mtd_info { | |||
202 | 200 | ||
203 | /* ECC status information */ | 201 | /* ECC status information */ |
204 | struct mtd_ecc_stats ecc_stats; | 202 | struct mtd_ecc_stats ecc_stats; |
203 | /* Subpage shift (NAND) */ | ||
204 | int subpage_sft; | ||
205 | 205 | ||
206 | void *priv; | 206 | void *priv; |
207 | 207 | ||
208 | struct module *owner; | 208 | struct module *owner; |
209 | int usecount; | 209 | int usecount; |
210 | |||
211 | /* If the driver is something smart, like UBI, it may need to maintain | ||
212 | * its own reference counting. The below functions are only for driver. | ||
213 | * The driver may register its callbacks. These callbacks are not | ||
214 | * supposed to be called by MTD users */ | ||
215 | int (*get_device) (struct mtd_info *mtd); | ||
216 | void (*put_device) (struct mtd_info *mtd); | ||
210 | }; | 217 | }; |
211 | 218 | ||
212 | 219 | ||
@@ -216,6 +223,7 @@ extern int add_mtd_device(struct mtd_info *mtd); | |||
216 | extern int del_mtd_device (struct mtd_info *mtd); | 223 | extern int del_mtd_device (struct mtd_info *mtd); |
217 | 224 | ||
218 | extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num); | 225 | extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num); |
226 | extern struct mtd_info *get_mtd_device_nm(const char *name); | ||
219 | 227 | ||
220 | extern void put_mtd_device(struct mtd_info *mtd); | 228 | extern void put_mtd_device(struct mtd_info *mtd); |
221 | 229 | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 8b3ef4187219..2071b02f0526 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -166,6 +166,9 @@ typedef enum { | |||
166 | * for all large page devices, as they do not support | 166 | * for all large page devices, as they do not support |
167 | * autoincrement.*/ | 167 | * autoincrement.*/ |
168 | #define NAND_NO_READRDY 0x00000100 | 168 | #define NAND_NO_READRDY 0x00000100 |
169 | /* Chip does not allow subpage writes */ | ||
170 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 | ||
171 | |||
169 | 172 | ||
170 | /* Options valid for Samsung large page devices */ | 173 | /* Options valid for Samsung large page devices */ |
171 | #define NAND_SAMSUNG_LP_OPTIONS \ | 174 | #define NAND_SAMSUNG_LP_OPTIONS \ |
@@ -193,6 +196,9 @@ typedef enum { | |||
193 | /* Nand scan has allocated controller struct */ | 196 | /* Nand scan has allocated controller struct */ |
194 | #define NAND_CONTROLLER_ALLOC 0x80000000 | 197 | #define NAND_CONTROLLER_ALLOC 0x80000000 |
195 | 198 | ||
199 | /* Cell info constants */ | ||
200 | #define NAND_CI_CHIPNR_MSK 0x03 | ||
201 | #define NAND_CI_CELLTYPE_MSK 0x0C | ||
196 | 202 | ||
197 | /* | 203 | /* |
198 | * nand_state_t - chip states | 204 | * nand_state_t - chip states |
@@ -286,9 +292,7 @@ struct nand_ecc_ctrl { | |||
286 | * struct nand_buffers - buffer structure for read/write | 292 | * struct nand_buffers - buffer structure for read/write |
287 | * @ecccalc: buffer for calculated ecc | 293 | * @ecccalc: buffer for calculated ecc |
288 | * @ecccode: buffer for ecc read from flash | 294 | * @ecccode: buffer for ecc read from flash |
289 | * @oobwbuf: buffer for write oob data | ||
290 | * @databuf: buffer for data - dynamically sized | 295 | * @databuf: buffer for data - dynamically sized |
291 | * @oobrbuf: buffer to read oob data | ||
292 | * | 296 | * |
293 | * Do not change the order of buffers. databuf and oobrbuf must be in | 297 | * Do not change the order of buffers. databuf and oobrbuf must be in |
294 | * consecutive order. | 298 | * consecutive order. |
@@ -296,9 +300,7 @@ struct nand_ecc_ctrl { | |||
296 | struct nand_buffers { | 300 | struct nand_buffers { |
297 | uint8_t ecccalc[NAND_MAX_OOBSIZE]; | 301 | uint8_t ecccalc[NAND_MAX_OOBSIZE]; |
298 | uint8_t ecccode[NAND_MAX_OOBSIZE]; | 302 | uint8_t ecccode[NAND_MAX_OOBSIZE]; |
299 | uint8_t oobwbuf[NAND_MAX_OOBSIZE]; | 303 | uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE]; |
300 | uint8_t databuf[NAND_MAX_PAGESIZE]; | ||
301 | uint8_t oobrbuf[NAND_MAX_OOBSIZE]; | ||
302 | }; | 304 | }; |
303 | 305 | ||
304 | /** | 306 | /** |
@@ -345,6 +347,7 @@ struct nand_buffers { | |||
345 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 347 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
346 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 348 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
347 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf | 349 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf |
350 | * @subpagesize: [INTERN] holds the subpagesize | ||
348 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 351 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
349 | * @bbt: [INTERN] bad block table pointer | 352 | * @bbt: [INTERN] bad block table pointer |
350 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup | 353 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup |
@@ -392,6 +395,8 @@ struct nand_chip { | |||
392 | unsigned long chipsize; | 395 | unsigned long chipsize; |
393 | int pagemask; | 396 | int pagemask; |
394 | int pagebuf; | 397 | int pagebuf; |
398 | int subpagesize; | ||
399 | uint8_t cellinfo; | ||
395 | int badblockpos; | 400 | int badblockpos; |
396 | 401 | ||
397 | nand_state_t state; | 402 | nand_state_t state; |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 6f045b586e76..f775a7af3890 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define __LINUX_MTD_ONENAND_H | 13 | #define __LINUX_MTD_ONENAND_H |
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/completion.h> | ||
16 | #include <linux/mtd/onenand_regs.h> | 17 | #include <linux/mtd/onenand_regs.h> |
17 | #include <linux/mtd/bbm.h> | 18 | #include <linux/mtd/bbm.h> |
18 | 19 | ||
@@ -33,7 +34,6 @@ typedef enum { | |||
33 | FL_WRITING, | 34 | FL_WRITING, |
34 | FL_ERASING, | 35 | FL_ERASING, |
35 | FL_SYNCING, | 36 | FL_SYNCING, |
36 | FL_UNLOCKING, | ||
37 | FL_LOCKING, | 37 | FL_LOCKING, |
38 | FL_RESETING, | 38 | FL_RESETING, |
39 | FL_OTPING, | 39 | FL_OTPING, |
@@ -88,6 +88,7 @@ struct onenand_bufferram { | |||
88 | * operation is in progress | 88 | * operation is in progress |
89 | * @state: [INTERN] the current state of the OneNAND device | 89 | * @state: [INTERN] the current state of the OneNAND device |
90 | * @page_buf: data buffer | 90 | * @page_buf: data buffer |
91 | * @subpagesize: [INTERN] holds the subpagesize | ||
91 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 92 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
92 | * @bbm: [REPLACEABLE] pointer to Bad Block Management | 93 | * @bbm: [REPLACEABLE] pointer to Bad Block Management |
93 | * @priv: [OPTIONAL] pointer to private chip date | 94 | * @priv: [OPTIONAL] pointer to private chip date |
@@ -120,11 +121,15 @@ struct onenand_chip { | |||
120 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); | 121 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); |
121 | int (*scan_bbt)(struct mtd_info *mtd); | 122 | int (*scan_bbt)(struct mtd_info *mtd); |
122 | 123 | ||
124 | struct completion complete; | ||
125 | int irq; | ||
126 | |||
123 | spinlock_t chip_lock; | 127 | spinlock_t chip_lock; |
124 | wait_queue_head_t wq; | 128 | wait_queue_head_t wq; |
125 | onenand_state_t state; | 129 | onenand_state_t state; |
126 | unsigned char *page_buf; | 130 | unsigned char *page_buf; |
127 | 131 | ||
132 | int subpagesize; | ||
128 | struct nand_ecclayout *ecclayout; | 133 | struct nand_ecclayout *ecclayout; |
129 | 134 | ||
130 | void *bbm; | 135 | void *bbm; |
@@ -138,6 +143,7 @@ struct onenand_chip { | |||
138 | #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) | 143 | #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) |
139 | #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) | 144 | #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) |
140 | #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) | 145 | #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) |
146 | #define ONENAND_SET_PREV_BUFFERRAM(this) (this->bufferram_index ^= 1) | ||
141 | 147 | ||
142 | #define ONENAND_GET_SYS_CFG1(this) \ | 148 | #define ONENAND_GET_SYS_CFG1(this) \ |
143 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) | 149 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) |
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index 9e409fe6ded6..e31c8f5d4271 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
@@ -179,6 +179,7 @@ | |||
179 | * ECC Status Reigser FF00h (R) | 179 | * ECC Status Reigser FF00h (R) |
180 | */ | 180 | */ |
181 | #define ONENAND_ECC_1BIT (1 << 0) | 181 | #define ONENAND_ECC_1BIT (1 << 0) |
182 | #define ONENAND_ECC_1BIT_ALL (0x5555) | ||
182 | #define ONENAND_ECC_2BIT (1 << 1) | 183 | #define ONENAND_ECC_2BIT (1 << 1) |
183 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) | 184 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) |
184 | 185 | ||
diff --git a/include/linux/mtio.h b/include/linux/mtio.h index 8c66151821e3..6f8d2d45a8fb 100644 --- a/include/linux/mtio.h +++ b/include/linux/mtio.h | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | #include <linux/qic117.h> | ||
14 | 13 | ||
15 | /* | 14 | /* |
16 | * Structures and definitions for mag tape io control commands | 15 | * Structures and definitions for mag tape io control commands |
@@ -116,32 +115,6 @@ struct mtget { | |||
116 | #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ | 115 | #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ |
117 | #define MT_ISFTAPE_FLAG 0x800000 | 116 | #define MT_ISFTAPE_FLAG 0x800000 |
118 | 117 | ||
119 | struct mt_tape_info { | ||
120 | long t_type; /* device type id (mt_type) */ | ||
121 | char *t_name; /* descriptive name */ | ||
122 | }; | ||
123 | |||
124 | #define MT_TAPE_INFO { \ | ||
125 | {MT_ISUNKNOWN, "Unknown type of tape device"}, \ | ||
126 | {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \ | ||
127 | {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \ | ||
128 | {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \ | ||
129 | {MT_ISCMSJ500, "CMS Jumbo 500"}, \ | ||
130 | {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \ | ||
131 | {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \ | ||
132 | {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \ | ||
133 | {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \ | ||
134 | {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \ | ||
135 | {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \ | ||
136 | {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \ | ||
137 | {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \ | ||
138 | {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \ | ||
139 | {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, \ | ||
140 | {MT_ISSCSI1, "Generic SCSI-1 tape"}, \ | ||
141 | {MT_ISSCSI2, "Generic SCSI-2 tape"}, \ | ||
142 | {0, NULL} \ | ||
143 | } | ||
144 | |||
145 | 118 | ||
146 | /* structure for MTIOCPOS - mag tape get position command */ | 119 | /* structure for MTIOCPOS - mag tape get position command */ |
147 | 120 | ||
@@ -150,130 +123,11 @@ struct mtpos { | |||
150 | }; | 123 | }; |
151 | 124 | ||
152 | 125 | ||
153 | /* structure for MTIOCVOLINFO, query information about the volume | ||
154 | * currently positioned at (zftape) | ||
155 | */ | ||
156 | struct mtvolinfo { | ||
157 | unsigned int mt_volno; /* vol-number */ | ||
158 | unsigned int mt_blksz; /* blocksize used when recording */ | ||
159 | unsigned int mt_rawsize; /* raw tape space consumed, in kb */ | ||
160 | unsigned int mt_size; /* volume size after decompression, in kb */ | ||
161 | unsigned int mt_cmpr:1; /* this volume has been compressed */ | ||
162 | }; | ||
163 | |||
164 | /* raw access to a floppy drive, read and write an arbitrary segment. | ||
165 | * For ftape/zftape to support formatting etc. | ||
166 | */ | ||
167 | #define MT_FT_RD_SINGLE 0 | ||
168 | #define MT_FT_RD_AHEAD 1 | ||
169 | #define MT_FT_WR_ASYNC 0 /* start tape only when all buffers are full */ | ||
170 | #define MT_FT_WR_MULTI 1 /* start tape, continue until buffers are empty */ | ||
171 | #define MT_FT_WR_SINGLE 2 /* write a single segment and stop afterwards */ | ||
172 | #define MT_FT_WR_DELETE 3 /* write deleted data marks, one segment at time */ | ||
173 | |||
174 | struct mtftseg | ||
175 | { | ||
176 | unsigned mt_segno; /* the segment to read or write */ | ||
177 | unsigned mt_mode; /* modes for read/write (sync/async etc.) */ | ||
178 | int mt_result; /* result of r/w request, not of the ioctl */ | ||
179 | void __user *mt_data; /* User space buffer: must be 29kb */ | ||
180 | }; | ||
181 | |||
182 | /* get tape capacity (ftape/zftape) | ||
183 | */ | ||
184 | struct mttapesize { | ||
185 | unsigned long mt_capacity; /* entire, uncompressed capacity | ||
186 | * of a cartridge | ||
187 | */ | ||
188 | unsigned long mt_used; /* what has been used so far, raw | ||
189 | * uncompressed amount | ||
190 | */ | ||
191 | }; | ||
192 | |||
193 | /* possible values of the ftfmt_op field | ||
194 | */ | ||
195 | #define FTFMT_SET_PARMS 1 /* set software parms */ | ||
196 | #define FTFMT_GET_PARMS 2 /* get software parms */ | ||
197 | #define FTFMT_FORMAT_TRACK 3 /* start formatting a tape track */ | ||
198 | #define FTFMT_STATUS 4 /* monitor formatting a tape track */ | ||
199 | #define FTFMT_VERIFY 5 /* verify the given segment */ | ||
200 | |||
201 | struct ftfmtparms { | ||
202 | unsigned char ft_qicstd; /* QIC-40/QIC-80/QIC-3010/QIC-3020 */ | ||
203 | unsigned char ft_fmtcode; /* Refer to the QIC specs */ | ||
204 | unsigned char ft_fhm; /* floppy head max */ | ||
205 | unsigned char ft_ftm; /* floppy track max */ | ||
206 | unsigned short ft_spt; /* segments per track */ | ||
207 | unsigned short ft_tpc; /* tracks per cartridge */ | ||
208 | }; | ||
209 | |||
210 | struct ftfmttrack { | ||
211 | unsigned int ft_track; /* track to format */ | ||
212 | unsigned char ft_gap3; /* size of gap3, for FORMAT_TRK */ | ||
213 | }; | ||
214 | |||
215 | struct ftfmtstatus { | ||
216 | unsigned int ft_segment; /* segment currently being formatted */ | ||
217 | }; | ||
218 | |||
219 | struct ftfmtverify { | ||
220 | unsigned int ft_segment; /* segment to verify */ | ||
221 | unsigned long ft_bsm; /* bsm as result of VERIFY cmd */ | ||
222 | }; | ||
223 | |||
224 | struct mtftformat { | ||
225 | unsigned int fmt_op; /* operation to perform */ | ||
226 | union fmt_arg { | ||
227 | struct ftfmtparms fmt_parms; /* format parameters */ | ||
228 | struct ftfmttrack fmt_track; /* ctrl while formatting */ | ||
229 | struct ftfmtstatus fmt_status; | ||
230 | struct ftfmtverify fmt_verify; /* for verifying */ | ||
231 | } fmt_arg; | ||
232 | }; | ||
233 | |||
234 | struct mtftcmd { | ||
235 | unsigned int ft_wait_before; /* timeout to wait for drive to get ready | ||
236 | * before command is sent. Milliseconds | ||
237 | */ | ||
238 | qic117_cmd_t ft_cmd; /* command to send */ | ||
239 | unsigned char ft_parm_cnt; /* zero: no parm is sent. */ | ||
240 | unsigned char ft_parms[3]; /* parameter(s) to send to | ||
241 | * the drive. The parms are nibbles | ||
242 | * driver sends cmd + 2 step pulses */ | ||
243 | unsigned int ft_result_bits; /* if non zero, number of bits | ||
244 | * returned by the tape drive | ||
245 | */ | ||
246 | unsigned int ft_result; /* the result returned by the tape drive*/ | ||
247 | unsigned int ft_wait_after; /* timeout to wait for drive to get ready | ||
248 | * after command is sent. 0: don't wait */ | ||
249 | int ft_status; /* status returned by ready wait | ||
250 | * undefined if timeout was 0. | ||
251 | */ | ||
252 | int ft_error; /* error code if error status was set by | ||
253 | * command | ||
254 | */ | ||
255 | }; | ||
256 | |||
257 | /* mag tape io control commands */ | 126 | /* mag tape io control commands */ |
258 | #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ | 127 | #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ |
259 | #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ | 128 | #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ |
260 | #define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ | 129 | #define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ |
261 | 130 | ||
262 | /* The next two are used by the QIC-02 driver for runtime reconfiguration. | ||
263 | * See tpqic02.h for struct mtconfiginfo. | ||
264 | */ | ||
265 | #define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* get tape config */ | ||
266 | #define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* set tape config */ | ||
267 | |||
268 | /* the next six are used by the floppy ftape drivers and its frontends | ||
269 | * sorry, but MTIOCTOP commands are write only. | ||
270 | */ | ||
271 | #define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg) /* read a segment */ | ||
272 | #define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg) /* write a segment */ | ||
273 | #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo) /* info about volume */ | ||
274 | #define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)/* get cartridge size*/ | ||
275 | #define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat) /* format ftape */ | ||
276 | #define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */ | ||
277 | 131 | ||
278 | /* Generic Mag Tape (device independent) status macros for examining | 132 | /* Generic Mag Tape (device independent) status macros for examining |
279 | * mt_gstat -- HP-UX compatible. | 133 | * mt_gstat -- HP-UX compatible. |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index b2b91c477563..b81bc2adaeff 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -105,7 +105,7 @@ do { \ | |||
105 | extern void __mutex_init(struct mutex *lock, const char *name, | 105 | extern void __mutex_init(struct mutex *lock, const char *name, |
106 | struct lock_class_key *key); | 106 | struct lock_class_key *key); |
107 | 107 | ||
108 | /*** | 108 | /** |
109 | * mutex_is_locked - is the mutex locked | 109 | * mutex_is_locked - is the mutex locked |
110 | * @lock: the mutex to be queried | 110 | * @lock: the mutex to be queried |
111 | * | 111 | * |
@@ -125,8 +125,10 @@ extern int fastcall mutex_lock_interruptible(struct mutex *lock); | |||
125 | 125 | ||
126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
127 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 127 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
128 | extern int mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass); | ||
128 | #else | 129 | #else |
129 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) | 130 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) |
131 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) | ||
130 | #endif | 132 | #endif |
131 | 133 | ||
132 | /* | 134 | /* |
diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h index db4f3776978a..de24af79ebd3 100644 --- a/include/linux/n_r3964.h +++ b/include/linux/n_r3964.h | |||
@@ -116,7 +116,7 @@ struct r3964_message; | |||
116 | 116 | ||
117 | struct r3964_client_info { | 117 | struct r3964_client_info { |
118 | spinlock_t lock; | 118 | spinlock_t lock; |
119 | pid_t pid; | 119 | struct pid *pid; |
120 | unsigned int sig_flags; | 120 | unsigned int sig_flags; |
121 | 121 | ||
122 | struct r3964_client_info *next; | 122 | struct r3964_client_info *next; |
diff --git a/include/linux/namei.h b/include/linux/namei.h index f5f19606effb..d39a5a67e979 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -29,6 +29,11 @@ struct nameidata { | |||
29 | } intent; | 29 | } intent; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | struct path { | ||
33 | struct vfsmount *mnt; | ||
34 | struct dentry *dentry; | ||
35 | }; | ||
36 | |||
32 | /* | 37 | /* |
33 | * Type of the last component on LOOKUP_PARENT | 38 | * Type of the last component on LOOKUP_PARENT |
34 | */ | 39 | */ |
diff --git a/include/linux/namespace.h b/include/linux/namespace.h deleted file mode 100644 index d137009f0b2b..000000000000 --- a/include/linux/namespace.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef _NAMESPACE_H_ | ||
2 | #define _NAMESPACE_H_ | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <linux/mount.h> | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/nsproxy.h> | ||
8 | |||
9 | struct namespace { | ||
10 | atomic_t count; | ||
11 | struct vfsmount * root; | ||
12 | struct list_head list; | ||
13 | wait_queue_head_t poll; | ||
14 | int event; | ||
15 | }; | ||
16 | |||
17 | extern int copy_namespace(int, struct task_struct *); | ||
18 | extern void __put_namespace(struct namespace *namespace); | ||
19 | extern struct namespace *dup_namespace(struct task_struct *, struct fs_struct *); | ||
20 | |||
21 | static inline void put_namespace(struct namespace *namespace) | ||
22 | { | ||
23 | if (atomic_dec_and_lock(&namespace->count, &vfsmount_lock)) | ||
24 | /* releases vfsmount_lock */ | ||
25 | __put_namespace(namespace); | ||
26 | } | ||
27 | |||
28 | static inline void exit_namespace(struct task_struct *p) | ||
29 | { | ||
30 | struct namespace *namespace = p->nsproxy->namespace; | ||
31 | if (namespace) { | ||
32 | put_namespace(namespace); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | static inline void get_namespace(struct namespace *namespace) | ||
37 | { | ||
38 | atomic_inc(&namespace->count); | ||
39 | } | ||
40 | |||
41 | #endif | ||
42 | #endif | ||
diff --git a/include/linux/ncp_mount.h b/include/linux/ncp_mount.h index f46bddcdbd3b..a2b549eb1eca 100644 --- a/include/linux/ncp_mount.h +++ b/include/linux/ncp_mount.h | |||
@@ -75,7 +75,7 @@ struct ncp_mount_data_kernel { | |||
75 | unsigned int int_flags; /* internal flags */ | 75 | unsigned int int_flags; /* internal flags */ |
76 | #define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001 | 76 | #define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001 |
77 | __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */ | 77 | __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */ |
78 | __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */ | 78 | struct pid *wdog_pid; /* Who cares for our watchdog packets? */ |
79 | unsigned int ncp_fd; /* The socket to the ncp port */ | 79 | unsigned int ncp_fd; /* The socket to the ncp port */ |
80 | unsigned int time_out; /* How long should I wait after | 80 | unsigned int time_out; /* How long should I wait after |
81 | sending a NCP request? */ | 81 | sending a NCP request? */ |
diff --git a/include/linux/net.h b/include/linux/net.h index 6f0dfeba509a..4db21e63d8d2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -19,13 +19,12 @@ | |||
19 | #define _LINUX_NET_H | 19 | #define _LINUX_NET_H |
20 | 20 | ||
21 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
22 | #include <linux/random.h> | ||
23 | #include <asm/socket.h> | 22 | #include <asm/socket.h> |
24 | 23 | ||
25 | struct poll_table_struct; | 24 | struct poll_table_struct; |
26 | struct inode; | 25 | struct inode; |
27 | 26 | ||
28 | #define NPROTO 32 /* should be enough for now.. */ | 27 | #define NPROTO 33 /* should be enough for now.. */ |
29 | 28 | ||
30 | #define SYS_SOCKET 1 /* sys_socket(2) */ | 29 | #define SYS_SOCKET 1 /* sys_socket(2) */ |
31 | #define SYS_BIND 2 /* sys_bind(2) */ | 30 | #define SYS_BIND 2 /* sys_bind(2) */ |
@@ -57,6 +56,7 @@ typedef enum { | |||
57 | 56 | ||
58 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
59 | #include <linux/stringify.h> | 58 | #include <linux/stringify.h> |
59 | #include <linux/random.h> | ||
60 | 60 | ||
61 | #define SOCK_ASYNC_NOSPACE 0 | 61 | #define SOCK_ASYNC_NOSPACE 0 |
62 | #define SOCK_ASYNC_WAITDATA 1 | 62 | #define SOCK_ASYNC_WAITDATA 1 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c57088f575a3..1a528548cd1d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -193,13 +193,20 @@ struct hh_cache | |||
193 | { | 193 | { |
194 | struct hh_cache *hh_next; /* Next entry */ | 194 | struct hh_cache *hh_next; /* Next entry */ |
195 | atomic_t hh_refcnt; /* number of users */ | 195 | atomic_t hh_refcnt; /* number of users */ |
196 | __be16 hh_type; /* protocol identifier, f.e ETH_P_IP | 196 | /* |
197 | * We want hh_output, hh_len, hh_lock and hh_data be a in a separate | ||
198 | * cache line on SMP. | ||
199 | * They are mostly read, but hh_refcnt may be changed quite frequently, | ||
200 | * incurring cache line ping pongs. | ||
201 | */ | ||
202 | __be16 hh_type ____cacheline_aligned_in_smp; | ||
203 | /* protocol identifier, f.e ETH_P_IP | ||
197 | * NOTE: For VLANs, this will be the | 204 | * NOTE: For VLANs, this will be the |
198 | * encapuslated type. --BLG | 205 | * encapuslated type. --BLG |
199 | */ | 206 | */ |
200 | u16 hh_len; /* length of header */ | 207 | u16 hh_len; /* length of header */ |
201 | int (*hh_output)(struct sk_buff *skb); | 208 | int (*hh_output)(struct sk_buff *skb); |
202 | rwlock_t hh_lock; | 209 | seqlock_t hh_lock; |
203 | 210 | ||
204 | /* cached hardware header; allow for machine alignment needs. */ | 211 | /* cached hardware header; allow for machine alignment needs. */ |
205 | #define HH_DATA_MOD 16 | 212 | #define HH_DATA_MOD 16 |
@@ -522,10 +529,11 @@ struct net_device | |||
522 | struct net_bridge_port *br_port; | 529 | struct net_bridge_port *br_port; |
523 | 530 | ||
524 | /* class/net/name entry */ | 531 | /* class/net/name entry */ |
525 | struct class_device class_dev; | 532 | struct device dev; |
526 | /* space for optional statistics and wireless sysfs groups */ | 533 | /* space for optional statistics and wireless sysfs groups */ |
527 | struct attribute_group *sysfs_groups[3]; | 534 | struct attribute_group *sysfs_groups[3]; |
528 | }; | 535 | }; |
536 | #define to_net_dev(d) container_of(d, struct net_device, dev) | ||
529 | 537 | ||
530 | #define NETDEV_ALIGN 32 | 538 | #define NETDEV_ALIGN 32 |
531 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 539 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
@@ -541,7 +549,7 @@ static inline void *netdev_priv(struct net_device *dev) | |||
541 | /* Set the sysfs physical device reference for the network logical device | 549 | /* Set the sysfs physical device reference for the network logical device |
542 | * if set prior to registration will cause a symlink during initialization. | 550 | * if set prior to registration will cause a symlink during initialization. |
543 | */ | 551 | */ |
544 | #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) | 552 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) |
545 | 553 | ||
546 | struct packet_type { | 554 | struct packet_type { |
547 | __be16 type; /* This is really htons(ether_type). */ | 555 | __be16 type; /* This is really htons(ether_type). */ |
@@ -581,7 +589,7 @@ extern int dev_open(struct net_device *dev); | |||
581 | extern int dev_close(struct net_device *dev); | 589 | extern int dev_close(struct net_device *dev); |
582 | extern int dev_queue_xmit(struct sk_buff *skb); | 590 | extern int dev_queue_xmit(struct sk_buff *skb); |
583 | extern int register_netdevice(struct net_device *dev); | 591 | extern int register_netdevice(struct net_device *dev); |
584 | extern int unregister_netdevice(struct net_device *dev); | 592 | extern void unregister_netdevice(struct net_device *dev); |
585 | extern void free_netdev(struct net_device *dev); | 593 | extern void free_netdev(struct net_device *dev); |
586 | extern void synchronize_net(void); | 594 | extern void synchronize_net(void); |
587 | extern int register_netdevice_notifier(struct notifier_block *nb); | 595 | extern int register_netdevice_notifier(struct notifier_block *nb); |
@@ -899,6 +907,7 @@ static inline void netif_poll_disable(struct net_device *dev) | |||
899 | 907 | ||
900 | static inline void netif_poll_enable(struct net_device *dev) | 908 | static inline void netif_poll_enable(struct net_device *dev) |
901 | { | 909 | { |
910 | smp_mb__before_clear_bit(); | ||
902 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); | 911 | clear_bit(__LINK_STATE_RX_SCHED, &dev->state); |
903 | } | 912 | } |
904 | 913 | ||
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 6b01ba297727..007af4c2770b 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -25,7 +25,10 @@ enum tcp_conntrack { | |||
25 | #define IP_CT_TCP_FLAG_SACK_PERM 0x02 | 25 | #define IP_CT_TCP_FLAG_SACK_PERM 0x02 |
26 | 26 | ||
27 | /* This sender sent FIN first */ | 27 | /* This sender sent FIN first */ |
28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x03 | 28 | #define IP_CT_TCP_FLAG_CLOSE_INIT 0x04 |
29 | |||
30 | /* Be liberal in window checking */ | ||
31 | #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 | ||
29 | 32 | ||
30 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
31 | 34 | ||
@@ -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_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 0be235418a2f..24c8786d12e9 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -190,6 +190,7 @@ struct arpt_replace | |||
190 | 190 | ||
191 | /* The argument to ARPT_SO_ADD_COUNTERS. */ | 191 | /* The argument to ARPT_SO_ADD_COUNTERS. */ |
192 | #define arpt_counters_info xt_counters_info | 192 | #define arpt_counters_info xt_counters_info |
193 | #define arpt_counters xt_counters | ||
193 | 194 | ||
194 | /* The argument to ARPT_SO_GET_ENTRIES. */ | 195 | /* The argument to ARPT_SO_GET_ENTRIES. */ |
195 | struct arpt_get_entries | 196 | struct arpt_get_entries |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 6c4613f8ad75..55689f39f77a 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -68,7 +68,6 @@ struct bridge_skb_cb { | |||
68 | } daddr; | 68 | } daddr; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | extern int brnf_deferred_hooks; | ||
72 | #else | 71 | #else |
73 | #define nf_bridge_maybe_copy_header(skb) (0) | 72 | #define nf_bridge_maybe_copy_header(skb) (0) |
74 | #define nf_bridge_pad(skb) (0) | 73 | #define nf_bridge_pad(skb) (0) |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 5821eb5a0a3e..ceae87a4c891 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -57,10 +57,8 @@ enum nf_ip_hook_priorities { | |||
57 | NF_IP_PRI_RAW = -300, | 57 | NF_IP_PRI_RAW = -300, |
58 | NF_IP_PRI_SELINUX_FIRST = -225, | 58 | NF_IP_PRI_SELINUX_FIRST = -225, |
59 | NF_IP_PRI_CONNTRACK = -200, | 59 | NF_IP_PRI_CONNTRACK = -200, |
60 | NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175, | ||
61 | NF_IP_PRI_MANGLE = -150, | 60 | NF_IP_PRI_MANGLE = -150, |
62 | NF_IP_PRI_NAT_DST = -100, | 61 | NF_IP_PRI_NAT_DST = -100, |
63 | NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50, | ||
64 | NF_IP_PRI_FILTER = 0, | 62 | NF_IP_PRI_FILTER = 0, |
65 | NF_IP_PRI_NAT_SRC = 100, | 63 | NF_IP_PRI_NAT_SRC = 100, |
66 | NF_IP_PRI_SELINUX_LAST = 225, | 64 | NF_IP_PRI_SELINUX_LAST = 225, |
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 4f06dad0bde9..9527296595cd 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/netfilter/x_tables.h> | 28 | #include <linux/netfilter/x_tables.h> |
29 | 29 | ||
30 | #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 30 | #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN |
31 | #define IPT_TABLE_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 31 | #define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN |
32 | #define ipt_match xt_match | 32 | #define ipt_match xt_match |
33 | #define ipt_target xt_target | 33 | #define ipt_target xt_target |
34 | #define ipt_table xt_table | 34 | #define ipt_table xt_table |
@@ -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.h b/include/linux/netfilter_ipv6.h index ab81a6dc94ea..66ca8e3100dc 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -62,10 +62,8 @@ enum nf_ip6_hook_priorities { | |||
62 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, | 62 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, |
63 | NF_IP6_PRI_SELINUX_FIRST = -225, | 63 | NF_IP6_PRI_SELINUX_FIRST = -225, |
64 | NF_IP6_PRI_CONNTRACK = -200, | 64 | NF_IP6_PRI_CONNTRACK = -200, |
65 | NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD = -175, | ||
66 | NF_IP6_PRI_MANGLE = -150, | 65 | NF_IP6_PRI_MANGLE = -150, |
67 | NF_IP6_PRI_NAT_DST = -100, | 66 | NF_IP6_PRI_NAT_DST = -100, |
68 | NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50, | ||
69 | NF_IP6_PRI_FILTER = 0, | 67 | NF_IP6_PRI_FILTER = 0, |
70 | NF_IP6_PRI_NAT_SRC = 100, | 68 | NF_IP6_PRI_NAT_SRC = 100, |
71 | NF_IP6_PRI_SELINUX_LAST = 225, | 69 | NF_IP6_PRI_SELINUX_LAST = 225, |
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/nfs_fs.h b/include/linux/nfs_fs.h index 04963063e620..c5d4084773e8 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -308,6 +308,7 @@ extern int nfs_attribute_timeout(struct inode *inode); | |||
308 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); | 308 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); |
309 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); | 309 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
310 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); | 310 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); |
311 | extern int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping); | ||
311 | extern int nfs_setattr(struct dentry *, struct iattr *); | 312 | extern int nfs_setattr(struct dentry *, struct iattr *); |
312 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | 313 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); |
313 | extern void nfs_begin_attr_update(struct inode *); | 314 | extern void nfs_begin_attr_update(struct inode *); |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index edb54c3171b3..4b7c4b568f6d 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -52,8 +52,6 @@ | |||
52 | struct readdir_cd { | 52 | struct readdir_cd { |
53 | __be32 err; /* 0, nfserr, or nfserr_eof */ | 53 | __be32 err; /* 0, nfserr, or nfserr_eof */ |
54 | }; | 54 | }; |
55 | typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, | ||
56 | int, loff_t, ino_t, unsigned int); | ||
57 | typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); | 55 | typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); |
58 | 56 | ||
59 | extern struct svc_program nfsd_program; | 57 | extern struct svc_program nfsd_program; |
@@ -117,7 +115,7 @@ __be32 nfsd_unlink(struct svc_rqst *, struct svc_fh *, int type, | |||
117 | int nfsd_truncate(struct svc_rqst *, struct svc_fh *, | 115 | int nfsd_truncate(struct svc_rqst *, struct svc_fh *, |
118 | unsigned long size); | 116 | unsigned long size); |
119 | __be32 nfsd_readdir(struct svc_rqst *, struct svc_fh *, | 117 | __be32 nfsd_readdir(struct svc_rqst *, struct svc_fh *, |
120 | loff_t *, struct readdir_cd *, encode_dent_fn); | 118 | loff_t *, struct readdir_cd *, filldir_t); |
121 | __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, | 119 | __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, |
122 | struct kstatfs *); | 120 | struct kstatfs *); |
123 | 121 | ||
@@ -275,12 +273,12 @@ static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh) | |||
275 | * we might process an operation with side effects, and be unable to | 273 | * we might process an operation with side effects, and be unable to |
276 | * tell the client that the operation succeeded. | 274 | * tell the client that the operation succeeded. |
277 | * | 275 | * |
278 | * COMPOUND_SLACK_SPACE - this is the minimum amount of buffer space | 276 | * COMPOUND_SLACK_SPACE - this is the minimum bytes of buffer space |
279 | * needed to encode an "ordinary" _successful_ operation. (GETATTR, | 277 | * needed to encode an "ordinary" _successful_ operation. (GETATTR, |
280 | * READ, READDIR, and READLINK have their own buffer checks.) if we | 278 | * READ, READDIR, and READLINK have their own buffer checks.) if we |
281 | * fall below this level, we fail the next operation with NFS4ERR_RESOURCE. | 279 | * fall below this level, we fail the next operation with NFS4ERR_RESOURCE. |
282 | * | 280 | * |
283 | * COMPOUND_ERR_SLACK_SPACE - this is the minimum amount of buffer space | 281 | * COMPOUND_ERR_SLACK_SPACE - this is the minimum bytes of buffer space |
284 | * needed to encode an operation which has failed with NFS4ERR_RESOURCE. | 282 | * needed to encode an operation which has failed with NFS4ERR_RESOURCE. |
285 | * care is taken to ensure that we never fall below this level for any | 283 | * care is taken to ensure that we never fall below this level for any |
286 | * reason. | 284 | * reason. |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index f3b51d62ec7d..d9c6c382165d 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -217,11 +217,7 @@ void fh_put(struct svc_fh *); | |||
217 | static __inline__ struct svc_fh * | 217 | static __inline__ struct svc_fh * |
218 | fh_copy(struct svc_fh *dst, struct svc_fh *src) | 218 | fh_copy(struct svc_fh *dst, struct svc_fh *src) |
219 | { | 219 | { |
220 | if (src->fh_dentry || src->fh_locked) { | 220 | WARN_ON(src->fh_dentry || src->fh_locked); |
221 | struct dentry *dentry = src->fh_dentry; | ||
222 | printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n", | ||
223 | dentry->d_parent->d_name.name, dentry->d_name.name); | ||
224 | } | ||
225 | 221 | ||
226 | *dst = *src; | 222 | *dst = *src; |
227 | return dst; | 223 | return dst; |
@@ -300,10 +296,8 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass) | |||
300 | dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", | 296 | dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", |
301 | SVCFH_fmt(fhp), fhp->fh_locked); | 297 | SVCFH_fmt(fhp), fhp->fh_locked); |
302 | 298 | ||
303 | if (!fhp->fh_dentry) { | 299 | BUG_ON(!dentry); |
304 | printk(KERN_ERR "fh_lock: fh not verified!\n"); | 300 | |
305 | return; | ||
306 | } | ||
307 | if (fhp->fh_locked) { | 301 | if (fhp->fh_locked) { |
308 | printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", | 302 | printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", |
309 | dentry->d_parent->d_name.name, dentry->d_name.name); | 303 | dentry->d_parent->d_name.name, dentry->d_name.name); |
@@ -328,8 +322,7 @@ fh_lock(struct svc_fh *fhp) | |||
328 | static inline void | 322 | static inline void |
329 | fh_unlock(struct svc_fh *fhp) | 323 | fh_unlock(struct svc_fh *fhp) |
330 | { | 324 | { |
331 | if (!fhp->fh_dentry) | 325 | BUG_ON(!fhp->fh_dentry); |
332 | printk(KERN_ERR "fh_unlock: fh not verified!\n"); | ||
333 | 326 | ||
334 | if (fhp->fh_locked) { | 327 | if (fhp->fh_locked) { |
335 | fill_post_wcc(fhp); | 328 | fill_post_wcc(fhp); |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index c3673f487e84..ab5c236bd9a7 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
@@ -273,7 +273,6 @@ struct nfs4_stateid { | |||
273 | ((err) != nfserr_stale_stateid) && \ | 273 | ((err) != nfserr_stale_stateid) && \ |
274 | ((err) != nfserr_bad_stateid)) | 274 | ((err) != nfserr_bad_stateid)) |
275 | 275 | ||
276 | extern __be32 nfsd4_renew(clientid_t *clid); | ||
277 | extern __be32 nfs4_preprocess_stateid_op(struct svc_fh *current_fh, | 276 | extern __be32 nfs4_preprocess_stateid_op(struct svc_fh *current_fh, |
278 | stateid_t *stateid, int flags, struct file **filp); | 277 | stateid_t *stateid, int flags, struct file **filp); |
279 | extern void nfs4_lock_state(void); | 278 | extern void nfs4_lock_state(void); |
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h index 877192d3ae79..67885d5e6e50 100644 --- a/include/linux/nfsd/xdr.h +++ b/include/linux/nfsd/xdr.h | |||
@@ -165,8 +165,8 @@ int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *); | |||
165 | int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *); | 165 | int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *); |
166 | int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *); | 166 | int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *); |
167 | 167 | ||
168 | int nfssvc_encode_entry(struct readdir_cd *, const char *name, | 168 | int nfssvc_encode_entry(void *, const char *name, |
169 | int namlen, loff_t offset, ino_t ino, unsigned int); | 169 | int namlen, loff_t offset, u64 ino, unsigned int); |
170 | 170 | ||
171 | int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *); | 171 | int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *); |
172 | 172 | ||
diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h index 79963867b0d7..89d9d6061a62 100644 --- a/include/linux/nfsd/xdr3.h +++ b/include/linux/nfsd/xdr3.h | |||
@@ -331,11 +331,11 @@ int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *, | |||
331 | struct nfsd3_attrstat *); | 331 | struct nfsd3_attrstat *); |
332 | int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *, | 332 | int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *, |
333 | struct nfsd3_fhandle_pair *); | 333 | struct nfsd3_fhandle_pair *); |
334 | int nfs3svc_encode_entry(struct readdir_cd *, const char *name, | 334 | int nfs3svc_encode_entry(void *, const char *name, |
335 | int namlen, loff_t offset, ino_t ino, | 335 | int namlen, loff_t offset, u64 ino, |
336 | unsigned int); | 336 | unsigned int); |
337 | int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, | 337 | int nfs3svc_encode_entry_plus(void *, const char *name, |
338 | int namlen, loff_t offset, ino_t ino, | 338 | int namlen, loff_t offset, u64 ino, |
339 | unsigned int); | 339 | unsigned int); |
340 | /* Helper functions for NFSv3 ACL code */ | 340 | /* Helper functions for NFSv3 ACL code */ |
341 | __be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, | 341 | __be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, |
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 45ca01b5f844..09799bcee0ac 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
@@ -44,6 +44,12 @@ | |||
44 | #define NFSD4_MAX_TAGLEN 128 | 44 | #define NFSD4_MAX_TAGLEN 128 |
45 | #define XDR_LEN(n) (((n) + 3) & ~3) | 45 | #define XDR_LEN(n) (((n) + 3) & ~3) |
46 | 46 | ||
47 | struct nfsd4_compound_state { | ||
48 | struct svc_fh current_fh; | ||
49 | struct svc_fh save_fh; | ||
50 | struct nfs4_stateowner *replay_owner; | ||
51 | }; | ||
52 | |||
47 | struct nfsd4_change_info { | 53 | struct nfsd4_change_info { |
48 | u32 atomic; | 54 | u32 atomic; |
49 | u32 before_ctime_sec; | 55 | u32 before_ctime_sec; |
@@ -430,35 +436,39 @@ __be32 nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
430 | struct dentry *dentry, __be32 *buffer, int *countp, | 436 | struct dentry *dentry, __be32 *buffer, int *countp, |
431 | u32 *bmval, struct svc_rqst *); | 437 | u32 *bmval, struct svc_rqst *); |
432 | extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp, | 438 | extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp, |
439 | struct nfsd4_compound_state *, | ||
433 | struct nfsd4_setclientid *setclid); | 440 | struct nfsd4_setclientid *setclid); |
434 | extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp, | 441 | extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp, |
442 | struct nfsd4_compound_state *, | ||
435 | struct nfsd4_setclientid_confirm *setclientid_confirm); | 443 | struct nfsd4_setclientid_confirm *setclientid_confirm); |
436 | extern __be32 nfsd4_process_open1(struct nfsd4_open *open); | 444 | extern __be32 nfsd4_process_open1(struct nfsd4_open *open); |
437 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, | 445 | extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, |
438 | struct svc_fh *current_fh, struct nfsd4_open *open); | 446 | struct svc_fh *current_fh, struct nfsd4_open *open); |
439 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, | 447 | extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, |
440 | struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, | 448 | struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc); |
441 | struct nfs4_stateowner **); | 449 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, |
442 | extern __be32 nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 450 | struct nfsd4_compound_state *, |
443 | struct nfsd4_close *close, | 451 | struct nfsd4_close *close); |
444 | struct nfs4_stateowner **replay_owner); | ||
445 | extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp, | 452 | extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp, |
446 | struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, | 453 | struct nfsd4_compound_state *, |
447 | struct nfs4_stateowner **replay_owner); | 454 | struct nfsd4_open_downgrade *od); |
448 | extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 455 | extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *, |
449 | struct nfsd4_lock *lock, | 456 | struct nfsd4_lock *lock); |
450 | struct nfs4_stateowner **replay_owner); | 457 | extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, |
451 | extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 458 | struct nfsd4_compound_state *, |
452 | struct nfsd4_lockt *lockt); | 459 | struct nfsd4_lockt *lockt); |
453 | extern __be32 nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 460 | extern __be32 nfsd4_locku(struct svc_rqst *rqstp, |
454 | struct nfsd4_locku *locku, | 461 | struct nfsd4_compound_state *, |
455 | struct nfs4_stateowner **replay_owner); | 462 | struct nfsd4_locku *locku); |
456 | extern __be32 | 463 | extern __be32 |
457 | nfsd4_release_lockowner(struct svc_rqst *rqstp, | 464 | nfsd4_release_lockowner(struct svc_rqst *rqstp, |
465 | struct nfsd4_compound_state *, | ||
458 | struct nfsd4_release_lockowner *rlockowner); | 466 | struct nfsd4_release_lockowner *rlockowner); |
459 | extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *); | 467 | extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *); |
460 | extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp, | 468 | extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp, |
461 | struct svc_fh *current_fh, struct nfsd4_delegreturn *dr); | 469 | struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr); |
470 | extern __be32 nfsd4_renew(struct svc_rqst *rqstp, | ||
471 | struct nfsd4_compound_state *, clientid_t *clid); | ||
462 | #endif | 472 | #endif |
463 | 473 | ||
464 | /* | 474 | /* |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 971d1c6dfc4b..0b9f0dc30d61 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -4,9 +4,10 @@ | |||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | 6 | ||
7 | struct namespace; | 7 | struct mnt_namespace; |
8 | struct uts_namespace; | 8 | struct uts_namespace; |
9 | struct ipc_namespace; | 9 | struct ipc_namespace; |
10 | struct pid_namespace; | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * A structure to contain pointers to all per-process | 13 | * A structure to contain pointers to all per-process |
@@ -25,7 +26,8 @@ struct nsproxy { | |||
25 | spinlock_t nslock; | 26 | spinlock_t nslock; |
26 | struct uts_namespace *uts_ns; | 27 | struct uts_namespace *uts_ns; |
27 | struct ipc_namespace *ipc_ns; | 28 | struct ipc_namespace *ipc_ns; |
28 | struct namespace *namespace; | 29 | struct mnt_namespace *mnt_ns; |
30 | struct pid_namespace *pid_ns; | ||
29 | }; | 31 | }; |
30 | extern struct nsproxy init_nsproxy; | 32 | extern struct nsproxy init_nsproxy; |
31 | 33 | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 4830a3bedfb2..350878a2d848 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -253,15 +253,11 @@ static inline void SetPageUptodate(struct page *page) | |||
253 | 253 | ||
254 | struct page; /* forward declaration */ | 254 | struct page; /* forward declaration */ |
255 | 255 | ||
256 | int test_clear_page_dirty(struct page *page); | 256 | extern void cancel_dirty_page(struct page *page, unsigned int account_size); |
257 | |||
257 | int test_clear_page_writeback(struct page *page); | 258 | int test_clear_page_writeback(struct page *page); |
258 | int test_set_page_writeback(struct page *page); | 259 | int test_set_page_writeback(struct page *page); |
259 | 260 | ||
260 | static inline void clear_page_dirty(struct page *page) | ||
261 | { | ||
262 | test_clear_page_dirty(page); | ||
263 | } | ||
264 | |||
265 | static inline void set_page_writeback(struct page *page) | 261 | static inline void set_page_writeback(struct page *page) |
266 | { | 262 | { |
267 | test_set_page_writeback(page); | 263 | test_set_page_writeback(page); |
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 01c707261f9c..9e3042e7e1cc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -20,9 +20,6 @@ | |||
20 | /* Include the pci register defines */ | 20 | /* Include the pci register defines */ |
21 | #include <linux/pci_regs.h> | 21 | #include <linux/pci_regs.h> |
22 | 22 | ||
23 | /* Include the ID list */ | ||
24 | #include <linux/pci_ids.h> | ||
25 | |||
26 | /* | 23 | /* |
27 | * The PCI interface treats multi-function devices as independent | 24 | * The PCI interface treats multi-function devices as independent |
28 | * devices. The slot/function address of each device is encoded | 25 | * devices. The slot/function address of each device is encoded |
@@ -54,6 +51,9 @@ | |||
54 | #include <asm/atomic.h> | 51 | #include <asm/atomic.h> |
55 | #include <linux/device.h> | 52 | #include <linux/device.h> |
56 | 53 | ||
54 | /* Include the ID list */ | ||
55 | #include <linux/pci_ids.h> | ||
56 | |||
57 | /* File state for mmap()s on /proc/bus/pci/X/Y */ | 57 | /* File state for mmap()s on /proc/bus/pci/X/Y */ |
58 | enum pci_mmap_state { | 58 | enum pci_mmap_state { |
59 | pci_mmap_io, | 59 | pci_mmap_io, |
@@ -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 | { |
@@ -396,6 +405,21 @@ struct pci_driver { | |||
396 | */ | 405 | */ |
397 | #define pci_module_init pci_register_driver | 406 | #define pci_module_init pci_register_driver |
398 | 407 | ||
408 | /** | ||
409 | * PCI_VDEVICE - macro used to describe a specific pci device in short form | ||
410 | * @vend: the vendor name | ||
411 | * @dev: the 16 bit PCI Device ID | ||
412 | * | ||
413 | * This macro is used to create a struct pci_device_id that matches a | ||
414 | * specific PCI device. The subvendor, and subdevice fields will be set | ||
415 | * to PCI_ANY_ID. The macro allows the next field to follow as the device | ||
416 | * private data. | ||
417 | */ | ||
418 | |||
419 | #define PCI_VDEVICE(vendor, device) \ | ||
420 | PCI_VENDOR_ID_##vendor, (device), \ | ||
421 | PCI_ANY_ID, PCI_ANY_ID, 0, 0 | ||
422 | |||
399 | /* these external functions are only available when PCI support is enabled */ | 423 | /* these external functions are only available when PCI support is enabled */ |
400 | #ifdef CONFIG_PCI | 424 | #ifdef CONFIG_PCI |
401 | 425 | ||
@@ -448,12 +472,13 @@ extern void pci_sort_breadthfirst(void); | |||
448 | 472 | ||
449 | /* Generic PCI functions exported to card drivers */ | 473 | /* Generic PCI functions exported to card drivers */ |
450 | 474 | ||
451 | 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); |
452 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | ||
453 | 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); |
454 | int pci_find_capability (struct pci_dev *dev, int cap); | 477 | int pci_find_capability (struct pci_dev *dev, int cap); |
455 | 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); |
456 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 479 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
480 | int pci_find_ht_capability (struct pci_dev *dev, int ht_cap); | ||
481 | int pci_find_next_ht_capability (struct pci_dev *dev, int pos, int ht_cap); | ||
457 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); | 482 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); |
458 | 483 | ||
459 | struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, | 484 | struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, |
@@ -468,6 +493,7 @@ struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); | |||
468 | struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn); | 493 | struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn); |
469 | struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); | 494 | struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); |
470 | int pci_dev_present(const struct pci_device_id *ids); | 495 | int pci_dev_present(const struct pci_device_id *ids); |
496 | const struct pci_device_id *pci_find_present(const struct pci_device_id *ids); | ||
471 | 497 | ||
472 | int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val); | 498 | int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val); |
473 | int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val); | 499 | int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val); |
@@ -503,6 +529,14 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val | |||
503 | 529 | ||
504 | int __must_check pci_enable_device(struct pci_dev *dev); | 530 | int __must_check pci_enable_device(struct pci_dev *dev); |
505 | 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 | |||
506 | void pci_disable_device(struct pci_dev *dev); | 540 | void pci_disable_device(struct pci_dev *dev); |
507 | void pci_set_master(struct pci_dev *dev); | 541 | void pci_set_master(struct pci_dev *dev); |
508 | #define HAVE_PCI_SET_MWI | 542 | #define HAVE_PCI_SET_MWI |
@@ -515,6 +549,7 @@ void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | |||
515 | 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); |
516 | 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); |
517 | 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); | ||
518 | 553 | ||
519 | /* ROM control related routines */ | 554 | /* ROM control related routines */ |
520 | 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); |
@@ -543,6 +578,8 @@ int __must_check pci_request_regions(struct pci_dev *, const char *); | |||
543 | void pci_release_regions(struct pci_dev *); | 578 | void pci_release_regions(struct pci_dev *); |
544 | 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 *); |
545 | 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); | ||
546 | 583 | ||
547 | /* drivers/pci/bus.c */ | 584 | /* drivers/pci/bus.c */ |
548 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 585 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
@@ -555,10 +592,11 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | |||
555 | void pci_enable_bridges(struct pci_bus *bus); | 592 | void pci_enable_bridges(struct pci_bus *bus); |
556 | 593 | ||
557 | /* Proper probing supporting hot-pluggable devices */ | 594 | /* Proper probing supporting hot-pluggable devices */ |
558 | 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); | ||
559 | 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) |
560 | { | 598 | { |
561 | return __pci_register_driver(driver, THIS_MODULE); | 599 | return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
562 | } | 600 | } |
563 | 601 | ||
564 | void pci_unregister_driver(struct pci_driver *); | 602 | void pci_unregister_driver(struct pci_driver *); |
@@ -593,10 +631,6 @@ enum pci_dma_burst_strategy { | |||
593 | strategy_parameter byte boundaries */ | 631 | strategy_parameter byte boundaries */ |
594 | }; | 632 | }; |
595 | 633 | ||
596 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | ||
597 | extern struct pci_dev *isa_bridge; | ||
598 | #endif | ||
599 | |||
600 | struct msix_entry { | 634 | struct msix_entry { |
601 | u16 vector; /* kernel uses to write allocated vector */ | 635 | u16 vector; /* kernel uses to write allocated vector */ |
602 | u16 entry; /* driver uses to specify entry, OS writes */ | 636 | u16 entry; /* driver uses to specify entry, OS writes */ |
@@ -604,7 +638,6 @@ struct msix_entry { | |||
604 | 638 | ||
605 | 639 | ||
606 | #ifndef CONFIG_PCI_MSI | 640 | #ifndef CONFIG_PCI_MSI |
607 | static inline void pci_scan_msi_device(struct pci_dev *dev) {} | ||
608 | 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;} |
609 | static inline void pci_disable_msi(struct pci_dev *dev) {} | 642 | static inline void pci_disable_msi(struct pci_dev *dev) {} |
610 | static inline int pci_enable_msix(struct pci_dev* dev, | 643 | static inline int pci_enable_msix(struct pci_dev* dev, |
@@ -612,7 +645,6 @@ static inline int pci_enable_msix(struct pci_dev* dev, | |||
612 | static inline void pci_disable_msix(struct pci_dev *dev) {} | 645 | static inline void pci_disable_msix(struct pci_dev *dev) {} |
613 | 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) {} |
614 | #else | 647 | #else |
615 | extern void pci_scan_msi_device(struct pci_dev *dev); | ||
616 | extern int pci_enable_msi(struct pci_dev *dev); | 648 | extern int pci_enable_msi(struct pci_dev *dev); |
617 | extern void pci_disable_msi(struct pci_dev *dev); | 649 | extern void pci_disable_msi(struct pci_dev *dev); |
618 | extern int pci_enable_msix(struct pci_dev* dev, | 650 | extern int pci_enable_msix(struct pci_dev* dev, |
@@ -681,6 +713,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev * | |||
681 | { return NULL; } | 713 | { return NULL; } |
682 | 714 | ||
683 | #define pci_dev_present(ids) (0) | 715 | #define pci_dev_present(ids) (0) |
716 | #define pci_find_present(ids) (NULL) | ||
684 | #define pci_dev_put(dev) do { } while (0) | 717 | #define pci_dev_put(dev) do { } while (0) |
685 | 718 | ||
686 | static inline void pci_set_master(struct pci_dev *dev) { } | 719 | static inline void pci_set_master(struct pci_dev *dev) { } |
@@ -703,8 +736,6 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
703 | 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; } |
704 | 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; } |
705 | 738 | ||
706 | #define isa_bridge ((struct pci_dev *)NULL) | ||
707 | |||
708 | #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) |
709 | 740 | ||
710 | 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) { } |
@@ -783,6 +814,7 @@ enum pci_fixup_pass { | |||
783 | pci_fixup_header, /* After reading configuration header */ | 814 | pci_fixup_header, /* After reading configuration header */ |
784 | pci_fixup_final, /* Final phase of device fixups */ | 815 | pci_fixup_final, /* Final phase of device fixups */ |
785 | pci_fixup_enable, /* pci_enable_device() time */ | 816 | pci_fixup_enable, /* pci_enable_device() time */ |
817 | pci_fixup_resume, /* pci_enable_device() time */ | ||
786 | }; | 818 | }; |
787 | 819 | ||
788 | /* Anonymous variables would be nice... */ | 820 | /* Anonymous variables would be nice... */ |
@@ -801,6 +833,9 @@ enum pci_fixup_pass { | |||
801 | #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ | 833 | #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ |
802 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ | 834 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ |
803 | vendor##device##hook, vendor, device, hook) | 835 | vendor##device##hook, vendor, device, hook) |
836 | #define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ | ||
837 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ | ||
838 | resume##vendor##device##hook, vendor, device, hook) | ||
804 | 839 | ||
805 | 840 | ||
806 | 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); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4d972bbef316..e67b68ca235a 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 |
@@ -104,6 +107,10 @@ | |||
104 | #define PCI_CLASS_SERIAL_FIBER 0x0c04 | 107 | #define PCI_CLASS_SERIAL_FIBER 0x0c04 |
105 | #define PCI_CLASS_SERIAL_SMBUS 0x0c05 | 108 | #define PCI_CLASS_SERIAL_SMBUS 0x0c05 |
106 | 109 | ||
110 | #define PCI_BASE_CLASS_WIRELESS 0x0d | ||
111 | #define PCI_CLASS_WIRELESS_RF_CONTROLLER 0x0d10 | ||
112 | #define PCI_CLASS_WIRELESS_WHCI 0x0d1010 | ||
113 | |||
107 | #define PCI_BASE_CLASS_INTELLIGENT 0x0e | 114 | #define PCI_BASE_CLASS_INTELLIGENT 0x0e |
108 | #define PCI_CLASS_INTELLIGENT_I2O 0x0e00 | 115 | #define PCI_CLASS_INTELLIGENT_I2O 0x0e00 |
109 | 116 | ||
@@ -731,9 +738,11 @@ | |||
731 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 738 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
732 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 739 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
733 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | 740 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 |
741 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 | ||
734 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 | 742 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 |
735 | #define PCI_DEVICE_ID_TI_X515 0x8036 | 743 | #define PCI_DEVICE_ID_TI_X515 0x8036 |
736 | #define PCI_DEVICE_ID_TI_XX12 0x8039 | 744 | #define PCI_DEVICE_ID_TI_XX12 0x8039 |
745 | #define PCI_DEVICE_ID_TI_XX12_FM 0x803b | ||
737 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 746 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
738 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 747 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
739 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 748 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
@@ -761,6 +770,7 @@ | |||
761 | #define PCI_DEVICE_ID_TI_1510 0xac56 | 770 | #define PCI_DEVICE_ID_TI_1510 0xac56 |
762 | #define PCI_DEVICE_ID_TI_X620 0xac8d | 771 | #define PCI_DEVICE_ID_TI_X620 0xac8d |
763 | #define PCI_DEVICE_ID_TI_X420 0xac8e | 772 | #define PCI_DEVICE_ID_TI_X420 0xac8e |
773 | #define PCI_DEVICE_ID_TI_XX20_FM 0xac8f | ||
764 | 774 | ||
765 | #define PCI_VENDOR_ID_SONY 0x104d | 775 | #define PCI_VENDOR_ID_SONY 0x104d |
766 | 776 | ||
@@ -1273,12 +1283,13 @@ | |||
1273 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 | 1283 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 |
1274 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 | 1284 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 |
1275 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 | 1285 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 |
1286 | #define PCI_DEVICE_ID_VIA_P4M890 0x0327 | ||
1287 | #define PCI_DEVICE_ID_VIA_VT3336 0x0336 | ||
1276 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1288 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1277 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1289 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1278 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1290 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
1279 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 | 1291 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 |
1280 | #define PCI_DEVICE_ID_VIA_82C576 0x0576 | 1292 | #define PCI_DEVICE_ID_VIA_82C576 0x0576 |
1281 | #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x0581 | ||
1282 | #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 | 1293 | #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 |
1283 | #define PCI_DEVICE_ID_VIA_82C596 0x0596 | 1294 | #define PCI_DEVICE_ID_VIA_82C596 0x0596 |
1284 | #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 | 1295 | #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 |
@@ -1321,6 +1332,8 @@ | |||
1321 | #define PCI_DEVICE_ID_VIA_8237 0x3227 | 1332 | #define PCI_DEVICE_ID_VIA_8237 0x3227 |
1322 | #define PCI_DEVICE_ID_VIA_8251 0x3287 | 1333 | #define PCI_DEVICE_ID_VIA_8251 0x3287 |
1323 | #define PCI_DEVICE_ID_VIA_8237A 0x3337 | 1334 | #define PCI_DEVICE_ID_VIA_8237A 0x3337 |
1335 | #define PCI_DEVICE_ID_VIA_8237S 0x3372 | ||
1336 | #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 | ||
1324 | #define PCI_DEVICE_ID_VIA_8231 0x8231 | 1337 | #define PCI_DEVICE_ID_VIA_8231 0x8231 |
1325 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 | 1338 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 |
1326 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 | 1339 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 |
@@ -1444,6 +1457,7 @@ | |||
1444 | 1457 | ||
1445 | #define PCI_VENDOR_ID_TOSHIBA_2 0x102f | 1458 | #define PCI_VENDOR_ID_TOSHIBA_2 0x102f |
1446 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 | 1459 | #define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 |
1460 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE 0x0105 | ||
1447 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 | 1461 | #define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108 |
1448 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 | 1462 | #define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3 |
1449 | 1463 | ||
@@ -1621,6 +1635,7 @@ | |||
1621 | #define PCI_VENDOR_ID_ITE 0x1283 | 1635 | #define PCI_VENDOR_ID_ITE 0x1283 |
1622 | #define PCI_DEVICE_ID_ITE_8211 0x8211 | 1636 | #define PCI_DEVICE_ID_ITE_8211 0x8211 |
1623 | #define PCI_DEVICE_ID_ITE_8212 0x8212 | 1637 | #define PCI_DEVICE_ID_ITE_8212 0x8212 |
1638 | #define PCI_DEVICE_ID_ITE_8213 0x8213 | ||
1624 | #define PCI_DEVICE_ID_ITE_8872 0x8872 | 1639 | #define PCI_DEVICE_ID_ITE_8872 0x8872 |
1625 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 | 1640 | #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 |
1626 | 1641 | ||
@@ -1785,14 +1800,17 @@ | |||
1785 | #define PCI_DEVICE_ID_MOXA_C104 0x1040 | 1800 | #define PCI_DEVICE_ID_MOXA_C104 0x1040 |
1786 | #define PCI_DEVICE_ID_MOXA_CP104U 0x1041 | 1801 | #define PCI_DEVICE_ID_MOXA_CP104U 0x1041 |
1787 | #define PCI_DEVICE_ID_MOXA_CP104JU 0x1042 | 1802 | #define PCI_DEVICE_ID_MOXA_CP104JU 0x1042 |
1803 | #define PCI_DEVICE_ID_MOXA_CP104EL 0x1043 | ||
1788 | #define PCI_DEVICE_ID_MOXA_CT114 0x1140 | 1804 | #define PCI_DEVICE_ID_MOXA_CT114 0x1140 |
1789 | #define PCI_DEVICE_ID_MOXA_CP114 0x1141 | 1805 | #define PCI_DEVICE_ID_MOXA_CP114 0x1141 |
1790 | #define PCI_DEVICE_ID_MOXA_CP118U 0x1180 | 1806 | #define PCI_DEVICE_ID_MOXA_CP118U 0x1180 |
1807 | #define PCI_DEVICE_ID_MOXA_CP118EL 0x1181 | ||
1791 | #define PCI_DEVICE_ID_MOXA_CP132 0x1320 | 1808 | #define PCI_DEVICE_ID_MOXA_CP132 0x1320 |
1792 | #define PCI_DEVICE_ID_MOXA_CP132U 0x1321 | 1809 | #define PCI_DEVICE_ID_MOXA_CP132U 0x1321 |
1793 | #define PCI_DEVICE_ID_MOXA_CP134U 0x1340 | 1810 | #define PCI_DEVICE_ID_MOXA_CP134U 0x1340 |
1794 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 | 1811 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 |
1795 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 | 1812 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 |
1813 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 | ||
1796 | 1814 | ||
1797 | #define PCI_VENDOR_ID_CCD 0x1397 | 1815 | #define PCI_VENDOR_ID_CCD 0x1397 |
1798 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 | 1816 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 |
@@ -1961,6 +1979,7 @@ | |||
1961 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 | 1979 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 |
1962 | 1980 | ||
1963 | #define PCI_VENDOR_ID_ENE 0x1524 | 1981 | #define PCI_VENDOR_ID_ENE 0x1524 |
1982 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | ||
1964 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1983 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
1965 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1984 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
1966 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1985 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
@@ -2056,6 +2075,10 @@ | |||
2056 | #define PCI_VENDOR_ID_TDI 0x192E | 2075 | #define PCI_VENDOR_ID_TDI 0x192E |
2057 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2076 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2058 | 2077 | ||
2078 | #define PCI_VENDOR_ID_PASEMI 0x1959 | ||
2079 | |||
2080 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | ||
2081 | |||
2059 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2082 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2060 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2083 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
2061 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | 2084 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 |
@@ -2064,6 +2087,10 @@ | |||
2064 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 | 2087 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 |
2065 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 | 2088 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 |
2066 | 2089 | ||
2090 | #define PCI_VENDOR_ID_KORENIX 0x1982 | ||
2091 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | ||
2092 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff | ||
2093 | |||
2067 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2094 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2068 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2095 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
2069 | 2096 | ||
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 064b1dc71c22..7a6d34ee5ab1 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -475,15 +475,32 @@ | |||
475 | #define PCI_PWR_CAP 12 /* Capability */ | 475 | #define PCI_PWR_CAP 12 /* Capability */ |
476 | #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ | 476 | #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ |
477 | 477 | ||
478 | /* Hypertransport sub capability types */ | 478 | /* |
479 | * Hypertransport sub capability types | ||
480 | * | ||
481 | * Unfortunately there are both 3 bit and 5 bit capability types defined | ||
482 | * in the HT spec, catering for that is a little messy. You probably don't | ||
483 | * want to use these directly, just use pci_find_ht_capability() and it | ||
484 | * will do the right thing for you. | ||
485 | */ | ||
486 | #define HT_3BIT_CAP_MASK 0xE0 | ||
479 | #define HT_CAPTYPE_SLAVE 0x00 /* Slave/Primary link configuration */ | 487 | #define HT_CAPTYPE_SLAVE 0x00 /* Slave/Primary link configuration */ |
480 | #define HT_CAPTYPE_HOST 0x20 /* Host/Secondary link configuration */ | 488 | #define HT_CAPTYPE_HOST 0x20 /* Host/Secondary link configuration */ |
489 | |||
490 | #define HT_5BIT_CAP_MASK 0xF8 | ||
481 | #define HT_CAPTYPE_IRQ 0x80 /* IRQ Configuration */ | 491 | #define HT_CAPTYPE_IRQ 0x80 /* IRQ Configuration */ |
482 | #define HT_CAPTYPE_REMAPPING_40 0xA0 /* 40 bit address remapping */ | 492 | #define HT_CAPTYPE_REMAPPING_40 0xA0 /* 40 bit address remapping */ |
483 | #define HT_CAPTYPE_REMAPPING_64 0xA2 /* 64 bit address remapping */ | 493 | #define HT_CAPTYPE_REMAPPING_64 0xA2 /* 64 bit address remapping */ |
484 | #define HT_CAPTYPE_UNITID_CLUMP 0x90 /* Unit ID clumping */ | 494 | #define HT_CAPTYPE_UNITID_CLUMP 0x90 /* Unit ID clumping */ |
485 | #define HT_CAPTYPE_EXTCONF 0x98 /* Extended Configuration Space Access */ | 495 | #define HT_CAPTYPE_EXTCONF 0x98 /* Extended Configuration Space Access */ |
486 | #define HT_CAPTYPE_MSI_MAPPING 0xA8 /* MSI Mapping Capability */ | 496 | #define HT_CAPTYPE_MSI_MAPPING 0xA8 /* MSI Mapping Capability */ |
497 | #define HT_MSI_FLAGS 0x02 /* Offset to flags */ | ||
498 | #define HT_MSI_FLAGS_ENABLE 0x1 /* Mapping enable */ | ||
499 | #define HT_MSI_FLAGS_FIXED 0x2 /* Fixed mapping only */ | ||
500 | #define HT_MSI_FIXED_ADDR 0x00000000FEE00000ULL /* Fixed addr */ | ||
501 | #define HT_MSI_ADDR_LO 0x04 /* Offset to low addr bits */ | ||
502 | #define HT_MSI_ADDR_LO_MASK 0xFFF00000 /* Low address bit mask */ | ||
503 | #define HT_MSI_ADDR_HI 0x08 /* Offset to high addr bits */ | ||
487 | #define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ | 504 | #define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ |
488 | #define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ | 505 | #define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ |
489 | #define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ | 506 | #define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ |
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/pid.h b/include/linux/pid.h index 2c0007d17218..4dec047b1837 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -35,8 +35,9 @@ enum pid_type | |||
35 | * | 35 | * |
36 | * Holding a reference to struct pid solves both of these problems. | 36 | * Holding a reference to struct pid solves both of these problems. |
37 | * It is small so holding a reference does not consume a lot of | 37 | * It is small so holding a reference does not consume a lot of |
38 | * resources, and since a new struct pid is allocated when the numeric | 38 | * resources, and since a new struct pid is allocated when the numeric pid |
39 | * pid value is reused we don't mistakenly refer to new processes. | 39 | * value is reused (when pids wrap around) we don't mistakenly refer to new |
40 | * processes. | ||
40 | */ | 41 | */ |
41 | 42 | ||
42 | struct pid | 43 | struct pid |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h new file mode 100644 index 000000000000..2833806d42c6 --- /dev/null +++ b/include/linux/pid_namespace.h | |||
@@ -0,0 +1,45 @@ | |||
1 | #ifndef _LINUX_PID_NS_H | ||
2 | #define _LINUX_PID_NS_H | ||
3 | |||
4 | #include <linux/sched.h> | ||
5 | #include <linux/mm.h> | ||
6 | #include <linux/threads.h> | ||
7 | #include <linux/pid.h> | ||
8 | #include <linux/nsproxy.h> | ||
9 | #include <linux/kref.h> | ||
10 | |||
11 | struct pidmap { | ||
12 | atomic_t nr_free; | ||
13 | void *page; | ||
14 | }; | ||
15 | |||
16 | #define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8) | ||
17 | |||
18 | struct pid_namespace { | ||
19 | struct kref kref; | ||
20 | struct pidmap pidmap[PIDMAP_ENTRIES]; | ||
21 | int last_pid; | ||
22 | struct task_struct *child_reaper; | ||
23 | }; | ||
24 | |||
25 | extern struct pid_namespace init_pid_ns; | ||
26 | |||
27 | static inline void get_pid_ns(struct pid_namespace *ns) | ||
28 | { | ||
29 | kref_get(&ns->kref); | ||
30 | } | ||
31 | |||
32 | extern int copy_pid_ns(int flags, struct task_struct *tsk); | ||
33 | extern void free_pid_ns(struct kref *kref); | ||
34 | |||
35 | static inline void put_pid_ns(struct pid_namespace *ns) | ||
36 | { | ||
37 | kref_put(&ns->kref, free_pid_ns); | ||
38 | } | ||
39 | |||
40 | static inline struct task_struct *child_reaper(struct task_struct *tsk) | ||
41 | { | ||
42 | return init_pid_ns.child_reaper; | ||
43 | } | ||
44 | |||
45 | #endif /* _LINUX_PID_NS_H */ | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index ea4f7cd7bfd8..2e19478e9e84 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -12,7 +12,7 @@ | |||
12 | struct pipe_buffer { | 12 | struct pipe_buffer { |
13 | struct page *page; | 13 | struct page *page; |
14 | unsigned int offset, len; | 14 | unsigned int offset, len; |
15 | struct pipe_buf_operations *ops; | 15 | const struct pipe_buf_operations *ops; |
16 | unsigned int flags; | 16 | unsigned int flags; |
17 | }; | 17 | }; |
18 | 18 | ||
@@ -41,9 +41,7 @@ struct pipe_buf_operations { | |||
41 | struct pipe_inode_info { | 41 | struct pipe_inode_info { |
42 | wait_queue_head_t wait; | 42 | wait_queue_head_t wait; |
43 | unsigned int nrbufs, curbuf; | 43 | unsigned int nrbufs, curbuf; |
44 | struct pipe_buffer bufs[PIPE_BUFFERS]; | ||
45 | struct page *tmp_page; | 44 | struct page *tmp_page; |
46 | unsigned int start; | ||
47 | unsigned int readers; | 45 | unsigned int readers; |
48 | unsigned int writers; | 46 | unsigned int writers; |
49 | unsigned int waiting_writers; | 47 | unsigned int waiting_writers; |
@@ -52,6 +50,7 @@ struct pipe_inode_info { | |||
52 | struct fasync_struct *fasync_readers; | 50 | struct fasync_struct *fasync_readers; |
53 | struct fasync_struct *fasync_writers; | 51 | struct fasync_struct *fasync_writers; |
54 | struct inode *inode; | 52 | struct inode *inode; |
53 | struct pipe_buffer bufs[PIPE_BUFFERS]; | ||
55 | }; | 54 | }; |
56 | 55 | ||
57 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual | 56 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 8a94c717c266..5ea4f05683f6 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -111,6 +111,13 @@ struct pkt_ctrl_command { | |||
111 | #include <linux/blkdev.h> | 111 | #include <linux/blkdev.h> |
112 | #include <linux/completion.h> | 112 | #include <linux/completion.h> |
113 | #include <linux/cdrom.h> | 113 | #include <linux/cdrom.h> |
114 | #include <linux/kobject.h> | ||
115 | #include <linux/sysfs.h> | ||
116 | |||
117 | /* default bio write queue congestion marks */ | ||
118 | #define PKT_WRITE_CONGESTION_ON 10000 | ||
119 | #define PKT_WRITE_CONGESTION_OFF 9000 | ||
120 | |||
114 | 121 | ||
115 | struct packet_settings | 122 | struct packet_settings |
116 | { | 123 | { |
@@ -241,6 +248,14 @@ struct packet_stacked_data | |||
241 | }; | 248 | }; |
242 | #define PSD_POOL_SIZE 64 | 249 | #define PSD_POOL_SIZE 64 |
243 | 250 | ||
251 | struct pktcdvd_kobj | ||
252 | { | ||
253 | struct kobject kobj; | ||
254 | struct pktcdvd_device *pd; | ||
255 | }; | ||
256 | #define to_pktcdvdkobj(_k) \ | ||
257 | ((struct pktcdvd_kobj*)container_of(_k,struct pktcdvd_kobj,kobj)) | ||
258 | |||
244 | struct pktcdvd_device | 259 | struct pktcdvd_device |
245 | { | 260 | { |
246 | struct block_device *bdev; /* dev attached */ | 261 | struct block_device *bdev; /* dev attached */ |
@@ -271,6 +286,16 @@ struct pktcdvd_device | |||
271 | 286 | ||
272 | struct packet_iosched iosched; | 287 | struct packet_iosched iosched; |
273 | struct gendisk *disk; | 288 | struct gendisk *disk; |
289 | |||
290 | int write_congestion_off; | ||
291 | int write_congestion_on; | ||
292 | |||
293 | struct class_device *clsdev; /* sysfs pktcdvd[0-7] class dev */ | ||
294 | struct pktcdvd_kobj *kobj_stat; /* sysfs pktcdvd[0-7]/stat/ */ | ||
295 | struct pktcdvd_kobj *kobj_wqueue; /* sysfs pktcdvd[0-7]/write_queue/ */ | ||
296 | |||
297 | struct dentry *dfs_d_root; /* debugfs: devname directory */ | ||
298 | struct dentry *dfs_f_info; /* debugfs: info file */ | ||
274 | }; | 299 | }; |
275 | 300 | ||
276 | #endif /* __KERNEL__ */ | 301 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 20f47b81d3fa..8bbd459eafdc 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -39,7 +39,7 @@ extern struct platform_device *platform_device_register_simple(char *, unsigned | |||
39 | 39 | ||
40 | extern struct platform_device *platform_device_alloc(const char *name, unsigned int id); | 40 | extern struct platform_device *platform_device_alloc(const char *name, unsigned int id); |
41 | extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); | 41 | extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); |
42 | extern int platform_device_add_data(struct platform_device *pdev, void *data, size_t size); | 42 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); |
43 | extern int platform_device_add(struct platform_device *pdev); | 43 | extern int platform_device_add(struct platform_device *pdev); |
44 | extern void platform_device_del(struct platform_device *pdev); | 44 | extern void platform_device_del(struct platform_device *pdev); |
45 | extern void platform_device_put(struct platform_device *pdev); | 45 | extern void platform_device_put(struct platform_device *pdev); |
diff --git a/include/linux/profile.h b/include/linux/profile.h index 5670b340c4ef..eec48f5f9348 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h | |||
@@ -15,6 +15,7 @@ extern int prof_on __read_mostly; | |||
15 | #define CPU_PROFILING 1 | 15 | #define CPU_PROFILING 1 |
16 | #define SCHED_PROFILING 2 | 16 | #define SCHED_PROFILING 2 |
17 | #define SLEEP_PROFILING 3 | 17 | #define SLEEP_PROFILING 3 |
18 | #define KVM_PROFILING 4 | ||
18 | 19 | ||
19 | struct proc_dir_entry; | 20 | struct proc_dir_entry; |
20 | struct pt_regs; | 21 | struct pt_regs; |
diff --git a/include/linux/pspace.h b/include/linux/pspace.h deleted file mode 100644 index 91d48b8b2d99..000000000000 --- a/include/linux/pspace.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _LINUX_PSPACE_H | ||
2 | #define _LINUX_PSPACE_H | ||
3 | |||
4 | #include <linux/sched.h> | ||
5 | #include <linux/mm.h> | ||
6 | #include <linux/threads.h> | ||
7 | #include <linux/pid.h> | ||
8 | |||
9 | struct pidmap { | ||
10 | atomic_t nr_free; | ||
11 | void *page; | ||
12 | }; | ||
13 | |||
14 | #define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8) | ||
15 | |||
16 | struct pspace { | ||
17 | struct pidmap pidmap[PIDMAP_ENTRIES]; | ||
18 | int last_pid; | ||
19 | }; | ||
20 | |||
21 | extern struct pspace init_pspace; | ||
22 | |||
23 | #endif /* _LINUX_PSPACE_H */ | ||
diff --git a/include/linux/qic117.h b/include/linux/qic117.h deleted file mode 100644 index 07b537e5d359..000000000000 --- a/include/linux/qic117.h +++ /dev/null | |||
@@ -1,290 +0,0 @@ | |||
1 | #ifndef _QIC117_H | ||
2 | #define _QIC117_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1993-1996 Bas Laarhoven, | ||
6 | * (C) 1997 Claus-Justus Heine. | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2, or (at your option) | ||
11 | any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; see the file COPYING. If not, write to | ||
20 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | |||
22 | * | ||
23 | * $Source: /homes/cvs/ftape-stacked/include/linux/qic117.h,v $ | ||
24 | * $Revision: 1.2 $ | ||
25 | * $Date: 1997/10/05 19:19:32 $ | ||
26 | * | ||
27 | * This file contains QIC-117 spec. related definitions for the | ||
28 | * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. | ||
29 | * | ||
30 | * These data were taken from the Quarter-Inch Cartridge | ||
31 | * Drive Standards, Inc. document titled: | ||
32 | * `Common Command Set Interface Specification for Flexible | ||
33 | * Disk Controller Based Minicartridge Tape Drives' | ||
34 | * document QIC-117 Revision J, 28 Aug 96. | ||
35 | * For more information, contact: | ||
36 | * Quarter-Inch Cartridge Drive Standards, Inc. | ||
37 | * 311 East Carrillo Street | ||
38 | * Santa Barbara, California 93101 | ||
39 | * Telephone (805) 963-3853 | ||
40 | * Fax (805) 962-1541 | ||
41 | * WWW http://www.qic.org | ||
42 | * | ||
43 | * Current QIC standard revisions (of interest) are: | ||
44 | * QIC-40-MC, Rev. M, 2 Sep 92. | ||
45 | * QIC-80-MC, Rev. N, 20 Mar 96. | ||
46 | * QIC-80-MC, Rev. K, 15 Dec 94. | ||
47 | * QIC-113, Rev. G, 15 Jun 95. | ||
48 | * QIC-117, Rev. J, 28 Aug 96. | ||
49 | * QIC-122, Rev. B, 6 Mar 91. | ||
50 | * QIC-130, Rev. C, 2 Sep 92. | ||
51 | * QIC-3010-MC, Rev. F, 14 Jun 95. | ||
52 | * QIC-3020-MC, Rev. G, 31 Aug 95. | ||
53 | * QIC-CRF3, Rev. B, 15 Jun 95. | ||
54 | * */ | ||
55 | |||
56 | /* | ||
57 | * QIC-117 common command set rev. J. | ||
58 | * These commands are sent to the tape unit | ||
59 | * as number of pulses over the step line. | ||
60 | */ | ||
61 | |||
62 | typedef enum { | ||
63 | QIC_NO_COMMAND = 0, | ||
64 | QIC_RESET = 1, | ||
65 | QIC_REPORT_NEXT_BIT = 2, | ||
66 | QIC_PAUSE = 3, | ||
67 | QIC_MICRO_STEP_PAUSE = 4, | ||
68 | QIC_ALTERNATE_TIMEOUT = 5, | ||
69 | QIC_REPORT_DRIVE_STATUS = 6, | ||
70 | QIC_REPORT_ERROR_CODE = 7, | ||
71 | QIC_REPORT_DRIVE_CONFIGURATION = 8, | ||
72 | QIC_REPORT_ROM_VERSION = 9, | ||
73 | QIC_LOGICAL_FORWARD = 10, | ||
74 | QIC_PHYSICAL_REVERSE = 11, | ||
75 | QIC_PHYSICAL_FORWARD = 12, | ||
76 | QIC_SEEK_HEAD_TO_TRACK = 13, | ||
77 | QIC_SEEK_LOAD_POINT = 14, | ||
78 | QIC_ENTER_FORMAT_MODE = 15, | ||
79 | QIC_WRITE_REFERENCE_BURST = 16, | ||
80 | QIC_ENTER_VERIFY_MODE = 17, | ||
81 | QIC_STOP_TAPE = 18, | ||
82 | /* commands 19-20: reserved */ | ||
83 | QIC_MICRO_STEP_HEAD_UP = 21, | ||
84 | QIC_MICRO_STEP_HEAD_DOWN = 22, | ||
85 | QIC_SOFT_SELECT = 23, | ||
86 | QIC_SOFT_DESELECT = 24, | ||
87 | QIC_SKIP_REVERSE = 25, | ||
88 | QIC_SKIP_FORWARD = 26, | ||
89 | QIC_SELECT_RATE = 27, | ||
90 | /* command 27, in ccs2: Select Rate or Format */ | ||
91 | QIC_ENTER_DIAGNOSTIC_1 = 28, | ||
92 | QIC_ENTER_DIAGNOSTIC_2 = 29, | ||
93 | QIC_ENTER_PRIMARY_MODE = 30, | ||
94 | /* command 31: vendor unique */ | ||
95 | QIC_REPORT_VENDOR_ID = 32, | ||
96 | QIC_REPORT_TAPE_STATUS = 33, | ||
97 | QIC_SKIP_EXTENDED_REVERSE = 34, | ||
98 | QIC_SKIP_EXTENDED_FORWARD = 35, | ||
99 | QIC_CALIBRATE_TAPE_LENGTH = 36, | ||
100 | QIC_REPORT_FORMAT_SEGMENTS = 37, | ||
101 | QIC_SET_FORMAT_SEGMENTS = 38, | ||
102 | /* commands 39-45: reserved */ | ||
103 | QIC_PHANTOM_SELECT = 46, | ||
104 | QIC_PHANTOM_DESELECT = 47 | ||
105 | } qic117_cmd_t; | ||
106 | |||
107 | typedef enum { | ||
108 | discretional = 0, required, ccs1, ccs2 | ||
109 | } qic_compatibility; | ||
110 | |||
111 | typedef enum { | ||
112 | unused, mode, motion, report | ||
113 | } command_types; | ||
114 | |||
115 | struct qic117_command_table { | ||
116 | char *name; | ||
117 | __u8 mask; | ||
118 | __u8 state; | ||
119 | __u8 cmd_type; | ||
120 | __u8 non_intr; | ||
121 | __u8 level; | ||
122 | }; | ||
123 | |||
124 | #define QIC117_COMMANDS {\ | ||
125 | /* command mask state cmd_type */\ | ||
126 | /* | name | | | non_intr */\ | ||
127 | /* | | | | | | level */\ | ||
128 | /* 0*/ {NULL, 0x00, 0x00, mode, 0, discretional},\ | ||
129 | /* 1*/ {"soft reset", 0x00, 0x00, motion, 1, required},\ | ||
130 | /* 2*/ {"report next bit", 0x00, 0x00, report, 0, required},\ | ||
131 | /* 3*/ {"pause", 0x36, 0x24, motion, 1, required},\ | ||
132 | /* 4*/ {"micro step pause", 0x36, 0x24, motion, 1, required},\ | ||
133 | /* 5*/ {"alternate command timeout", 0x00, 0x00, mode, 0, required},\ | ||
134 | /* 6*/ {"report drive status", 0x00, 0x00, report, 0, required},\ | ||
135 | /* 7*/ {"report error code", 0x01, 0x01, report, 0, required},\ | ||
136 | /* 8*/ {"report drive configuration",0x00, 0x00, report, 0, required},\ | ||
137 | /* 9*/ {"report rom version", 0x00, 0x00, report, 0, required},\ | ||
138 | /*10*/ {"logical forward", 0x37, 0x25, motion, 0, required},\ | ||
139 | /*11*/ {"physical reverse", 0x17, 0x05, motion, 0, required},\ | ||
140 | /*12*/ {"physical forward", 0x17, 0x05, motion, 0, required},\ | ||
141 | /*13*/ {"seek head to track", 0x37, 0x25, motion, 0, required},\ | ||
142 | /*14*/ {"seek load point", 0x17, 0x05, motion, 1, required},\ | ||
143 | /*15*/ {"enter format mode", 0x1f, 0x05, mode, 0, required},\ | ||
144 | /*16*/ {"write reference burst", 0x1f, 0x05, motion, 1, required},\ | ||
145 | /*17*/ {"enter verify mode", 0x37, 0x25, mode, 0, required},\ | ||
146 | /*18*/ {"stop tape", 0x00, 0x00, motion, 1, required},\ | ||
147 | /*19*/ {"reserved (19)", 0x00, 0x00, unused, 0, discretional},\ | ||
148 | /*20*/ {"reserved (20)", 0x00, 0x00, unused, 0, discretional},\ | ||
149 | /*21*/ {"micro step head up", 0x02, 0x00, motion, 0, required},\ | ||
150 | /*22*/ {"micro step head down", 0x02, 0x00, motion, 0, required},\ | ||
151 | /*23*/ {"soft select", 0x00, 0x00, mode, 0, discretional},\ | ||
152 | /*24*/ {"soft deselect", 0x00, 0x00, mode, 0, discretional},\ | ||
153 | /*25*/ {"skip segments reverse", 0x36, 0x24, motion, 1, required},\ | ||
154 | /*26*/ {"skip segments forward", 0x36, 0x24, motion, 1, required},\ | ||
155 | /*27*/ {"select rate or format", 0x03, 0x01, mode, 0, required /* [ccs2] */},\ | ||
156 | /*28*/ {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional},\ | ||
157 | /*29*/ {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional},\ | ||
158 | /*30*/ {"enter primary mode", 0x00, 0x00, mode, 0, required},\ | ||
159 | /*31*/ {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional},\ | ||
160 | /*32*/ {"report vendor id", 0x00, 0x00, report, 0, required},\ | ||
161 | /*33*/ {"report tape status", 0x04, 0x04, report, 0, ccs1},\ | ||
162 | /*34*/ {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1},\ | ||
163 | /*35*/ {"skip extended forward", 0x36, 0x24, motion, 1, ccs1},\ | ||
164 | /*36*/ {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2},\ | ||
165 | /*37*/ {"report format segments", 0x17, 0x05, report, 0, ccs2},\ | ||
166 | /*38*/ {"set format segments", 0x17, 0x05, mode, 0, ccs2},\ | ||
167 | /*39*/ {"reserved (39)", 0x00, 0x00, unused, 0, discretional},\ | ||
168 | /*40*/ {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional},\ | ||
169 | /*41*/ {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional},\ | ||
170 | /*42*/ {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional},\ | ||
171 | /*43*/ {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional},\ | ||
172 | /*44*/ {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional},\ | ||
173 | /*45*/ {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional},\ | ||
174 | /*46*/ {"phantom select", 0x00, 0x00, mode, 0, discretional},\ | ||
175 | /*47*/ {"phantom deselect", 0x00, 0x00, mode, 0, discretional},\ | ||
176 | } | ||
177 | |||
178 | /* | ||
179 | * Status bits returned by QIC_REPORT_DRIVE_STATUS | ||
180 | */ | ||
181 | |||
182 | #define QIC_STATUS_READY 0x01 /* Drive is ready or idle. */ | ||
183 | #define QIC_STATUS_ERROR 0x02 /* Error detected, must read | ||
184 | error code to clear this */ | ||
185 | #define QIC_STATUS_CARTRIDGE_PRESENT 0x04 /* Tape is present */ | ||
186 | #define QIC_STATUS_WRITE_PROTECT 0x08 /* Tape is write protected */ | ||
187 | #define QIC_STATUS_NEW_CARTRIDGE 0x10 /* New cartridge inserted, must | ||
188 | read error status to clear. */ | ||
189 | #define QIC_STATUS_REFERENCED 0x20 /* Cartridge appears to have been | ||
190 | formatted. */ | ||
191 | #define QIC_STATUS_AT_BOT 0x40 /* Cartridge is at physical | ||
192 | beginning of tape. */ | ||
193 | #define QIC_STATUS_AT_EOT 0x80 /* Cartridge is at physical end | ||
194 | of tape. */ | ||
195 | /* | ||
196 | * Status bits returned by QIC_REPORT_DRIVE_CONFIGURATION | ||
197 | */ | ||
198 | |||
199 | #define QIC_CONFIG_RATE_MASK 0x18 | ||
200 | #define QIC_CONFIG_RATE_SHIFT 3 | ||
201 | #define QIC_CONFIG_RATE_250 0 | ||
202 | #define QIC_CONFIG_RATE_500 2 | ||
203 | #define QIC_CONFIG_RATE_1000 3 | ||
204 | #define QIC_CONFIG_RATE_2000 1 | ||
205 | #define QIC_CONFIG_RATE_4000 0 /* since QIC-117 Rev. J */ | ||
206 | |||
207 | #define QIC_CONFIG_LONG 0x40 /* Extra Length Tape Detected */ | ||
208 | #define QIC_CONFIG_80 0x80 /* QIC-80 detected. */ | ||
209 | |||
210 | /* | ||
211 | * Status bits returned by QIC_REPORT_TAPE_STATUS | ||
212 | */ | ||
213 | |||
214 | #define QIC_TAPE_STD_MASK 0x0f | ||
215 | #define QIC_TAPE_QIC40 0x01 | ||
216 | #define QIC_TAPE_QIC80 0x02 | ||
217 | #define QIC_TAPE_QIC3020 0x03 | ||
218 | #define QIC_TAPE_QIC3010 0x04 | ||
219 | |||
220 | #define QIC_TAPE_LEN_MASK 0x70 | ||
221 | #define QIC_TAPE_205FT 0x10 | ||
222 | #define QIC_TAPE_307FT 0x20 | ||
223 | #define QIC_TAPE_VARIABLE 0x30 | ||
224 | #define QIC_TAPE_1100FT 0x40 | ||
225 | #define QIC_TAPE_FLEX 0x60 | ||
226 | |||
227 | #define QIC_TAPE_WIDE 0x80 | ||
228 | |||
229 | /* Define a value (in feet) slightly higher than | ||
230 | * the possible maximum tape length. | ||
231 | */ | ||
232 | #define QIC_TOP_TAPE_LEN 1500 | ||
233 | |||
234 | /* | ||
235 | * Errors: List of error codes, and their severity. | ||
236 | */ | ||
237 | |||
238 | typedef struct { | ||
239 | char *message; /* Text describing the error. */ | ||
240 | unsigned int fatal:1; /* Non-zero if the error is fatal. */ | ||
241 | } ftape_error; | ||
242 | |||
243 | #define QIC117_ERRORS {\ | ||
244 | /* 0*/ { "No error", 0, },\ | ||
245 | /* 1*/ { "Command Received while Drive Not Ready", 0, },\ | ||
246 | /* 2*/ { "Cartridge Not Present or Removed", 1, },\ | ||
247 | /* 3*/ { "Motor Speed Error (not within 1%)", 1, },\ | ||
248 | /* 4*/ { "Motor Speed Fault (jammed, or gross speed error", 1, },\ | ||
249 | /* 5*/ { "Cartridge Write Protected", 1, },\ | ||
250 | /* 6*/ { "Undefined or Reserved Command Code", 1, },\ | ||
251 | /* 7*/ { "Illegal Track Address Specified for Seek", 1, },\ | ||
252 | /* 8*/ { "Illegal Command in Report Subcontext", 0, },\ | ||
253 | /* 9*/ { "Illegal Entry into a Diagnostic Mode", 1, },\ | ||
254 | /*10*/ { "Broken Tape Detected (based on hole sensor)", 1, },\ | ||
255 | /*11*/ { "Warning--Read Gain Setting Error", 1, },\ | ||
256 | /*12*/ { "Command Received While Error Status Pending (obs)", 1, },\ | ||
257 | /*13*/ { "Command Received While New Cartridge Pending", 1, },\ | ||
258 | /*14*/ { "Command Illegal or Undefined in Primary Mode", 1, },\ | ||
259 | /*15*/ { "Command Illegal or Undefined in Format Mode", 1, },\ | ||
260 | /*16*/ { "Command Illegal or Undefined in Verify Mode", 1, },\ | ||
261 | /*17*/ { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, },\ | ||
262 | /*18*/ { "Logical EOT Before All Segments generated", 1, },\ | ||
263 | /*19*/ { "Command Illegal When Cartridge Not Referenced", 1, },\ | ||
264 | /*20*/ { "Self-Diagnostic Failed (cannot be cleared)", 1, },\ | ||
265 | /*21*/ { "Warning EEPROM Not Initialized, Defaults Set", 1, },\ | ||
266 | /*22*/ { "EEPROM Corrupted or Hardware Failure", 1, },\ | ||
267 | /*23*/ { "Motion Time-out Error", 1, },\ | ||
268 | /*24*/ { "Data Segment Too Long -- Logical Forward or Pause", 1, },\ | ||
269 | /*25*/ { "Transmit Overrun (obs)", 1, },\ | ||
270 | /*26*/ { "Power On Reset Occurred", 0, },\ | ||
271 | /*27*/ { "Software Reset Occurred", 0, },\ | ||
272 | /*28*/ { "Diagnostic Mode 1 Error", 1, },\ | ||
273 | /*29*/ { "Diagnostic Mode 2 Error", 1, },\ | ||
274 | /*30*/ { "Command Received During Non-Interruptible Process", 1, },\ | ||
275 | /*31*/ { "Rate or Format Selection Error", 1, },\ | ||
276 | /*32*/ { "Illegal Command While in High Speed Mode", 1, },\ | ||
277 | /*33*/ { "Illegal Seek Segment Value", 1, },\ | ||
278 | /*34*/ { "Invalid Media", 1, },\ | ||
279 | /*35*/ { "Head Positioning Failure", 1, },\ | ||
280 | /*36*/ { "Write Reference Burst Failure", 1, },\ | ||
281 | /*37*/ { "Prom Code Missing", 1, },\ | ||
282 | /*38*/ { "Invalid Format", 1, },\ | ||
283 | /*39*/ { "EOT/BOT System Failure", 1, },\ | ||
284 | /*40*/ { "Prom A Checksum Error", 1, },\ | ||
285 | /*41*/ { "Drive Wakeup Reset Occurred", 1, },\ | ||
286 | /*42*/ { "Prom B Checksum Error", 1, },\ | ||
287 | /*43*/ { "Illegal Entry into Format Mode", 1, },\ | ||
288 | } | ||
289 | |||
290 | #endif /* _QIC117_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/raid/md.h b/include/linux/raid/md.h index 866a1e2b0ce0..fbaeda79b2e9 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -94,7 +94,7 @@ extern int sync_page_io(struct block_device *bdev, sector_t sector, int size, | |||
94 | struct page *page, int rw); | 94 | struct page *page, int rw); |
95 | extern void md_do_sync(mddev_t *mddev); | 95 | extern void md_do_sync(mddev_t *mddev); |
96 | extern void md_new_event(mddev_t *mddev); | 96 | extern void md_new_event(mddev_t *mddev); |
97 | 97 | extern void md_allow_write(mddev_t *mddev); | |
98 | 98 | ||
99 | #endif /* CONFIG_MD */ | 99 | #endif /* CONFIG_MD */ |
100 | #endif | 100 | #endif |
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 03636d7918fe..d8286db60b96 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -227,7 +227,10 @@ struct raid5_private_data { | |||
227 | struct list_head handle_list; /* stripes needing handling */ | 227 | struct list_head handle_list; /* stripes needing handling */ |
228 | struct list_head delayed_list; /* stripes that have plugged requests */ | 228 | struct list_head delayed_list; /* stripes that have plugged requests */ |
229 | struct list_head bitmap_list; /* stripes delaying awaiting bitmap update */ | 229 | struct list_head bitmap_list; /* stripes delaying awaiting bitmap update */ |
230 | struct bio *retry_read_aligned; /* currently retrying aligned bios */ | ||
231 | struct bio *retry_read_aligned_list; /* aligned bios retry list */ | ||
230 | atomic_t preread_active_stripes; /* stripes with scheduled io */ | 232 | atomic_t preread_active_stripes; /* stripes with scheduled io */ |
233 | atomic_t active_aligned_reads; | ||
231 | 234 | ||
232 | atomic_t reshape_stripes; /* stripes with pending writes for reshape */ | 235 | atomic_t reshape_stripes; /* stripes with pending writes for reshape */ |
233 | /* unfortunately we need two cache names as we temporarily have | 236 | /* unfortunately we need two cache names as we temporarily have |
diff --git a/include/linux/reciprocal_div.h b/include/linux/reciprocal_div.h new file mode 100644 index 000000000000..f9c90b33285b --- /dev/null +++ b/include/linux/reciprocal_div.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _LINUX_RECIPROCAL_DIV_H | ||
2 | #define _LINUX_RECIPROCAL_DIV_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * This file describes reciprocical division. | ||
8 | * | ||
9 | * This optimizes the (A/B) problem, when A and B are two u32 | ||
10 | * and B is a known value (but not known at compile time) | ||
11 | * | ||
12 | * The math principle used is : | ||
13 | * Let RECIPROCAL_VALUE(B) be (((1LL << 32) + (B - 1))/ B) | ||
14 | * Then A / B = (u32)(((u64)(A) * (R)) >> 32) | ||
15 | * | ||
16 | * This replaces a divide by a multiply (and a shift), and | ||
17 | * is generally less expensive in CPU cycles. | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * Computes the reciprocal value (R) for the value B of the divisor. | ||
22 | * Should not be called before each reciprocal_divide(), | ||
23 | * or else the performance is slower than a normal divide. | ||
24 | */ | ||
25 | extern u32 reciprocal_value(u32 B); | ||
26 | |||
27 | |||
28 | static inline u32 reciprocal_divide(u32 A, u32 R) | ||
29 | { | ||
30 | return (u32)(((u64)A * R) >> 32); | ||
31 | } | ||
32 | #endif | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index d0e4dce33ad5..c3fc6caaad3f 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1159,7 +1159,7 @@ znodes are the way! */ | |||
1159 | #define PATH_READA 0x1 /* do read ahead */ | 1159 | #define PATH_READA 0x1 /* do read ahead */ |
1160 | #define PATH_READA_BACK 0x2 /* read backwards */ | 1160 | #define PATH_READA_BACK 0x2 /* read backwards */ |
1161 | 1161 | ||
1162 | struct path { | 1162 | struct treepath { |
1163 | int path_length; /* Length of the array above. */ | 1163 | int path_length; /* Length of the array above. */ |
1164 | int reada; | 1164 | int reada; |
1165 | struct path_element path_elements[EXTENDED_MAX_HEIGHT]; /* Array of the path elements. */ | 1165 | struct path_element path_elements[EXTENDED_MAX_HEIGHT]; /* Array of the path elements. */ |
@@ -1169,7 +1169,7 @@ struct path { | |||
1169 | #define pos_in_item(path) ((path)->pos_in_item) | 1169 | #define pos_in_item(path) ((path)->pos_in_item) |
1170 | 1170 | ||
1171 | #define INITIALIZE_PATH(var) \ | 1171 | #define INITIALIZE_PATH(var) \ |
1172 | struct path var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,} | 1172 | struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,} |
1173 | 1173 | ||
1174 | /* Get path element by path and path position. */ | 1174 | /* Get path element by path and path position. */ |
1175 | #define PATH_OFFSET_PELEMENT(p_s_path,n_offset) ((p_s_path)->path_elements +(n_offset)) | 1175 | #define PATH_OFFSET_PELEMENT(p_s_path,n_offset) ((p_s_path)->path_elements +(n_offset)) |
@@ -1327,7 +1327,7 @@ struct tree_balance { | |||
1327 | int need_balance_dirty; | 1327 | int need_balance_dirty; |
1328 | struct super_block *tb_sb; | 1328 | struct super_block *tb_sb; |
1329 | struct reiserfs_transaction_handle *transaction_handle; | 1329 | struct reiserfs_transaction_handle *transaction_handle; |
1330 | struct path *tb_path; | 1330 | struct treepath *tb_path; |
1331 | struct buffer_head *L[MAX_HEIGHT]; /* array of left neighbors of nodes in the path */ | 1331 | struct buffer_head *L[MAX_HEIGHT]; /* array of left neighbors of nodes in the path */ |
1332 | struct buffer_head *R[MAX_HEIGHT]; /* array of right neighbors of nodes in the path */ | 1332 | struct buffer_head *R[MAX_HEIGHT]; /* array of right neighbors of nodes in the path */ |
1333 | struct buffer_head *FL[MAX_HEIGHT]; /* array of fathers of the left neighbors */ | 1333 | struct buffer_head *FL[MAX_HEIGHT]; /* array of fathers of the left neighbors */ |
@@ -1793,41 +1793,41 @@ static inline void copy_key(struct reiserfs_key *to, | |||
1793 | memcpy(to, from, KEY_SIZE); | 1793 | memcpy(to, from, KEY_SIZE); |
1794 | } | 1794 | } |
1795 | 1795 | ||
1796 | int comp_items(const struct item_head *stored_ih, const struct path *p_s_path); | 1796 | int comp_items(const struct item_head *stored_ih, const struct treepath *p_s_path); |
1797 | const struct reiserfs_key *get_rkey(const struct path *p_s_chk_path, | 1797 | const struct reiserfs_key *get_rkey(const struct treepath *p_s_chk_path, |
1798 | const struct super_block *p_s_sb); | 1798 | const struct super_block *p_s_sb); |
1799 | int search_by_key(struct super_block *, const struct cpu_key *, | 1799 | int search_by_key(struct super_block *, const struct cpu_key *, |
1800 | struct path *, int); | 1800 | struct treepath *, int); |
1801 | #define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL) | 1801 | #define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL) |
1802 | int search_for_position_by_key(struct super_block *p_s_sb, | 1802 | int search_for_position_by_key(struct super_block *p_s_sb, |
1803 | const struct cpu_key *p_s_cpu_key, | 1803 | const struct cpu_key *p_s_cpu_key, |
1804 | struct path *p_s_search_path); | 1804 | struct treepath *p_s_search_path); |
1805 | extern void decrement_bcount(struct buffer_head *p_s_bh); | 1805 | extern void decrement_bcount(struct buffer_head *p_s_bh); |
1806 | void decrement_counters_in_path(struct path *p_s_search_path); | 1806 | void decrement_counters_in_path(struct treepath *p_s_search_path); |
1807 | void pathrelse(struct path *p_s_search_path); | 1807 | void pathrelse(struct treepath *p_s_search_path); |
1808 | int reiserfs_check_path(struct path *p); | 1808 | int reiserfs_check_path(struct treepath *p); |
1809 | void pathrelse_and_restore(struct super_block *s, struct path *p_s_search_path); | 1809 | void pathrelse_and_restore(struct super_block *s, struct treepath *p_s_search_path); |
1810 | 1810 | ||
1811 | int reiserfs_insert_item(struct reiserfs_transaction_handle *th, | 1811 | int reiserfs_insert_item(struct reiserfs_transaction_handle *th, |
1812 | struct path *path, | 1812 | struct treepath *path, |
1813 | const struct cpu_key *key, | 1813 | const struct cpu_key *key, |
1814 | struct item_head *ih, | 1814 | struct item_head *ih, |
1815 | struct inode *inode, const char *body); | 1815 | struct inode *inode, const char *body); |
1816 | 1816 | ||
1817 | int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, | 1817 | int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, |
1818 | struct path *path, | 1818 | struct treepath *path, |
1819 | const struct cpu_key *key, | 1819 | const struct cpu_key *key, |
1820 | struct inode *inode, | 1820 | struct inode *inode, |
1821 | const char *body, int paste_size); | 1821 | const char *body, int paste_size); |
1822 | 1822 | ||
1823 | int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th, | 1823 | int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th, |
1824 | struct path *path, | 1824 | struct treepath *path, |
1825 | struct cpu_key *key, | 1825 | struct cpu_key *key, |
1826 | struct inode *inode, | 1826 | struct inode *inode, |
1827 | struct page *page, loff_t new_file_size); | 1827 | struct page *page, loff_t new_file_size); |
1828 | 1828 | ||
1829 | int reiserfs_delete_item(struct reiserfs_transaction_handle *th, | 1829 | int reiserfs_delete_item(struct reiserfs_transaction_handle *th, |
1830 | struct path *path, | 1830 | struct treepath *path, |
1831 | const struct cpu_key *key, | 1831 | const struct cpu_key *key, |
1832 | struct inode *inode, struct buffer_head *p_s_un_bh); | 1832 | struct inode *inode, struct buffer_head *p_s_un_bh); |
1833 | 1833 | ||
@@ -1858,7 +1858,7 @@ void padd_item(char *item, int total_length, int length); | |||
1858 | #define GET_BLOCK_NO_DANGLE 16 /* don't leave any transactions running */ | 1858 | #define GET_BLOCK_NO_DANGLE 16 /* don't leave any transactions running */ |
1859 | 1859 | ||
1860 | int restart_transaction(struct reiserfs_transaction_handle *th, | 1860 | int restart_transaction(struct reiserfs_transaction_handle *th, |
1861 | struct inode *inode, struct path *path); | 1861 | struct inode *inode, struct treepath *path); |
1862 | void reiserfs_read_locked_inode(struct inode *inode, | 1862 | void reiserfs_read_locked_inode(struct inode *inode, |
1863 | struct reiserfs_iget_args *args); | 1863 | struct reiserfs_iget_args *args); |
1864 | int reiserfs_find_actor(struct inode *inode, void *p); | 1864 | int reiserfs_find_actor(struct inode *inode, void *p); |
@@ -1905,7 +1905,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr); | |||
1905 | /* namei.c */ | 1905 | /* namei.c */ |
1906 | void set_de_name_and_namelen(struct reiserfs_dir_entry *de); | 1906 | void set_de_name_and_namelen(struct reiserfs_dir_entry *de); |
1907 | int search_by_entry_key(struct super_block *sb, const struct cpu_key *key, | 1907 | int search_by_entry_key(struct super_block *sb, const struct cpu_key *key, |
1908 | struct path *path, struct reiserfs_dir_entry *de); | 1908 | struct treepath *path, struct reiserfs_dir_entry *de); |
1909 | struct dentry *reiserfs_get_parent(struct dentry *); | 1909 | struct dentry *reiserfs_get_parent(struct dentry *); |
1910 | /* procfs.c */ | 1910 | /* procfs.c */ |
1911 | 1911 | ||
@@ -1956,9 +1956,9 @@ extern const struct file_operations reiserfs_dir_operations; | |||
1956 | 1956 | ||
1957 | /* tail_conversion.c */ | 1957 | /* tail_conversion.c */ |
1958 | int direct2indirect(struct reiserfs_transaction_handle *, struct inode *, | 1958 | int direct2indirect(struct reiserfs_transaction_handle *, struct inode *, |
1959 | struct path *, struct buffer_head *, loff_t); | 1959 | struct treepath *, struct buffer_head *, loff_t); |
1960 | int indirect2direct(struct reiserfs_transaction_handle *, struct inode *, | 1960 | int indirect2direct(struct reiserfs_transaction_handle *, struct inode *, |
1961 | struct page *, struct path *, const struct cpu_key *, | 1961 | struct page *, struct treepath *, const struct cpu_key *, |
1962 | loff_t, char *); | 1962 | loff_t, char *); |
1963 | void reiserfs_unmap_buffer(struct buffer_head *); | 1963 | void reiserfs_unmap_buffer(struct buffer_head *); |
1964 | 1964 | ||
@@ -2045,7 +2045,7 @@ struct __reiserfs_blocknr_hint { | |||
2045 | struct inode *inode; /* inode passed to allocator, if we allocate unf. nodes */ | 2045 | struct inode *inode; /* inode passed to allocator, if we allocate unf. nodes */ |
2046 | long block; /* file offset, in blocks */ | 2046 | long block; /* file offset, in blocks */ |
2047 | struct in_core_key key; | 2047 | struct in_core_key key; |
2048 | struct path *path; /* search path, used by allocator to deternine search_start by | 2048 | struct treepath *path; /* search path, used by allocator to deternine search_start by |
2049 | * various ways */ | 2049 | * various ways */ |
2050 | struct reiserfs_transaction_handle *th; /* transaction handle is needed to log super blocks and | 2050 | struct reiserfs_transaction_handle *th; /* transaction handle is needed to log super blocks and |
2051 | * bitmap blocks changes */ | 2051 | * bitmap blocks changes */ |
@@ -2101,7 +2101,7 @@ static inline int reiserfs_new_form_blocknrs(struct tree_balance *tb, | |||
2101 | static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle | 2101 | static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle |
2102 | *th, struct inode *inode, | 2102 | *th, struct inode *inode, |
2103 | b_blocknr_t * new_blocknrs, | 2103 | b_blocknr_t * new_blocknrs, |
2104 | struct path *path, long block) | 2104 | struct treepath *path, long block) |
2105 | { | 2105 | { |
2106 | reiserfs_blocknr_hint_t hint = { | 2106 | reiserfs_blocknr_hint_t hint = { |
2107 | .th = th, | 2107 | .th = th, |
@@ -2118,7 +2118,7 @@ static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle | |||
2118 | static inline int reiserfs_new_unf_blocknrs2(struct reiserfs_transaction_handle | 2118 | static inline int reiserfs_new_unf_blocknrs2(struct reiserfs_transaction_handle |
2119 | *th, struct inode *inode, | 2119 | *th, struct inode *inode, |
2120 | b_blocknr_t * new_blocknrs, | 2120 | b_blocknr_t * new_blocknrs, |
2121 | struct path *path, long block) | 2121 | struct treepath *path, long block) |
2122 | { | 2122 | { |
2123 | reiserfs_blocknr_hint_t hint = { | 2123 | reiserfs_blocknr_hint_t hint = { |
2124 | .th = th, | 2124 | .th = th, |
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index 5b3b297aa2c5..ce3663fb0101 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
@@ -25,6 +25,7 @@ typedef enum { | |||
25 | i_link_saved_truncate_mask = 0x0020, | 25 | i_link_saved_truncate_mask = 0x0020, |
26 | i_has_xattr_dir = 0x0040, | 26 | i_has_xattr_dir = 0x0040, |
27 | i_data_log = 0x0080, | 27 | i_data_log = 0x0080, |
28 | i_ever_mapped = 0x0100 | ||
28 | } reiserfs_inode_flags; | 29 | } reiserfs_inode_flags; |
29 | 30 | ||
30 | struct reiserfs_inode_info { | 31 | struct reiserfs_inode_info { |
@@ -52,6 +53,7 @@ struct reiserfs_inode_info { | |||
52 | ** flushed */ | 53 | ** flushed */ |
53 | unsigned long i_trans_id; | 54 | unsigned long i_trans_id; |
54 | struct reiserfs_journal_list *i_jl; | 55 | struct reiserfs_journal_list *i_jl; |
56 | struct mutex i_mmap; | ||
55 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | 57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL |
56 | struct posix_acl *i_acl_access; | 58 | struct posix_acl *i_acl_access; |
57 | struct posix_acl *i_acl_default; | 59 | struct posix_acl *i_acl_default; |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 36f850373d2c..bdd277223af0 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -72,7 +72,7 @@ void __anon_vma_link(struct vm_area_struct *); | |||
72 | void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | 72 | void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); |
73 | void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | 73 | void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); |
74 | void page_add_file_rmap(struct page *); | 74 | void page_add_file_rmap(struct page *); |
75 | void page_remove_rmap(struct page *); | 75 | void page_remove_rmap(struct page *, struct vm_area_struct *); |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * page_dup_rmap - duplicate pte mapping to a page | 78 | * page_dup_rmap - duplicate pte mapping to a page |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 09ff4c3e2713..5e22d4510d11 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -106,6 +106,7 @@ extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year | |||
106 | extern int rtc_valid_tm(struct rtc_time *tm); | 106 | extern int rtc_valid_tm(struct rtc_time *tm); |
107 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); | 107 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); |
108 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); | 108 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); |
109 | extern void rtc_merge_alarm(struct rtc_time *now, struct rtc_time *alarm); | ||
109 | 110 | ||
110 | #include <linux/device.h> | 111 | #include <linux/device.h> |
111 | #include <linux/seq_file.h> | 112 | #include <linux/seq_file.h> |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index b0090e9f7884..382bb7951166 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/plist.h> | 16 | #include <linux/plist.h> |
17 | #include <linux/spinlock_types.h> | 17 | #include <linux/spinlock_types.h> |
18 | 18 | ||
19 | /* | 19 | /** |
20 | * The rt_mutex structure | 20 | * The rt_mutex structure |
21 | * | 21 | * |
22 | * @wait_lock: spinlock to protect the structure | 22 | * @wait_lock: spinlock to protect the structure |
@@ -71,7 +71,7 @@ struct hrtimer_sleeper; | |||
71 | #define DEFINE_RT_MUTEX(mutexname) \ | 71 | #define DEFINE_RT_MUTEX(mutexname) \ |
72 | struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) | 72 | struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) |
73 | 73 | ||
74 | /*** | 74 | /** |
75 | * rt_mutex_is_locked - is the mutex locked | 75 | * rt_mutex_is_locked - is the mutex locked |
76 | * @lock: the mutex to be queried | 76 | * @lock: the mutex to be queried |
77 | * | 77 | * |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 493297acdae8..4a629ea70cc4 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/netlink.h> | 4 | #include <linux/netlink.h> |
5 | #include <linux/if_link.h> | 5 | #include <linux/if_link.h> |
6 | #include <linux/if_addr.h> | ||
7 | #include <linux/neighbour.h> | ||
6 | 8 | ||
7 | /**** | 9 | /**** |
8 | * Routing/neighbour discovery messages. | 10 | * Routing/neighbour discovery messages. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index dede82c63445..446373535190 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -82,6 +82,7 @@ struct sched_param { | |||
82 | #include <linux/resource.h> | 82 | #include <linux/resource.h> |
83 | #include <linux/timer.h> | 83 | #include <linux/timer.h> |
84 | #include <linux/hrtimer.h> | 84 | #include <linux/hrtimer.h> |
85 | #include <linux/task_io_accounting.h> | ||
85 | 86 | ||
86 | #include <asm/processor.h> | 87 | #include <asm/processor.h> |
87 | 88 | ||
@@ -436,7 +437,12 @@ struct signal_struct { | |||
436 | /* job control IDs */ | 437 | /* job control IDs */ |
437 | pid_t pgrp; | 438 | pid_t pgrp; |
438 | pid_t tty_old_pgrp; | 439 | pid_t tty_old_pgrp; |
439 | pid_t session; | 440 | |
441 | union { | ||
442 | pid_t session __deprecated; | ||
443 | pid_t __session; | ||
444 | }; | ||
445 | |||
440 | /* boolean value for session group leader */ | 446 | /* boolean value for session group leader */ |
441 | int leader; | 447 | int leader; |
442 | 448 | ||
@@ -642,6 +648,7 @@ enum idle_type | |||
642 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ | 648 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ |
643 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ | 649 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ |
644 | #define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */ | 650 | #define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */ |
651 | #define SD_SERIALIZE 1024 /* Only a single load balancing instance */ | ||
645 | 652 | ||
646 | #define BALANCE_FOR_MC_POWER \ | 653 | #define BALANCE_FOR_MC_POWER \ |
647 | (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0) | 654 | (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0) |
@@ -1008,6 +1015,7 @@ struct task_struct { | |||
1008 | wait_queue_t *io_wait; | 1015 | wait_queue_t *io_wait; |
1009 | /* i/o counters(bytes read/written, #syscalls */ | 1016 | /* i/o counters(bytes read/written, #syscalls */ |
1010 | u64 rchar, wchar, syscr, syscw; | 1017 | u64 rchar, wchar, syscr, syscw; |
1018 | struct task_io_accounting ioac; | ||
1011 | #if defined(CONFIG_TASK_XACCT) | 1019 | #if defined(CONFIG_TASK_XACCT) |
1012 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1020 | u64 acct_rss_mem1; /* accumulated rss usage */ |
1013 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ | 1021 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ |
@@ -1040,6 +1048,9 @@ struct task_struct { | |||
1040 | #ifdef CONFIG_TASK_DELAY_ACCT | 1048 | #ifdef CONFIG_TASK_DELAY_ACCT |
1041 | struct task_delay_info *delays; | 1049 | struct task_delay_info *delays; |
1042 | #endif | 1050 | #endif |
1051 | #ifdef CONFIG_FAULT_INJECTION | ||
1052 | int make_it_fail; | ||
1053 | #endif | ||
1043 | }; | 1054 | }; |
1044 | 1055 | ||
1045 | static inline pid_t process_group(struct task_struct *tsk) | 1056 | static inline pid_t process_group(struct task_struct *tsk) |
@@ -1047,6 +1058,21 @@ static inline pid_t process_group(struct task_struct *tsk) | |||
1047 | return tsk->signal->pgrp; | 1058 | return tsk->signal->pgrp; |
1048 | } | 1059 | } |
1049 | 1060 | ||
1061 | static inline pid_t signal_session(struct signal_struct *sig) | ||
1062 | { | ||
1063 | return sig->__session; | ||
1064 | } | ||
1065 | |||
1066 | static inline pid_t process_session(struct task_struct *tsk) | ||
1067 | { | ||
1068 | return signal_session(tsk->signal); | ||
1069 | } | ||
1070 | |||
1071 | static inline void set_signal_session(struct signal_struct *sig, pid_t session) | ||
1072 | { | ||
1073 | sig->__session = session; | ||
1074 | } | ||
1075 | |||
1050 | static inline struct pid *task_pid(struct task_struct *task) | 1076 | static inline struct pid *task_pid(struct task_struct *task) |
1051 | { | 1077 | { |
1052 | return task->pids[PIDTYPE_PID].pid; | 1078 | return task->pids[PIDTYPE_PID].pid; |
@@ -1118,7 +1144,6 @@ static inline void put_task_struct(struct task_struct *t) | |||
1118 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1144 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
1119 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ | 1145 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ |
1120 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1146 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
1121 | #define PF_FREEZE 0x00004000 /* this task is being frozen for suspend now */ | ||
1122 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1147 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
1123 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ | 1148 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ |
1124 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ | 1149 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ |
@@ -1240,7 +1265,6 @@ extern struct mm_struct init_mm; | |||
1240 | 1265 | ||
1241 | #define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) | 1266 | #define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) |
1242 | extern struct task_struct *find_task_by_pid_type(int type, int pid); | 1267 | extern struct task_struct *find_task_by_pid_type(int type, int pid); |
1243 | extern void set_special_pids(pid_t session, pid_t pgrp); | ||
1244 | extern void __set_special_pids(pid_t session, pid_t pgrp); | 1268 | extern void __set_special_pids(pid_t session, pid_t pgrp); |
1245 | 1269 | ||
1246 | /* per-UID process charging. */ | 1270 | /* per-UID process charging. */ |
@@ -1381,7 +1405,6 @@ extern NORET_TYPE void do_group_exit(int); | |||
1381 | extern void daemonize(const char *, ...); | 1405 | extern void daemonize(const char *, ...); |
1382 | extern int allow_signal(int); | 1406 | extern int allow_signal(int); |
1383 | extern int disallow_signal(int); | 1407 | extern int disallow_signal(int); |
1384 | extern struct task_struct *child_reaper; | ||
1385 | 1408 | ||
1386 | extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); | 1409 | extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); |
1387 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); | 1410 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 35108fe7a686..d4f86560bfff 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -180,7 +180,7 @@ typedef enum { | |||
180 | SCTP_PARAM_ERR_CAUSE = __constant_htons(0xc003), | 180 | SCTP_PARAM_ERR_CAUSE = __constant_htons(0xc003), |
181 | SCTP_PARAM_SET_PRIMARY = __constant_htons(0xc004), | 181 | SCTP_PARAM_SET_PRIMARY = __constant_htons(0xc004), |
182 | SCTP_PARAM_SUCCESS_REPORT = __constant_htons(0xc005), | 182 | SCTP_PARAM_SUCCESS_REPORT = __constant_htons(0xc005), |
183 | SCTP_PARAM_ADAPTION_LAYER_IND = __constant_htons(0xc006), | 183 | SCTP_PARAM_ADAPTATION_LAYER_IND = __constant_htons(0xc006), |
184 | 184 | ||
185 | } sctp_param_t; /* enum */ | 185 | } sctp_param_t; /* enum */ |
186 | 186 | ||
@@ -281,11 +281,11 @@ typedef struct sctp_ecn_capable_param { | |||
281 | sctp_paramhdr_t param_hdr; | 281 | sctp_paramhdr_t param_hdr; |
282 | } __attribute__((packed)) sctp_ecn_capable_param_t; | 282 | } __attribute__((packed)) sctp_ecn_capable_param_t; |
283 | 283 | ||
284 | /* ADDIP Section 3.2.6 Adaption Layer Indication */ | 284 | /* ADDIP Section 3.2.6 Adaptation Layer Indication */ |
285 | typedef struct sctp_adaption_ind_param { | 285 | typedef struct sctp_adaptation_ind_param { |
286 | struct sctp_paramhdr param_hdr; | 286 | struct sctp_paramhdr param_hdr; |
287 | __be32 adaption_ind; | 287 | __be32 adaptation_ind; |
288 | } __attribute__((packed)) sctp_adaption_ind_param_t; | 288 | } __attribute__((packed)) sctp_adaptation_ind_param_t; |
289 | 289 | ||
290 | /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): | 290 | /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): |
291 | * The INIT ACK chunk is used to acknowledge the initiation of an SCTP | 291 | * The INIT ACK chunk is used to acknowledge the initiation of an SCTP |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 46000936f8f1..6b0648cfdffc 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -44,8 +44,11 @@ typedef struct { | |||
44 | #define SEQLOCK_UNLOCKED \ | 44 | #define SEQLOCK_UNLOCKED \ |
45 | __SEQLOCK_UNLOCKED(old_style_seqlock_init) | 45 | __SEQLOCK_UNLOCKED(old_style_seqlock_init) |
46 | 46 | ||
47 | #define seqlock_init(x) \ | 47 | #define seqlock_init(x) \ |
48 | do { *(x) = (seqlock_t) __SEQLOCK_UNLOCKED(x); } while (0) | 48 | do { \ |
49 | (x)->sequence = 0; \ | ||
50 | spin_lock_init(&(x)->lock); \ | ||
51 | } while (0) | ||
49 | 52 | ||
50 | #define DEFINE_SEQLOCK(x) \ | 53 | #define DEFINE_SEQLOCK(x) \ |
51 | seqlock_t x = __SEQLOCK_UNLOCKED(x) | 54 | seqlock_t x = __SEQLOCK_UNLOCKED(x) |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 827672136646..cf23813cbec2 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -166,8 +166,8 @@ struct uart_ops { | |||
166 | void (*break_ctl)(struct uart_port *, int ctl); | 166 | void (*break_ctl)(struct uart_port *, int ctl); |
167 | int (*startup)(struct uart_port *); | 167 | int (*startup)(struct uart_port *); |
168 | void (*shutdown)(struct uart_port *); | 168 | void (*shutdown)(struct uart_port *); |
169 | void (*set_termios)(struct uart_port *, struct termios *new, | 169 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
170 | struct termios *old); | 170 | struct ktermios *old); |
171 | void (*pm)(struct uart_port *, unsigned int state, | 171 | void (*pm)(struct uart_port *, unsigned int state, |
172 | unsigned int oldstate); | 172 | unsigned int oldstate); |
173 | int (*set_wake)(struct uart_port *, unsigned int state); | 173 | int (*set_wake)(struct uart_port *, unsigned int state); |
@@ -361,8 +361,8 @@ void uart_write_wakeup(struct uart_port *port); | |||
361 | */ | 361 | */ |
362 | void uart_update_timeout(struct uart_port *port, unsigned int cflag, | 362 | void uart_update_timeout(struct uart_port *port, unsigned int cflag, |
363 | unsigned int baud); | 363 | unsigned int baud); |
364 | unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios, | 364 | unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, |
365 | struct termios *old, unsigned int min, | 365 | struct ktermios *old, unsigned int min, |
366 | unsigned int max); | 366 | unsigned int max); |
367 | unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); | 367 | unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); |
368 | 368 | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index 0f478a8791a2..ac2c70e7f760 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 | ||
diff --git a/include/linux/slab.h b/include/linux/slab.h index 2271886744f8..1ef822e31c77 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/slab.h | 2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). |
3 | * Written by Mark Hemment, 1996. | 3 | * |
4 | * (markhe@nextd.demon.co.uk) | 4 | * (C) SGI 2006, Christoph Lameter <clameter@sgi.com> |
5 | * Cleaned up and restructured to ease the addition of alternative | ||
6 | * implementations of SLAB allocators. | ||
5 | */ | 7 | */ |
6 | 8 | ||
7 | #ifndef _LINUX_SLAB_H | 9 | #ifndef _LINUX_SLAB_H |
@@ -10,64 +12,95 @@ | |||
10 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
11 | 13 | ||
12 | #include <linux/gfp.h> | 14 | #include <linux/gfp.h> |
13 | #include <linux/init.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <asm/page.h> /* kmalloc_sizes.h needs PAGE_SIZE */ | ||
16 | #include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */ | ||
17 | #include <linux/compiler.h> | ||
18 | 16 | ||
19 | /* kmem_cache_t exists for legacy reasons and is not used by code in mm */ | ||
20 | typedef struct kmem_cache kmem_cache_t __deprecated; | 17 | typedef struct kmem_cache kmem_cache_t __deprecated; |
21 | 18 | ||
22 | /* flags to pass to kmem_cache_create(). | 19 | /* |
23 | * The first 3 are only valid when the allocator as been build | 20 | * Flags to pass to kmem_cache_create(). |
24 | * SLAB_DEBUG_SUPPORT. | 21 | * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. |
25 | */ | 22 | */ |
26 | #define SLAB_DEBUG_FREE 0x00000100UL /* Peform (expensive) checks on free */ | 23 | #define SLAB_DEBUG_FREE 0x00000100UL /* DEBUG: Perform (expensive) checks on free */ |
27 | #define SLAB_DEBUG_INITIAL 0x00000200UL /* Call constructor (as verifier) */ | 24 | #define SLAB_DEBUG_INITIAL 0x00000200UL /* DEBUG: Call constructor (as verifier) */ |
28 | #define SLAB_RED_ZONE 0x00000400UL /* Red zone objs in a cache */ | 25 | #define SLAB_RED_ZONE 0x00000400UL /* DEBUG: Red zone objs in a cache */ |
29 | #define SLAB_POISON 0x00000800UL /* Poison objects */ | 26 | #define SLAB_POISON 0x00000800UL /* DEBUG: Poison objects */ |
30 | #define SLAB_HWCACHE_ALIGN 0x00002000UL /* align objs on a h/w cache lines */ | 27 | #define SLAB_HWCACHE_ALIGN 0x00002000UL /* Align objs on cache lines */ |
31 | #define SLAB_CACHE_DMA 0x00004000UL /* use GFP_DMA memory */ | 28 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ |
32 | #define SLAB_MUST_HWCACHE_ALIGN 0x00008000UL /* force alignment */ | 29 | #define SLAB_MUST_HWCACHE_ALIGN 0x00008000UL /* Force alignment even if debuggin is active */ |
33 | #define SLAB_STORE_USER 0x00010000UL /* store the last owner for bug hunting */ | 30 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ |
34 | #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* track pages allocated to indicate | 31 | #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* Objects are reclaimable */ |
35 | what is reclaimable later*/ | 32 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ |
36 | #define SLAB_PANIC 0x00040000UL /* panic if kmem_cache_create() fails */ | 33 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ |
37 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* defer freeing pages to RCU */ | ||
38 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ | 34 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ |
39 | 35 | ||
40 | /* flags passed to a constructor func */ | 36 | /* Flags passed to a constructor functions */ |
41 | #define SLAB_CTOR_CONSTRUCTOR 0x001UL /* if not set, then deconstructor */ | 37 | #define SLAB_CTOR_CONSTRUCTOR 0x001UL /* If not set, then deconstructor */ |
42 | #define SLAB_CTOR_ATOMIC 0x002UL /* tell constructor it can't sleep */ | 38 | #define SLAB_CTOR_ATOMIC 0x002UL /* Tell constructor it can't sleep */ |
43 | #define SLAB_CTOR_VERIFY 0x004UL /* tell constructor it's a verify call */ | 39 | #define SLAB_CTOR_VERIFY 0x004UL /* Tell constructor it's a verify call */ |
44 | 40 | ||
45 | #ifndef CONFIG_SLOB | 41 | /* |
46 | 42 | * struct kmem_cache related prototypes | |
47 | /* prototypes */ | 43 | */ |
48 | extern void __init kmem_cache_init(void); | 44 | void __init kmem_cache_init(void); |
45 | extern int slab_is_available(void); | ||
49 | 46 | ||
50 | extern struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | 47 | struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, |
51 | unsigned long, | 48 | unsigned long, |
52 | void (*)(void *, struct kmem_cache *, unsigned long), | 49 | void (*)(void *, struct kmem_cache *, unsigned long), |
53 | void (*)(void *, struct kmem_cache *, unsigned long)); | 50 | void (*)(void *, struct kmem_cache *, unsigned long)); |
54 | extern void kmem_cache_destroy(struct kmem_cache *); | 51 | void kmem_cache_destroy(struct kmem_cache *); |
55 | extern int kmem_cache_shrink(struct kmem_cache *); | 52 | int kmem_cache_shrink(struct kmem_cache *); |
56 | extern void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 53 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
57 | extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | 54 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); |
58 | extern void kmem_cache_free(struct kmem_cache *, void *); | 55 | void kmem_cache_free(struct kmem_cache *, void *); |
59 | extern unsigned int kmem_cache_size(struct kmem_cache *); | 56 | unsigned int kmem_cache_size(struct kmem_cache *); |
60 | extern const char *kmem_cache_name(struct kmem_cache *); | 57 | const char *kmem_cache_name(struct kmem_cache *); |
58 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | ||
59 | |||
60 | #ifdef CONFIG_NUMA | ||
61 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
62 | #else | ||
63 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
64 | gfp_t flags, int node) | ||
65 | { | ||
66 | return kmem_cache_alloc(cachep, flags); | ||
67 | } | ||
68 | #endif | ||
69 | |||
70 | /* | ||
71 | * Common kmalloc functions provided by all allocators | ||
72 | */ | ||
73 | void *__kmalloc(size_t, gfp_t); | ||
74 | void *__kzalloc(size_t, gfp_t); | ||
75 | void kfree(const void *); | ||
76 | unsigned int ksize(const void *); | ||
77 | |||
78 | /** | ||
79 | * kcalloc - allocate memory for an array. The memory is set to zero. | ||
80 | * @n: number of elements. | ||
81 | * @size: element size. | ||
82 | * @flags: the type of memory to allocate. | ||
83 | */ | ||
84 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
85 | { | ||
86 | if (n != 0 && size > ULONG_MAX / n) | ||
87 | return NULL; | ||
88 | return __kzalloc(n * size, flags); | ||
89 | } | ||
61 | 90 | ||
62 | /* Size description struct for general caches. */ | 91 | /* |
63 | struct cache_sizes { | 92 | * Allocator specific definitions. These are mainly used to establish optimized |
64 | size_t cs_size; | 93 | * ways to convert kmalloc() calls to kmem_cache_alloc() invocations by selecting |
65 | struct kmem_cache *cs_cachep; | 94 | * the appropriate general cache at compile time. |
66 | struct kmem_cache *cs_dmacachep; | 95 | */ |
67 | }; | ||
68 | extern struct cache_sizes malloc_sizes[]; | ||
69 | 96 | ||
70 | extern void *__kmalloc(size_t, gfp_t); | 97 | #ifdef CONFIG_SLAB |
98 | #include <linux/slab_def.h> | ||
99 | #else | ||
100 | /* | ||
101 | * Fallback definitions for an allocator not wanting to provide | ||
102 | * its own optimized kmalloc definitions (like SLOB). | ||
103 | */ | ||
71 | 104 | ||
72 | /** | 105 | /** |
73 | * kmalloc - allocate memory | 106 | * kmalloc - allocate memory |
@@ -116,46 +149,9 @@ extern void *__kmalloc(size_t, gfp_t); | |||
116 | */ | 149 | */ |
117 | static inline void *kmalloc(size_t size, gfp_t flags) | 150 | static inline void *kmalloc(size_t size, gfp_t flags) |
118 | { | 151 | { |
119 | if (__builtin_constant_p(size)) { | ||
120 | int i = 0; | ||
121 | #define CACHE(x) \ | ||
122 | if (size <= x) \ | ||
123 | goto found; \ | ||
124 | else \ | ||
125 | i++; | ||
126 | #include "kmalloc_sizes.h" | ||
127 | #undef CACHE | ||
128 | { | ||
129 | extern void __you_cannot_kmalloc_that_much(void); | ||
130 | __you_cannot_kmalloc_that_much(); | ||
131 | } | ||
132 | found: | ||
133 | return kmem_cache_alloc((flags & GFP_DMA) ? | ||
134 | malloc_sizes[i].cs_dmacachep : | ||
135 | malloc_sizes[i].cs_cachep, flags); | ||
136 | } | ||
137 | return __kmalloc(size, flags); | 152 | return __kmalloc(size, flags); |
138 | } | 153 | } |
139 | 154 | ||
140 | /* | ||
141 | * kmalloc_track_caller is a special version of kmalloc that records the | ||
142 | * calling function of the routine calling it for slab leak tracking instead | ||
143 | * of just the calling function (confusing, eh?). | ||
144 | * It's useful when the call to kmalloc comes from a widely-used standard | ||
145 | * allocator where we care about the real place the memory allocation | ||
146 | * request comes from. | ||
147 | */ | ||
148 | #ifndef CONFIG_DEBUG_SLAB | ||
149 | #define kmalloc_track_caller(size, flags) \ | ||
150 | __kmalloc(size, flags) | ||
151 | #else | ||
152 | extern void *__kmalloc_track_caller(size_t, gfp_t, void*); | ||
153 | #define kmalloc_track_caller(size, flags) \ | ||
154 | __kmalloc_track_caller(size, flags, __builtin_return_address(0)) | ||
155 | #endif | ||
156 | |||
157 | extern void *__kzalloc(size_t, gfp_t); | ||
158 | |||
159 | /** | 155 | /** |
160 | * kzalloc - allocate memory. The memory is set to zero. | 156 | * kzalloc - allocate memory. The memory is set to zero. |
161 | * @size: how many bytes of memory are required. | 157 | * @size: how many bytes of memory are required. |
@@ -163,72 +159,41 @@ extern void *__kzalloc(size_t, gfp_t); | |||
163 | */ | 159 | */ |
164 | static inline void *kzalloc(size_t size, gfp_t flags) | 160 | static inline void *kzalloc(size_t size, gfp_t flags) |
165 | { | 161 | { |
166 | if (__builtin_constant_p(size)) { | ||
167 | int i = 0; | ||
168 | #define CACHE(x) \ | ||
169 | if (size <= x) \ | ||
170 | goto found; \ | ||
171 | else \ | ||
172 | i++; | ||
173 | #include "kmalloc_sizes.h" | ||
174 | #undef CACHE | ||
175 | { | ||
176 | extern void __you_cannot_kzalloc_that_much(void); | ||
177 | __you_cannot_kzalloc_that_much(); | ||
178 | } | ||
179 | found: | ||
180 | return kmem_cache_zalloc((flags & GFP_DMA) ? | ||
181 | malloc_sizes[i].cs_dmacachep : | ||
182 | malloc_sizes[i].cs_cachep, flags); | ||
183 | } | ||
184 | return __kzalloc(size, flags); | 162 | return __kzalloc(size, flags); |
185 | } | 163 | } |
164 | #endif | ||
186 | 165 | ||
187 | /** | 166 | #ifndef CONFIG_NUMA |
188 | * kcalloc - allocate memory for an array. The memory is set to zero. | 167 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) |
189 | * @n: number of elements. | ||
190 | * @size: element size. | ||
191 | * @flags: the type of memory to allocate. | ||
192 | */ | ||
193 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
194 | { | 168 | { |
195 | if (n != 0 && size > ULONG_MAX / n) | 169 | return kmalloc(size, flags); |
196 | return NULL; | ||
197 | return kzalloc(n * size, flags); | ||
198 | } | 170 | } |
199 | 171 | ||
200 | extern void kfree(const void *); | 172 | static inline void *__kmalloc_node(size_t size, gfp_t flags, int node) |
201 | extern unsigned int ksize(const void *); | ||
202 | extern int slab_is_available(void); | ||
203 | |||
204 | #ifdef CONFIG_NUMA | ||
205 | extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | ||
206 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | ||
207 | |||
208 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | ||
209 | { | 173 | { |
210 | if (__builtin_constant_p(size)) { | 174 | return __kmalloc(size, flags); |
211 | int i = 0; | ||
212 | #define CACHE(x) \ | ||
213 | if (size <= x) \ | ||
214 | goto found; \ | ||
215 | else \ | ||
216 | i++; | ||
217 | #include "kmalloc_sizes.h" | ||
218 | #undef CACHE | ||
219 | { | ||
220 | extern void __you_cannot_kmalloc_that_much(void); | ||
221 | __you_cannot_kmalloc_that_much(); | ||
222 | } | ||
223 | found: | ||
224 | return kmem_cache_alloc_node((flags & GFP_DMA) ? | ||
225 | malloc_sizes[i].cs_dmacachep : | ||
226 | malloc_sizes[i].cs_cachep, flags, node); | ||
227 | } | ||
228 | return __kmalloc_node(size, flags, node); | ||
229 | } | 175 | } |
176 | #endif /* !CONFIG_NUMA */ | ||
230 | 177 | ||
231 | /* | 178 | /* |
179 | * kmalloc_track_caller is a special version of kmalloc that records the | ||
180 | * calling function of the routine calling it for slab leak tracking instead | ||
181 | * of just the calling function (confusing, eh?). | ||
182 | * It's useful when the call to kmalloc comes from a widely-used standard | ||
183 | * allocator where we care about the real place the memory allocation | ||
184 | * request comes from. | ||
185 | */ | ||
186 | #ifdef CONFIG_DEBUG_SLAB | ||
187 | extern void *__kmalloc_track_caller(size_t, gfp_t, void*); | ||
188 | #define kmalloc_track_caller(size, flags) \ | ||
189 | __kmalloc_track_caller(size, flags, __builtin_return_address(0)) | ||
190 | #else | ||
191 | #define kmalloc_track_caller(size, flags) \ | ||
192 | __kmalloc(size, flags) | ||
193 | #endif /* DEBUG_SLAB */ | ||
194 | |||
195 | #ifdef CONFIG_NUMA | ||
196 | /* | ||
232 | * kmalloc_node_track_caller is a special version of kmalloc_node that | 197 | * kmalloc_node_track_caller is a special version of kmalloc_node that |
233 | * records the calling function of the routine calling it for slab leak | 198 | * records the calling function of the routine calling it for slab leak |
234 | * tracking instead of just the calling function (confusing, eh?). | 199 | * tracking instead of just the calling function (confusing, eh?). |
@@ -236,70 +201,23 @@ found: | |||
236 | * standard allocator where we care about the real place the memory | 201 | * standard allocator where we care about the real place the memory |
237 | * allocation request comes from. | 202 | * allocation request comes from. |
238 | */ | 203 | */ |
239 | #ifndef CONFIG_DEBUG_SLAB | 204 | #ifdef CONFIG_DEBUG_SLAB |
240 | #define kmalloc_node_track_caller(size, flags, node) \ | ||
241 | __kmalloc_node(size, flags, node) | ||
242 | #else | ||
243 | extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); | 205 | extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); |
244 | #define kmalloc_node_track_caller(size, flags, node) \ | 206 | #define kmalloc_node_track_caller(size, flags, node) \ |
245 | __kmalloc_node_track_caller(size, flags, node, \ | 207 | __kmalloc_node_track_caller(size, flags, node, \ |
246 | __builtin_return_address(0)) | 208 | __builtin_return_address(0)) |
209 | #else | ||
210 | #define kmalloc_node_track_caller(size, flags, node) \ | ||
211 | __kmalloc_node(size, flags, node) | ||
247 | #endif | 212 | #endif |
213 | |||
248 | #else /* CONFIG_NUMA */ | 214 | #else /* CONFIG_NUMA */ |
249 | static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, | ||
250 | gfp_t flags, int node) | ||
251 | { | ||
252 | return kmem_cache_alloc(cachep, flags); | ||
253 | } | ||
254 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | ||
255 | { | ||
256 | return kmalloc(size, flags); | ||
257 | } | ||
258 | 215 | ||
259 | #define kmalloc_node_track_caller(size, flags, node) \ | 216 | #define kmalloc_node_track_caller(size, flags, node) \ |
260 | kmalloc_track_caller(size, flags) | 217 | kmalloc_track_caller(size, flags) |
261 | #endif | ||
262 | 218 | ||
263 | extern int FASTCALL(kmem_cache_reap(int)); | 219 | #endif /* DEBUG_SLAB */ |
264 | extern int FASTCALL(kmem_ptr_validate(struct kmem_cache *cachep, void *ptr)); | ||
265 | |||
266 | #else /* CONFIG_SLOB */ | ||
267 | |||
268 | /* SLOB allocator routines */ | ||
269 | |||
270 | void kmem_cache_init(void); | ||
271 | struct kmem_cache *kmem_cache_create(const char *c, size_t, size_t, | ||
272 | unsigned long, | ||
273 | void (*)(void *, struct kmem_cache *, unsigned long), | ||
274 | void (*)(void *, struct kmem_cache *, unsigned long)); | ||
275 | void kmem_cache_destroy(struct kmem_cache *c); | ||
276 | void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags); | ||
277 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | ||
278 | void kmem_cache_free(struct kmem_cache *c, void *b); | ||
279 | const char *kmem_cache_name(struct kmem_cache *); | ||
280 | void *kmalloc(size_t size, gfp_t flags); | ||
281 | void *__kzalloc(size_t size, gfp_t flags); | ||
282 | void kfree(const void *m); | ||
283 | unsigned int ksize(const void *m); | ||
284 | unsigned int kmem_cache_size(struct kmem_cache *c); | ||
285 | |||
286 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | ||
287 | { | ||
288 | return __kzalloc(n * size, flags); | ||
289 | } | ||
290 | |||
291 | #define kmem_cache_shrink(d) (0) | ||
292 | #define kmem_cache_reap(a) | ||
293 | #define kmem_ptr_validate(a, b) (0) | ||
294 | #define kmem_cache_alloc_node(c, f, n) kmem_cache_alloc(c, f) | ||
295 | #define kmalloc_node(s, f, n) kmalloc(s, f) | ||
296 | #define kzalloc(s, f) __kzalloc(s, f) | ||
297 | #define kmalloc_track_caller kmalloc | ||
298 | |||
299 | #define kmalloc_node_track_caller kmalloc_node | ||
300 | |||
301 | #endif /* CONFIG_SLOB */ | ||
302 | 220 | ||
303 | #endif /* __KERNEL__ */ | 221 | #endif /* __KERNEL__ */ |
304 | |||
305 | #endif /* _LINUX_SLAB_H */ | 222 | #endif /* _LINUX_SLAB_H */ |
223 | |||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h new file mode 100644 index 000000000000..4b463e66ddea --- /dev/null +++ b/include/linux/slab_def.h | |||
@@ -0,0 +1,100 @@ | |||
1 | #ifndef _LINUX_SLAB_DEF_H | ||
2 | #define _LINUX_SLAB_DEF_H | ||
3 | |||
4 | /* | ||
5 | * Definitions unique to the original Linux SLAB allocator. | ||
6 | * | ||
7 | * What we provide here is a way to optimize the frequent kmalloc | ||
8 | * calls in the kernel by selecting the appropriate general cache | ||
9 | * if kmalloc was called with a size that can be established at | ||
10 | * compile time. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <asm/page.h> /* kmalloc_sizes.h needs PAGE_SIZE */ | ||
15 | #include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */ | ||
16 | #include <linux/compiler.h> | ||
17 | |||
18 | /* Size description struct for general caches. */ | ||
19 | struct cache_sizes { | ||
20 | size_t cs_size; | ||
21 | struct kmem_cache *cs_cachep; | ||
22 | struct kmem_cache *cs_dmacachep; | ||
23 | }; | ||
24 | extern struct cache_sizes malloc_sizes[]; | ||
25 | |||
26 | static inline void *kmalloc(size_t size, gfp_t flags) | ||
27 | { | ||
28 | if (__builtin_constant_p(size)) { | ||
29 | int i = 0; | ||
30 | #define CACHE(x) \ | ||
31 | if (size <= x) \ | ||
32 | goto found; \ | ||
33 | else \ | ||
34 | i++; | ||
35 | #include "kmalloc_sizes.h" | ||
36 | #undef CACHE | ||
37 | { | ||
38 | extern void __you_cannot_kmalloc_that_much(void); | ||
39 | __you_cannot_kmalloc_that_much(); | ||
40 | } | ||
41 | found: | ||
42 | return kmem_cache_alloc((flags & GFP_DMA) ? | ||
43 | malloc_sizes[i].cs_dmacachep : | ||
44 | malloc_sizes[i].cs_cachep, flags); | ||
45 | } | ||
46 | return __kmalloc(size, flags); | ||
47 | } | ||
48 | |||
49 | static inline void *kzalloc(size_t size, gfp_t flags) | ||
50 | { | ||
51 | if (__builtin_constant_p(size)) { | ||
52 | int i = 0; | ||
53 | #define CACHE(x) \ | ||
54 | if (size <= x) \ | ||
55 | goto found; \ | ||
56 | else \ | ||
57 | i++; | ||
58 | #include "kmalloc_sizes.h" | ||
59 | #undef CACHE | ||
60 | { | ||
61 | extern void __you_cannot_kzalloc_that_much(void); | ||
62 | __you_cannot_kzalloc_that_much(); | ||
63 | } | ||
64 | found: | ||
65 | return kmem_cache_zalloc((flags & GFP_DMA) ? | ||
66 | malloc_sizes[i].cs_dmacachep : | ||
67 | malloc_sizes[i].cs_cachep, flags); | ||
68 | } | ||
69 | return __kzalloc(size, flags); | ||
70 | } | ||
71 | |||
72 | #ifdef CONFIG_NUMA | ||
73 | extern void *__kmalloc_node(size_t size, gfp_t flags, int node); | ||
74 | |||
75 | static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | ||
76 | { | ||
77 | if (__builtin_constant_p(size)) { | ||
78 | int i = 0; | ||
79 | #define CACHE(x) \ | ||
80 | if (size <= x) \ | ||
81 | goto found; \ | ||
82 | else \ | ||
83 | i++; | ||
84 | #include "kmalloc_sizes.h" | ||
85 | #undef CACHE | ||
86 | { | ||
87 | extern void __you_cannot_kmalloc_that_much(void); | ||
88 | __you_cannot_kmalloc_that_much(); | ||
89 | } | ||
90 | found: | ||
91 | return kmem_cache_alloc_node((flags & GFP_DMA) ? | ||
92 | malloc_sizes[i].cs_dmacachep : | ||
93 | malloc_sizes[i].cs_cachep, flags, node); | ||
94 | } | ||
95 | return __kmalloc_node(size, flags, node); | ||
96 | } | ||
97 | |||
98 | #endif /* CONFIG_NUMA */ | ||
99 | |||
100 | #endif /* _LINUX_SLAB_DEF_H */ | ||
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h index 5b4ae2cc445c..3aa97aa4277f 100644 --- a/include/linux/smb_fs_sb.h +++ b/include/linux/smb_fs_sb.h | |||
@@ -55,7 +55,7 @@ struct smb_sb_info { | |||
55 | * generation is incremented. | 55 | * generation is incremented. |
56 | */ | 56 | */ |
57 | unsigned int generation; | 57 | unsigned int generation; |
58 | pid_t conn_pid; | 58 | struct pid *conn_pid; |
59 | struct smb_conn_opt opt; | 59 | struct smb_conn_opt opt; |
60 | wait_queue_head_t conn_wq; | 60 | wait_queue_head_t conn_wq; |
61 | int conn_complete; | 61 | int conn_complete; |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 92cd38efad7f..fcd35a210e7f 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -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/spi.h b/include/linux/spi/spi.h index c8bb68099eb9..176f6e36dbfa 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -289,7 +289,7 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); | |||
289 | * the data being transferred; that may reduce overhead, when the | 289 | * the data being transferred; that may reduce overhead, when the |
290 | * underlying driver uses dma. | 290 | * underlying driver uses dma. |
291 | * | 291 | * |
292 | * If the transmit buffer is null, undefined data will be shifted out | 292 | * If the transmit buffer is null, zeroes will be shifted out |
293 | * while filling rx_buf. If the receive buffer is null, the data | 293 | * while filling rx_buf. If the receive buffer is null, the data |
294 | * shifted in will be discarded. Only "len" bytes shift out (or in). | 294 | * shifted in will be discarded. Only "len" bytes shift out (or in). |
295 | * It's an error to try to shift out a partial word. (For example, by | 295 | * It's an error to try to shift out a partial word. (For example, by |
diff --git a/include/linux/stallion.h b/include/linux/stallion.h index 13a37f137ea2..4a0a329beafb 100644 --- a/include/linux/stallion.h +++ b/include/linux/stallion.h | |||
@@ -52,11 +52,11 @@ | |||
52 | * protection - since "write" code only needs to change the head, and | 52 | * protection - since "write" code only needs to change the head, and |
53 | * interrupt code only needs to change the tail. | 53 | * interrupt code only needs to change the tail. |
54 | */ | 54 | */ |
55 | typedef struct { | 55 | struct stlrq { |
56 | char *buf; | 56 | char *buf; |
57 | char *head; | 57 | char *head; |
58 | char *tail; | 58 | char *tail; |
59 | } stlrq_t; | 59 | }; |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Port, panel and board structures to hold status info about each. | 62 | * Port, panel and board structures to hold status info about each. |
@@ -67,14 +67,14 @@ typedef struct { | |||
67 | * is associated with, this makes it (fairly) easy to get back to the | 67 | * is associated with, this makes it (fairly) easy to get back to the |
68 | * board/panel info for a port. | 68 | * board/panel info for a port. |
69 | */ | 69 | */ |
70 | typedef struct stlport { | 70 | struct stlport { |
71 | unsigned long magic; | 71 | unsigned long magic; |
72 | int portnr; | 72 | unsigned int portnr; |
73 | int panelnr; | 73 | unsigned int panelnr; |
74 | int brdnr; | 74 | unsigned int brdnr; |
75 | int ioaddr; | 75 | int ioaddr; |
76 | int uartaddr; | 76 | int uartaddr; |
77 | int pagenr; | 77 | unsigned int pagenr; |
78 | long istate; | 78 | long istate; |
79 | int flags; | 79 | int flags; |
80 | int baud_base; | 80 | int baud_base; |
@@ -97,31 +97,31 @@ typedef struct stlport { | |||
97 | wait_queue_head_t close_wait; | 97 | wait_queue_head_t close_wait; |
98 | struct work_struct tqueue; | 98 | struct work_struct tqueue; |
99 | comstats_t stats; | 99 | comstats_t stats; |
100 | stlrq_t tx; | 100 | struct stlrq tx; |
101 | } stlport_t; | 101 | }; |
102 | 102 | ||
103 | typedef struct stlpanel { | 103 | struct stlpanel { |
104 | unsigned long magic; | 104 | unsigned long magic; |
105 | int panelnr; | 105 | unsigned int panelnr; |
106 | int brdnr; | 106 | unsigned int brdnr; |
107 | int pagenr; | 107 | unsigned int pagenr; |
108 | int nrports; | 108 | unsigned int nrports; |
109 | int iobase; | 109 | int iobase; |
110 | void *uartp; | 110 | void *uartp; |
111 | void (*isr)(struct stlpanel *panelp, unsigned int iobase); | 111 | void (*isr)(struct stlpanel *panelp, unsigned int iobase); |
112 | unsigned int hwid; | 112 | unsigned int hwid; |
113 | unsigned int ackmask; | 113 | unsigned int ackmask; |
114 | stlport_t *ports[STL_PORTSPERPANEL]; | 114 | struct stlport *ports[STL_PORTSPERPANEL]; |
115 | } stlpanel_t; | 115 | }; |
116 | 116 | ||
117 | typedef struct stlbrd { | 117 | struct stlbrd { |
118 | unsigned long magic; | 118 | unsigned long magic; |
119 | int brdnr; | 119 | unsigned int brdnr; |
120 | int brdtype; | 120 | unsigned int brdtype; |
121 | int state; | 121 | unsigned int state; |
122 | int nrpanels; | 122 | unsigned int nrpanels; |
123 | int nrports; | 123 | unsigned int nrports; |
124 | int nrbnks; | 124 | unsigned int nrbnks; |
125 | int irq; | 125 | int irq; |
126 | int irqtype; | 126 | int irqtype; |
127 | int (*isr)(struct stlbrd *brdp); | 127 | int (*isr)(struct stlbrd *brdp); |
@@ -136,9 +136,9 @@ typedef struct stlbrd { | |||
136 | unsigned long clk; | 136 | unsigned long clk; |
137 | unsigned int bnkpageaddr[STL_MAXBANKS]; | 137 | unsigned int bnkpageaddr[STL_MAXBANKS]; |
138 | unsigned int bnkstataddr[STL_MAXBANKS]; | 138 | unsigned int bnkstataddr[STL_MAXBANKS]; |
139 | stlpanel_t *bnk2panel[STL_MAXBANKS]; | 139 | struct stlpanel *bnk2panel[STL_MAXBANKS]; |
140 | stlpanel_t *panels[STL_MAXPANELS]; | 140 | struct stlpanel *panels[STL_MAXPANELS]; |
141 | } stlbrd_t; | 141 | }; |
142 | 142 | ||
143 | 143 | ||
144 | /* | 144 | /* |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 97c761652581..8b6ce60ea057 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -250,7 +250,6 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, | |||
250 | int flags, const struct rpc_call_ops *ops, | 250 | int flags, const struct rpc_call_ops *ops, |
251 | void *data); | 251 | void *data); |
252 | void rpc_put_task(struct rpc_task *); | 252 | void rpc_put_task(struct rpc_task *); |
253 | void rpc_release_task(struct rpc_task *); | ||
254 | void rpc_exit_task(struct rpc_task *); | 253 | void rpc_exit_task(struct rpc_task *); |
255 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 254 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
256 | void rpc_killall_tasks(struct rpc_clnt *); | 255 | void rpc_killall_tasks(struct rpc_clnt *); |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 965d6c20086e..64f3d60c72af 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -144,8 +144,11 @@ extern u32 svc_max_payload(const struct svc_rqst *rqstp); | |||
144 | * | 144 | * |
145 | * Each request/reply pair can have at most one "payload", plus two pages, | 145 | * Each request/reply pair can have at most one "payload", plus two pages, |
146 | * one for the request, and one for the reply. | 146 | * one for the request, and one for the reply. |
147 | * We using ->sendfile to return read data, we might need one extra page | ||
148 | * if the request is not page-aligned. So add another '1'. | ||
147 | */ | 149 | */ |
148 | #define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2) | 150 | #define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE \ |
151 | + 2 + 1) | ||
149 | 152 | ||
150 | static inline u32 svc_getnl(struct kvec *iov) | 153 | static inline u32 svc_getnl(struct kvec *iov) |
151 | { | 154 | { |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 98b21ad370fd..db312a1e2eeb 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -63,7 +63,7 @@ struct svc_sock { | |||
63 | * Function prototypes. | 63 | * Function prototypes. |
64 | */ | 64 | */ |
65 | int svc_makesock(struct svc_serv *, int, unsigned short); | 65 | int svc_makesock(struct svc_serv *, int, unsigned short); |
66 | void svc_delete_socket(struct svc_sock *); | 66 | void svc_close_socket(struct svc_sock *); |
67 | int svc_recv(struct svc_rqst *, long); | 67 | int svc_recv(struct svc_rqst *, long); |
68 | int svc_send(struct svc_rqst *); | 68 | int svc_send(struct svc_rqst *); |
69 | void svc_drop(struct svc_rqst *); | 69 | void svc_drop(struct svc_rqst *); |
diff --git a/include/linux/swap.h b/include/linux/swap.h index add51cebc8d9..5423559a44a6 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -245,7 +245,7 @@ extern int swap_duplicate(swp_entry_t); | |||
245 | extern int valid_swaphandles(swp_entry_t, unsigned long *); | 245 | extern int valid_swaphandles(swp_entry_t, unsigned long *); |
246 | extern void swap_free(swp_entry_t); | 246 | extern void swap_free(swp_entry_t); |
247 | extern void free_swap_and_cache(swp_entry_t); | 247 | extern void free_swap_and_cache(swp_entry_t); |
248 | extern int swap_type_of(dev_t, sector_t); | 248 | extern int swap_type_of(dev_t, sector_t, struct block_device **); |
249 | extern unsigned int count_swap_pages(int, int); | 249 | extern unsigned int count_swap_pages(int, int); |
250 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); | 250 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); |
251 | extern sector_t swapdev_block(int, pgoff_t); | 251 | extern sector_t swapdev_block(int, pgoff_t); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 94316a98e0d0..665412c4f4b9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -11,7 +11,7 @@ | |||
11 | ** the sysctl() binary interface. Do *NOT* change the | 11 | ** the sysctl() binary interface. Do *NOT* change the |
12 | ** numbering of any existing values here, and do not change | 12 | ** numbering of any existing values here, and do not change |
13 | ** any numbers within any one set of values. If you have to | 13 | ** any numbers within any one set of values. If you have to |
14 | ** have to redefine an existing interface, use a new number for it. | 14 | ** redefine an existing interface, use a new number for it. |
15 | ** The kernel will then return -ENOTDIR to any application using | 15 | ** The kernel will then return -ENOTDIR to any application using |
16 | ** the old binary interface. | 16 | ** the old binary interface. |
17 | ** | 17 | ** |
@@ -699,7 +699,8 @@ enum { | |||
699 | NET_X25_CALL_REQUEST_TIMEOUT=2, | 699 | NET_X25_CALL_REQUEST_TIMEOUT=2, |
700 | NET_X25_RESET_REQUEST_TIMEOUT=3, | 700 | NET_X25_RESET_REQUEST_TIMEOUT=3, |
701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, | 701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, |
702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5 | 702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5, |
703 | NET_X25_FORWARD=6 | ||
703 | }; | 704 | }; |
704 | 705 | ||
705 | /* /proc/sys/net/token-ring */ | 706 | /* /proc/sys/net/token-ring */ |
@@ -918,8 +919,7 @@ typedef struct ctl_table ctl_table; | |||
918 | 919 | ||
919 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, | 920 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, |
920 | void __user *oldval, size_t __user *oldlenp, | 921 | void __user *oldval, size_t __user *oldlenp, |
921 | void __user *newval, size_t newlen, | 922 | void __user *newval, size_t newlen); |
922 | void **context); | ||
923 | 923 | ||
924 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, | 924 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, |
925 | void __user *buffer, size_t *lenp, loff_t *ppos); | 925 | void __user *buffer, size_t *lenp, loff_t *ppos); |
@@ -950,7 +950,7 @@ extern int do_sysctl (int __user *name, int nlen, | |||
950 | extern int do_sysctl_strategy (ctl_table *table, | 950 | extern int do_sysctl_strategy (ctl_table *table, |
951 | int __user *name, int nlen, | 951 | int __user *name, int nlen, |
952 | void __user *oldval, size_t __user *oldlenp, | 952 | void __user *oldval, size_t __user *oldlenp, |
953 | void __user *newval, size_t newlen, void ** context); | 953 | void __user *newval, size_t newlen); |
954 | 954 | ||
955 | extern ctl_handler sysctl_string; | 955 | extern ctl_handler sysctl_string; |
956 | extern ctl_handler sysctl_intvec; | 956 | extern ctl_handler sysctl_intvec; |
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/sysrq.h b/include/linux/sysrq.h index 9df8833670cb..98a1d8cfb73d 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -37,23 +37,37 @@ struct sysrq_key_op { | |||
37 | 37 | ||
38 | #ifdef CONFIG_MAGIC_SYSRQ | 38 | #ifdef CONFIG_MAGIC_SYSRQ |
39 | 39 | ||
40 | extern int sysrq_on(void); | ||
41 | |||
42 | /* | ||
43 | * Do not use this one directly: | ||
44 | */ | ||
45 | extern int __sysrq_enabled; | ||
46 | |||
40 | /* Generic SysRq interface -- you may call it from any device driver, supplying | 47 | /* Generic SysRq interface -- you may call it from any device driver, supplying |
41 | * ASCII code of the key, pointer to registers and kbd/tty structs (if they | 48 | * ASCII code of the key, pointer to registers and kbd/tty structs (if they |
42 | * are available -- else NULL's). | 49 | * are available -- else NULL's). |
43 | */ | 50 | */ |
44 | 51 | ||
45 | void handle_sysrq(int, struct tty_struct *); | 52 | void handle_sysrq(int key, struct tty_struct *tty); |
46 | void __handle_sysrq(int, struct tty_struct *, int check_mask); | 53 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); |
47 | int register_sysrq_key(int, struct sysrq_key_op *); | 54 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
48 | int unregister_sysrq_key(int, struct sysrq_key_op *); | 55 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
49 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 56 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
50 | 57 | ||
51 | #else | 58 | #else |
52 | 59 | ||
60 | static inline int sysrq_on(void) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
53 | static inline int __reterr(void) | 64 | static inline int __reterr(void) |
54 | { | 65 | { |
55 | return -EINVAL; | 66 | return -EINVAL; |
56 | } | 67 | } |
68 | static inline void handle_sysrq(int key, struct tty_struct *tty) | ||
69 | { | ||
70 | } | ||
57 | 71 | ||
58 | #define register_sysrq_key(ig,nore) __reterr() | 72 | #define register_sysrq_key(ig,nore) __reterr() |
59 | #define unregister_sysrq_key(ig,nore) __reterr() | 73 | #define unregister_sysrq_key(ig,nore) __reterr() |
diff --git a/include/linux/task_io_accounting.h b/include/linux/task_io_accounting.h new file mode 100644 index 000000000000..44d00e9cceea --- /dev/null +++ b/include/linux/task_io_accounting.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * task_io_accounting: a structure which is used for recording a single task's | ||
3 | * IO statistics. | ||
4 | * | ||
5 | * Don't include this header file directly - it is designed to be dragged in via | ||
6 | * sched.h. | ||
7 | * | ||
8 | * Blame akpm@osdl.org for all this. | ||
9 | */ | ||
10 | |||
11 | #ifdef CONFIG_TASK_IO_ACCOUNTING | ||
12 | struct task_io_accounting { | ||
13 | /* | ||
14 | * The number of bytes which this task has caused to be read from | ||
15 | * storage. | ||
16 | */ | ||
17 | u64 read_bytes; | ||
18 | |||
19 | /* | ||
20 | * The number of bytes which this task has caused, or shall cause to be | ||
21 | * written to disk. | ||
22 | */ | ||
23 | u64 write_bytes; | ||
24 | |||
25 | /* | ||
26 | * A task can cause "negative" IO too. If this task truncates some | ||
27 | * dirty pagecache, some IO which another task has been accounted for | ||
28 | * (in its write_bytes) will not be happening. We _could_ just | ||
29 | * subtract that from the truncating task's write_bytes, but there is | ||
30 | * information loss in doing that. | ||
31 | */ | ||
32 | u64 cancelled_write_bytes; | ||
33 | }; | ||
34 | #else | ||
35 | struct task_io_accounting { | ||
36 | }; | ||
37 | #endif | ||
diff --git a/include/linux/task_io_accounting_ops.h b/include/linux/task_io_accounting_ops.h new file mode 100644 index 000000000000..df2a319106b2 --- /dev/null +++ b/include/linux/task_io_accounting_ops.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Task I/O accounting operations | ||
3 | */ | ||
4 | #ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED | ||
5 | #define __TASK_IO_ACCOUNTING_OPS_INCLUDED | ||
6 | |||
7 | #ifdef CONFIG_TASK_IO_ACCOUNTING | ||
8 | static inline void task_io_account_read(size_t bytes) | ||
9 | { | ||
10 | current->ioac.read_bytes += bytes; | ||
11 | } | ||
12 | |||
13 | static inline void task_io_account_write(size_t bytes) | ||
14 | { | ||
15 | current->ioac.write_bytes += bytes; | ||
16 | } | ||
17 | |||
18 | static inline void task_io_account_cancelled_write(size_t bytes) | ||
19 | { | ||
20 | current->ioac.cancelled_write_bytes += bytes; | ||
21 | } | ||
22 | |||
23 | static inline void task_io_accounting_init(struct task_struct *tsk) | ||
24 | { | ||
25 | memset(&tsk->ioac, 0, sizeof(tsk->ioac)); | ||
26 | } | ||
27 | |||
28 | #else | ||
29 | |||
30 | static inline void task_io_account_read(size_t bytes) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | static inline void task_io_account_write(size_t bytes) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | static inline void task_io_account_cancelled_write(size_t bytes) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | static inline void task_io_accounting_init(struct task_struct *tsk) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | #endif /* CONFIG_TASK_IO_ACCOUNTING */ | ||
47 | #endif /* __TASK_IO_ACCOUNTING_OPS_INCLUDED */ | ||
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 45248806ae9c..3fced4798255 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | 33 | ||
34 | #define TASKSTATS_VERSION 2 | 34 | #define TASKSTATS_VERSION 3 |
35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
36 | * in linux/sched.h */ | 36 | * in linux/sched.h */ |
37 | 37 | ||
@@ -115,31 +115,37 @@ struct taskstats { | |||
115 | __u64 ac_majflt; /* Major Page Fault Count */ | 115 | __u64 ac_majflt; /* Major Page Fault Count */ |
116 | /* Basic Accounting Fields end */ | 116 | /* Basic Accounting Fields end */ |
117 | 117 | ||
118 | /* Extended accounting fields start */ | 118 | /* Extended accounting fields start */ |
119 | /* Accumulated RSS usage in duration of a task, in MBytes-usecs. | 119 | /* Accumulated RSS usage in duration of a task, in MBytes-usecs. |
120 | * The current rss usage is added to this counter every time | 120 | * The current rss usage is added to this counter every time |
121 | * a tick is charged to a task's system time. So, at the end we | 121 | * a tick is charged to a task's system time. So, at the end we |
122 | * will have memory usage multiplied by system time. Thus an | 122 | * will have memory usage multiplied by system time. Thus an |
123 | * average usage per system time unit can be calculated. | 123 | * average usage per system time unit can be calculated. |
124 | */ | 124 | */ |
125 | __u64 coremem; /* accumulated RSS usage in MB-usec */ | 125 | __u64 coremem; /* accumulated RSS usage in MB-usec */ |
126 | /* Accumulated virtual memory usage in duration of a task. | 126 | /* Accumulated virtual memory usage in duration of a task. |
127 | * Same as acct_rss_mem1 above except that we keep track of VM usage. | 127 | * Same as acct_rss_mem1 above except that we keep track of VM usage. |
128 | */ | 128 | */ |
129 | __u64 virtmem; /* accumulated VM usage in MB-usec */ | 129 | __u64 virtmem; /* accumulated VM usage in MB-usec */ |
130 | 130 | ||
131 | /* High watermark of RSS and virtual memory usage in duration of | 131 | /* High watermark of RSS and virtual memory usage in duration of |
132 | * a task, in KBytes. | 132 | * a task, in KBytes. |
133 | */ | 133 | */ |
134 | __u64 hiwater_rss; /* High-watermark of RSS usage, in KB */ | 134 | __u64 hiwater_rss; /* High-watermark of RSS usage, in KB */ |
135 | __u64 hiwater_vm; /* High-water VM usage, in KB */ | 135 | __u64 hiwater_vm; /* High-water VM usage, in KB */ |
136 | 136 | ||
137 | /* The following four fields are I/O statistics of a task. */ | 137 | /* The following four fields are I/O statistics of a task. */ |
138 | __u64 read_char; /* bytes read */ | 138 | __u64 read_char; /* bytes read */ |
139 | __u64 write_char; /* bytes written */ | 139 | __u64 write_char; /* bytes written */ |
140 | __u64 read_syscalls; /* read syscalls */ | 140 | __u64 read_syscalls; /* read syscalls */ |
141 | __u64 write_syscalls; /* write syscalls */ | 141 | __u64 write_syscalls; /* write syscalls */ |
142 | /* Extended accounting fields end */ | 142 | /* Extended accounting fields end */ |
143 | |||
144 | #define TASKSTATS_HAS_IO_ACCOUNTING | ||
145 | /* Per-task storage I/O accounting starts */ | ||
146 | __u64 read_bytes; /* bytes of read I/O */ | ||
147 | __u64 write_bytes; /* bytes of write I/O */ | ||
148 | __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ | ||
143 | }; | 149 | }; |
144 | 150 | ||
145 | 151 | ||
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/tfrc.h b/include/linux/tfrc.h index 31a9b25276fe..8a8462b4a4dd 100644 --- a/include/linux/tfrc.h +++ b/include/linux/tfrc.h | |||
@@ -37,10 +37,14 @@ struct tfrc_rx_info { | |||
37 | * @tfrctx_p: current loss event rate (5.4) | 37 | * @tfrctx_p: current loss event rate (5.4) |
38 | * @tfrctx_rto: estimate of RTO, equals 4*RTT (4.3) | 38 | * @tfrctx_rto: estimate of RTO, equals 4*RTT (4.3) |
39 | * @tfrctx_ipi: inter-packet interval (4.6) | 39 | * @tfrctx_ipi: inter-packet interval (4.6) |
40 | * | ||
41 | * Note: X and X_recv are both maintained in units of 64 * bytes/second. This | ||
42 | * enables a finer resolution of sending rates and avoids problems with | ||
43 | * integer arithmetic; u32 is not sufficient as scaling consumes 6 bits. | ||
40 | */ | 44 | */ |
41 | struct tfrc_tx_info { | 45 | struct tfrc_tx_info { |
42 | __u32 tfrctx_x; | 46 | __u64 tfrctx_x; |
43 | __u32 tfrctx_x_recv; | 47 | __u64 tfrctx_x_recv; |
44 | __u32 tfrctx_x_calc; | 48 | __u32 tfrctx_x_calc; |
45 | __u32 tfrctx_rtt; | 49 | __u32 tfrctx_rtt; |
46 | __u32 tfrctx_p; | 50 | __u32 tfrctx_p; |
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/timer.h b/include/linux/timer.h index c982304dbafd..fb5edaaf0ebd 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -41,7 +41,7 @@ static inline void setup_timer(struct timer_list * timer, | |||
41 | init_timer(timer); | 41 | init_timer(timer); |
42 | } | 42 | } |
43 | 43 | ||
44 | /*** | 44 | /** |
45 | * timer_pending - is a timer pending? | 45 | * timer_pending - is a timer pending? |
46 | * @timer: the timer in question | 46 | * @timer: the timer in question |
47 | * | 47 | * |
@@ -63,7 +63,7 @@ extern int mod_timer(struct timer_list *timer, unsigned long expires); | |||
63 | 63 | ||
64 | extern unsigned long next_timer_interrupt(void); | 64 | extern unsigned long next_timer_interrupt(void); |
65 | 65 | ||
66 | /*** | 66 | /** |
67 | * add_timer - start a timer | 67 | * add_timer - start a timer |
68 | * @timer: the timer to be added | 68 | * @timer: the timer to be added |
69 | * | 69 | * |
@@ -98,4 +98,10 @@ extern void run_local_timers(void); | |||
98 | struct hrtimer; | 98 | struct hrtimer; |
99 | extern int it_real_fn(struct hrtimer *); | 99 | extern int it_real_fn(struct hrtimer *); |
100 | 100 | ||
101 | unsigned long __round_jiffies(unsigned long j, int cpu); | ||
102 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); | ||
103 | unsigned long round_jiffies(unsigned long j); | ||
104 | unsigned long round_jiffies_relative(unsigned long j); | ||
105 | |||
106 | |||
101 | #endif | 107 | #endif |
diff --git a/include/linux/topology.h b/include/linux/topology.h index da508d1998e4..6c5a6e6e813b 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -93,7 +93,7 @@ | |||
93 | .groups = NULL, \ | 93 | .groups = NULL, \ |
94 | .min_interval = 1, \ | 94 | .min_interval = 1, \ |
95 | .max_interval = 2, \ | 95 | .max_interval = 2, \ |
96 | .busy_factor = 8, \ | 96 | .busy_factor = 64, \ |
97 | .imbalance_pct = 110, \ | 97 | .imbalance_pct = 110, \ |
98 | .cache_nice_tries = 0, \ | 98 | .cache_nice_tries = 0, \ |
99 | .per_cpu_gain = 25, \ | 99 | .per_cpu_gain = 25, \ |
@@ -194,7 +194,8 @@ | |||
194 | .wake_idx = 0, /* unused */ \ | 194 | .wake_idx = 0, /* unused */ \ |
195 | .forkexec_idx = 0, /* unused */ \ | 195 | .forkexec_idx = 0, /* unused */ \ |
196 | .per_cpu_gain = 100, \ | 196 | .per_cpu_gain = 100, \ |
197 | .flags = SD_LOAD_BALANCE, \ | 197 | .flags = SD_LOAD_BALANCE \ |
198 | | SD_SERIALIZE, \ | ||
198 | .last_balance = jiffies, \ | 199 | .last_balance = jiffies, \ |
199 | .balance_interval = 64, \ | 200 | .balance_interval = 64, \ |
200 | .nr_balance_failed = 0, \ | 201 | .nr_balance_failed = 0, \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index f717f0898238..65cbcf22c31e 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -175,7 +175,7 @@ struct tty_struct { | |||
175 | int index; | 175 | int index; |
176 | struct tty_ldisc ldisc; | 176 | struct tty_ldisc ldisc; |
177 | struct mutex termios_mutex; | 177 | struct mutex termios_mutex; |
178 | struct termios *termios, *termios_locked; | 178 | struct ktermios *termios, *termios_locked; |
179 | char name[64]; | 179 | char name[64]; |
180 | int pgrp; | 180 | int pgrp; |
181 | int session; | 181 | int session; |
@@ -258,7 +258,7 @@ struct tty_struct { | |||
258 | 258 | ||
259 | extern void tty_write_flush(struct tty_struct *); | 259 | extern void tty_write_flush(struct tty_struct *); |
260 | 260 | ||
261 | extern struct termios tty_std_termios; | 261 | extern struct ktermios tty_std_termios; |
262 | 262 | ||
263 | extern int kmsg_redirect; | 263 | extern int kmsg_redirect; |
264 | 264 | ||
@@ -293,8 +293,9 @@ extern int tty_hung_up_p(struct file * filp); | |||
293 | extern void do_SAK(struct tty_struct *tty); | 293 | extern void do_SAK(struct tty_struct *tty); |
294 | extern void disassociate_ctty(int priv); | 294 | extern void disassociate_ctty(int priv); |
295 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 295 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
296 | extern int tty_get_baud_rate(struct tty_struct *tty); | 296 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
297 | extern int tty_termios_baud_rate(struct termios *termios); | 297 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
298 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | ||
298 | 299 | ||
299 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 300 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
300 | extern void tty_ldisc_deref(struct tty_ldisc *); | 301 | extern void tty_ldisc_deref(struct tty_ldisc *); |
@@ -309,6 +310,12 @@ extern void tty_ldisc_flush(struct tty_struct *tty); | |||
309 | extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 310 | extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, |
310 | unsigned long arg); | 311 | unsigned long arg); |
311 | 312 | ||
313 | extern dev_t tty_devnum(struct tty_struct *tty); | ||
314 | 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); | ||
317 | extern struct tty_struct *get_current_tty(void); | ||
318 | |||
312 | extern struct mutex tty_mutex; | 319 | extern struct mutex tty_mutex; |
313 | 320 | ||
314 | /* n_tty.c */ | 321 | /* n_tty.c */ |
@@ -335,10 +342,5 @@ extern void console_print(const char *); | |||
335 | extern int vt_ioctl(struct tty_struct *tty, struct file * file, | 342 | extern int vt_ioctl(struct tty_struct *tty, struct file * file, |
336 | unsigned int cmd, unsigned long arg); | 343 | unsigned int cmd, unsigned long arg); |
337 | 344 | ||
338 | static inline dev_t tty_devnum(struct tty_struct *tty) | ||
339 | { | ||
340 | return MKDEV(tty->driver->major, tty->driver->minor_start) + tty->index; | ||
341 | } | ||
342 | |||
343 | #endif /* __KERNEL__ */ | 345 | #endif /* __KERNEL__ */ |
344 | #endif | 346 | #endif |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 5c8473bb6882..659487e3ebeb 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -53,7 +53,7 @@ | |||
53 | * device-specific ioctl's. If the ioctl number passed in cmd | 53 | * device-specific ioctl's. If the ioctl number passed in cmd |
54 | * is not recognized by the driver, it should return ENOIOCTLCMD. | 54 | * is not recognized by the driver, it should return ENOIOCTLCMD. |
55 | * | 55 | * |
56 | * void (*set_termios)(struct tty_struct *tty, struct termios * old); | 56 | * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
57 | * | 57 | * |
58 | * This routine allows the tty driver to be notified when | 58 | * This routine allows the tty driver to be notified when |
59 | * device's termios settings have changed. Note that a | 59 | * device's termios settings have changed. Note that a |
@@ -132,7 +132,7 @@ struct tty_operations { | |||
132 | int (*chars_in_buffer)(struct tty_struct *tty); | 132 | int (*chars_in_buffer)(struct tty_struct *tty); |
133 | int (*ioctl)(struct tty_struct *tty, struct file * file, | 133 | int (*ioctl)(struct tty_struct *tty, struct file * file, |
134 | unsigned int cmd, unsigned long arg); | 134 | unsigned int cmd, unsigned long arg); |
135 | void (*set_termios)(struct tty_struct *tty, struct termios * old); | 135 | void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
136 | void (*throttle)(struct tty_struct * tty); | 136 | void (*throttle)(struct tty_struct * tty); |
137 | void (*unthrottle)(struct tty_struct * tty); | 137 | void (*unthrottle)(struct tty_struct * tty); |
138 | void (*stop)(struct tty_struct *tty); | 138 | void (*stop)(struct tty_struct *tty); |
@@ -165,7 +165,7 @@ struct tty_driver { | |||
165 | int num; /* number of devices allocated */ | 165 | int num; /* number of devices allocated */ |
166 | short type; /* type of tty driver */ | 166 | short type; /* type of tty driver */ |
167 | short subtype; /* subtype of tty driver */ | 167 | short subtype; /* subtype of tty driver */ |
168 | struct termios init_termios; /* Initial termios */ | 168 | struct ktermios init_termios; /* Initial termios */ |
169 | int flags; /* tty driver flags */ | 169 | int flags; /* tty driver flags */ |
170 | int refcount; /* for loadable tty drivers */ | 170 | int refcount; /* for loadable tty drivers */ |
171 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ | 171 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ |
@@ -175,8 +175,8 @@ struct tty_driver { | |||
175 | * Pointer to the tty data structures | 175 | * Pointer to the tty data structures |
176 | */ | 176 | */ |
177 | struct tty_struct **ttys; | 177 | struct tty_struct **ttys; |
178 | struct termios **termios; | 178 | struct ktermios **termios; |
179 | struct termios **termios_locked; | 179 | struct ktermios **termios_locked; |
180 | void *driver_state; /* only used for the PTY driver */ | 180 | void *driver_state; /* only used for the PTY driver */ |
181 | 181 | ||
182 | /* | 182 | /* |
@@ -193,7 +193,7 @@ struct tty_driver { | |||
193 | int (*chars_in_buffer)(struct tty_struct *tty); | 193 | int (*chars_in_buffer)(struct tty_struct *tty); |
194 | int (*ioctl)(struct tty_struct *tty, struct file * file, | 194 | int (*ioctl)(struct tty_struct *tty, struct file * file, |
195 | unsigned int cmd, unsigned long arg); | 195 | unsigned int cmd, unsigned long arg); |
196 | void (*set_termios)(struct tty_struct *tty, struct termios * old); | 196 | void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
197 | void (*throttle)(struct tty_struct * tty); | 197 | void (*throttle)(struct tty_struct * tty); |
198 | void (*unthrottle)(struct tty_struct * tty); | 198 | void (*unthrottle)(struct tty_struct * tty); |
199 | void (*stop)(struct tty_struct *tty); | 199 | void (*stop)(struct tty_struct *tty); |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 83c6e6c10ebb..d75932e27710 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -59,7 +59,7 @@ | |||
59 | * low-level driver can "grab" an ioctl request before the line | 59 | * low-level driver can "grab" an ioctl request before the line |
60 | * discpline has a chance to see it. | 60 | * discpline has a chance to see it. |
61 | * | 61 | * |
62 | * void (*set_termios)(struct tty_struct *tty, struct termios * old); | 62 | * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
63 | * | 63 | * |
64 | * This function notifies the line discpline that a change has | 64 | * This function notifies the line discpline that a change has |
65 | * been made to the termios structure. | 65 | * been made to the termios structure. |
@@ -118,7 +118,7 @@ struct tty_ldisc { | |||
118 | const unsigned char * buf, size_t nr); | 118 | const unsigned char * buf, size_t nr); |
119 | int (*ioctl)(struct tty_struct * tty, struct file * file, | 119 | int (*ioctl)(struct tty_struct * tty, struct file * file, |
120 | unsigned int cmd, unsigned long arg); | 120 | unsigned int cmd, unsigned long arg); |
121 | void (*set_termios)(struct tty_struct *tty, struct termios * old); | 121 | void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
122 | unsigned int (*poll)(struct tty_struct *, struct file *, | 122 | unsigned int (*poll)(struct tty_struct *, struct file *, |
123 | struct poll_table_struct *); | 123 | struct poll_table_struct *); |
124 | int (*hangup)(struct tty_struct *tty); | 124 | int (*hangup)(struct tty_struct *tty); |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 28967eda9d7b..d3a4f994a5dc 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -789,6 +789,7 @@ struct ufs_sb_private_info { | |||
789 | 789 | ||
790 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ | 790 | __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */ |
791 | __s32 fs_magic; /* filesystem magic */ | 791 | __s32 fs_magic; /* filesystem magic */ |
792 | unsigned int s_dirblksize; | ||
792 | }; | 793 | }; |
793 | 794 | ||
794 | /* | 795 | /* |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h index 749928c161fb..7760860fa170 100644 --- a/include/linux/unwind.h +++ b/include/linux/unwind.h | |||
@@ -14,63 +14,6 @@ | |||
14 | 14 | ||
15 | struct module; | 15 | struct module; |
16 | 16 | ||
17 | #ifdef CONFIG_STACK_UNWIND | ||
18 | |||
19 | #include <asm/unwind.h> | ||
20 | |||
21 | #ifndef ARCH_UNWIND_SECTION_NAME | ||
22 | #define ARCH_UNWIND_SECTION_NAME ".eh_frame" | ||
23 | #endif | ||
24 | |||
25 | /* | ||
26 | * Initialize unwind support. | ||
27 | */ | ||
28 | extern void unwind_init(void); | ||
29 | extern void unwind_setup(void); | ||
30 | |||
31 | #ifdef CONFIG_MODULES | ||
32 | |||
33 | extern void *unwind_add_table(struct module *, | ||
34 | const void *table_start, | ||
35 | unsigned long table_size); | ||
36 | |||
37 | extern void unwind_remove_table(void *handle, int init_only); | ||
38 | |||
39 | #endif | ||
40 | |||
41 | extern int unwind_init_frame_info(struct unwind_frame_info *, | ||
42 | struct task_struct *, | ||
43 | /*const*/ struct pt_regs *); | ||
44 | |||
45 | /* | ||
46 | * Prepare to unwind a blocked task. | ||
47 | */ | ||
48 | extern int unwind_init_blocked(struct unwind_frame_info *, | ||
49 | struct task_struct *); | ||
50 | |||
51 | /* | ||
52 | * Prepare to unwind the currently running thread. | ||
53 | */ | ||
54 | extern int unwind_init_running(struct unwind_frame_info *, | ||
55 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
56 | void *arg), | ||
57 | void *arg); | ||
58 | |||
59 | /* | ||
60 | * Unwind to previous to frame. Returns 0 if successful, negative | ||
61 | * number in case of an error. | ||
62 | */ | ||
63 | extern int unwind(struct unwind_frame_info *); | ||
64 | |||
65 | /* | ||
66 | * Unwind until the return pointer is in user-land (or until an error | ||
67 | * occurs). Returns 0 if successful, negative number in case of | ||
68 | * error. | ||
69 | */ | ||
70 | extern int unwind_to_user(struct unwind_frame_info *); | ||
71 | |||
72 | #else | ||
73 | |||
74 | struct unwind_frame_info {}; | 17 | struct unwind_frame_info {}; |
75 | 18 | ||
76 | static inline void unwind_init(void) {} | 19 | static inline void unwind_init(void) {} |
@@ -85,12 +28,12 @@ static inline void *unwind_add_table(struct module *mod, | |||
85 | return NULL; | 28 | return NULL; |
86 | } | 29 | } |
87 | 30 | ||
88 | #endif | ||
89 | |||
90 | static inline void unwind_remove_table(void *handle, int init_only) | 31 | static inline void unwind_remove_table(void *handle, int init_only) |
91 | { | 32 | { |
92 | } | 33 | } |
93 | 34 | ||
35 | #endif | ||
36 | |||
94 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, | 37 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, |
95 | struct task_struct *tsk, | 38 | struct task_struct *tsk, |
96 | const struct pt_regs *regs) | 39 | const struct pt_regs *regs) |
@@ -122,6 +65,4 @@ static inline int unwind_to_user(struct unwind_frame_info *info) | |||
122 | return -ENOSYS; | 65 | return -ENOSYS; |
123 | } | 66 | } |
124 | 67 | ||
125 | #endif | ||
126 | |||
127 | #endif /* _LINUX_UNWIND_H */ | 68 | #endif /* _LINUX_UNWIND_H */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index aab5b1b72021..b5c226a87ed8 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 | ||
@@ -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_ch9.h b/include/linux/usb/ch9.h index c720d107ff29..ae7833749fa2 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 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 91b3ea2bbb14..33dcd8576696 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -179,6 +179,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
179 | * memory structure allocation at this point in time. | 179 | * memory structure allocation at this point in time. |
180 | * @shutdown: pointer to the driver's shutdown function. This will be | 180 | * @shutdown: pointer to the driver's shutdown function. This will be |
181 | * called when the device is removed from the system. | 181 | * called when the device is removed from the system. |
182 | * @usb_driver: pointer to the struct usb_driver that controls this | ||
183 | * device. This is necessary to allow dynamic ids to be added to | ||
184 | * the driver from sysfs. | ||
182 | * | 185 | * |
183 | * This structure is defines a USB Serial driver. It provides all of | 186 | * 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 | 187 | * the information that the USB serial core code needs. If the function |
@@ -202,6 +205,8 @@ struct usb_serial_driver { | |||
202 | 205 | ||
203 | struct list_head driver_list; | 206 | struct list_head driver_list; |
204 | struct device_driver driver; | 207 | struct device_driver driver; |
208 | struct usb_driver *usb_driver; | ||
209 | struct usb_dynids dynids; | ||
205 | 210 | ||
206 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); | 211 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); |
207 | int (*attach) (struct usb_serial *serial); | 212 | int (*attach) (struct usb_serial *serial); |
@@ -218,7 +223,7 @@ struct usb_serial_driver { | |||
218 | int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count); | 223 | int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count); |
219 | int (*write_room) (struct usb_serial_port *port); | 224 | int (*write_room) (struct usb_serial_port *port); |
220 | int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); | 225 | int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); |
221 | void (*set_termios) (struct usb_serial_port *port, struct termios * old); | 226 | void (*set_termios) (struct usb_serial_port *port, struct ktermios * old); |
222 | void (*break_ctl) (struct usb_serial_port *port, int break_state); | 227 | void (*break_ctl) (struct usb_serial_port *port, int break_state); |
223 | int (*chars_in_buffer) (struct usb_serial_port *port); | 228 | int (*chars_in_buffer) (struct usb_serial_port *port); |
224 | void (*throttle) (struct usb_serial_port *port); | 229 | void (*throttle) (struct usb_serial_port *port); |
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/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/videodev2.h b/include/linux/videodev2.h index df5c4654360d..d94e2683be52 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -244,6 +244,7 @@ struct v4l2_pix_format | |||
244 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ | 244 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ |
245 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ | 245 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ |
246 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ | 246 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ |
247 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R','4','4','4') /* 16 xxxxrrrr ggggbbbb */ | ||
247 | 248 | ||
248 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 249 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
249 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ | 250 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ |
@@ -661,6 +662,15 @@ typedef __u64 v4l2_std_id; | |||
661 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) | 662 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) |
662 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) | 663 | #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) |
663 | 664 | ||
665 | /* FIXME: | ||
666 | Although std_id is 64 bits, there is an issue on PPC32 architecture that | ||
667 | makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding | ||
668 | this value to 32 bits. | ||
669 | As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide), | ||
670 | it should work fine. However, if needed to add more than two standards, | ||
671 | v4l2-common.c should be fixed. | ||
672 | */ | ||
673 | |||
664 | /* some merged standards */ | 674 | /* some merged standards */ |
665 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) | 675 | #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) |
666 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) | 676 | #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index c89df55f6e03..5e9803ed17fc 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -10,8 +10,9 @@ | |||
10 | /* | 10 | /* |
11 | * Light weight per cpu counter implementation. | 11 | * Light weight per cpu counter implementation. |
12 | * | 12 | * |
13 | * Counters should only be incremented and no critical kernel component | 13 | * Counters should only be incremented. You need to set EMBEDDED |
14 | * should rely on the counter values. | 14 | * to disable VM_EVENT_COUNTERS. Things like procps (vmstat, |
15 | * top, etc) use /proc/vmstat and depend on these counters. | ||
15 | * | 16 | * |
16 | * Counters are handled completely inline. On many platforms the code | 17 | * Counters are handled completely inline. On many platforms the code |
17 | * generated will simply be the increment of a global address. | 18 | * generated will simply be the increment of a global address. |
@@ -73,7 +74,13 @@ static inline void count_vm_events(enum vm_event_item item, long delta) | |||
73 | } | 74 | } |
74 | 75 | ||
75 | extern void all_vm_events(unsigned long *); | 76 | extern void all_vm_events(unsigned long *); |
77 | #ifdef CONFIG_HOTPLUG | ||
76 | extern void vm_events_fold_cpu(int cpu); | 78 | extern void vm_events_fold_cpu(int cpu); |
79 | #else | ||
80 | static inline void vm_events_fold_cpu(int cpu) | ||
81 | { | ||
82 | } | ||
83 | #endif | ||
77 | 84 | ||
78 | #else | 85 | #else |
79 | 86 | ||
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/workqueue.h b/include/linux/workqueue.h index edef8d50b26b..2a7b38d87018 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -8,16 +8,21 @@ | |||
8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <asm/atomic.h> | ||
11 | 12 | ||
12 | struct workqueue_struct; | 13 | struct workqueue_struct; |
13 | 14 | ||
14 | struct work_struct; | 15 | struct work_struct; |
15 | typedef void (*work_func_t)(struct work_struct *work); | 16 | typedef void (*work_func_t)(struct work_struct *work); |
16 | 17 | ||
18 | /* | ||
19 | * The first word is the work queue pointer and the flags rolled into | ||
20 | * one | ||
21 | */ | ||
22 | #define work_data_bits(work) ((unsigned long *)(&(work)->data)) | ||
23 | |||
17 | struct work_struct { | 24 | struct work_struct { |
18 | /* the first word is the work queue pointer and the flags rolled into | 25 | atomic_long_t data; |
19 | * one */ | ||
20 | unsigned long management; | ||
21 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ | 26 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ |
22 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ | 27 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ |
23 | #define WORK_STRUCT_FLAG_MASK (3UL) | 28 | #define WORK_STRUCT_FLAG_MASK (3UL) |
@@ -26,6 +31,9 @@ struct work_struct { | |||
26 | work_func_t func; | 31 | work_func_t func; |
27 | }; | 32 | }; |
28 | 33 | ||
34 | #define WORK_DATA_INIT(autorelease) \ | ||
35 | ATOMIC_LONG_INIT((autorelease) << WORK_STRUCT_NOAUTOREL) | ||
36 | |||
29 | struct delayed_work { | 37 | struct delayed_work { |
30 | struct work_struct work; | 38 | struct work_struct work; |
31 | struct timer_list timer; | 39 | struct timer_list timer; |
@@ -36,13 +44,13 @@ struct execute_work { | |||
36 | }; | 44 | }; |
37 | 45 | ||
38 | #define __WORK_INITIALIZER(n, f) { \ | 46 | #define __WORK_INITIALIZER(n, f) { \ |
39 | .management = 0, \ | 47 | .data = WORK_DATA_INIT(0), \ |
40 | .entry = { &(n).entry, &(n).entry }, \ | 48 | .entry = { &(n).entry, &(n).entry }, \ |
41 | .func = (f), \ | 49 | .func = (f), \ |
42 | } | 50 | } |
43 | 51 | ||
44 | #define __WORK_INITIALIZER_NAR(n, f) { \ | 52 | #define __WORK_INITIALIZER_NAR(n, f) { \ |
45 | .management = (1 << WORK_STRUCT_NOAUTOREL), \ | 53 | .data = WORK_DATA_INIT(1), \ |
46 | .entry = { &(n).entry, &(n).entry }, \ | 54 | .entry = { &(n).entry, &(n).entry }, \ |
47 | .func = (f), \ | 55 | .func = (f), \ |
48 | } | 56 | } |
@@ -82,17 +90,21 @@ struct execute_work { | |||
82 | 90 | ||
83 | /* | 91 | /* |
84 | * initialize all of a work item in one go | 92 | * initialize all of a work item in one go |
93 | * | ||
94 | * NOTE! No point in using "atomic_long_set()": useing a direct | ||
95 | * assignment of the work data initializer allows the compiler | ||
96 | * to generate better code. | ||
85 | */ | 97 | */ |
86 | #define INIT_WORK(_work, _func) \ | 98 | #define INIT_WORK(_work, _func) \ |
87 | do { \ | 99 | do { \ |
88 | (_work)->management = 0; \ | 100 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(0); \ |
89 | INIT_LIST_HEAD(&(_work)->entry); \ | 101 | INIT_LIST_HEAD(&(_work)->entry); \ |
90 | PREPARE_WORK((_work), (_func)); \ | 102 | PREPARE_WORK((_work), (_func)); \ |
91 | } while (0) | 103 | } while (0) |
92 | 104 | ||
93 | #define INIT_WORK_NAR(_work, _func) \ | 105 | #define INIT_WORK_NAR(_work, _func) \ |
94 | do { \ | 106 | do { \ |
95 | (_work)->management = (1 << WORK_STRUCT_NOAUTOREL); \ | 107 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(1); \ |
96 | INIT_LIST_HEAD(&(_work)->entry); \ | 108 | INIT_LIST_HEAD(&(_work)->entry); \ |
97 | PREPARE_WORK((_work), (_func)); \ | 109 | PREPARE_WORK((_work), (_func)); \ |
98 | } while (0) | 110 | } while (0) |
@@ -114,15 +126,15 @@ struct execute_work { | |||
114 | * @work: The work item in question | 126 | * @work: The work item in question |
115 | */ | 127 | */ |
116 | #define work_pending(work) \ | 128 | #define work_pending(work) \ |
117 | test_bit(WORK_STRUCT_PENDING, &(work)->management) | 129 | test_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
118 | 130 | ||
119 | /** | 131 | /** |
120 | * delayed_work_pending - Find out whether a delayable work item is currently | 132 | * delayed_work_pending - Find out whether a delayable work item is currently |
121 | * pending | 133 | * pending |
122 | * @work: The work item in question | 134 | * @work: The work item in question |
123 | */ | 135 | */ |
124 | #define delayed_work_pending(work) \ | 136 | #define delayed_work_pending(w) \ |
125 | test_bit(WORK_STRUCT_PENDING, &(work)->work.management) | 137 | work_pending(&(w)->work) |
126 | 138 | ||
127 | /** | 139 | /** |
128 | * work_release - Release a work item under execution | 140 | * work_release - Release a work item under execution |
@@ -143,7 +155,7 @@ struct execute_work { | |||
143 | * This should also be used to release a delayed work item. | 155 | * This should also be used to release a delayed work item. |
144 | */ | 156 | */ |
145 | #define work_release(work) \ | 157 | #define work_release(work) \ |
146 | clear_bit(WORK_STRUCT_PENDING, &(work)->management) | 158 | clear_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
147 | 159 | ||
148 | 160 | ||
149 | extern struct workqueue_struct *__create_workqueue(const char *name, | 161 | extern struct workqueue_struct *__create_workqueue(const char *name, |
@@ -188,7 +200,7 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
188 | 200 | ||
189 | ret = del_timer_sync(&work->timer); | 201 | ret = del_timer_sync(&work->timer); |
190 | if (ret) | 202 | if (ret) |
191 | clear_bit(WORK_STRUCT_PENDING, &work->work.management); | 203 | work_release(&work->work); |
192 | return ret; | 204 | return ret; |
193 | } | 205 | } |
194 | 206 | ||
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 088ba8113f7e..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,13 +355,26 @@ 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 |
357 | #define XFRMGRP_EXPIRE 2 | 374 | #define XFRMGRP_EXPIRE 2 |
358 | #define XFRMGRP_SA 4 | 375 | #define XFRMGRP_SA 4 |
359 | #define XFRMGRP_POLICY 8 | 376 | #define XFRMGRP_POLICY 8 |
360 | #define XFRMGRP_REPORT 0x10 | 377 | #define XFRMGRP_REPORT 0x20 |
361 | #endif | 378 | #endif |
362 | 379 | ||
363 | enum xfrm_nlgroups { | 380 | enum xfrm_nlgroups { |
@@ -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) |