diff options
Diffstat (limited to 'include/linux')
52 files changed, 818 insertions, 313 deletions
diff --git a/include/linux/aer.h b/include/linux/aer.h new file mode 100644 index 000000000000..402e178b38eb --- /dev/null +++ b/include/linux/aer.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Intel Corp. | ||
3 | * Tom Long Nguyen (tom.l.nguyen@intel.com) | ||
4 | * Zhang Yanmin (yanmin.zhang@intel.com) | ||
5 | */ | ||
6 | |||
7 | #ifndef _AER_H_ | ||
8 | #define _AER_H_ | ||
9 | |||
10 | #if defined(CONFIG_PCIEAER) | ||
11 | /* pci-e port driver needs this function to enable aer */ | ||
12 | extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); | ||
13 | extern int pci_find_aer_capability(struct pci_dev *dev); | ||
14 | extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); | ||
15 | extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); | ||
16 | #else | ||
17 | #define pci_enable_pcie_error_reporting(dev) do { } while (0) | ||
18 | #define pci_find_aer_capability(dev) do { } while (0) | ||
19 | #define pci_disable_pcie_error_reporting(dev) do { } while (0) | ||
20 | #define pci_cleanup_aer_uncorrect_error_status(dev) do { } while (0) | ||
21 | #endif | ||
22 | |||
23 | #endif //_AER_H_ | ||
24 | |||
diff --git a/include/linux/cdev.h b/include/linux/cdev.h index 2216638962d2..ee5f53f2ca15 100644 --- a/include/linux/cdev.h +++ b/include/linux/cdev.h | |||
@@ -23,5 +23,7 @@ void cdev_del(struct cdev *); | |||
23 | 23 | ||
24 | void cd_forget(struct inode *); | 24 | void cd_forget(struct inode *); |
25 | 25 | ||
26 | extern struct backing_dev_info directly_mappable_cdev_bdi; | ||
27 | |||
26 | #endif | 28 | #endif |
27 | #endif | 29 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 9b4f11094937..060b96112ec6 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -99,6 +99,11 @@ extern void __chk_io_ptr(void __iomem *); | |||
99 | #define __must_check | 99 | #define __must_check |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifndef CONFIG_ENABLE_MUST_CHECK | ||
103 | #undef __must_check | ||
104 | #define __must_check | ||
105 | #endif | ||
106 | |||
102 | /* | 107 | /* |
103 | * Allow us to avoid 'defined but not used' warnings on functions and data, | 108 | * Allow us to avoid 'defined but not used' warnings on functions and data, |
104 | * as well as force them to be emitted to the assembly file. | 109 | * as well as force them to be emitted to the assembly file. |
diff --git a/include/linux/device.h b/include/linux/device.h index 1e5f30da98bc..662e6a10144e 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kobject.h> | 15 | #include <linux/kobject.h> |
16 | #include <linux/klist.h> | 16 | #include <linux/klist.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/compiler.h> | ||
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
@@ -51,14 +52,17 @@ struct bus_type { | |||
51 | int (*probe)(struct device * dev); | 52 | int (*probe)(struct device * dev); |
52 | int (*remove)(struct device * dev); | 53 | int (*remove)(struct device * dev); |
53 | void (*shutdown)(struct device * dev); | 54 | void (*shutdown)(struct device * dev); |
54 | int (*suspend)(struct device * dev, pm_message_t state); | 55 | |
55 | int (*resume)(struct device * dev); | 56 | int (*suspend)(struct device * dev, pm_message_t state); |
57 | int (*suspend_late)(struct device * dev, pm_message_t state); | ||
58 | int (*resume_early)(struct device * dev); | ||
59 | int (*resume)(struct device * dev); | ||
56 | }; | 60 | }; |
57 | 61 | ||
58 | extern int bus_register(struct bus_type * bus); | 62 | extern int __must_check bus_register(struct bus_type * bus); |
59 | extern void bus_unregister(struct bus_type * bus); | 63 | extern void bus_unregister(struct bus_type * bus); |
60 | 64 | ||
61 | extern void bus_rescan_devices(struct bus_type * bus); | 65 | extern int __must_check bus_rescan_devices(struct bus_type * bus); |
62 | 66 | ||
63 | /* iterator helpers for buses */ | 67 | /* iterator helpers for buses */ |
64 | 68 | ||
@@ -67,9 +71,9 @@ int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, | |||
67 | struct device * bus_find_device(struct bus_type *bus, struct device *start, | 71 | struct device * bus_find_device(struct bus_type *bus, struct device *start, |
68 | void *data, int (*match)(struct device *, void *)); | 72 | void *data, int (*match)(struct device *, void *)); |
69 | 73 | ||
70 | int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, | 74 | int __must_check bus_for_each_drv(struct bus_type *bus, |
71 | void * data, int (*fn)(struct device_driver *, void *)); | 75 | struct device_driver *start, void *data, |
72 | 76 | int (*fn)(struct device_driver *, void *)); | |
73 | 77 | ||
74 | /* driverfs interface for exporting bus attributes */ | 78 | /* driverfs interface for exporting bus attributes */ |
75 | 79 | ||
@@ -82,7 +86,8 @@ struct bus_attribute { | |||
82 | #define BUS_ATTR(_name,_mode,_show,_store) \ | 86 | #define BUS_ATTR(_name,_mode,_show,_store) \ |
83 | struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store) | 87 | struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store) |
84 | 88 | ||
85 | extern int bus_create_file(struct bus_type *, struct bus_attribute *); | 89 | extern int __must_check bus_create_file(struct bus_type *, |
90 | struct bus_attribute *); | ||
86 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | 91 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); |
87 | 92 | ||
88 | struct device_driver { | 93 | struct device_driver { |
@@ -101,16 +106,18 @@ struct device_driver { | |||
101 | void (*shutdown) (struct device * dev); | 106 | void (*shutdown) (struct device * dev); |
102 | int (*suspend) (struct device * dev, pm_message_t state); | 107 | int (*suspend) (struct device * dev, pm_message_t state); |
103 | int (*resume) (struct device * dev); | 108 | int (*resume) (struct device * dev); |
109 | |||
110 | unsigned int multithread_probe:1; | ||
104 | }; | 111 | }; |
105 | 112 | ||
106 | 113 | ||
107 | extern int driver_register(struct device_driver * drv); | 114 | extern int __must_check driver_register(struct device_driver * drv); |
108 | extern void driver_unregister(struct device_driver * drv); | 115 | extern void driver_unregister(struct device_driver * drv); |
109 | 116 | ||
110 | extern struct device_driver * get_driver(struct device_driver * drv); | 117 | extern struct device_driver * get_driver(struct device_driver * drv); |
111 | extern void put_driver(struct device_driver * drv); | 118 | extern void put_driver(struct device_driver * drv); |
112 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); | 119 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); |
113 | 120 | extern int driver_probe_done(void); | |
114 | 121 | ||
115 | /* driverfs interface for exporting driver attributes */ | 122 | /* driverfs interface for exporting driver attributes */ |
116 | 123 | ||
@@ -123,16 +130,17 @@ struct driver_attribute { | |||
123 | #define DRIVER_ATTR(_name,_mode,_show,_store) \ | 130 | #define DRIVER_ATTR(_name,_mode,_show,_store) \ |
124 | struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store) | 131 | struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store) |
125 | 132 | ||
126 | extern int driver_create_file(struct device_driver *, struct driver_attribute *); | 133 | extern int __must_check driver_create_file(struct device_driver *, |
134 | struct driver_attribute *); | ||
127 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); | 135 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); |
128 | 136 | ||
129 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, | 137 | extern int __must_check driver_for_each_device(struct device_driver * drv, |
130 | void * data, int (*fn)(struct device *, void *)); | 138 | struct device *start, void *data, |
139 | int (*fn)(struct device *, void *)); | ||
131 | struct device * driver_find_device(struct device_driver *drv, | 140 | struct device * driver_find_device(struct device_driver *drv, |
132 | struct device *start, void *data, | 141 | struct device *start, void *data, |
133 | int (*match)(struct device *, void *)); | 142 | int (*match)(struct device *, void *)); |
134 | 143 | ||
135 | |||
136 | /* | 144 | /* |
137 | * device classes | 145 | * device classes |
138 | */ | 146 | */ |
@@ -146,17 +154,26 @@ struct class { | |||
146 | struct list_head interfaces; | 154 | struct list_head interfaces; |
147 | struct semaphore sem; /* locks both the children and interfaces lists */ | 155 | struct semaphore sem; /* locks both the children and interfaces lists */ |
148 | 156 | ||
157 | struct kobject *virtual_dir; | ||
158 | |||
149 | struct class_attribute * class_attrs; | 159 | struct class_attribute * class_attrs; |
150 | struct class_device_attribute * class_dev_attrs; | 160 | struct class_device_attribute * class_dev_attrs; |
161 | struct device_attribute * dev_attrs; | ||
151 | 162 | ||
152 | int (*uevent)(struct class_device *dev, char **envp, | 163 | int (*uevent)(struct class_device *dev, char **envp, |
153 | int num_envp, char *buffer, int buffer_size); | 164 | int num_envp, char *buffer, int buffer_size); |
165 | int (*dev_uevent)(struct device *dev, char **envp, int num_envp, | ||
166 | char *buffer, int buffer_size); | ||
154 | 167 | ||
155 | void (*release)(struct class_device *dev); | 168 | void (*release)(struct class_device *dev); |
156 | void (*class_release)(struct class *class); | 169 | void (*class_release)(struct class *class); |
170 | void (*dev_release)(struct device *dev); | ||
171 | |||
172 | int (*suspend)(struct device *, pm_message_t state); | ||
173 | int (*resume)(struct device *); | ||
157 | }; | 174 | }; |
158 | 175 | ||
159 | extern int class_register(struct class *); | 176 | extern int __must_check class_register(struct class *); |
160 | extern void class_unregister(struct class *); | 177 | extern void class_unregister(struct class *); |
161 | 178 | ||
162 | 179 | ||
@@ -169,7 +186,8 @@ struct class_attribute { | |||
169 | #define CLASS_ATTR(_name,_mode,_show,_store) \ | 186 | #define CLASS_ATTR(_name,_mode,_show,_store) \ |
170 | struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store) | 187 | struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store) |
171 | 188 | ||
172 | extern int class_create_file(struct class *, const struct class_attribute *); | 189 | extern int __must_check class_create_file(struct class *, |
190 | const struct class_attribute *); | ||
173 | extern void class_remove_file(struct class *, const struct class_attribute *); | 191 | extern void class_remove_file(struct class *, const struct class_attribute *); |
174 | 192 | ||
175 | struct class_device_attribute { | 193 | struct class_device_attribute { |
@@ -182,7 +200,7 @@ struct class_device_attribute { | |||
182 | struct class_device_attribute class_device_attr_##_name = \ | 200 | struct class_device_attribute class_device_attr_##_name = \ |
183 | __ATTR(_name,_mode,_show,_store) | 201 | __ATTR(_name,_mode,_show,_store) |
184 | 202 | ||
185 | extern int class_device_create_file(struct class_device *, | 203 | extern int __must_check class_device_create_file(struct class_device *, |
186 | const struct class_device_attribute *); | 204 | const struct class_device_attribute *); |
187 | 205 | ||
188 | /** | 206 | /** |
@@ -242,10 +260,10 @@ class_set_devdata (struct class_device *dev, void *data) | |||
242 | } | 260 | } |
243 | 261 | ||
244 | 262 | ||
245 | extern int class_device_register(struct class_device *); | 263 | extern int __must_check class_device_register(struct class_device *); |
246 | extern void class_device_unregister(struct class_device *); | 264 | extern void class_device_unregister(struct class_device *); |
247 | extern void class_device_initialize(struct class_device *); | 265 | extern void class_device_initialize(struct class_device *); |
248 | extern int class_device_add(struct class_device *); | 266 | extern int __must_check class_device_add(struct class_device *); |
249 | extern void class_device_del(struct class_device *); | 267 | extern void class_device_del(struct class_device *); |
250 | 268 | ||
251 | extern int class_device_rename(struct class_device *, char *); | 269 | extern int class_device_rename(struct class_device *, char *); |
@@ -255,7 +273,7 @@ extern void class_device_put(struct class_device *); | |||
255 | 273 | ||
256 | extern void class_device_remove_file(struct class_device *, | 274 | extern void class_device_remove_file(struct class_device *, |
257 | const struct class_device_attribute *); | 275 | const struct class_device_attribute *); |
258 | extern int class_device_create_bin_file(struct class_device *, | 276 | extern int __must_check class_device_create_bin_file(struct class_device *, |
259 | struct bin_attribute *); | 277 | struct bin_attribute *); |
260 | extern void class_device_remove_bin_file(struct class_device *, | 278 | extern void class_device_remove_bin_file(struct class_device *, |
261 | struct bin_attribute *); | 279 | struct bin_attribute *); |
@@ -266,22 +284,23 @@ struct class_interface { | |||
266 | 284 | ||
267 | int (*add) (struct class_device *, struct class_interface *); | 285 | int (*add) (struct class_device *, struct class_interface *); |
268 | void (*remove) (struct class_device *, struct class_interface *); | 286 | void (*remove) (struct class_device *, struct class_interface *); |
287 | int (*add_dev) (struct device *, struct class_interface *); | ||
288 | void (*remove_dev) (struct device *, struct class_interface *); | ||
269 | }; | 289 | }; |
270 | 290 | ||
271 | extern int class_interface_register(struct class_interface *); | 291 | extern int __must_check class_interface_register(struct class_interface *); |
272 | extern void class_interface_unregister(struct class_interface *); | 292 | extern void class_interface_unregister(struct class_interface *); |
273 | 293 | ||
274 | extern struct class *class_create(struct module *owner, char *name); | 294 | extern struct class *class_create(struct module *owner, const char *name); |
275 | extern void class_destroy(struct class *cls); | 295 | extern void class_destroy(struct class *cls); |
276 | extern struct class_device *class_device_create(struct class *cls, | 296 | extern struct class_device *class_device_create(struct class *cls, |
277 | struct class_device *parent, | 297 | struct class_device *parent, |
278 | dev_t devt, | 298 | dev_t devt, |
279 | struct device *device, | 299 | struct device *device, |
280 | char *fmt, ...) | 300 | const char *fmt, ...) |
281 | __attribute__((format(printf,5,6))); | 301 | __attribute__((format(printf,5,6))); |
282 | extern void class_device_destroy(struct class *cls, dev_t devt); | 302 | extern void class_device_destroy(struct class *cls, dev_t devt); |
283 | 303 | ||
284 | |||
285 | /* interface for exporting device attributes */ | 304 | /* interface for exporting device attributes */ |
286 | struct device_attribute { | 305 | struct device_attribute { |
287 | struct attribute attr; | 306 | struct attribute attr; |
@@ -294,8 +313,13 @@ struct device_attribute { | |||
294 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ | 313 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ |
295 | struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store) | 314 | struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store) |
296 | 315 | ||
297 | extern int device_create_file(struct device *device, struct device_attribute * entry); | 316 | extern int __must_check device_create_file(struct device *device, |
317 | struct device_attribute * entry); | ||
298 | extern void device_remove_file(struct device * dev, struct device_attribute * attr); | 318 | extern void device_remove_file(struct device * dev, struct device_attribute * attr); |
319 | extern int __must_check device_create_bin_file(struct device *dev, | ||
320 | struct bin_attribute *attr); | ||
321 | extern void device_remove_bin_file(struct device *dev, | ||
322 | struct bin_attribute *attr); | ||
299 | struct device { | 323 | struct device { |
300 | struct klist klist_children; | 324 | struct klist klist_children; |
301 | struct klist_node knode_parent; /* node in sibling list */ | 325 | struct klist_node knode_parent; /* node in sibling list */ |
@@ -305,6 +329,7 @@ struct device { | |||
305 | 329 | ||
306 | struct kobject kobj; | 330 | struct kobject kobj; |
307 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 331 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
332 | unsigned is_registered:1; | ||
308 | struct device_attribute uevent_attr; | 333 | struct device_attribute uevent_attr; |
309 | struct device_attribute *devt_attr; | 334 | struct device_attribute *devt_attr; |
310 | 335 | ||
@@ -338,6 +363,7 @@ struct device { | |||
338 | struct list_head node; | 363 | struct list_head node; |
339 | struct class *class; /* optional*/ | 364 | struct class *class; /* optional*/ |
340 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 365 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
366 | struct attribute_group **groups; /* optional groups */ | ||
341 | 367 | ||
342 | void (*release)(struct device * dev); | 368 | void (*release)(struct device * dev); |
343 | }; | 369 | }; |
@@ -356,38 +382,41 @@ dev_set_drvdata (struct device *dev, void *data) | |||
356 | 382 | ||
357 | static inline int device_is_registered(struct device *dev) | 383 | static inline int device_is_registered(struct device *dev) |
358 | { | 384 | { |
359 | return klist_node_attached(&dev->knode_bus); | 385 | return dev->is_registered; |
360 | } | 386 | } |
361 | 387 | ||
362 | /* | 388 | /* |
363 | * High level routines for use by the bus drivers | 389 | * High level routines for use by the bus drivers |
364 | */ | 390 | */ |
365 | extern int device_register(struct device * dev); | 391 | extern int __must_check device_register(struct device * dev); |
366 | extern void device_unregister(struct device * dev); | 392 | extern void device_unregister(struct device * dev); |
367 | extern void device_initialize(struct device * dev); | 393 | extern void device_initialize(struct device * dev); |
368 | extern int device_add(struct device * dev); | 394 | extern int __must_check device_add(struct device * dev); |
369 | extern void device_del(struct device * dev); | 395 | extern void device_del(struct device * dev); |
370 | extern int device_for_each_child(struct device *, void *, | 396 | extern int __must_check device_for_each_child(struct device *, void *, |
371 | int (*fn)(struct device *, void *)); | 397 | int (*fn)(struct device *, void *)); |
398 | extern int device_rename(struct device *dev, char *new_name); | ||
372 | 399 | ||
373 | /* | 400 | /* |
374 | * Manual binding of a device to driver. See drivers/base/bus.c | 401 | * Manual binding of a device to driver. See drivers/base/bus.c |
375 | * for information on use. | 402 | * for information on use. |
376 | */ | 403 | */ |
377 | extern void device_bind_driver(struct device * dev); | 404 | extern int __must_check device_bind_driver(struct device *dev); |
378 | extern void device_release_driver(struct device * dev); | 405 | extern void device_release_driver(struct device * dev); |
379 | extern int device_attach(struct device * dev); | 406 | extern int __must_check device_attach(struct device * dev); |
380 | extern void driver_attach(struct device_driver * drv); | 407 | extern int __must_check driver_attach(struct device_driver *drv); |
381 | extern void device_reprobe(struct device *dev); | 408 | extern int __must_check device_reprobe(struct device *dev); |
382 | 409 | ||
383 | /* | 410 | /* |
384 | * Easy functions for dynamically creating devices on the fly | 411 | * Easy functions for dynamically creating devices on the fly |
385 | */ | 412 | */ |
386 | extern struct device *device_create(struct class *cls, struct device *parent, | 413 | extern struct device *device_create(struct class *cls, struct device *parent, |
387 | dev_t devt, char *fmt, ...) | 414 | dev_t devt, const char *fmt, ...) |
388 | __attribute__((format(printf,4,5))); | 415 | __attribute__((format(printf,4,5))); |
389 | extern void device_destroy(struct class *cls, dev_t devt); | 416 | extern void device_destroy(struct class *cls, dev_t devt); |
390 | 417 | ||
418 | extern int virtual_device_parent(struct device *dev); | ||
419 | |||
391 | /* | 420 | /* |
392 | * Platform "fixup" functions - allow the platform to have their say | 421 | * Platform "fixup" functions - allow the platform to have their say |
393 | * about devices and actions that the general device layer doesn't | 422 | * about devices and actions that the general device layer doesn't |
@@ -412,7 +441,7 @@ extern void device_shutdown(void); | |||
412 | 441 | ||
413 | 442 | ||
414 | /* drivers/base/firmware.c */ | 443 | /* drivers/base/firmware.c */ |
415 | extern int firmware_register(struct subsystem *); | 444 | extern int __must_check firmware_register(struct subsystem *); |
416 | extern void firmware_unregister(struct subsystem *); | 445 | extern void firmware_unregister(struct subsystem *); |
417 | 446 | ||
418 | /* debugging and troubleshooting/diagnostic helpers. */ | 447 | /* debugging and troubleshooting/diagnostic helpers. */ |
diff --git a/include/linux/edd.h b/include/linux/edd.h index 162512b886f7..b2b3e68aa512 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #define EDD_CL_EQUALS 0x3d646465 /* "edd=" */ | 52 | #define EDD_CL_EQUALS 0x3d646465 /* "edd=" */ |
53 | #define EDD_CL_OFF 0x666f /* "of" for off */ | 53 | #define EDD_CL_OFF 0x666f /* "of" for off */ |
54 | #define EDD_CL_SKIP 0x6b73 /* "sk" for skipmbr */ | 54 | #define EDD_CL_SKIP 0x6b73 /* "sk" for skipmbr */ |
55 | #define EDD_CL_ON 0x6e6f /* "on" for on */ | ||
55 | 56 | ||
56 | #ifndef __ASSEMBLY__ | 57 | #ifndef __ASSEMBLY__ |
57 | 58 | ||
diff --git a/include/linux/eisa.h b/include/linux/eisa.h index 4079242dced8..1ff7c1392525 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h | |||
@@ -3,8 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/ioport.h> | 4 | #include <linux/ioport.h> |
5 | #include <linux/device.h> | 5 | #include <linux/device.h> |
6 | #include <linux/mod_devicetable.h> | ||
6 | 7 | ||
7 | #define EISA_SIG_LEN 8 | ||
8 | #define EISA_MAX_SLOTS 8 | 8 | #define EISA_MAX_SLOTS 8 |
9 | 9 | ||
10 | #define EISA_MAX_RESOURCES 4 | 10 | #define EISA_MAX_RESOURCES 4 |
@@ -27,12 +27,6 @@ | |||
27 | #define EISA_CONFIG_ENABLED 1 | 27 | #define EISA_CONFIG_ENABLED 1 |
28 | #define EISA_CONFIG_FORCED 2 | 28 | #define EISA_CONFIG_FORCED 2 |
29 | 29 | ||
30 | /* The EISA signature, in ASCII form, null terminated */ | ||
31 | struct eisa_device_id { | ||
32 | char sig[EISA_SIG_LEN]; | ||
33 | unsigned long driver_data; | ||
34 | }; | ||
35 | |||
36 | /* There is not much we can say about an EISA device, apart from | 30 | /* There is not much we can say about an EISA device, apart from |
37 | * signature, slot number, and base address. dma_mask is set by | 31 | * signature, slot number, and base address. dma_mask is set by |
38 | * default to parent device mask..*/ | 32 | * default to parent device mask..*/ |
diff --git a/include/linux/err.h b/include/linux/err.h index cd3b367f7445..1ab1d44f8d3b 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -15,6 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | #define MAX_ERRNO 4095 | 16 | #define MAX_ERRNO 4095 |
17 | 17 | ||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
18 | #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) | 20 | #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) |
19 | 21 | ||
20 | static inline void *ERR_PTR(long error) | 22 | static inline void *ERR_PTR(long error) |
@@ -32,4 +34,6 @@ static inline long IS_ERR(const void *ptr) | |||
32 | return IS_ERR_VALUE((unsigned long)ptr); | 34 | return IS_ERR_VALUE((unsigned long)ptr); |
33 | } | 35 | } |
34 | 36 | ||
37 | #endif | ||
38 | |||
35 | #endif /* _LINUX_ERR_H */ | 39 | #endif /* _LINUX_ERR_H */ |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 0eed918b3816..cc08f56750da 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -460,7 +460,7 @@ struct ext3_super_block { | |||
460 | */ | 460 | */ |
461 | __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ | 461 | __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ |
462 | __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ | 462 | __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ |
463 | __u16 s_reserved_gdt_blocks; /* Per group desc for online growth */ | 463 | __le16 s_reserved_gdt_blocks; /* Per group desc for online growth */ |
464 | /* | 464 | /* |
465 | * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set. | 465 | * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set. |
466 | */ | 466 | */ |
@@ -473,7 +473,7 @@ struct ext3_super_block { | |||
473 | __u8 s_reserved_char_pad; | 473 | __u8 s_reserved_char_pad; |
474 | __u16 s_reserved_word_pad; | 474 | __u16 s_reserved_word_pad; |
475 | __le32 s_default_mount_opts; | 475 | __le32 s_default_mount_opts; |
476 | __le32 s_first_meta_bg; /* First metablock block group */ | 476 | __le32 s_first_meta_bg; /* First metablock block group */ |
477 | __u32 s_reserved[190]; /* Padding to the end of the block */ | 477 | __u32 s_reserved[190]; /* Padding to the end of the block */ |
478 | }; | 478 | }; |
479 | 479 | ||
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 2f18b9511f21..4395e5206746 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -35,7 +35,7 @@ struct ext3_reserve_window { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct ext3_reserve_window_node { | 37 | struct ext3_reserve_window_node { |
38 | struct rb_node rsv_node; | 38 | struct rb_node rsv_node; |
39 | __u32 rsv_goal_size; | 39 | __u32 rsv_goal_size; |
40 | __u32 rsv_alloc_hit; | 40 | __u32 rsv_alloc_hit; |
41 | struct ext3_reserve_window rsv_window; | 41 | struct ext3_reserve_window rsv_window; |
diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h index c8307c02dd07..ce0e6109aff0 100644 --- a/include/linux/ext3_jbd.h +++ b/include/linux/ext3_jbd.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | /* Define the number of blocks we need to account to a transaction to | 24 | /* Define the number of blocks we need to account to a transaction to |
25 | * modify one block of data. | 25 | * modify one block of data. |
26 | * | 26 | * |
27 | * We may have to touch one inode, one bitmap buffer, up to three | 27 | * We may have to touch one inode, one bitmap buffer, up to three |
28 | * indirection blocks, the group and superblock summaries, and the data | 28 | * indirection blocks, the group and superblock summaries, and the data |
29 | * block to complete the transaction. */ | 29 | * block to complete the transaction. */ |
@@ -88,16 +88,16 @@ | |||
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | int | 90 | int |
91 | ext3_mark_iloc_dirty(handle_t *handle, | 91 | ext3_mark_iloc_dirty(handle_t *handle, |
92 | struct inode *inode, | 92 | struct inode *inode, |
93 | struct ext3_iloc *iloc); | 93 | struct ext3_iloc *iloc); |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * On success, We end up with an outstanding reference count against | 96 | * On success, We end up with an outstanding reference count against |
97 | * iloc->bh. This _must_ be cleaned up later. | 97 | * iloc->bh. This _must_ be cleaned up later. |
98 | */ | 98 | */ |
99 | 99 | ||
100 | int ext3_reserve_inode_write(handle_t *handle, struct inode *inode, | 100 | int ext3_reserve_inode_write(handle_t *handle, struct inode *inode, |
101 | struct ext3_iloc *iloc); | 101 | struct ext3_iloc *iloc); |
102 | 102 | ||
103 | int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode); | 103 | int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1d3e601ece73..8f74dfbb2edd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -512,7 +512,6 @@ struct inode { | |||
512 | struct timespec i_mtime; | 512 | struct timespec i_mtime; |
513 | struct timespec i_ctime; | 513 | struct timespec i_ctime; |
514 | unsigned int i_blkbits; | 514 | unsigned int i_blkbits; |
515 | unsigned long i_blksize; | ||
516 | unsigned long i_version; | 515 | unsigned long i_version; |
517 | blkcnt_t i_blocks; | 516 | blkcnt_t i_blocks; |
518 | unsigned short i_bytes; | 517 | unsigned short i_bytes; |
@@ -528,11 +527,12 @@ struct inode { | |||
528 | #ifdef CONFIG_QUOTA | 527 | #ifdef CONFIG_QUOTA |
529 | struct dquot *i_dquot[MAXQUOTAS]; | 528 | struct dquot *i_dquot[MAXQUOTAS]; |
530 | #endif | 529 | #endif |
531 | /* These three should probably be a union */ | ||
532 | struct list_head i_devices; | 530 | struct list_head i_devices; |
533 | struct pipe_inode_info *i_pipe; | 531 | union { |
534 | struct block_device *i_bdev; | 532 | struct pipe_inode_info *i_pipe; |
535 | struct cdev *i_cdev; | 533 | struct block_device *i_bdev; |
534 | struct cdev *i_cdev; | ||
535 | }; | ||
536 | int i_cindex; | 536 | int i_cindex; |
537 | 537 | ||
538 | __u32 i_generation; | 538 | __u32 i_generation; |
@@ -554,9 +554,7 @@ struct inode { | |||
554 | 554 | ||
555 | atomic_t i_writecount; | 555 | atomic_t i_writecount; |
556 | void *i_security; | 556 | void *i_security; |
557 | union { | 557 | void *i_private; /* fs or device private pointer */ |
558 | void *generic_ip; | ||
559 | } u; | ||
560 | #ifdef __NEED_I_SIZE_ORDERED | 558 | #ifdef __NEED_I_SIZE_ORDERED |
561 | seqcount_t i_size_seqcount; | 559 | seqcount_t i_size_seqcount; |
562 | #endif | 560 | #endif |
diff --git a/include/linux/getcpu.h b/include/linux/getcpu.h new file mode 100644 index 000000000000..031ed3780e45 --- /dev/null +++ b/include/linux/getcpu.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _LINUX_GETCPU_H | ||
2 | #define _LINUX_GETCPU_H 1 | ||
3 | |||
4 | /* Cache for getcpu() to speed it up. Results might be upto a jiffie | ||
5 | out of date, but will be faster. | ||
6 | User programs should not refer to the contents of this structure. | ||
7 | It is only a cache for vgetcpu(). It might change in future kernels. | ||
8 | The user program must store this information per thread (__thread) | ||
9 | If you want 100% accurate information pass NULL instead. */ | ||
10 | struct getcpu_cache { | ||
11 | unsigned long t0; | ||
12 | unsigned long t1; | ||
13 | unsigned long res[4]; | ||
14 | }; | ||
15 | |||
16 | #endif | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 8b34aabfe4c6..bf2b6bc3f6fd 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -67,7 +67,12 @@ struct vm_area_struct; | |||
67 | #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \ | 67 | #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \ |
68 | __GFP_HIGHMEM) | 68 | __GFP_HIGHMEM) |
69 | 69 | ||
70 | #ifdef CONFIG_NUMA | ||
70 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 71 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
72 | #else | ||
73 | #define GFP_THISNODE 0 | ||
74 | #endif | ||
75 | |||
71 | 76 | ||
72 | /* Flag - indicates that the buffer will be suitable for DMA. Ignored on some | 77 | /* Flag - indicates that the buffer will be suitable for DMA. Ignored on some |
73 | platforms, used as appropriate on others */ | 78 | platforms, used as appropriate on others */ |
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index c0e7fab28ce3..c8f8df25c7e0 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h | |||
@@ -40,7 +40,6 @@ struct i2c_algo_bit_data { | |||
40 | /* local settings */ | 40 | /* local settings */ |
41 | int udelay; /* half-clock-cycle time in microsecs */ | 41 | int udelay; /* half-clock-cycle time in microsecs */ |
42 | /* i.e. clock is (500 / udelay) KHz */ | 42 | /* i.e. clock is (500 / udelay) KHz */ |
43 | int mdelay; /* in millisecs, unused */ | ||
44 | int timeout; /* in jiffies */ | 43 | int timeout; /* in jiffies */ |
45 | }; | 44 | }; |
46 | 45 | ||
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h index 18b0adf57a3d..9908f3fc4839 100644 --- a/include/linux/i2c-algo-pcf.h +++ b/include/linux/i2c-algo-pcf.h | |||
@@ -35,7 +35,6 @@ struct i2c_algo_pcf_data { | |||
35 | 35 | ||
36 | /* local settings */ | 36 | /* local settings */ |
37 | int udelay; | 37 | int udelay; |
38 | int mdelay; | ||
39 | int timeout; | 38 | int timeout; |
40 | }; | 39 | }; |
41 | 40 | ||
diff --git a/include/linux/i2c-algo-sibyte.h b/include/linux/i2c-algo-sibyte.h deleted file mode 100644 index 03914ded8614..000000000000 --- a/include/linux/i2c-algo-sibyte.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001,2002,2003 Broadcom Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef I2C_ALGO_SIBYTE_H | ||
20 | #define I2C_ALGO_SIBYTE_H 1 | ||
21 | |||
22 | #include <linux/i2c.h> | ||
23 | |||
24 | struct i2c_algo_sibyte_data { | ||
25 | void *data; /* private data */ | ||
26 | int bus; /* which bus */ | ||
27 | void *reg_base; /* CSR base */ | ||
28 | }; | ||
29 | |||
30 | int i2c_sibyte_add_bus(struct i2c_adapter *, int speed); | ||
31 | int i2c_sibyte_del_bus(struct i2c_adapter *); | ||
32 | |||
33 | #endif /* I2C_ALGO_SIBYTE_H */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index eb0628a7ecc6..9b5d04768c2c 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -64,14 +64,6 @@ extern int i2c_master_recv(struct i2c_client *,char* ,int); | |||
64 | */ | 64 | */ |
65 | extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); | 65 | extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); |
66 | 66 | ||
67 | /* | ||
68 | * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. | ||
69 | * This is not tested/implemented yet and will change in the future. | ||
70 | */ | ||
71 | extern int i2c_slave_send(struct i2c_client *,char*,int); | ||
72 | extern int i2c_slave_recv(struct i2c_client *,char*,int); | ||
73 | |||
74 | |||
75 | 67 | ||
76 | /* 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 |
77 | 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, |
@@ -201,10 +193,6 @@ struct i2c_algorithm { | |||
201 | unsigned short flags, char read_write, | 193 | unsigned short flags, char read_write, |
202 | u8 command, int size, union i2c_smbus_data * data); | 194 | u8 command, int size, union i2c_smbus_data * data); |
203 | 195 | ||
204 | /* --- these optional/future use for some adapter types.*/ | ||
205 | int (*slave_send)(struct i2c_adapter *,char*,int); | ||
206 | int (*slave_recv)(struct i2c_adapter *,char*,int); | ||
207 | |||
208 | /* --- ioctl like call to set div. parameters. */ | 196 | /* --- ioctl like call to set div. parameters. */ |
209 | int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long); | 197 | int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long); |
210 | 198 | ||
@@ -220,7 +208,7 @@ struct i2c_adapter { | |||
220 | struct module *owner; | 208 | struct module *owner; |
221 | unsigned int id; | 209 | unsigned int id; |
222 | unsigned int class; | 210 | unsigned int class; |
223 | struct i2c_algorithm *algo;/* the algorithm to access the bus */ | 211 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
224 | void *algo_data; | 212 | void *algo_data; |
225 | 213 | ||
226 | /* --- administration stuff. */ | 214 | /* --- administration stuff. */ |
diff --git a/include/linux/init.h b/include/linux/init.h index 6667785dd1ff..e92b1455d7af 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -68,6 +68,7 @@ extern initcall_t __security_initcall_start[], __security_initcall_end[]; | |||
68 | 68 | ||
69 | /* Defined in init/main.c */ | 69 | /* Defined in init/main.c */ |
70 | extern char saved_command_line[]; | 70 | extern char saved_command_line[]; |
71 | extern unsigned int reset_devices; | ||
71 | 72 | ||
72 | /* used by init/main.c */ | 73 | /* used by init/main.c */ |
73 | extern void setup_arch(char **); | 74 | extern void setup_arch(char **); |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index a04c154c5207..a6d9daa38c6d 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/jbd.h | 2 | * linux/include/linux/jbd.h |
3 | * | 3 | * |
4 | * Written by Stephen C. Tweedie <sct@redhat.com> | 4 | * Written by Stephen C. Tweedie <sct@redhat.com> |
5 | * | 5 | * |
6 | * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved | 6 | * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved |
@@ -64,7 +64,7 @@ extern int journal_enable_debug; | |||
64 | if ((n) <= journal_enable_debug) { \ | 64 | if ((n) <= journal_enable_debug) { \ |
65 | printk (KERN_DEBUG "(%s, %d): %s: ", \ | 65 | printk (KERN_DEBUG "(%s, %d): %s: ", \ |
66 | __FILE__, __LINE__, __FUNCTION__); \ | 66 | __FILE__, __LINE__, __FUNCTION__); \ |
67 | printk (f, ## a); \ | 67 | printk (f, ## a); \ |
68 | } \ | 68 | } \ |
69 | } while (0) | 69 | } while (0) |
70 | #else | 70 | #else |
@@ -97,8 +97,8 @@ extern void jbd_slab_free(void *ptr, size_t size); | |||
97 | * number of outstanding buffers possible at any time. When the | 97 | * number of outstanding buffers possible at any time. When the |
98 | * operation completes, any buffer credits not used are credited back to | 98 | * operation completes, any buffer credits not used are credited back to |
99 | * the transaction, so that at all times we know how many buffers the | 99 | * the transaction, so that at all times we know how many buffers the |
100 | * outstanding updates on a transaction might possibly touch. | 100 | * outstanding updates on a transaction might possibly touch. |
101 | * | 101 | * |
102 | * This is an opaque datatype. | 102 | * This is an opaque datatype. |
103 | **/ | 103 | **/ |
104 | typedef struct handle_s handle_t; /* Atomic operation type */ | 104 | typedef struct handle_s handle_t; /* Atomic operation type */ |
@@ -108,7 +108,7 @@ typedef struct handle_s handle_t; /* Atomic operation type */ | |||
108 | * typedef journal_t - The journal_t maintains all of the journaling state information for a single filesystem. | 108 | * typedef journal_t - The journal_t maintains all of the journaling state information for a single filesystem. |
109 | * | 109 | * |
110 | * journal_t is linked to from the fs superblock structure. | 110 | * journal_t is linked to from the fs superblock structure. |
111 | * | 111 | * |
112 | * We use the journal_t to keep track of all outstanding transaction | 112 | * We use the journal_t to keep track of all outstanding transaction |
113 | * activity on the filesystem, and to manage the state of the log | 113 | * activity on the filesystem, and to manage the state of the log |
114 | * writing process. | 114 | * writing process. |
@@ -128,7 +128,7 @@ typedef struct journal_s journal_t; /* Journal control structure */ | |||
128 | * On-disk structures | 128 | * On-disk structures |
129 | */ | 129 | */ |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * Descriptor block types: | 132 | * Descriptor block types: |
133 | */ | 133 | */ |
134 | 134 | ||
@@ -149,8 +149,8 @@ typedef struct journal_header_s | |||
149 | } journal_header_t; | 149 | } journal_header_t; |
150 | 150 | ||
151 | 151 | ||
152 | /* | 152 | /* |
153 | * The block tag: used to describe a single buffer in the journal | 153 | * The block tag: used to describe a single buffer in the journal |
154 | */ | 154 | */ |
155 | typedef struct journal_block_tag_s | 155 | typedef struct journal_block_tag_s |
156 | { | 156 | { |
@@ -158,9 +158,9 @@ typedef struct journal_block_tag_s | |||
158 | __be32 t_flags; /* See below */ | 158 | __be32 t_flags; /* See below */ |
159 | } journal_block_tag_t; | 159 | } journal_block_tag_t; |
160 | 160 | ||
161 | /* | 161 | /* |
162 | * The revoke descriptor: used on disk to describe a series of blocks to | 162 | * The revoke descriptor: used on disk to describe a series of blocks to |
163 | * be revoked from the log | 163 | * be revoked from the log |
164 | */ | 164 | */ |
165 | typedef struct journal_revoke_header_s | 165 | typedef struct journal_revoke_header_s |
166 | { | 166 | { |
@@ -201,9 +201,9 @@ typedef struct journal_superblock_s | |||
201 | 201 | ||
202 | /* 0x0024 */ | 202 | /* 0x0024 */ |
203 | /* Remaining fields are only valid in a version-2 superblock */ | 203 | /* Remaining fields are only valid in a version-2 superblock */ |
204 | __be32 s_feature_compat; /* compatible feature set */ | 204 | __be32 s_feature_compat; /* compatible feature set */ |
205 | __be32 s_feature_incompat; /* incompatible feature set */ | 205 | __be32 s_feature_incompat; /* incompatible feature set */ |
206 | __be32 s_feature_ro_compat; /* readonly-compatible feature set */ | 206 | __be32 s_feature_ro_compat; /* readonly-compatible feature set */ |
207 | /* 0x0030 */ | 207 | /* 0x0030 */ |
208 | __u8 s_uuid[16]; /* 128-bit uuid for journal */ | 208 | __u8 s_uuid[16]; /* 128-bit uuid for journal */ |
209 | 209 | ||
@@ -374,10 +374,10 @@ struct jbd_revoke_table_s; | |||
374 | **/ | 374 | **/ |
375 | 375 | ||
376 | /* Docbook can't yet cope with the bit fields, but will leave the documentation | 376 | /* Docbook can't yet cope with the bit fields, but will leave the documentation |
377 | * in so it can be fixed later. | 377 | * in so it can be fixed later. |
378 | */ | 378 | */ |
379 | 379 | ||
380 | struct handle_s | 380 | struct handle_s |
381 | { | 381 | { |
382 | /* Which compound transaction is this update a part of? */ | 382 | /* Which compound transaction is this update a part of? */ |
383 | transaction_t *h_transaction; | 383 | transaction_t *h_transaction; |
@@ -435,7 +435,7 @@ struct handle_s | |||
435 | * | 435 | * |
436 | */ | 436 | */ |
437 | 437 | ||
438 | struct transaction_s | 438 | struct transaction_s |
439 | { | 439 | { |
440 | /* Pointer to the journal for this transaction. [no locking] */ | 440 | /* Pointer to the journal for this transaction. [no locking] */ |
441 | journal_t *t_journal; | 441 | journal_t *t_journal; |
@@ -455,7 +455,7 @@ struct transaction_s | |||
455 | T_RUNDOWN, | 455 | T_RUNDOWN, |
456 | T_FLUSH, | 456 | T_FLUSH, |
457 | T_COMMIT, | 457 | T_COMMIT, |
458 | T_FINISHED | 458 | T_FINISHED |
459 | } t_state; | 459 | } t_state; |
460 | 460 | ||
461 | /* | 461 | /* |
@@ -569,7 +569,7 @@ struct transaction_s | |||
569 | * journal_t. | 569 | * journal_t. |
570 | * @j_flags: General journaling state flags | 570 | * @j_flags: General journaling state flags |
571 | * @j_errno: Is there an outstanding uncleared error on the journal (from a | 571 | * @j_errno: Is there an outstanding uncleared error on the journal (from a |
572 | * prior abort)? | 572 | * prior abort)? |
573 | * @j_sb_buffer: First part of superblock buffer | 573 | * @j_sb_buffer: First part of superblock buffer |
574 | * @j_superblock: Second part of superblock buffer | 574 | * @j_superblock: Second part of superblock buffer |
575 | * @j_format_version: Version of the superblock format | 575 | * @j_format_version: Version of the superblock format |
@@ -583,7 +583,7 @@ struct transaction_s | |||
583 | * @j_wait_transaction_locked: Wait queue for waiting for a locked transaction | 583 | * @j_wait_transaction_locked: Wait queue for waiting for a locked transaction |
584 | * to start committing, or for a barrier lock to be released | 584 | * to start committing, or for a barrier lock to be released |
585 | * @j_wait_logspace: Wait queue for waiting for checkpointing to complete | 585 | * @j_wait_logspace: Wait queue for waiting for checkpointing to complete |
586 | * @j_wait_done_commit: Wait queue for waiting for commit to complete | 586 | * @j_wait_done_commit: Wait queue for waiting for commit to complete |
587 | * @j_wait_checkpoint: Wait queue to trigger checkpointing | 587 | * @j_wait_checkpoint: Wait queue to trigger checkpointing |
588 | * @j_wait_commit: Wait queue to trigger commit | 588 | * @j_wait_commit: Wait queue to trigger commit |
589 | * @j_wait_updates: Wait queue to wait for updates to complete | 589 | * @j_wait_updates: Wait queue to wait for updates to complete |
@@ -592,7 +592,7 @@ struct transaction_s | |||
592 | * @j_tail: Journal tail - identifies the oldest still-used block in the | 592 | * @j_tail: Journal tail - identifies the oldest still-used block in the |
593 | * journal. | 593 | * journal. |
594 | * @j_free: Journal free - how many free blocks are there in the journal? | 594 | * @j_free: Journal free - how many free blocks are there in the journal? |
595 | * @j_first: The block number of the first usable block | 595 | * @j_first: The block number of the first usable block |
596 | * @j_last: The block number one beyond the last usable block | 596 | * @j_last: The block number one beyond the last usable block |
597 | * @j_dev: Device where we store the journal | 597 | * @j_dev: Device where we store the journal |
598 | * @j_blocksize: blocksize for the location where we store the journal. | 598 | * @j_blocksize: blocksize for the location where we store the journal. |
@@ -604,12 +604,12 @@ struct transaction_s | |||
604 | * @j_list_lock: Protects the buffer lists and internal buffer state. | 604 | * @j_list_lock: Protects the buffer lists and internal buffer state. |
605 | * @j_inode: Optional inode where we store the journal. If present, all journal | 605 | * @j_inode: Optional inode where we store the journal. If present, all journal |
606 | * block numbers are mapped into this inode via bmap(). | 606 | * block numbers are mapped into this inode via bmap(). |
607 | * @j_tail_sequence: Sequence number of the oldest transaction in the log | 607 | * @j_tail_sequence: Sequence number of the oldest transaction in the log |
608 | * @j_transaction_sequence: Sequence number of the next transaction to grant | 608 | * @j_transaction_sequence: Sequence number of the next transaction to grant |
609 | * @j_commit_sequence: Sequence number of the most recently committed | 609 | * @j_commit_sequence: Sequence number of the most recently committed |
610 | * transaction | 610 | * transaction |
611 | * @j_commit_request: Sequence number of the most recent transaction wanting | 611 | * @j_commit_request: Sequence number of the most recent transaction wanting |
612 | * commit | 612 | * commit |
613 | * @j_uuid: Uuid of client object. | 613 | * @j_uuid: Uuid of client object. |
614 | * @j_task: Pointer to the current commit thread for this journal | 614 | * @j_task: Pointer to the current commit thread for this journal |
615 | * @j_max_transaction_buffers: Maximum number of metadata buffers to allow in a | 615 | * @j_max_transaction_buffers: Maximum number of metadata buffers to allow in a |
@@ -699,7 +699,7 @@ struct journal_s | |||
699 | wait_queue_head_t j_wait_updates; | 699 | wait_queue_head_t j_wait_updates; |
700 | 700 | ||
701 | /* Semaphore for locking against concurrent checkpoints */ | 701 | /* Semaphore for locking against concurrent checkpoints */ |
702 | struct mutex j_checkpoint_mutex; | 702 | struct mutex j_checkpoint_mutex; |
703 | 703 | ||
704 | /* | 704 | /* |
705 | * Journal head: identifies the first unused block in the journal. | 705 | * Journal head: identifies the first unused block in the journal. |
@@ -732,7 +732,7 @@ struct journal_s | |||
732 | */ | 732 | */ |
733 | struct block_device *j_dev; | 733 | struct block_device *j_dev; |
734 | int j_blocksize; | 734 | int j_blocksize; |
735 | unsigned int j_blk_offset; | 735 | unsigned long j_blk_offset; |
736 | 736 | ||
737 | /* | 737 | /* |
738 | * Device which holds the client fs. For internal journal this will be | 738 | * Device which holds the client fs. For internal journal this will be |
@@ -823,8 +823,8 @@ struct journal_s | |||
823 | void *j_private; | 823 | void *j_private; |
824 | }; | 824 | }; |
825 | 825 | ||
826 | /* | 826 | /* |
827 | * Journal flag definitions | 827 | * Journal flag definitions |
828 | */ | 828 | */ |
829 | #define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */ | 829 | #define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */ |
830 | #define JFS_ABORT 0x002 /* Journaling has been aborted for errors. */ | 830 | #define JFS_ABORT 0x002 /* Journaling has been aborted for errors. */ |
@@ -833,7 +833,7 @@ struct journal_s | |||
833 | #define JFS_LOADED 0x010 /* The journal superblock has been loaded */ | 833 | #define JFS_LOADED 0x010 /* The journal superblock has been loaded */ |
834 | #define JFS_BARRIER 0x020 /* Use IDE barriers */ | 834 | #define JFS_BARRIER 0x020 /* Use IDE barriers */ |
835 | 835 | ||
836 | /* | 836 | /* |
837 | * Function declarations for the journaling transaction and buffer | 837 | * Function declarations for the journaling transaction and buffer |
838 | * management | 838 | * management |
839 | */ | 839 | */ |
@@ -862,11 +862,11 @@ int __journal_remove_checkpoint(struct journal_head *); | |||
862 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); | 862 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); |
863 | 863 | ||
864 | /* Buffer IO */ | 864 | /* Buffer IO */ |
865 | extern int | 865 | extern int |
866 | journal_write_metadata_buffer(transaction_t *transaction, | 866 | journal_write_metadata_buffer(transaction_t *transaction, |
867 | struct journal_head *jh_in, | 867 | struct journal_head *jh_in, |
868 | struct journal_head **jh_out, | 868 | struct journal_head **jh_out, |
869 | int blocknr); | 869 | unsigned long blocknr); |
870 | 870 | ||
871 | /* Transaction locking */ | 871 | /* Transaction locking */ |
872 | extern void __wait_on_journal (journal_t *); | 872 | extern void __wait_on_journal (journal_t *); |
@@ -890,7 +890,7 @@ static inline handle_t *journal_current_handle(void) | |||
890 | /* The journaling code user interface: | 890 | /* The journaling code user interface: |
891 | * | 891 | * |
892 | * Create and destroy handles | 892 | * Create and destroy handles |
893 | * Register buffer modifications against the current transaction. | 893 | * Register buffer modifications against the current transaction. |
894 | */ | 894 | */ |
895 | 895 | ||
896 | extern handle_t *journal_start(journal_t *, int nblocks); | 896 | extern handle_t *journal_start(journal_t *, int nblocks); |
@@ -917,11 +917,11 @@ extern journal_t * journal_init_dev(struct block_device *bdev, | |||
917 | int start, int len, int bsize); | 917 | int start, int len, int bsize); |
918 | extern journal_t * journal_init_inode (struct inode *); | 918 | extern journal_t * journal_init_inode (struct inode *); |
919 | extern int journal_update_format (journal_t *); | 919 | extern int journal_update_format (journal_t *); |
920 | extern int journal_check_used_features | 920 | extern int journal_check_used_features |
921 | (journal_t *, unsigned long, unsigned long, unsigned long); | 921 | (journal_t *, unsigned long, unsigned long, unsigned long); |
922 | extern int journal_check_available_features | 922 | extern int journal_check_available_features |
923 | (journal_t *, unsigned long, unsigned long, unsigned long); | 923 | (journal_t *, unsigned long, unsigned long, unsigned long); |
924 | extern int journal_set_features | 924 | extern int journal_set_features |
925 | (journal_t *, unsigned long, unsigned long, unsigned long); | 925 | (journal_t *, unsigned long, unsigned long, unsigned long); |
926 | extern int journal_create (journal_t *); | 926 | extern int journal_create (journal_t *); |
927 | extern int journal_load (journal_t *journal); | 927 | extern int journal_load (journal_t *journal); |
@@ -1015,7 +1015,7 @@ do { \ | |||
1015 | * bit, when set, indicates that we have had a fatal error somewhere, | 1015 | * bit, when set, indicates that we have had a fatal error somewhere, |
1016 | * either inside the journaling layer or indicated to us by the client | 1016 | * either inside the journaling layer or indicated to us by the client |
1017 | * (eg. ext3), and that we and should not commit any further | 1017 | * (eg. ext3), and that we and should not commit any further |
1018 | * transactions. | 1018 | * transactions. |
1019 | */ | 1019 | */ |
1020 | 1020 | ||
1021 | static inline int is_journal_aborted(journal_t *journal) | 1021 | static inline int is_journal_aborted(journal_t *journal) |
@@ -1082,7 +1082,7 @@ static inline int jbd_space_needed(journal_t *journal) | |||
1082 | #define BJ_Reserved 7 /* Buffer is reserved for access by journal */ | 1082 | #define BJ_Reserved 7 /* Buffer is reserved for access by journal */ |
1083 | #define BJ_Locked 8 /* Locked for I/O during commit */ | 1083 | #define BJ_Locked 8 /* Locked for I/O during commit */ |
1084 | #define BJ_Types 9 | 1084 | #define BJ_Types 9 |
1085 | 1085 | ||
1086 | extern int jbd_blocks_per_page(struct inode *inode); | 1086 | extern int jbd_blocks_per_page(struct inode *inode); |
1087 | 1087 | ||
1088 | #ifdef __KERNEL__ | 1088 | #ifdef __KERNEL__ |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 329ebcffa106..c8d5f207c3d4 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -115,6 +115,21 @@ static inline u64 get_jiffies_64(void) | |||
115 | ((long)(a) - (long)(b) >= 0)) | 115 | ((long)(a) - (long)(b) >= 0)) |
116 | #define time_before_eq(a,b) time_after_eq(b,a) | 116 | #define time_before_eq(a,b) time_after_eq(b,a) |
117 | 117 | ||
118 | /* Same as above, but does so with platform independent 64bit types. | ||
119 | * These must be used when utilizing jiffies_64 (i.e. return value of | ||
120 | * get_jiffies_64() */ | ||
121 | #define time_after64(a,b) \ | ||
122 | (typecheck(__u64, a) && \ | ||
123 | typecheck(__u64, b) && \ | ||
124 | ((__s64)(b) - (__s64)(a) < 0)) | ||
125 | #define time_before64(a,b) time_after64(b,a) | ||
126 | |||
127 | #define time_after_eq64(a,b) \ | ||
128 | (typecheck(__u64, a) && \ | ||
129 | typecheck(__u64, b) && \ | ||
130 | ((__s64)(a) - (__s64)(b) >= 0)) | ||
131 | #define time_before_eq64(a,b) time_after_eq64(b,a) | ||
132 | |||
118 | /* | 133 | /* |
119 | * Have the 32 bit jiffies value wrap 5 minutes after boot | 134 | * Have the 32 bit jiffies value wrap 5 minutes after boot |
120 | * so jiffies wrap bugs show up earlier. | 135 | * so jiffies wrap bugs show up earlier. |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e44a37e2c71c..4d00988dad03 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -187,6 +187,7 @@ extern void bust_spinlocks(int yes); | |||
187 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 187 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
188 | extern int panic_timeout; | 188 | extern int panic_timeout; |
189 | extern int panic_on_oops; | 189 | extern int panic_on_oops; |
190 | extern int panic_on_unrecovered_nmi; | ||
190 | extern int tainted; | 191 | extern int tainted; |
191 | extern const char *print_tainted(void); | 192 | extern const char *print_tainted(void); |
192 | extern void add_taint(unsigned); | 193 | extern void add_taint(unsigned); |
@@ -349,4 +350,11 @@ struct sysinfo { | |||
349 | /* Trap pasters of __FUNCTION__ at compile-time */ | 350 | /* Trap pasters of __FUNCTION__ at compile-time */ |
350 | #define __FUNCTION__ (__func__) | 351 | #define __FUNCTION__ (__func__) |
351 | 352 | ||
353 | /* This helps us to avoid #ifdef CONFIG_NUMA */ | ||
354 | #ifdef CONFIG_NUMA | ||
355 | #define NUMA_BUILD 1 | ||
356 | #else | ||
357 | #define NUMA_BUILD 0 | ||
358 | #endif | ||
359 | |||
352 | #endif | 360 | #endif |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 2d229327959e..bcd9cd173c2c 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/sysfs.h> | 22 | #include <linux/sysfs.h> |
23 | #include <linux/compiler.h> | ||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/rwsem.h> | 25 | #include <linux/rwsem.h> |
25 | #include <linux/kref.h> | 26 | #include <linux/kref.h> |
@@ -71,12 +72,12 @@ static inline const char * kobject_name(const struct kobject * kobj) | |||
71 | extern void kobject_init(struct kobject *); | 72 | extern void kobject_init(struct kobject *); |
72 | extern void kobject_cleanup(struct kobject *); | 73 | extern void kobject_cleanup(struct kobject *); |
73 | 74 | ||
74 | extern int kobject_add(struct kobject *); | 75 | extern int __must_check kobject_add(struct kobject *); |
75 | extern void kobject_del(struct kobject *); | 76 | extern void kobject_del(struct kobject *); |
76 | 77 | ||
77 | extern int kobject_rename(struct kobject *, const char *new_name); | 78 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
78 | 79 | ||
79 | extern int kobject_register(struct kobject *); | 80 | extern int __must_check kobject_register(struct kobject *); |
80 | extern void kobject_unregister(struct kobject *); | 81 | extern void kobject_unregister(struct kobject *); |
81 | 82 | ||
82 | extern struct kobject * kobject_get(struct kobject *); | 83 | extern struct kobject * kobject_get(struct kobject *); |
@@ -128,8 +129,8 @@ struct kset { | |||
128 | 129 | ||
129 | 130 | ||
130 | extern void kset_init(struct kset * k); | 131 | extern void kset_init(struct kset * k); |
131 | extern int kset_add(struct kset * k); | 132 | extern int __must_check kset_add(struct kset * k); |
132 | extern int kset_register(struct kset * k); | 133 | extern int __must_check kset_register(struct kset * k); |
133 | extern void kset_unregister(struct kset * k); | 134 | extern void kset_unregister(struct kset * k); |
134 | 135 | ||
135 | static inline struct kset * to_kset(struct kobject * kobj) | 136 | static inline struct kset * to_kset(struct kobject * kobj) |
@@ -239,7 +240,7 @@ extern struct subsystem hypervisor_subsys; | |||
239 | (obj)->subsys.kset.kobj.kset = &(_subsys).kset | 240 | (obj)->subsys.kset.kobj.kset = &(_subsys).kset |
240 | 241 | ||
241 | extern void subsystem_init(struct subsystem *); | 242 | extern void subsystem_init(struct subsystem *); |
242 | extern int subsystem_register(struct subsystem *); | 243 | extern int __must_check subsystem_register(struct subsystem *); |
243 | extern void subsystem_unregister(struct subsystem *); | 244 | extern void subsystem_unregister(struct subsystem *); |
244 | 245 | ||
245 | static inline struct subsystem * subsys_get(struct subsystem * s) | 246 | static inline struct subsystem * subsys_get(struct subsystem * s) |
@@ -258,7 +259,8 @@ struct subsys_attribute { | |||
258 | ssize_t (*store)(struct subsystem *, const char *, size_t); | 259 | ssize_t (*store)(struct subsystem *, const char *, size_t); |
259 | }; | 260 | }; |
260 | 261 | ||
261 | extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); | 262 | extern int __must_check subsys_create_file(struct subsystem * , |
263 | struct subsys_attribute *); | ||
262 | 264 | ||
263 | #if defined(CONFIG_HOTPLUG) | 265 | #if defined(CONFIG_HOTPLUG) |
264 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); | 266 | void kobject_uevent(struct kobject *kobj, enum kobject_action action); |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 932021f872d5..6c9873f88287 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -35,9 +35,13 @@ | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #define KPROBE_ENTRY(name) \ | 37 | #define KPROBE_ENTRY(name) \ |
38 | .section .kprobes.text, "ax"; \ | 38 | .pushsection .kprobes.text, "ax"; \ |
39 | ENTRY(name) | 39 | ENTRY(name) |
40 | 40 | ||
41 | #define KPROBE_END(name) \ | ||
42 | END(name); \ | ||
43 | .popsection | ||
44 | |||
41 | #ifndef END | 45 | #ifndef END |
42 | #define END(name) \ | 46 | #define END(name) \ |
43 | .size name, .-name | 47 | .size name, .-name |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 856f0ee7e84a..7b703b6d4358 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/debug_locks.h> | 17 | #include <linux/debug_locks.h> |
18 | #include <linux/backing-dev.h> | 18 | #include <linux/backing-dev.h> |
19 | #include <linux/mm_types.h> | ||
19 | 20 | ||
20 | struct mempolicy; | 21 | struct mempolicy; |
21 | struct anon_vma; | 22 | struct anon_vma; |
@@ -198,6 +199,7 @@ struct vm_operations_struct { | |||
198 | void (*open)(struct vm_area_struct * area); | 199 | void (*open)(struct vm_area_struct * area); |
199 | void (*close)(struct vm_area_struct * area); | 200 | void (*close)(struct vm_area_struct * area); |
200 | struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); | 201 | struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); |
202 | unsigned long (*nopfn)(struct vm_area_struct * area, unsigned long address); | ||
201 | int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); | 203 | int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); |
202 | 204 | ||
203 | /* notification that a previously read-only page is about to become | 205 | /* notification that a previously read-only page is about to become |
@@ -215,62 +217,6 @@ struct vm_operations_struct { | |||
215 | struct mmu_gather; | 217 | struct mmu_gather; |
216 | struct inode; | 218 | struct inode; |
217 | 219 | ||
218 | /* | ||
219 | * Each physical page in the system has a struct page associated with | ||
220 | * it to keep track of whatever it is we are using the page for at the | ||
221 | * moment. Note that we have no way to track which tasks are using | ||
222 | * a page, though if it is a pagecache page, rmap structures can tell us | ||
223 | * who is mapping it. | ||
224 | */ | ||
225 | struct page { | ||
226 | unsigned long flags; /* Atomic flags, some possibly | ||
227 | * updated asynchronously */ | ||
228 | atomic_t _count; /* Usage count, see below. */ | ||
229 | atomic_t _mapcount; /* Count of ptes mapped in mms, | ||
230 | * to show when page is mapped | ||
231 | * & limit reverse map searches. | ||
232 | */ | ||
233 | union { | ||
234 | struct { | ||
235 | unsigned long private; /* Mapping-private opaque data: | ||
236 | * usually used for buffer_heads | ||
237 | * if PagePrivate set; used for | ||
238 | * swp_entry_t if PageSwapCache; | ||
239 | * indicates order in the buddy | ||
240 | * system if PG_buddy is set. | ||
241 | */ | ||
242 | struct address_space *mapping; /* If low bit clear, points to | ||
243 | * inode address_space, or NULL. | ||
244 | * If page mapped as anonymous | ||
245 | * memory, low bit is set, and | ||
246 | * it points to anon_vma object: | ||
247 | * see PAGE_MAPPING_ANON below. | ||
248 | */ | ||
249 | }; | ||
250 | #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS | ||
251 | spinlock_t ptl; | ||
252 | #endif | ||
253 | }; | ||
254 | pgoff_t index; /* Our offset within mapping. */ | ||
255 | struct list_head lru; /* Pageout list, eg. active_list | ||
256 | * protected by zone->lru_lock ! | ||
257 | */ | ||
258 | /* | ||
259 | * On machines where all RAM is mapped into kernel address space, | ||
260 | * we can simply calculate the virtual address. On machines with | ||
261 | * highmem some memory is mapped into kernel virtual memory | ||
262 | * dynamically, so we need a place to store that address. | ||
263 | * Note that this field could be 16 bits on x86 ... ;) | ||
264 | * | ||
265 | * Architectures with slow multiplication can define | ||
266 | * WANT_PAGE_VIRTUAL in asm/page.h | ||
267 | */ | ||
268 | #if defined(WANT_PAGE_VIRTUAL) | ||
269 | void *virtual; /* Kernel virtual address (NULL if | ||
270 | not kmapped, ie. highmem) */ | ||
271 | #endif /* WANT_PAGE_VIRTUAL */ | ||
272 | }; | ||
273 | |||
274 | #define page_private(page) ((page)->private) | 220 | #define page_private(page) ((page)->private) |
275 | #define set_page_private(page, v) ((page)->private = (v)) | 221 | #define set_page_private(page, v) ((page)->private = (v)) |
276 | 222 | ||
@@ -501,7 +447,11 @@ static inline struct zone *page_zone(struct page *page) | |||
501 | 447 | ||
502 | static inline unsigned long zone_to_nid(struct zone *zone) | 448 | static inline unsigned long zone_to_nid(struct zone *zone) |
503 | { | 449 | { |
504 | return zone->zone_pgdat->node_id; | 450 | #ifdef CONFIG_NUMA |
451 | return zone->node; | ||
452 | #else | ||
453 | return 0; | ||
454 | #endif | ||
505 | } | 455 | } |
506 | 456 | ||
507 | static inline unsigned long page_to_nid(struct page *page) | 457 | static inline unsigned long page_to_nid(struct page *page) |
@@ -546,11 +496,6 @@ static inline void set_page_links(struct page *page, enum zone_type zone, | |||
546 | */ | 496 | */ |
547 | #include <linux/vmstat.h> | 497 | #include <linux/vmstat.h> |
548 | 498 | ||
549 | #ifndef CONFIG_DISCONTIGMEM | ||
550 | /* The array of struct pages - for discontigmem use pgdat->lmem_map */ | ||
551 | extern struct page *mem_map; | ||
552 | #endif | ||
553 | |||
554 | static __always_inline void *lowmem_page_address(struct page *page) | 499 | static __always_inline void *lowmem_page_address(struct page *page) |
555 | { | 500 | { |
556 | return __va(page_to_pfn(page) << PAGE_SHIFT); | 501 | return __va(page_to_pfn(page) << PAGE_SHIFT); |
@@ -650,6 +595,12 @@ static inline int page_mapped(struct page *page) | |||
650 | #define NOPAGE_OOM ((struct page *) (-1)) | 595 | #define NOPAGE_OOM ((struct page *) (-1)) |
651 | 596 | ||
652 | /* | 597 | /* |
598 | * Error return values for the *_nopfn functions | ||
599 | */ | ||
600 | #define NOPFN_SIGBUS ((unsigned long) -1) | ||
601 | #define NOPFN_OOM ((unsigned long) -2) | ||
602 | |||
603 | /* | ||
653 | * Different kinds of faults, as returned by handle_mm_fault(). | 604 | * Different kinds of faults, as returned by handle_mm_fault(). |
654 | * Used to decide whether a process gets delivered SIGBUS or | 605 | * Used to decide whether a process gets delivered SIGBUS or |
655 | * just gets major/minor fault counters bumped up. | 606 | * just gets major/minor fault counters bumped up. |
@@ -937,6 +888,56 @@ extern void free_area_init(unsigned long * zones_size); | |||
937 | extern void free_area_init_node(int nid, pg_data_t *pgdat, | 888 | extern void free_area_init_node(int nid, pg_data_t *pgdat, |
938 | unsigned long * zones_size, unsigned long zone_start_pfn, | 889 | unsigned long * zones_size, unsigned long zone_start_pfn, |
939 | unsigned long *zholes_size); | 890 | unsigned long *zholes_size); |
891 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP | ||
892 | /* | ||
893 | * With CONFIG_ARCH_POPULATES_NODE_MAP set, an architecture may initialise its | ||
894 | * zones, allocate the backing mem_map and account for memory holes in a more | ||
895 | * architecture independent manner. This is a substitute for creating the | ||
896 | * zone_sizes[] and zholes_size[] arrays and passing them to | ||
897 | * free_area_init_node() | ||
898 | * | ||
899 | * An architecture is expected to register range of page frames backed by | ||
900 | * physical memory with add_active_range() before calling | ||
901 | * free_area_init_nodes() passing in the PFN each zone ends at. At a basic | ||
902 | * usage, an architecture is expected to do something like | ||
903 | * | ||
904 | * unsigned long max_zone_pfns[MAX_NR_ZONES] = {max_dma, max_normal_pfn, | ||
905 | * max_highmem_pfn}; | ||
906 | * for_each_valid_physical_page_range() | ||
907 | * add_active_range(node_id, start_pfn, end_pfn) | ||
908 | * free_area_init_nodes(max_zone_pfns); | ||
909 | * | ||
910 | * If the architecture guarantees that there are no holes in the ranges | ||
911 | * registered with add_active_range(), free_bootmem_active_regions() | ||
912 | * will call free_bootmem_node() for each registered physical page range. | ||
913 | * Similarly sparse_memory_present_with_active_regions() calls | ||
914 | * memory_present() for each range when SPARSEMEM is enabled. | ||
915 | * | ||
916 | * See mm/page_alloc.c for more information on each function exposed by | ||
917 | * CONFIG_ARCH_POPULATES_NODE_MAP | ||
918 | */ | ||
919 | extern void free_area_init_nodes(unsigned long *max_zone_pfn); | ||
920 | extern void add_active_range(unsigned int nid, unsigned long start_pfn, | ||
921 | unsigned long end_pfn); | ||
922 | extern void shrink_active_range(unsigned int nid, unsigned long old_end_pfn, | ||
923 | unsigned long new_end_pfn); | ||
924 | extern void push_node_boundaries(unsigned int nid, unsigned long start_pfn, | ||
925 | unsigned long end_pfn); | ||
926 | extern void remove_all_active_ranges(void); | ||
927 | extern unsigned long absent_pages_in_range(unsigned long start_pfn, | ||
928 | unsigned long end_pfn); | ||
929 | extern void get_pfn_range_for_nid(unsigned int nid, | ||
930 | unsigned long *start_pfn, unsigned long *end_pfn); | ||
931 | extern unsigned long find_min_pfn_with_active_regions(void); | ||
932 | extern unsigned long find_max_pfn_with_active_regions(void); | ||
933 | extern void free_bootmem_with_active_regions(int nid, | ||
934 | unsigned long max_low_pfn); | ||
935 | extern void sparse_memory_present_with_active_regions(int nid); | ||
936 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | ||
937 | extern int early_pfn_to_nid(unsigned long pfn); | ||
938 | #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ | ||
939 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ | ||
940 | extern void set_dma_reserve(unsigned long new_dma_reserve); | ||
940 | extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); | 941 | extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); |
941 | extern void setup_per_zone_pages_min(void); | 942 | extern void setup_per_zone_pages_min(void); |
942 | extern void mem_init(void); | 943 | extern void mem_init(void); |
@@ -1130,7 +1131,7 @@ void drop_slab(void); | |||
1130 | extern int randomize_va_space; | 1131 | extern int randomize_va_space; |
1131 | #endif | 1132 | #endif |
1132 | 1133 | ||
1133 | const char *arch_vma_name(struct vm_area_struct *vma); | 1134 | __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma); |
1134 | 1135 | ||
1135 | #endif /* __KERNEL__ */ | 1136 | #endif /* __KERNEL__ */ |
1136 | #endif /* _LINUX_MM_H */ | 1137 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h new file mode 100644 index 000000000000..c3852fd4a1cc --- /dev/null +++ b/include/linux/mm_types.h | |||
@@ -0,0 +1,67 @@ | |||
1 | #ifndef _LINUX_MM_TYPES_H | ||
2 | #define _LINUX_MM_TYPES_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/list.h> | ||
7 | #include <linux/spinlock.h> | ||
8 | |||
9 | struct address_space; | ||
10 | |||
11 | /* | ||
12 | * Each physical page in the system has a struct page associated with | ||
13 | * it to keep track of whatever it is we are using the page for at the | ||
14 | * moment. Note that we have no way to track which tasks are using | ||
15 | * a page, though if it is a pagecache page, rmap structures can tell us | ||
16 | * who is mapping it. | ||
17 | */ | ||
18 | struct page { | ||
19 | unsigned long flags; /* Atomic flags, some possibly | ||
20 | * updated asynchronously */ | ||
21 | atomic_t _count; /* Usage count, see below. */ | ||
22 | atomic_t _mapcount; /* Count of ptes mapped in mms, | ||
23 | * to show when page is mapped | ||
24 | * & limit reverse map searches. | ||
25 | */ | ||
26 | union { | ||
27 | struct { | ||
28 | unsigned long private; /* Mapping-private opaque data: | ||
29 | * usually used for buffer_heads | ||
30 | * if PagePrivate set; used for | ||
31 | * swp_entry_t if PageSwapCache; | ||
32 | * indicates order in the buddy | ||
33 | * system if PG_buddy is set. | ||
34 | */ | ||
35 | struct address_space *mapping; /* If low bit clear, points to | ||
36 | * inode address_space, or NULL. | ||
37 | * If page mapped as anonymous | ||
38 | * memory, low bit is set, and | ||
39 | * it points to anon_vma object: | ||
40 | * see PAGE_MAPPING_ANON below. | ||
41 | */ | ||
42 | }; | ||
43 | #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS | ||
44 | spinlock_t ptl; | ||
45 | #endif | ||
46 | }; | ||
47 | pgoff_t index; /* Our offset within mapping. */ | ||
48 | struct list_head lru; /* Pageout list, eg. active_list | ||
49 | * protected by zone->lru_lock ! | ||
50 | */ | ||
51 | /* | ||
52 | * On machines where all RAM is mapped into kernel address space, | ||
53 | * we can simply calculate the virtual address. On machines with | ||
54 | * highmem some memory is mapped into kernel virtual memory | ||
55 | * dynamically, so we need a place to store that address. | ||
56 | * Note that this field could be 16 bits on x86 ... ;) | ||
57 | * | ||
58 | * Architectures with slow multiplication can define | ||
59 | * WANT_PAGE_VIRTUAL in asm/page.h | ||
60 | */ | ||
61 | #if defined(WANT_PAGE_VIRTUAL) | ||
62 | void *virtual; /* Kernel virtual address (NULL if | ||
63 | not kmapped, ie. highmem) */ | ||
64 | #endif /* WANT_PAGE_VIRTUAL */ | ||
65 | }; | ||
66 | |||
67 | #endif /* _LINUX_MM_TYPES_H */ | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 3693f1a52788..59855b8718a0 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -58,6 +58,7 @@ enum zone_stat_item { | |||
58 | NR_WRITEBACK, | 58 | NR_WRITEBACK, |
59 | NR_UNSTABLE_NFS, /* NFS unstable pages */ | 59 | NR_UNSTABLE_NFS, /* NFS unstable pages */ |
60 | NR_BOUNCE, | 60 | NR_BOUNCE, |
61 | NR_VMSCAN_WRITE, | ||
61 | #ifdef CONFIG_NUMA | 62 | #ifdef CONFIG_NUMA |
62 | NUMA_HIT, /* allocated in intended node */ | 63 | NUMA_HIT, /* allocated in intended node */ |
63 | NUMA_MISS, /* allocated in non intended node */ | 64 | NUMA_MISS, /* allocated in non intended node */ |
@@ -167,6 +168,7 @@ struct zone { | |||
167 | unsigned long lowmem_reserve[MAX_NR_ZONES]; | 168 | unsigned long lowmem_reserve[MAX_NR_ZONES]; |
168 | 169 | ||
169 | #ifdef CONFIG_NUMA | 170 | #ifdef CONFIG_NUMA |
171 | int node; | ||
170 | /* | 172 | /* |
171 | * zone reclaim becomes active if more unmapped pages exist. | 173 | * zone reclaim becomes active if more unmapped pages exist. |
172 | */ | 174 | */ |
@@ -305,6 +307,18 @@ struct zonelist { | |||
305 | struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited | 307 | struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited |
306 | }; | 308 | }; |
307 | 309 | ||
310 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP | ||
311 | struct node_active_region { | ||
312 | unsigned long start_pfn; | ||
313 | unsigned long end_pfn; | ||
314 | int nid; | ||
315 | }; | ||
316 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ | ||
317 | |||
318 | #ifndef CONFIG_DISCONTIGMEM | ||
319 | /* The array of struct pages - for discontigmem use pgdat->lmem_map */ | ||
320 | extern struct page *mem_map; | ||
321 | #endif | ||
308 | 322 | ||
309 | /* | 323 | /* |
310 | * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM | 324 | * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM |
@@ -518,7 +532,8 @@ extern struct zone *next_zone(struct zone *zone); | |||
518 | 532 | ||
519 | #endif | 533 | #endif |
520 | 534 | ||
521 | #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | 535 | #if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \ |
536 | !defined(CONFIG_ARCH_POPULATES_NODE_MAP) | ||
522 | #define early_pfn_to_nid(nid) (0UL) | 537 | #define early_pfn_to_nid(nid) (0UL) |
523 | #endif | 538 | #endif |
524 | 539 | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f7ca0b09075d..e0c393cc7240 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -308,4 +308,16 @@ struct input_device_id { | |||
308 | kernel_ulong_t driver_info; | 308 | kernel_ulong_t driver_info; |
309 | }; | 309 | }; |
310 | 310 | ||
311 | /* EISA */ | ||
312 | |||
313 | #define EISA_SIG_LEN 8 | ||
314 | |||
315 | /* The EISA signature, in ASCII form, null terminated */ | ||
316 | struct eisa_device_id { | ||
317 | char sig[EISA_SIG_LEN]; | ||
318 | kernel_ulong_t driver_data; | ||
319 | }; | ||
320 | |||
321 | #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s" | ||
322 | |||
311 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 323 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 36f5bcf513b0..98c9b9f667a5 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -315,10 +315,6 @@ extern void nfs_end_data_update(struct inode *); | |||
315 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 315 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
316 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 316 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
317 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); | 317 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); |
318 | extern struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent, | ||
319 | const struct dentry *dentry, | ||
320 | struct nfs_fh *fh, | ||
321 | struct nfs_fattr *fattr); | ||
322 | 318 | ||
323 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 319 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
324 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ | 320 | extern u32 root_nfs_parse_addr(char *name); /*__init*/ |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index f9edcd2ff3c8..31a3cb617ce0 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -269,14 +269,8 @@ fill_post_wcc(struct svc_fh *fhp) | |||
269 | fhp->fh_post_uid = inode->i_uid; | 269 | fhp->fh_post_uid = inode->i_uid; |
270 | fhp->fh_post_gid = inode->i_gid; | 270 | fhp->fh_post_gid = inode->i_gid; |
271 | fhp->fh_post_size = inode->i_size; | 271 | fhp->fh_post_size = inode->i_size; |
272 | if (inode->i_blksize) { | 272 | fhp->fh_post_blksize = BLOCK_SIZE; |
273 | fhp->fh_post_blksize = inode->i_blksize; | 273 | fhp->fh_post_blocks = inode->i_blocks; |
274 | fhp->fh_post_blocks = inode->i_blocks; | ||
275 | } else { | ||
276 | fhp->fh_post_blksize = BLOCK_SIZE; | ||
277 | /* how much do we care for accuracy with MinixFS? */ | ||
278 | fhp->fh_post_blocks = (inode->i_size+511) >> 9; | ||
279 | } | ||
280 | fhp->fh_post_rdev[0] = htonl((u32)imajor(inode)); | 274 | fhp->fh_post_rdev[0] = htonl((u32)imajor(inode)); |
281 | fhp->fh_post_rdev[1] = htonl((u32)iminor(inode)); | 275 | fhp->fh_post_rdev[1] = htonl((u32)iminor(inode)); |
282 | fhp->fh_post_atime = inode->i_atime; | 276 | fhp->fh_post_atime = inode->i_atime; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8565b81d7fbc..5c3a4176eb64 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/types.h> | 49 | #include <linux/types.h> |
50 | #include <linux/ioport.h> | 50 | #include <linux/ioport.h> |
51 | #include <linux/list.h> | 51 | #include <linux/list.h> |
52 | #include <linux/compiler.h> | ||
52 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
53 | #include <linux/device.h> | 54 | #include <linux/device.h> |
54 | 55 | ||
@@ -346,6 +347,8 @@ struct pci_driver { | |||
346 | int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ | 347 | int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ |
347 | void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ | 348 | void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ |
348 | int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ | 349 | int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ |
350 | int (*suspend_late) (struct pci_dev *dev, pm_message_t state); | ||
351 | int (*resume_early) (struct pci_dev *dev); | ||
349 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 352 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
350 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ | 353 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ |
351 | void (*shutdown) (struct pci_dev *dev); | 354 | void (*shutdown) (struct pci_dev *dev); |
@@ -353,6 +356,8 @@ struct pci_driver { | |||
353 | struct pci_error_handlers *err_handler; | 356 | struct pci_error_handlers *err_handler; |
354 | struct device_driver driver; | 357 | struct device_driver driver; |
355 | struct pci_dynids dynids; | 358 | struct pci_dynids dynids; |
359 | |||
360 | int multithread_probe; | ||
356 | }; | 361 | }; |
357 | 362 | ||
358 | #define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) | 363 | #define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) |
@@ -401,7 +406,7 @@ extern struct list_head pci_root_buses; /* list of all known PCI buses */ | |||
401 | extern struct list_head pci_devices; /* list of all devices */ | 406 | extern struct list_head pci_devices; /* list of all devices */ |
402 | 407 | ||
403 | void pcibios_fixup_bus(struct pci_bus *); | 408 | void pcibios_fixup_bus(struct pci_bus *); |
404 | int pcibios_enable_device(struct pci_dev *, int mask); | 409 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
405 | char *pcibios_setup (char *str); | 410 | char *pcibios_setup (char *str); |
406 | 411 | ||
407 | /* Used only when drivers/pci/setup.c is used */ | 412 | /* Used only when drivers/pci/setup.c is used */ |
@@ -428,7 +433,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn); | |||
428 | struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn); | 433 | struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn); |
429 | void pci_device_add(struct pci_dev *dev, struct pci_bus *bus); | 434 | void pci_device_add(struct pci_dev *dev, struct pci_bus *bus); |
430 | unsigned int pci_scan_child_bus(struct pci_bus *bus); | 435 | unsigned int pci_scan_child_bus(struct pci_bus *bus); |
431 | void pci_bus_add_device(struct pci_dev *dev); | 436 | int __must_check pci_bus_add_device(struct pci_dev *dev); |
432 | void pci_read_bridge_bases(struct pci_bus *child); | 437 | void pci_read_bridge_bases(struct pci_bus *child); |
433 | struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res); | 438 | struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res); |
434 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); | 439 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); |
@@ -436,6 +441,7 @@ extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | |||
436 | extern void pci_dev_put(struct pci_dev *dev); | 441 | extern void pci_dev_put(struct pci_dev *dev); |
437 | extern void pci_remove_bus(struct pci_bus *b); | 442 | extern void pci_remove_bus(struct pci_bus *b); |
438 | extern void pci_remove_bus_device(struct pci_dev *dev); | 443 | extern void pci_remove_bus_device(struct pci_dev *dev); |
444 | extern void pci_stop_bus_device(struct pci_dev *dev); | ||
439 | void pci_setup_cardbus(struct pci_bus *bus); | 445 | void pci_setup_cardbus(struct pci_bus *bus); |
440 | 446 | ||
441 | /* Generic PCI functions exported to card drivers */ | 447 | /* Generic PCI functions exported to card drivers */ |
@@ -488,19 +494,19 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val | |||
488 | return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val); | 494 | return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val); |
489 | } | 495 | } |
490 | 496 | ||
491 | int pci_enable_device(struct pci_dev *dev); | 497 | int __must_check pci_enable_device(struct pci_dev *dev); |
492 | int pci_enable_device_bars(struct pci_dev *dev, int mask); | 498 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); |
493 | void pci_disable_device(struct pci_dev *dev); | 499 | void pci_disable_device(struct pci_dev *dev); |
494 | void pci_set_master(struct pci_dev *dev); | 500 | void pci_set_master(struct pci_dev *dev); |
495 | #define HAVE_PCI_SET_MWI | 501 | #define HAVE_PCI_SET_MWI |
496 | int pci_set_mwi(struct pci_dev *dev); | 502 | int __must_check pci_set_mwi(struct pci_dev *dev); |
497 | void pci_clear_mwi(struct pci_dev *dev); | 503 | void pci_clear_mwi(struct pci_dev *dev); |
498 | void pci_intx(struct pci_dev *dev, int enable); | 504 | void pci_intx(struct pci_dev *dev, int enable); |
499 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 505 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
500 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 506 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
501 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 507 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
502 | int pci_assign_resource(struct pci_dev *dev, int i); | 508 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
503 | int pci_assign_resource_fixed(struct pci_dev *dev, int i); | 509 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
504 | void pci_restore_bars(struct pci_dev *dev); | 510 | void pci_restore_bars(struct pci_dev *dev); |
505 | 511 | ||
506 | /* ROM control related routines */ | 512 | /* ROM control related routines */ |
@@ -526,23 +532,24 @@ void pdev_sort_resources(struct pci_dev *, struct resource_list *); | |||
526 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), | 532 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), |
527 | int (*)(struct pci_dev *, u8, u8)); | 533 | int (*)(struct pci_dev *, u8, u8)); |
528 | #define HAVE_PCI_REQ_REGIONS 2 | 534 | #define HAVE_PCI_REQ_REGIONS 2 |
529 | int pci_request_regions(struct pci_dev *, const char *); | 535 | int __must_check pci_request_regions(struct pci_dev *, const char *); |
530 | void pci_release_regions(struct pci_dev *); | 536 | void pci_release_regions(struct pci_dev *); |
531 | int pci_request_region(struct pci_dev *, int, const char *); | 537 | int __must_check pci_request_region(struct pci_dev *, int, const char *); |
532 | void pci_release_region(struct pci_dev *, int); | 538 | void pci_release_region(struct pci_dev *, int); |
533 | 539 | ||
534 | /* drivers/pci/bus.c */ | 540 | /* drivers/pci/bus.c */ |
535 | int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 541 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
536 | resource_size_t size, resource_size_t align, | 542 | struct resource *res, resource_size_t size, |
537 | resource_size_t min, unsigned int type_mask, | 543 | resource_size_t align, resource_size_t min, |
538 | void (*alignf)(void *, struct resource *, | 544 | unsigned int type_mask, |
539 | resource_size_t, resource_size_t), | 545 | void (*alignf)(void *, struct resource *, |
540 | void *alignf_data); | 546 | resource_size_t, resource_size_t), |
547 | void *alignf_data); | ||
541 | void pci_enable_bridges(struct pci_bus *bus); | 548 | void pci_enable_bridges(struct pci_bus *bus); |
542 | 549 | ||
543 | /* Proper probing supporting hot-pluggable devices */ | 550 | /* Proper probing supporting hot-pluggable devices */ |
544 | int __pci_register_driver(struct pci_driver *, struct module *); | 551 | int __must_check __pci_register_driver(struct pci_driver *, struct module *); |
545 | static inline int pci_register_driver(struct pci_driver *driver) | 552 | static inline int __must_check pci_register_driver(struct pci_driver *driver) |
546 | { | 553 | { |
547 | return __pci_register_driver(driver, THIS_MODULE); | 554 | return __pci_register_driver(driver, THIS_MODULE); |
548 | } | 555 | } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6a1e09834559..ab032ceafa84 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1411,6 +1411,7 @@ | |||
1411 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1411 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
1412 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 | 1412 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 |
1413 | #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 | 1413 | #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 |
1414 | #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 | ||
1414 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 | 1415 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 |
1415 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 | 1416 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 |
1416 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 | 1417 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 |
@@ -1482,9 +1483,6 @@ | |||
1482 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 | 1483 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 |
1483 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 | 1484 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 |
1484 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 | 1485 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 |
1485 | #define PCI_DEVICE_ID_MARVELL_GT96100 0x9652 | ||
1486 | #define PCI_DEVICE_ID_MARVELL_GT96100A 0x9653 | ||
1487 | |||
1488 | 1486 | ||
1489 | #define PCI_VENDOR_ID_V3 0x11b0 | 1487 | #define PCI_VENDOR_ID_V3 0x11b0 |
1490 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1488 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 96930cb5927c..7d0e26cba420 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -196,7 +196,7 @@ | |||
196 | #define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ | 196 | #define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ |
197 | #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ | 197 | #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ |
198 | #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */ | 198 | #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */ |
199 | #define PCI_CAP_ID_HT_IRQCONF 0x08 /* HyperTransport IRQ Configuration */ | 199 | #define PCI_CAP_ID_HT 0x08 /* HyperTransport */ |
200 | #define PCI_CAP_ID_VNDR 0x09 /* Vendor specific capability */ | 200 | #define PCI_CAP_ID_VNDR 0x09 /* Vendor specific capability */ |
201 | #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ | 201 | #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ |
202 | #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ | 202 | #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index b44e01a70914..6cd91e3f9820 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
@@ -62,6 +62,12 @@ struct pcie_port_service_driver { | |||
62 | int (*suspend) (struct pcie_device *dev, pm_message_t state); | 62 | int (*suspend) (struct pcie_device *dev, pm_message_t state); |
63 | int (*resume) (struct pcie_device *dev); | 63 | int (*resume) (struct pcie_device *dev); |
64 | 64 | ||
65 | /* Service Error Recovery Handler */ | ||
66 | struct pci_error_handlers *err_handler; | ||
67 | |||
68 | /* Link Reset Capability - AER service driver specific */ | ||
69 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); | ||
70 | |||
65 | const struct pcie_port_service_id *id_table; | 71 | const struct pcie_port_service_id *id_table; |
66 | struct device_driver driver; | 72 | struct device_driver driver; |
67 | }; | 73 | }; |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 29960b03bef7..93da7e2d9f30 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -76,6 +76,8 @@ extern int FASTCALL(attach_pid(struct task_struct *task, | |||
76 | enum pid_type type, int nr)); | 76 | enum pid_type type, int nr)); |
77 | 77 | ||
78 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); | 78 | extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); |
79 | extern void FASTCALL(transfer_pid(struct task_struct *old, | ||
80 | struct task_struct *new, enum pid_type)); | ||
79 | 81 | ||
80 | /* | 82 | /* |
81 | * look up a PID in the hash table. Must be called with the tasklist_lock | 83 | * look up a PID in the hash table. Must be called with the tasklist_lock |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 782090c68932..29cd6dee13db 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -49,6 +49,8 @@ struct platform_driver { | |||
49 | int (*remove)(struct platform_device *); | 49 | int (*remove)(struct platform_device *); |
50 | void (*shutdown)(struct platform_device *); | 50 | void (*shutdown)(struct platform_device *); |
51 | int (*suspend)(struct platform_device *, pm_message_t state); | 51 | int (*suspend)(struct platform_device *, pm_message_t state); |
52 | int (*suspend_late)(struct platform_device *, pm_message_t state); | ||
53 | int (*resume_early)(struct platform_device *); | ||
52 | int (*resume)(struct platform_device *); | 54 | int (*resume)(struct platform_device *); |
53 | struct device_driver driver; | 55 | struct device_driver driver; |
54 | }; | 56 | }; |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 658c1b93d5bb..6b27e07aef19 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -142,29 +142,61 @@ typedef struct pm_message { | |||
142 | } pm_message_t; | 142 | } pm_message_t; |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * There are 4 important states driver can be in: | 145 | * Several driver power state transitions are externally visible, affecting |
146 | * ON -- driver is working | 146 | * the state of pending I/O queues and (for drivers that touch hardware) |
147 | * FREEZE -- stop operations and apply whatever policy is applicable to a | 147 | * interrupts, wakeups, DMA, and other hardware state. There may also be |
148 | * suspended driver of that class, freeze queues for block like IDE | 148 | * internal transitions to various low power modes, which are transparent |
149 | * does, drop packets for ethernet, etc... stop DMA engine too etc... | 149 | * to the rest of the driver stack (such as a driver that's ON gating off |
150 | * so a consistent image can be saved; but do not power any hardware | 150 | * clocks which are not in active use). |
151 | * down. | ||
152 | * SUSPEND - like FREEZE, but hardware is doing as much powersaving as | ||
153 | * possible. Roughly pci D3. | ||
154 | * | 151 | * |
155 | * Unfortunately, current drivers only recognize numeric values 0 (ON) and 3 | 152 | * One transition is triggered by resume(), after a suspend() call; the |
156 | * (SUSPEND). We'll need to fix the drivers. So yes, putting 3 to all different | 153 | * message is implicit: |
157 | * defines is intentional, and will go away as soon as drivers are fixed. Also | 154 | * |
158 | * note that typedef is neccessary, we'll probably want to switch to | 155 | * ON Driver starts working again, responding to hardware events |
159 | * typedef struct pm_message_t { int event; int flags; } pm_message_t | 156 | * and software requests. The hardware may have gone through |
160 | * or something similar soon. | 157 | * a power-off reset, or it may have maintained state from the |
158 | * previous suspend() which the driver will rely on while | ||
159 | * resuming. On most platforms, there are no restrictions on | ||
160 | * availability of resources like clocks during resume(). | ||
161 | * | ||
162 | * Other transitions are triggered by messages sent using suspend(). All | ||
163 | * these transitions quiesce the driver, so that I/O queues are inactive. | ||
164 | * That commonly entails turning off IRQs and DMA; there may be rules | ||
165 | * about how to quiesce that are specific to the bus or the device's type. | ||
166 | * (For example, network drivers mark the link state.) Other details may | ||
167 | * differ according to the message: | ||
168 | * | ||
169 | * SUSPEND Quiesce, enter a low power device state appropriate for | ||
170 | * the upcoming system state (such as PCI_D3hot), and enable | ||
171 | * wakeup events as appropriate. | ||
172 | * | ||
173 | * FREEZE Quiesce operations so that a consistent image can be saved; | ||
174 | * but do NOT otherwise enter a low power device state, and do | ||
175 | * NOT emit system wakeup events. | ||
176 | * | ||
177 | * PRETHAW Quiesce as if for FREEZE; additionally, prepare for restoring | ||
178 | * the system from a snapshot taken after an earlier FREEZE. | ||
179 | * Some drivers will need to reset their hardware state instead | ||
180 | * of preserving it, to ensure that it's never mistaken for the | ||
181 | * state which that earlier snapshot had set up. | ||
182 | * | ||
183 | * A minimally power-aware driver treats all messages as SUSPEND, fully | ||
184 | * reinitializes its device during resume() -- whether or not it was reset | ||
185 | * during the suspend/resume cycle -- and can't issue wakeup events. | ||
186 | * | ||
187 | * More power-aware drivers may also use low power states at runtime as | ||
188 | * well as during system sleep states like PM_SUSPEND_STANDBY. They may | ||
189 | * be able to use wakeup events to exit from runtime low-power states, | ||
190 | * or from system low-power states such as standby or suspend-to-RAM. | ||
161 | */ | 191 | */ |
162 | 192 | ||
163 | #define PM_EVENT_ON 0 | 193 | #define PM_EVENT_ON 0 |
164 | #define PM_EVENT_FREEZE 1 | 194 | #define PM_EVENT_FREEZE 1 |
165 | #define PM_EVENT_SUSPEND 2 | 195 | #define PM_EVENT_SUSPEND 2 |
196 | #define PM_EVENT_PRETHAW 3 | ||
166 | 197 | ||
167 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | 198 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) |
199 | #define PMSG_PRETHAW ((struct pm_message){ .event = PM_EVENT_PRETHAW, }) | ||
168 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | 200 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) |
169 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | 201 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) |
170 | 202 | ||
@@ -190,6 +222,7 @@ extern void device_resume(void); | |||
190 | extern suspend_disk_method_t pm_disk_mode; | 222 | extern suspend_disk_method_t pm_disk_mode; |
191 | 223 | ||
192 | extern int device_suspend(pm_message_t state); | 224 | extern int device_suspend(pm_message_t state); |
225 | extern int device_prepare_suspend(pm_message_t state); | ||
193 | 226 | ||
194 | #define device_set_wakeup_enable(dev,val) \ | 227 | #define device_set_wakeup_enable(dev,val) \ |
195 | ((dev)->power.should_wakeup = !!(val)) | 228 | ((dev)->power.should_wakeup = !!(val)) |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 3435ca38dd14..57f70bc8b24b 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -268,7 +268,9 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode) | |||
268 | struct proc_maps_private { | 268 | struct proc_maps_private { |
269 | struct pid *pid; | 269 | struct pid *pid; |
270 | struct task_struct *task; | 270 | struct task_struct *task; |
271 | #ifdef CONFIG_MMU | ||
271 | struct vm_area_struct *tail_vma; | 272 | struct vm_area_struct *tail_vma; |
273 | #endif | ||
272 | }; | 274 | }; |
273 | 275 | ||
274 | #endif /* _LINUX_PROC_FS_H */ | 276 | #endif /* _LINUX_PROC_FS_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 34ed0d99b1bd..9d4aa7f95bc8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -819,6 +819,11 @@ struct task_struct { | |||
819 | unsigned did_exec:1; | 819 | unsigned did_exec:1; |
820 | pid_t pid; | 820 | pid_t pid; |
821 | pid_t tgid; | 821 | pid_t tgid; |
822 | |||
823 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
824 | /* Canary value for the -fstack-protector gcc feature */ | ||
825 | unsigned long stack_canary; | ||
826 | #endif | ||
822 | /* | 827 | /* |
823 | * pointers to (original) parent process, youngest child, younger sibling, | 828 | * pointers to (original) parent process, youngest child, younger sibling, |
824 | * older sibling, respectively. (p->father can be replaced with | 829 | * older sibling, respectively. (p->father can be replaced with |
@@ -865,6 +870,15 @@ struct task_struct { | |||
865 | struct key *thread_keyring; /* keyring private to this thread */ | 870 | struct key *thread_keyring; /* keyring private to this thread */ |
866 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ | 871 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ |
867 | #endif | 872 | #endif |
873 | /* | ||
874 | * fpu_counter contains the number of consecutive context switches | ||
875 | * that the FPU is used. If this is over a threshold, the lazy fpu | ||
876 | * saving becomes unlazy to save the trap. This is an unsigned char | ||
877 | * so that after 256 times the counter wraps and the behavior turns | ||
878 | * lazy again; this to deal with bursty apps that only use FPU for | ||
879 | * a short time | ||
880 | */ | ||
881 | unsigned char fpu_counter; | ||
868 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ | 882 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ |
869 | char comm[TASK_COMM_LEN]; /* executable name excluding path | 883 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
870 | - access with [gs]et_task_comm (which lock | 884 | - access with [gs]et_task_comm (which lock |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 66d6eb78d1c6..a96fd9310d55 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -60,7 +60,7 @@ extern void __init kmem_cache_init(void); | |||
60 | extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long, | 60 | extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long, |
61 | void (*)(void *, kmem_cache_t *, unsigned long), | 61 | void (*)(void *, kmem_cache_t *, unsigned long), |
62 | void (*)(void *, kmem_cache_t *, unsigned long)); | 62 | void (*)(void *, kmem_cache_t *, unsigned long)); |
63 | extern int kmem_cache_destroy(kmem_cache_t *); | 63 | extern void kmem_cache_destroy(kmem_cache_t *); |
64 | extern int kmem_cache_shrink(kmem_cache_t *); | 64 | extern int kmem_cache_shrink(kmem_cache_t *); |
65 | extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t); | 65 | extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t); |
66 | extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | 66 | extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); |
@@ -249,7 +249,7 @@ struct kmem_cache *kmem_cache_create(const char *c, size_t, size_t, | |||
249 | unsigned long, | 249 | unsigned long, |
250 | void (*)(void *, struct kmem_cache *, unsigned long), | 250 | void (*)(void *, struct kmem_cache *, unsigned long), |
251 | void (*)(void *, struct kmem_cache *, unsigned long)); | 251 | void (*)(void *, struct kmem_cache *, unsigned long)); |
252 | int kmem_cache_destroy(struct kmem_cache *c); | 252 | void kmem_cache_destroy(struct kmem_cache *c); |
253 | void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags); | 253 | void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags); |
254 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); | 254 | void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); |
255 | void kmem_cache_free(struct kmem_cache *c, void *b); | 255 | void kmem_cache_free(struct kmem_cache *c, void *b); |
diff --git a/include/linux/smb.h b/include/linux/smb.h index 6df3b1501559..f098dff93f6b 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h | |||
@@ -89,7 +89,6 @@ struct smb_fattr { | |||
89 | struct timespec f_atime; | 89 | struct timespec f_atime; |
90 | struct timespec f_mtime; | 90 | struct timespec f_mtime; |
91 | struct timespec f_ctime; | 91 | struct timespec f_ctime; |
92 | unsigned long f_blksize; | ||
93 | unsigned long f_blocks; | 92 | unsigned long f_blocks; |
94 | int f_unix; | 93 | int f_unix; |
95 | }; | 94 | }; |
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 9cc81e572224..50e2b01e517c 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h | |||
@@ -5,15 +5,16 @@ | |||
5 | struct stack_trace { | 5 | struct stack_trace { |
6 | unsigned int nr_entries, max_entries; | 6 | unsigned int nr_entries, max_entries; |
7 | unsigned long *entries; | 7 | unsigned long *entries; |
8 | int skip; /* input argument: How many entries to skip */ | ||
9 | int all_contexts; /* input argument: if true do than one stack */ | ||
8 | }; | 10 | }; |
9 | 11 | ||
10 | extern void save_stack_trace(struct stack_trace *trace, | 12 | extern void save_stack_trace(struct stack_trace *trace, |
11 | struct task_struct *task, int all_contexts, | 13 | struct task_struct *task); |
12 | unsigned int skip); | ||
13 | 14 | ||
14 | extern void print_stack_trace(struct stack_trace *trace, int spaces); | 15 | extern void print_stack_trace(struct stack_trace *trace, int spaces); |
15 | #else | 16 | #else |
16 | # define save_stack_trace(trace, task, all, skip) do { } while (0) | 17 | # define save_stack_trace(trace, task) do { } while (0) |
17 | # define print_stack_trace(trace) do { } while (0) | 18 | # define print_stack_trace(trace) do { } while (0) |
18 | #endif | 19 | #endif |
19 | 20 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 008f04c56737..3f0f716225ec 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -53,6 +53,7 @@ struct mq_attr; | |||
53 | struct compat_stat; | 53 | struct compat_stat; |
54 | struct compat_timeval; | 54 | struct compat_timeval; |
55 | struct robust_list_head; | 55 | struct robust_list_head; |
56 | struct getcpu_cache; | ||
56 | 57 | ||
57 | #include <linux/types.h> | 58 | #include <linux/types.h> |
58 | #include <linux/aio_abi.h> | 59 | #include <linux/aio_abi.h> |
@@ -596,5 +597,6 @@ asmlinkage long sys_get_robust_list(int pid, | |||
596 | size_t __user *len_ptr); | 597 | size_t __user *len_ptr); |
597 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, | 598 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, |
598 | size_t len); | 599 | size_t len); |
600 | asmlinkage long sys_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *cache); | ||
599 | 601 | ||
600 | #endif | 602 | #endif |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index eca555781d05..1b24bd45e080 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -150,6 +150,8 @@ enum | |||
150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ | 150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ |
151 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ | 151 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ |
152 | KERN_MAX_LOCK_DEPTH=74, | 152 | KERN_MAX_LOCK_DEPTH=74, |
153 | KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */ | ||
154 | KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ | ||
153 | }; | 155 | }; |
154 | 156 | ||
155 | 157 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 1ea5d3cda6ae..6d5c43d31dec 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #ifndef _SYSFS_H_ | 10 | #ifndef _SYSFS_H_ |
11 | #define _SYSFS_H_ | 11 | #define _SYSFS_H_ |
12 | 12 | ||
13 | #include <linux/compiler.h> | ||
13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
14 | 15 | ||
15 | struct kobject; | 16 | struct kobject; |
@@ -86,40 +87,44 @@ struct sysfs_dirent { | |||
86 | 87 | ||
87 | #ifdef CONFIG_SYSFS | 88 | #ifdef CONFIG_SYSFS |
88 | 89 | ||
89 | extern int | 90 | extern int __must_check |
90 | sysfs_create_dir(struct kobject *); | 91 | sysfs_create_dir(struct kobject *); |
91 | 92 | ||
92 | extern void | 93 | extern void |
93 | sysfs_remove_dir(struct kobject *); | 94 | sysfs_remove_dir(struct kobject *); |
94 | 95 | ||
95 | extern int | 96 | extern int __must_check |
96 | sysfs_rename_dir(struct kobject *, const char *new_name); | 97 | sysfs_rename_dir(struct kobject *, const char *new_name); |
97 | 98 | ||
98 | extern int | 99 | extern int __must_check |
99 | sysfs_create_file(struct kobject *, const struct attribute *); | 100 | sysfs_create_file(struct kobject *, const struct attribute *); |
100 | 101 | ||
101 | extern int | 102 | extern int __must_check |
102 | sysfs_update_file(struct kobject *, const struct attribute *); | 103 | sysfs_update_file(struct kobject *, const struct attribute *); |
103 | 104 | ||
104 | extern int | 105 | extern int __must_check |
105 | sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); | 106 | sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); |
106 | 107 | ||
107 | extern void | 108 | extern void |
108 | sysfs_remove_file(struct kobject *, const struct attribute *); | 109 | sysfs_remove_file(struct kobject *, const struct attribute *); |
109 | 110 | ||
110 | extern int | 111 | extern int __must_check |
111 | sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name); | 112 | sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name); |
112 | 113 | ||
113 | extern void | 114 | extern void |
114 | sysfs_remove_link(struct kobject *, const char * name); | 115 | sysfs_remove_link(struct kobject *, const char * name); |
115 | 116 | ||
116 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); | 117 | int __must_check sysfs_create_bin_file(struct kobject *kobj, |
117 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); | 118 | struct bin_attribute *attr); |
119 | void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); | ||
118 | 120 | ||
119 | int sysfs_create_group(struct kobject *, const struct attribute_group *); | 121 | int __must_check sysfs_create_group(struct kobject *, |
122 | const struct attribute_group *); | ||
120 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 123 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
121 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 124 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
122 | 125 | ||
126 | extern int __must_check sysfs_init(void); | ||
127 | |||
123 | #else /* CONFIG_SYSFS */ | 128 | #else /* CONFIG_SYSFS */ |
124 | 129 | ||
125 | static inline int sysfs_create_dir(struct kobject * k) | 130 | static inline int sysfs_create_dir(struct kobject * k) |
@@ -191,6 +196,11 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | |||
191 | { | 196 | { |
192 | } | 197 | } |
193 | 198 | ||
199 | static inline int __must_check sysfs_init(void) | ||
200 | { | ||
201 | return 0; | ||
202 | } | ||
203 | |||
194 | #endif /* CONFIG_SYSFS */ | 204 | #endif /* CONFIG_SYSFS */ |
195 | 205 | ||
196 | #endif /* _SYSFS_H_ */ | 206 | #endif /* _SYSFS_H_ */ |
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 391e7ed1eb3f..a48d7f11c7be 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h | |||
@@ -19,4 +19,26 @@ static inline unsigned long __copy_from_user_nocache(void *to, | |||
19 | 19 | ||
20 | #endif /* ARCH_HAS_NOCACHE_UACCESS */ | 20 | #endif /* ARCH_HAS_NOCACHE_UACCESS */ |
21 | 21 | ||
22 | /** | ||
23 | * probe_kernel_address(): safely attempt to read from a location | ||
24 | * @addr: address to read from - its type is type typeof(retval)* | ||
25 | * @retval: read into this variable | ||
26 | * | ||
27 | * Safely read from address @addr into variable @revtal. If a kernel fault | ||
28 | * happens, handle that and return -EFAULT. | ||
29 | * We ensure that the __get_user() is executed in atomic context so that | ||
30 | * do_page_fault() doesn't attempt to take mmap_sem. This makes | ||
31 | * probe_kernel_address() suitable for use within regions where the caller | ||
32 | * already holds mmap_sem, or other locks which nest inside mmap_sem. | ||
33 | */ | ||
34 | #define probe_kernel_address(addr, retval) \ | ||
35 | ({ \ | ||
36 | long ret; \ | ||
37 | \ | ||
38 | inc_preempt_count(); \ | ||
39 | ret = __get_user(retval, addr); \ | ||
40 | dec_preempt_count(); \ | ||
41 | ret; \ | ||
42 | }) | ||
43 | |||
22 | #endif /* __LINUX_UACCESS_H__ */ | 44 | #endif /* __LINUX_UACCESS_H__ */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index d2bd0c8e0154..0da15b0b02be 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fs.h> /* for struct file_operations */ | 19 | #include <linux/fs.h> /* for struct file_operations */ |
20 | #include <linux/completion.h> /* for struct completion */ | 20 | #include <linux/completion.h> /* for struct completion */ |
21 | #include <linux/sched.h> /* for current && schedule_timeout */ | 21 | #include <linux/sched.h> /* for current && schedule_timeout */ |
22 | #include <linux/mutex.h> /* for struct mutex */ | ||
22 | 23 | ||
23 | struct usb_device; | 24 | struct usb_device; |
24 | struct usb_driver; | 25 | struct usb_driver; |
@@ -102,8 +103,13 @@ enum usb_interface_condition { | |||
102 | * number from the USB core by calling usb_register_dev(). | 103 | * number from the USB core by calling usb_register_dev(). |
103 | * @condition: binding state of the interface: not bound, binding | 104 | * @condition: binding state of the interface: not bound, binding |
104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 105 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
106 | * @is_active: flag set when the interface is bound and not suspended. | ||
107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | ||
108 | * capability during autosuspend. | ||
105 | * @dev: driver model's view of this device | 109 | * @dev: driver model's view of this device |
106 | * @class_dev: driver model's class view of this device. | 110 | * @class_dev: driver model's class view of this device. |
111 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | ||
112 | * allowed unless the counter is 0. | ||
107 | * | 113 | * |
108 | * USB device drivers attach to interfaces on a physical device. Each | 114 | * USB device drivers attach to interfaces on a physical device. Each |
109 | * interface encapsulates a single high level function, such as feeding | 115 | * interface encapsulates a single high level function, such as feeding |
@@ -142,8 +148,12 @@ struct usb_interface { | |||
142 | int minor; /* minor number this interface is | 148 | int minor; /* minor number this interface is |
143 | * bound to */ | 149 | * bound to */ |
144 | enum usb_interface_condition condition; /* state of binding */ | 150 | enum usb_interface_condition condition; /* state of binding */ |
151 | unsigned is_active:1; /* the interface is not suspended */ | ||
152 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | ||
153 | |||
145 | struct device dev; /* interface specific device info */ | 154 | struct device dev; /* interface specific device info */ |
146 | struct class_device *class_dev; | 155 | struct class_device *class_dev; |
156 | int pm_usage_cnt; /* usage counter for autosuspend */ | ||
147 | }; | 157 | }; |
148 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 158 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
149 | #define interface_to_usbdev(intf) \ | 159 | #define interface_to_usbdev(intf) \ |
@@ -254,8 +264,6 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size, | |||
254 | 264 | ||
255 | /* ----------------------------------------------------------------------- */ | 265 | /* ----------------------------------------------------------------------- */ |
256 | 266 | ||
257 | struct usb_operations; | ||
258 | |||
259 | /* USB device number allocation bitmap */ | 267 | /* USB device number allocation bitmap */ |
260 | struct usb_devmap { | 268 | struct usb_devmap { |
261 | unsigned long devicemap[128 / (8*sizeof(unsigned long))]; | 269 | unsigned long devicemap[128 / (8*sizeof(unsigned long))]; |
@@ -268,6 +276,7 @@ struct usb_bus { | |||
268 | struct device *controller; /* host/master side hardware */ | 276 | struct device *controller; /* host/master side hardware */ |
269 | int busnum; /* Bus number (in order of reg) */ | 277 | int busnum; /* Bus number (in order of reg) */ |
270 | char *bus_name; /* stable id (PCI slot_name etc) */ | 278 | char *bus_name; /* stable id (PCI slot_name etc) */ |
279 | u8 uses_dma; /* Does the host controller use DMA? */ | ||
271 | u8 otg_port; /* 0, or number of OTG/HNP port */ | 280 | u8 otg_port; /* 0, or number of OTG/HNP port */ |
272 | unsigned is_b_host:1; /* true during some HNP roleswitches */ | 281 | unsigned is_b_host:1; /* true during some HNP roleswitches */ |
273 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ | 282 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ |
@@ -276,10 +285,8 @@ struct usb_bus { | |||
276 | * round-robin allocation */ | 285 | * round-robin allocation */ |
277 | 286 | ||
278 | struct usb_devmap devmap; /* device address allocation map */ | 287 | struct usb_devmap devmap; /* device address allocation map */ |
279 | struct usb_operations *op; /* Operations (specific to the HC) */ | ||
280 | struct usb_device *root_hub; /* Root hub */ | 288 | struct usb_device *root_hub; /* Root hub */ |
281 | struct list_head bus_list; /* list of busses */ | 289 | struct list_head bus_list; /* list of busses */ |
282 | void *hcpriv; /* Host Controller private data */ | ||
283 | 290 | ||
284 | int bandwidth_allocated; /* on this bus: how much of the time | 291 | int bandwidth_allocated; /* on this bus: how much of the time |
285 | * reserved for periodic (intr/iso) | 292 | * reserved for periodic (intr/iso) |
@@ -294,8 +301,6 @@ struct usb_bus { | |||
294 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 301 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
295 | 302 | ||
296 | struct class_device *class_dev; /* class device for this bus */ | 303 | struct class_device *class_dev; /* class device for this bus */ |
297 | struct kref kref; /* reference counting for this bus */ | ||
298 | void (*release)(struct usb_bus *bus); | ||
299 | 304 | ||
300 | #if defined(CONFIG_USB_MON) | 305 | #if defined(CONFIG_USB_MON) |
301 | struct mon_bus *mon_bus; /* non-null when associated */ | 306 | struct mon_bus *mon_bus; /* non-null when associated */ |
@@ -350,6 +355,7 @@ struct usb_device { | |||
350 | 355 | ||
351 | unsigned short bus_mA; /* Current available from the bus */ | 356 | unsigned short bus_mA; /* Current available from the bus */ |
352 | u8 portnum; /* Parent port number (origin 1) */ | 357 | u8 portnum; /* Parent port number (origin 1) */ |
358 | u8 level; /* Number of USB hub ancestors */ | ||
353 | 359 | ||
354 | int have_langid; /* whether string_langid is valid */ | 360 | int have_langid; /* whether string_langid is valid */ |
355 | int string_langid; /* language ID for strings */ | 361 | int string_langid; /* language ID for strings */ |
@@ -373,6 +379,15 @@ struct usb_device { | |||
373 | 379 | ||
374 | int maxchild; /* Number of ports if hub */ | 380 | int maxchild; /* Number of ports if hub */ |
375 | struct usb_device *children[USB_MAXCHILDREN]; | 381 | struct usb_device *children[USB_MAXCHILDREN]; |
382 | |||
383 | #ifdef CONFIG_PM | ||
384 | struct work_struct autosuspend; /* for delayed autosuspends */ | ||
385 | struct mutex pm_mutex; /* protects PM operations */ | ||
386 | int pm_usage_cnt; /* usage counter for autosuspend */ | ||
387 | |||
388 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | ||
389 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | ||
390 | #endif | ||
376 | }; | 391 | }; |
377 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 392 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
378 | 393 | ||
@@ -384,7 +399,7 @@ extern void usb_put_dev(struct usb_device *dev); | |||
384 | #define usb_unlock_device(udev) up(&(udev)->dev.sem) | 399 | #define usb_unlock_device(udev) up(&(udev)->dev.sem) |
385 | #define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem) | 400 | #define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem) |
386 | extern int usb_lock_device_for_reset(struct usb_device *udev, | 401 | extern int usb_lock_device_for_reset(struct usb_device *udev, |
387 | struct usb_interface *iface); | 402 | const struct usb_interface *iface); |
388 | 403 | ||
389 | /* USB port reset for device reinitialization */ | 404 | /* USB port reset for device reinitialization */ |
390 | extern int usb_reset_device(struct usb_device *dev); | 405 | extern int usb_reset_device(struct usb_device *dev); |
@@ -393,6 +408,17 @@ extern int usb_reset_composite_device(struct usb_device *dev, | |||
393 | 408 | ||
394 | extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | 409 | extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); |
395 | 410 | ||
411 | /* USB autosuspend and autoresume */ | ||
412 | #ifdef CONFIG_USB_SUSPEND | ||
413 | extern int usb_autopm_get_interface(struct usb_interface *intf); | ||
414 | extern void usb_autopm_put_interface(struct usb_interface *intf); | ||
415 | |||
416 | #else | ||
417 | #define usb_autopm_get_interface(intf) 0 | ||
418 | #define usb_autopm_put_interface(intf) do {} while (0) | ||
419 | #endif | ||
420 | |||
421 | |||
396 | /*-------------------------------------------------------------------------*/ | 422 | /*-------------------------------------------------------------------------*/ |
397 | 423 | ||
398 | /* for drivers using iso endpoints */ | 424 | /* for drivers using iso endpoints */ |
@@ -423,10 +449,10 @@ const struct usb_device_id *usb_match_id(struct usb_interface *interface, | |||
423 | 449 | ||
424 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, | 450 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, |
425 | int minor); | 451 | int minor); |
426 | extern struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, | 452 | extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, |
427 | unsigned ifnum); | 453 | unsigned ifnum); |
428 | extern struct usb_host_interface *usb_altnum_to_altsetting( | 454 | extern struct usb_host_interface *usb_altnum_to_altsetting( |
429 | struct usb_interface *intf, unsigned int altnum); | 455 | const struct usb_interface *intf, unsigned int altnum); |
430 | 456 | ||
431 | 457 | ||
432 | /** | 458 | /** |
@@ -464,6 +490,20 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, | |||
464 | 490 | ||
465 | /*-------------------------------------------------------------------------*/ | 491 | /*-------------------------------------------------------------------------*/ |
466 | 492 | ||
493 | extern int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd); | ||
494 | extern int usb_endpoint_dir_out(const struct usb_endpoint_descriptor *epd); | ||
495 | extern int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd); | ||
496 | extern int usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd); | ||
497 | extern int usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd); | ||
498 | extern int usb_endpoint_is_bulk_in(const struct usb_endpoint_descriptor *epd); | ||
499 | extern int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd); | ||
500 | extern int usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd); | ||
501 | extern int usb_endpoint_is_int_out(const struct usb_endpoint_descriptor *epd); | ||
502 | extern int usb_endpoint_is_isoc_in(const struct usb_endpoint_descriptor *epd); | ||
503 | extern int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor *epd); | ||
504 | |||
505 | /*-------------------------------------------------------------------------*/ | ||
506 | |||
467 | #define USB_DEVICE_ID_MATCH_DEVICE \ | 507 | #define USB_DEVICE_ID_MATCH_DEVICE \ |
468 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) | 508 | (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) |
469 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ | 509 | #define USB_DEVICE_ID_MATCH_DEV_RANGE \ |
@@ -540,7 +580,17 @@ struct usb_dynids { | |||
540 | }; | 580 | }; |
541 | 581 | ||
542 | /** | 582 | /** |
543 | * struct usb_driver - identifies USB driver to usbcore | 583 | * struct usbdrv_wrap - wrapper for driver-model structure |
584 | * @driver: The driver-model core driver structure. | ||
585 | * @for_devices: Non-zero for device drivers, 0 for interface drivers. | ||
586 | */ | ||
587 | struct usbdrv_wrap { | ||
588 | struct device_driver driver; | ||
589 | int for_devices; | ||
590 | }; | ||
591 | |||
592 | /** | ||
593 | * struct usb_driver - identifies USB interface driver to usbcore | ||
544 | * @name: The driver name should be unique among USB drivers, | 594 | * @name: The driver name should be unique among USB drivers, |
545 | * and should normally be the same as the module name. | 595 | * and should normally be the same as the module name. |
546 | * @probe: Called to see if the driver is willing to manage a particular | 596 | * @probe: Called to see if the driver is willing to manage a particular |
@@ -567,12 +617,14 @@ struct usb_dynids { | |||
567 | * or your driver's probe function will never get called. | 617 | * or your driver's probe function will never get called. |
568 | * @dynids: used internally to hold the list of dynamically added device | 618 | * @dynids: used internally to hold the list of dynamically added device |
569 | * ids for this driver. | 619 | * ids for this driver. |
570 | * @driver: the driver model core driver structure. | 620 | * @drvwrap: Driver-model core structure wrapper. |
571 | * @no_dynamic_id: if set to 1, the USB core will not allow dynamic ids to be | 621 | * @no_dynamic_id: if set to 1, the USB core will not allow dynamic ids to be |
572 | * added to this driver by preventing the sysfs file from being created. | 622 | * added to this driver by preventing the sysfs file from being created. |
623 | * @supports_autosuspend: if set to 0, the USB core will not allow autosuspend | ||
624 | * for interfaces bound to this driver. | ||
573 | * | 625 | * |
574 | * USB drivers must provide a name, probe() and disconnect() methods, | 626 | * USB interface drivers must provide a name, probe() and disconnect() |
575 | * and an id_table. Other driver fields are optional. | 627 | * methods, and an id_table. Other driver fields are optional. |
576 | * | 628 | * |
577 | * The id_table is used in hotplugging. It holds a set of descriptors, | 629 | * The id_table is used in hotplugging. It holds a set of descriptors, |
578 | * and specialized data may be associated with each entry. That table | 630 | * and specialized data may be associated with each entry. That table |
@@ -606,10 +658,44 @@ struct usb_driver { | |||
606 | const struct usb_device_id *id_table; | 658 | const struct usb_device_id *id_table; |
607 | 659 | ||
608 | struct usb_dynids dynids; | 660 | struct usb_dynids dynids; |
609 | struct device_driver driver; | 661 | struct usbdrv_wrap drvwrap; |
610 | unsigned int no_dynamic_id:1; | 662 | unsigned int no_dynamic_id:1; |
663 | unsigned int supports_autosuspend:1; | ||
611 | }; | 664 | }; |
612 | #define to_usb_driver(d) container_of(d, struct usb_driver, driver) | 665 | #define to_usb_driver(d) container_of(d, struct usb_driver, drvwrap.driver) |
666 | |||
667 | /** | ||
668 | * struct usb_device_driver - identifies USB device driver to usbcore | ||
669 | * @name: The driver name should be unique among USB drivers, | ||
670 | * and should normally be the same as the module name. | ||
671 | * @probe: Called to see if the driver is willing to manage a particular | ||
672 | * device. If it is, probe returns zero and uses dev_set_drvdata() | ||
673 | * to associate driver-specific data with the device. If unwilling | ||
674 | * to manage the device, return a negative errno value. | ||
675 | * @disconnect: Called when the device is no longer accessible, usually | ||
676 | * because it has been (or is being) disconnected or the driver's | ||
677 | * module is being unloaded. | ||
678 | * @suspend: Called when the device is going to be suspended by the system. | ||
679 | * @resume: Called when the device is being resumed by the system. | ||
680 | * @drvwrap: Driver-model core structure wrapper. | ||
681 | * @supports_autosuspend: if set to 0, the USB core will not allow autosuspend | ||
682 | * for devices bound to this driver. | ||
683 | * | ||
684 | * USB drivers must provide all the fields listed above except drvwrap. | ||
685 | */ | ||
686 | struct usb_device_driver { | ||
687 | const char *name; | ||
688 | |||
689 | int (*probe) (struct usb_device *udev); | ||
690 | void (*disconnect) (struct usb_device *udev); | ||
691 | |||
692 | int (*suspend) (struct usb_device *udev, pm_message_t message); | ||
693 | int (*resume) (struct usb_device *udev); | ||
694 | struct usbdrv_wrap drvwrap; | ||
695 | unsigned int supports_autosuspend:1; | ||
696 | }; | ||
697 | #define to_usb_device_driver(d) container_of(d, struct usb_device_driver, \ | ||
698 | drvwrap.driver) | ||
613 | 699 | ||
614 | extern struct bus_type usb_bus_type; | 700 | extern struct bus_type usb_bus_type; |
615 | 701 | ||
@@ -633,13 +719,17 @@ struct usb_class_driver { | |||
633 | * use these in module_init()/module_exit() | 719 | * use these in module_init()/module_exit() |
634 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) | 720 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
635 | */ | 721 | */ |
636 | int usb_register_driver(struct usb_driver *, struct module *); | 722 | extern int usb_register_driver(struct usb_driver *, struct module *); |
637 | static inline int usb_register(struct usb_driver *driver) | 723 | static inline int usb_register(struct usb_driver *driver) |
638 | { | 724 | { |
639 | return usb_register_driver(driver, THIS_MODULE); | 725 | return usb_register_driver(driver, THIS_MODULE); |
640 | } | 726 | } |
641 | extern void usb_deregister(struct usb_driver *); | 727 | extern void usb_deregister(struct usb_driver *); |
642 | 728 | ||
729 | extern int usb_register_device_driver(struct usb_device_driver *, | ||
730 | struct module *); | ||
731 | extern void usb_deregister_device_driver(struct usb_device_driver *); | ||
732 | |||
643 | extern int usb_register_dev(struct usb_interface *intf, | 733 | extern int usb_register_dev(struct usb_interface *intf, |
644 | struct usb_class_driver *class_driver); | 734 | struct usb_class_driver *class_driver); |
645 | extern void usb_deregister_dev(struct usb_interface *intf, | 735 | extern void usb_deregister_dev(struct usb_interface *intf, |
@@ -885,7 +975,7 @@ struct urb | |||
885 | * @setup_packet: pointer to the setup_packet buffer | 975 | * @setup_packet: pointer to the setup_packet buffer |
886 | * @transfer_buffer: pointer to the transfer buffer | 976 | * @transfer_buffer: pointer to the transfer buffer |
887 | * @buffer_length: length of the transfer buffer | 977 | * @buffer_length: length of the transfer buffer |
888 | * @complete: pointer to the usb_complete_t function | 978 | * @complete_fn: pointer to the usb_complete_t function |
889 | * @context: what to set the urb context to. | 979 | * @context: what to set the urb context to. |
890 | * | 980 | * |
891 | * Initializes a control urb with the proper information needed to submit | 981 | * Initializes a control urb with the proper information needed to submit |
@@ -897,7 +987,7 @@ static inline void usb_fill_control_urb (struct urb *urb, | |||
897 | unsigned char *setup_packet, | 987 | unsigned char *setup_packet, |
898 | void *transfer_buffer, | 988 | void *transfer_buffer, |
899 | int buffer_length, | 989 | int buffer_length, |
900 | usb_complete_t complete, | 990 | usb_complete_t complete_fn, |
901 | void *context) | 991 | void *context) |
902 | { | 992 | { |
903 | spin_lock_init(&urb->lock); | 993 | spin_lock_init(&urb->lock); |
@@ -906,7 +996,7 @@ static inline void usb_fill_control_urb (struct urb *urb, | |||
906 | urb->setup_packet = setup_packet; | 996 | urb->setup_packet = setup_packet; |
907 | urb->transfer_buffer = transfer_buffer; | 997 | urb->transfer_buffer = transfer_buffer; |
908 | urb->transfer_buffer_length = buffer_length; | 998 | urb->transfer_buffer_length = buffer_length; |
909 | urb->complete = complete; | 999 | urb->complete = complete_fn; |
910 | urb->context = context; | 1000 | urb->context = context; |
911 | } | 1001 | } |
912 | 1002 | ||
@@ -917,7 +1007,7 @@ static inline void usb_fill_control_urb (struct urb *urb, | |||
917 | * @pipe: the endpoint pipe | 1007 | * @pipe: the endpoint pipe |
918 | * @transfer_buffer: pointer to the transfer buffer | 1008 | * @transfer_buffer: pointer to the transfer buffer |
919 | * @buffer_length: length of the transfer buffer | 1009 | * @buffer_length: length of the transfer buffer |
920 | * @complete: pointer to the usb_complete_t function | 1010 | * @complete_fn: pointer to the usb_complete_t function |
921 | * @context: what to set the urb context to. | 1011 | * @context: what to set the urb context to. |
922 | * | 1012 | * |
923 | * Initializes a bulk urb with the proper information needed to submit it | 1013 | * Initializes a bulk urb with the proper information needed to submit it |
@@ -928,7 +1018,7 @@ static inline void usb_fill_bulk_urb (struct urb *urb, | |||
928 | unsigned int pipe, | 1018 | unsigned int pipe, |
929 | void *transfer_buffer, | 1019 | void *transfer_buffer, |
930 | int buffer_length, | 1020 | int buffer_length, |
931 | usb_complete_t complete, | 1021 | usb_complete_t complete_fn, |
932 | void *context) | 1022 | void *context) |
933 | { | 1023 | { |
934 | spin_lock_init(&urb->lock); | 1024 | spin_lock_init(&urb->lock); |
@@ -936,7 +1026,7 @@ static inline void usb_fill_bulk_urb (struct urb *urb, | |||
936 | urb->pipe = pipe; | 1026 | urb->pipe = pipe; |
937 | urb->transfer_buffer = transfer_buffer; | 1027 | urb->transfer_buffer = transfer_buffer; |
938 | urb->transfer_buffer_length = buffer_length; | 1028 | urb->transfer_buffer_length = buffer_length; |
939 | urb->complete = complete; | 1029 | urb->complete = complete_fn; |
940 | urb->context = context; | 1030 | urb->context = context; |
941 | } | 1031 | } |
942 | 1032 | ||
@@ -947,7 +1037,7 @@ static inline void usb_fill_bulk_urb (struct urb *urb, | |||
947 | * @pipe: the endpoint pipe | 1037 | * @pipe: the endpoint pipe |
948 | * @transfer_buffer: pointer to the transfer buffer | 1038 | * @transfer_buffer: pointer to the transfer buffer |
949 | * @buffer_length: length of the transfer buffer | 1039 | * @buffer_length: length of the transfer buffer |
950 | * @complete: pointer to the usb_complete_t function | 1040 | * @complete_fn: pointer to the usb_complete_t function |
951 | * @context: what to set the urb context to. | 1041 | * @context: what to set the urb context to. |
952 | * @interval: what to set the urb interval to, encoded like | 1042 | * @interval: what to set the urb interval to, encoded like |
953 | * the endpoint descriptor's bInterval value. | 1043 | * the endpoint descriptor's bInterval value. |
@@ -963,7 +1053,7 @@ static inline void usb_fill_int_urb (struct urb *urb, | |||
963 | unsigned int pipe, | 1053 | unsigned int pipe, |
964 | void *transfer_buffer, | 1054 | void *transfer_buffer, |
965 | int buffer_length, | 1055 | int buffer_length, |
966 | usb_complete_t complete, | 1056 | usb_complete_t complete_fn, |
967 | void *context, | 1057 | void *context, |
968 | int interval) | 1058 | int interval) |
969 | { | 1059 | { |
@@ -972,7 +1062,7 @@ static inline void usb_fill_int_urb (struct urb *urb, | |||
972 | urb->pipe = pipe; | 1062 | urb->pipe = pipe; |
973 | urb->transfer_buffer = transfer_buffer; | 1063 | urb->transfer_buffer = transfer_buffer; |
974 | urb->transfer_buffer_length = buffer_length; | 1064 | urb->transfer_buffer_length = buffer_length; |
975 | urb->complete = complete; | 1065 | urb->complete = complete_fn; |
976 | urb->context = context; | 1066 | urb->context = context; |
977 | if (dev->speed == USB_SPEED_HIGH) | 1067 | if (dev->speed == USB_SPEED_HIGH) |
978 | urb->interval = 1 << (interval - 1); | 1068 | urb->interval = 1 << (interval - 1); |
@@ -990,7 +1080,6 @@ extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | |||
990 | extern int usb_unlink_urb(struct urb *urb); | 1080 | extern int usb_unlink_urb(struct urb *urb); |
991 | extern void usb_kill_urb(struct urb *urb); | 1081 | extern void usb_kill_urb(struct urb *urb); |
992 | 1082 | ||
993 | #define HAVE_USB_BUFFERS | ||
994 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, | 1083 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, |
995 | gfp_t mem_flags, dma_addr_t *dma); | 1084 | gfp_t mem_flags, dma_addr_t *dma); |
996 | void usb_buffer_free (struct usb_device *dev, size_t size, | 1085 | void usb_buffer_free (struct usb_device *dev, size_t size, |
@@ -1003,14 +1092,14 @@ void usb_buffer_unmap (struct urb *urb); | |||
1003 | #endif | 1092 | #endif |
1004 | 1093 | ||
1005 | struct scatterlist; | 1094 | struct scatterlist; |
1006 | int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, | 1095 | int usb_buffer_map_sg(const struct usb_device *dev, unsigned pipe, |
1007 | struct scatterlist *sg, int nents); | 1096 | struct scatterlist *sg, int nents); |
1008 | #if 0 | 1097 | #if 0 |
1009 | void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe, | 1098 | void usb_buffer_dmasync_sg(const struct usb_device *dev, unsigned pipe, |
1010 | struct scatterlist *sg, int n_hw_ents); | 1099 | struct scatterlist *sg, int n_hw_ents); |
1011 | #endif | 1100 | #endif |
1012 | void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, | 1101 | void usb_buffer_unmap_sg(const struct usb_device *dev, unsigned pipe, |
1013 | struct scatterlist *sg, int n_hw_ents); | 1102 | struct scatterlist *sg, int n_hw_ents); |
1014 | 1103 | ||
1015 | /*-------------------------------------------------------------------* | 1104 | /*-------------------------------------------------------------------* |
1016 | * SYNCHRONOUS CALL SUPPORT * | 1105 | * SYNCHRONOUS CALL SUPPORT * |
@@ -1038,6 +1127,9 @@ extern int usb_clear_halt(struct usb_device *dev, int pipe); | |||
1038 | extern int usb_reset_configuration(struct usb_device *dev); | 1127 | extern int usb_reset_configuration(struct usb_device *dev); |
1039 | extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); | 1128 | extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); |
1040 | 1129 | ||
1130 | /* this request isn't really synchronous, but it belongs with the others */ | ||
1131 | extern int usb_driver_set_configuration(struct usb_device *udev, int config); | ||
1132 | |||
1041 | /* | 1133 | /* |
1042 | * timeouts, in milliseconds, used for sending/receiving control messages | 1134 | * timeouts, in milliseconds, used for sending/receiving control messages |
1043 | * they typically complete within a few frames (msec) after they're issued | 1135 | * they typically complete within a few frames (msec) after they're issued |
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h new file mode 100644 index 000000000000..6bd235994dc2 --- /dev/null +++ b/include/linux/usb/audio.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * <linux/usb/audio.h> -- USB Audio definitions. | ||
3 | * | ||
4 | * Copyright (C) 2006 Thumtronics Pty Ltd. | ||
5 | * Developed for Thumtronics by Grey Innovation | ||
6 | * Ben Williamson <ben.williamson@greyinnovation.com> | ||
7 | * | ||
8 | * This software is distributed under the terms of the GNU General Public | ||
9 | * License ("GPL") version 2, as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This file holds USB constants and structures defined | ||
12 | * by the USB Device Class Definition for Audio Devices. | ||
13 | * Comments below reference relevant sections of that document: | ||
14 | * | ||
15 | * http://www.usb.org/developers/devclass_docs/audio10.pdf | ||
16 | */ | ||
17 | |||
18 | #ifndef __LINUX_USB_AUDIO_H | ||
19 | #define __LINUX_USB_AUDIO_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | /* A.2 Audio Interface Subclass Codes */ | ||
24 | #define USB_SUBCLASS_AUDIOCONTROL 0x01 | ||
25 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 | ||
26 | #define USB_SUBCLASS_MIDISTREAMING 0x03 | ||
27 | |||
28 | /* 4.3.2 Class-Specific AC Interface Descriptor */ | ||
29 | struct usb_ac_header_descriptor { | ||
30 | __u8 bLength; // 8+n | ||
31 | __u8 bDescriptorType; // USB_DT_CS_INTERFACE | ||
32 | __u8 bDescriptorSubtype; // USB_MS_HEADER | ||
33 | __le16 bcdADC; // 0x0100 | ||
34 | __le16 wTotalLength; // includes Unit and Terminal desc. | ||
35 | __u8 bInCollection; // n | ||
36 | __u8 baInterfaceNr[]; // [n] | ||
37 | } __attribute__ ((packed)); | ||
38 | |||
39 | #define USB_DT_AC_HEADER_SIZE(n) (8+(n)) | ||
40 | |||
41 | /* As above, but more useful for defining your own descriptors: */ | ||
42 | #define DECLARE_USB_AC_HEADER_DESCRIPTOR(n) \ | ||
43 | struct usb_ac_header_descriptor_##n { \ | ||
44 | __u8 bLength; \ | ||
45 | __u8 bDescriptorType; \ | ||
46 | __u8 bDescriptorSubtype; \ | ||
47 | __le16 bcdADC; \ | ||
48 | __le16 wTotalLength; \ | ||
49 | __u8 bInCollection; \ | ||
50 | __u8 baInterfaceNr[n]; \ | ||
51 | } __attribute__ ((packed)) | ||
52 | |||
53 | #endif | ||
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h new file mode 100644 index 000000000000..11a97d5ffd34 --- /dev/null +++ b/include/linux/usb/midi.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * <linux/usb/midi.h> -- USB MIDI definitions. | ||
3 | * | ||
4 | * Copyright (C) 2006 Thumtronics Pty Ltd. | ||
5 | * Developed for Thumtronics by Grey Innovation | ||
6 | * Ben Williamson <ben.williamson@greyinnovation.com> | ||
7 | * | ||
8 | * This software is distributed under the terms of the GNU General Public | ||
9 | * License ("GPL") version 2, as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This file holds USB constants and structures defined | ||
12 | * by the USB Device Class Definition for MIDI Devices. | ||
13 | * Comments below reference relevant sections of that document: | ||
14 | * | ||
15 | * http://www.usb.org/developers/devclass_docs/midi10.pdf | ||
16 | */ | ||
17 | |||
18 | #ifndef __LINUX_USB_MIDI_H | ||
19 | #define __LINUX_USB_MIDI_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | /* A.1 MS Class-Specific Interface Descriptor Subtypes */ | ||
24 | #define USB_MS_HEADER 0x01 | ||
25 | #define USB_MS_MIDI_IN_JACK 0x02 | ||
26 | #define USB_MS_MIDI_OUT_JACK 0x03 | ||
27 | #define USB_MS_ELEMENT 0x04 | ||
28 | |||
29 | /* A.2 MS Class-Specific Endpoint Descriptor Subtypes */ | ||
30 | #define USB_MS_GENERAL 0x01 | ||
31 | |||
32 | /* A.3 MS MIDI IN and OUT Jack Types */ | ||
33 | #define USB_MS_EMBEDDED 0x01 | ||
34 | #define USB_MS_EXTERNAL 0x02 | ||
35 | |||
36 | /* 6.1.2.1 Class-Specific MS Interface Header Descriptor */ | ||
37 | struct usb_ms_header_descriptor { | ||
38 | __u8 bLength; | ||
39 | __u8 bDescriptorType; | ||
40 | __u8 bDescriptorSubtype; | ||
41 | __le16 bcdMSC; | ||
42 | __le16 wTotalLength; | ||
43 | } __attribute__ ((packed)); | ||
44 | |||
45 | #define USB_DT_MS_HEADER_SIZE 7 | ||
46 | |||
47 | /* 6.1.2.2 MIDI IN Jack Descriptor */ | ||
48 | struct usb_midi_in_jack_descriptor { | ||
49 | __u8 bLength; | ||
50 | __u8 bDescriptorType; // USB_DT_CS_INTERFACE | ||
51 | __u8 bDescriptorSubtype; // USB_MS_MIDI_IN_JACK | ||
52 | __u8 bJackType; // USB_MS_EMBEDDED/EXTERNAL | ||
53 | __u8 bJackID; | ||
54 | __u8 iJack; | ||
55 | } __attribute__ ((packed)); | ||
56 | |||
57 | #define USB_DT_MIDI_IN_SIZE 6 | ||
58 | |||
59 | struct usb_midi_source_pin { | ||
60 | __u8 baSourceID; | ||
61 | __u8 baSourcePin; | ||
62 | } __attribute__ ((packed)); | ||
63 | |||
64 | /* 6.1.2.3 MIDI OUT Jack Descriptor */ | ||
65 | struct usb_midi_out_jack_descriptor { | ||
66 | __u8 bLength; | ||
67 | __u8 bDescriptorType; // USB_DT_CS_INTERFACE | ||
68 | __u8 bDescriptorSubtype; // USB_MS_MIDI_OUT_JACK | ||
69 | __u8 bJackType; // USB_MS_EMBEDDED/EXTERNAL | ||
70 | __u8 bJackID; | ||
71 | __u8 bNrInputPins; // p | ||
72 | struct usb_midi_source_pin pins[]; // [p] | ||
73 | /*__u8 iJack; -- ommitted due to variable-sized pins[] */ | ||
74 | } __attribute__ ((packed)); | ||
75 | |||
76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) | ||
77 | |||
78 | /* As above, but more useful for defining your own descriptors: */ | ||
79 | #define DECLARE_USB_MIDI_OUT_JACK_DESCRIPTOR(p) \ | ||
80 | struct usb_midi_out_jack_descriptor_##p { \ | ||
81 | __u8 bLength; \ | ||
82 | __u8 bDescriptorType; \ | ||
83 | __u8 bDescriptorSubtype; \ | ||
84 | __u8 bJackType; \ | ||
85 | __u8 bJackID; \ | ||
86 | __u8 bNrInputPins; \ | ||
87 | struct usb_midi_source_pin pins[p]; \ | ||
88 | __u8 iJack; \ | ||
89 | } __attribute__ ((packed)) | ||
90 | |||
91 | /* 6.2.2 Class-Specific MS Bulk Data Endpoint Descriptor */ | ||
92 | struct usb_ms_endpoint_descriptor { | ||
93 | __u8 bLength; // 4+n | ||
94 | __u8 bDescriptorType; // USB_DT_CS_ENDPOINT | ||
95 | __u8 bDescriptorSubtype; // USB_MS_GENERAL | ||
96 | __u8 bNumEmbMIDIJack; // n | ||
97 | __u8 baAssocJackID[]; // [n] | ||
98 | } __attribute__ ((packed)); | ||
99 | |||
100 | #define USB_DT_MS_ENDPOINT_SIZE(n) (4 + (n)) | ||
101 | |||
102 | /* As above, but more useful for defining your own descriptors: */ | ||
103 | #define DECLARE_USB_MS_ENDPOINT_DESCRIPTOR(n) \ | ||
104 | struct usb_ms_endpoint_descriptor_##n { \ | ||
105 | __u8 bLength; \ | ||
106 | __u8 bDescriptorType; \ | ||
107 | __u8 bDescriptorSubtype; \ | ||
108 | __u8 bNumEmbMIDIJack; \ | ||
109 | __u8 baAssocJackID[n]; \ | ||
110 | } __attribute__ ((packed)) | ||
111 | |||
112 | #endif | ||
diff --git a/include/linux/usb_otg.h b/include/linux/usb/otg.h index f827f6e203c2..9897f7a818c5 100644 --- a/include/linux/usb_otg.h +++ b/include/linux/usb/otg.h | |||
@@ -1,4 +1,4 @@ | |||
1 | // include/linux/usb_otg.h | 1 | // include/linux/usb/otg.h |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * These APIs may be used between USB controllers. USB device drivers | 4 | * These APIs may be used between USB controllers. USB device drivers |
@@ -52,7 +52,7 @@ struct otg_transceiver { | |||
52 | u16 port_change; | 52 | u16 port_change; |
53 | 53 | ||
54 | /* bind/unbind the host controller */ | 54 | /* bind/unbind the host controller */ |
55 | int (*set_host)(struct otg_transceiver *otg, | 55 | int (*set_host)(struct otg_transceiver *otg, |
56 | struct usb_bus *host); | 56 | struct usb_bus *host); |
57 | 57 | ||
58 | /* bind/unbind the peripheral controller */ | 58 | /* bind/unbind the peripheral controller */ |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index e7fc5fed5b98..2ae76fe52ff7 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -108,6 +108,9 @@ enum { US_DO_ALL_FLAGS }; | |||
108 | #ifdef CONFIG_USB_STORAGE_ALAUDA | 108 | #ifdef CONFIG_USB_STORAGE_ALAUDA |
109 | #define US_PR_ALAUDA 0xf4 /* Alauda chipsets */ | 109 | #define US_PR_ALAUDA 0xf4 /* Alauda chipsets */ |
110 | #endif | 110 | #endif |
111 | #ifdef CONFIG_USB_STORAGE_KARMA | ||
112 | #define US_PR_KARMA 0xf5 /* Rio Karma */ | ||
113 | #endif | ||
111 | 114 | ||
112 | #define US_PR_DEVICE 0xff /* Use device's value */ | 115 | #define US_PR_DEVICE 0xff /* Use device's value */ |
113 | 116 | ||
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index 46919f9f5eb3..4d0909e53595 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h | |||
@@ -24,5 +24,5 @@ | |||
24 | #define VERMAGIC_STRING \ | 24 | #define VERMAGIC_STRING \ |
25 | UTS_RELEASE " " \ | 25 | UTS_RELEASE " " \ |
26 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ | 26 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ |
27 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC \ | 27 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC |
28 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) | 28 | |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index dee88c6b6fa7..ce5f1482e6be 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -62,7 +62,6 @@ extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | |||
62 | extern struct vm_struct *get_vm_area_node(unsigned long size, | 62 | extern struct vm_struct *get_vm_area_node(unsigned long size, |
63 | unsigned long flags, int node); | 63 | unsigned long flags, int node); |
64 | extern struct vm_struct *remove_vm_area(void *addr); | 64 | extern struct vm_struct *remove_vm_area(void *addr); |
65 | extern struct vm_struct *__remove_vm_area(void *addr); | ||
66 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 65 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
67 | struct page ***pages); | 66 | struct page ***pages); |
68 | extern void unmap_vm_area(struct vm_struct *area); | 67 | extern void unmap_vm_area(struct vm_struct *area); |