diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ext3_fs_i.h | 8 | ||||
-rw-r--r-- | include/linux/fb.h | 6 | ||||
-rw-r--r-- | include/linux/fscache-cache.h | 40 | ||||
-rw-r--r-- | include/linux/fscache.h | 27 | ||||
-rw-r--r-- | include/linux/i2c-pnx.h | 2 | ||||
-rw-r--r-- | include/linux/i2c.h | 18 | ||||
-rw-r--r-- | include/linux/input.h | 4 | ||||
-rw-r--r-- | include/linux/isdn_ppp.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/wm831x/regulator.h | 4 | ||||
-rw-r--r-- | include/linux/nilfs2_fs.h | 9 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 4 | ||||
-rw-r--r-- | include/linux/slow-work.h | 72 | ||||
-rw-r--r-- | include/linux/suspend.h | 21 | ||||
-rw-r--r-- | include/linux/vt.h | 4 |
14 files changed, 193 insertions, 28 deletions
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index ca1bfe90004f..93e7428156ba 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -137,6 +137,14 @@ struct ext3_inode_info { | |||
137 | * by other means, so we have truncate_mutex. | 137 | * by other means, so we have truncate_mutex. |
138 | */ | 138 | */ |
139 | struct mutex truncate_mutex; | 139 | struct mutex truncate_mutex; |
140 | |||
141 | /* | ||
142 | * Transactions that contain inode's metadata needed to complete | ||
143 | * fsync and fdatasync, respectively. | ||
144 | */ | ||
145 | atomic_t i_sync_tid; | ||
146 | atomic_t i_datasync_tid; | ||
147 | |||
140 | struct inode vfs_inode; | 148 | struct inode vfs_inode; |
141 | }; | 149 | }; |
142 | 150 | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index a34bdf5a9d23..de9c722e7b90 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -669,12 +669,6 @@ struct fb_ops { | |||
669 | /* perform fb specific mmap */ | 669 | /* perform fb specific mmap */ |
670 | int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma); | 670 | int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma); |
671 | 671 | ||
672 | /* save current hardware state */ | ||
673 | void (*fb_save_state)(struct fb_info *info); | ||
674 | |||
675 | /* restore saved state */ | ||
676 | void (*fb_restore_state)(struct fb_info *info); | ||
677 | |||
678 | /* get capability given var */ | 672 | /* get capability given var */ |
679 | void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps, | 673 | void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps, |
680 | struct fb_var_screeninfo *var); | 674 | struct fb_var_screeninfo *var); |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 84d3532dd3ea..7be0c6fbe880 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -91,6 +91,8 @@ struct fscache_operation { | |||
91 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ | 91 | #define FSCACHE_OP_WAITING 4 /* cleared when op is woken */ |
92 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ | 92 | #define FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ |
93 | #define FSCACHE_OP_DEAD 6 /* op is now dead */ | 93 | #define FSCACHE_OP_DEAD 6 /* op is now dead */ |
94 | #define FSCACHE_OP_DEC_READ_CNT 7 /* decrement object->n_reads on destruction */ | ||
95 | #define FSCACHE_OP_KEEP_FLAGS 0xc0 /* flags to keep when repurposing an op */ | ||
94 | 96 | ||
95 | atomic_t usage; | 97 | atomic_t usage; |
96 | unsigned debug_id; /* debugging ID */ | 98 | unsigned debug_id; /* debugging ID */ |
@@ -102,6 +104,16 @@ struct fscache_operation { | |||
102 | 104 | ||
103 | /* operation releaser */ | 105 | /* operation releaser */ |
104 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
107 | |||
108 | #ifdef CONFIG_SLOW_WORK_PROC | ||
109 | const char *name; /* operation name */ | ||
110 | const char *state; /* operation state */ | ||
111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | ||
112 | #define fscache_set_op_state(OP, S) do { (OP)->state = (S); } while(0) | ||
113 | #else | ||
114 | #define fscache_set_op_name(OP, N) do { } while(0) | ||
115 | #define fscache_set_op_state(OP, S) do { } while(0) | ||
116 | #endif | ||
105 | }; | 117 | }; |
106 | 118 | ||
107 | extern atomic_t fscache_op_debug_id; | 119 | extern atomic_t fscache_op_debug_id; |
@@ -125,6 +137,7 @@ static inline void fscache_operation_init(struct fscache_operation *op, | |||
125 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); | 137 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); |
126 | op->release = release; | 138 | op->release = release; |
127 | INIT_LIST_HEAD(&op->pend_link); | 139 | INIT_LIST_HEAD(&op->pend_link); |
140 | fscache_set_op_state(op, "Init"); | ||
128 | } | 141 | } |
129 | 142 | ||
130 | /** | 143 | /** |
@@ -221,8 +234,10 @@ struct fscache_cache_ops { | |||
221 | struct fscache_object *(*alloc_object)(struct fscache_cache *cache, | 234 | struct fscache_object *(*alloc_object)(struct fscache_cache *cache, |
222 | struct fscache_cookie *cookie); | 235 | struct fscache_cookie *cookie); |
223 | 236 | ||
224 | /* look up the object for a cookie */ | 237 | /* look up the object for a cookie |
225 | void (*lookup_object)(struct fscache_object *object); | 238 | * - return -ETIMEDOUT to be requeued |
239 | */ | ||
240 | int (*lookup_object)(struct fscache_object *object); | ||
226 | 241 | ||
227 | /* finished looking up */ | 242 | /* finished looking up */ |
228 | void (*lookup_complete)(struct fscache_object *object); | 243 | void (*lookup_complete)(struct fscache_object *object); |
@@ -297,12 +312,14 @@ struct fscache_cookie { | |||
297 | atomic_t usage; /* number of users of this cookie */ | 312 | atomic_t usage; /* number of users of this cookie */ |
298 | atomic_t n_children; /* number of children of this cookie */ | 313 | atomic_t n_children; /* number of children of this cookie */ |
299 | spinlock_t lock; | 314 | spinlock_t lock; |
315 | spinlock_t stores_lock; /* lock on page store tree */ | ||
300 | struct hlist_head backing_objects; /* object(s) backing this file/index */ | 316 | struct hlist_head backing_objects; /* object(s) backing this file/index */ |
301 | const struct fscache_cookie_def *def; /* definition */ | 317 | const struct fscache_cookie_def *def; /* definition */ |
302 | struct fscache_cookie *parent; /* parent of this entry */ | 318 | struct fscache_cookie *parent; /* parent of this entry */ |
303 | void *netfs_data; /* back pointer to netfs */ | 319 | void *netfs_data; /* back pointer to netfs */ |
304 | struct radix_tree_root stores; /* pages to be stored on this cookie */ | 320 | struct radix_tree_root stores; /* pages to be stored on this cookie */ |
305 | #define FSCACHE_COOKIE_PENDING_TAG 0 /* pages tag: pending write to cache */ | 321 | #define FSCACHE_COOKIE_PENDING_TAG 0 /* pages tag: pending write to cache */ |
322 | #define FSCACHE_COOKIE_STORING_TAG 1 /* pages tag: writing to cache */ | ||
306 | 323 | ||
307 | unsigned long flags; | 324 | unsigned long flags; |
308 | #define FSCACHE_COOKIE_LOOKING_UP 0 /* T if non-index cookie being looked up still */ | 325 | #define FSCACHE_COOKIE_LOOKING_UP 0 /* T if non-index cookie being looked up still */ |
@@ -337,6 +354,7 @@ struct fscache_object { | |||
337 | FSCACHE_OBJECT_RECYCLING, /* retiring object */ | 354 | FSCACHE_OBJECT_RECYCLING, /* retiring object */ |
338 | FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */ | 355 | FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */ |
339 | FSCACHE_OBJECT_DEAD, /* object is now dead */ | 356 | FSCACHE_OBJECT_DEAD, /* object is now dead */ |
357 | FSCACHE_OBJECT__NSTATES | ||
340 | } state; | 358 | } state; |
341 | 359 | ||
342 | int debug_id; /* debugging ID */ | 360 | int debug_id; /* debugging ID */ |
@@ -345,6 +363,7 @@ struct fscache_object { | |||
345 | int n_obj_ops; /* number of object ops outstanding on object */ | 363 | int n_obj_ops; /* number of object ops outstanding on object */ |
346 | int n_in_progress; /* number of ops in progress */ | 364 | int n_in_progress; /* number of ops in progress */ |
347 | int n_exclusive; /* number of exclusive ops queued */ | 365 | int n_exclusive; /* number of exclusive ops queued */ |
366 | atomic_t n_reads; /* number of read ops in progress */ | ||
348 | spinlock_t lock; /* state and operations lock */ | 367 | spinlock_t lock; /* state and operations lock */ |
349 | 368 | ||
350 | unsigned long lookup_jif; /* time at which lookup started */ | 369 | unsigned long lookup_jif; /* time at which lookup started */ |
@@ -358,6 +377,7 @@ struct fscache_object { | |||
358 | #define FSCACHE_OBJECT_EV_RELEASE 4 /* T if netfs requested object release */ | 377 | #define FSCACHE_OBJECT_EV_RELEASE 4 /* T if netfs requested object release */ |
359 | #define FSCACHE_OBJECT_EV_RETIRE 5 /* T if netfs requested object retirement */ | 378 | #define FSCACHE_OBJECT_EV_RETIRE 5 /* T if netfs requested object retirement */ |
360 | #define FSCACHE_OBJECT_EV_WITHDRAW 6 /* T if cache requested object withdrawal */ | 379 | #define FSCACHE_OBJECT_EV_WITHDRAW 6 /* T if cache requested object withdrawal */ |
380 | #define FSCACHE_OBJECT_EVENTS_MASK 0x7f /* mask of all events*/ | ||
361 | 381 | ||
362 | unsigned long flags; | 382 | unsigned long flags; |
363 | #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ | 383 | #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ |
@@ -373,7 +393,11 @@ struct fscache_object { | |||
373 | struct list_head dependents; /* FIFO of dependent objects */ | 393 | struct list_head dependents; /* FIFO of dependent objects */ |
374 | struct list_head dep_link; /* link in parent's dependents list */ | 394 | struct list_head dep_link; /* link in parent's dependents list */ |
375 | struct list_head pending_ops; /* unstarted operations on this object */ | 395 | struct list_head pending_ops; /* unstarted operations on this object */ |
396 | #ifdef CONFIG_FSCACHE_OBJECT_LIST | ||
397 | struct rb_node objlist_link; /* link in global object list */ | ||
398 | #endif | ||
376 | pgoff_t store_limit; /* current storage limit */ | 399 | pgoff_t store_limit; /* current storage limit */ |
400 | loff_t store_limit_l; /* current storage limit */ | ||
377 | }; | 401 | }; |
378 | 402 | ||
379 | extern const char *fscache_object_states[]; | 403 | extern const char *fscache_object_states[]; |
@@ -383,6 +407,10 @@ extern const char *fscache_object_states[]; | |||
383 | (obj)->state >= FSCACHE_OBJECT_AVAILABLE && \ | 407 | (obj)->state >= FSCACHE_OBJECT_AVAILABLE && \ |
384 | (obj)->state < FSCACHE_OBJECT_DYING) | 408 | (obj)->state < FSCACHE_OBJECT_DYING) |
385 | 409 | ||
410 | #define fscache_object_is_dead(obj) \ | ||
411 | (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \ | ||
412 | (obj)->state >= FSCACHE_OBJECT_DYING) | ||
413 | |||
386 | extern const struct slow_work_ops fscache_object_slow_work_ops; | 414 | extern const struct slow_work_ops fscache_object_slow_work_ops; |
387 | 415 | ||
388 | /** | 416 | /** |
@@ -414,6 +442,7 @@ void fscache_object_init(struct fscache_object *object, | |||
414 | object->events = object->event_mask = 0; | 442 | object->events = object->event_mask = 0; |
415 | object->flags = 0; | 443 | object->flags = 0; |
416 | object->store_limit = 0; | 444 | object->store_limit = 0; |
445 | object->store_limit_l = 0; | ||
417 | object->cache = cache; | 446 | object->cache = cache; |
418 | object->cookie = cookie; | 447 | object->cookie = cookie; |
419 | object->parent = NULL; | 448 | object->parent = NULL; |
@@ -422,6 +451,12 @@ void fscache_object_init(struct fscache_object *object, | |||
422 | extern void fscache_object_lookup_negative(struct fscache_object *object); | 451 | extern void fscache_object_lookup_negative(struct fscache_object *object); |
423 | extern void fscache_obtained_object(struct fscache_object *object); | 452 | extern void fscache_obtained_object(struct fscache_object *object); |
424 | 453 | ||
454 | #ifdef CONFIG_FSCACHE_OBJECT_LIST | ||
455 | extern void fscache_object_destroy(struct fscache_object *object); | ||
456 | #else | ||
457 | #define fscache_object_destroy(object) do {} while(0) | ||
458 | #endif | ||
459 | |||
425 | /** | 460 | /** |
426 | * fscache_object_destroyed - Note destruction of an object in a cache | 461 | * fscache_object_destroyed - Note destruction of an object in a cache |
427 | * @cache: The cache from which the object came | 462 | * @cache: The cache from which the object came |
@@ -460,6 +495,7 @@ static inline void fscache_object_lookup_error(struct fscache_object *object) | |||
460 | static inline | 495 | static inline |
461 | void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) | 496 | void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) |
462 | { | 497 | { |
498 | object->store_limit_l = i_size; | ||
463 | object->store_limit = i_size >> PAGE_SHIFT; | 499 | object->store_limit = i_size >> PAGE_SHIFT; |
464 | if (i_size & ~PAGE_MASK) | 500 | if (i_size & ~PAGE_MASK) |
465 | object->store_limit++; | 501 | object->store_limit++; |
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index 6d8ee466e0a0..595ce49288b7 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
@@ -202,6 +202,8 @@ extern int __fscache_write_page(struct fscache_cookie *, struct page *, gfp_t); | |||
202 | extern void __fscache_uncache_page(struct fscache_cookie *, struct page *); | 202 | extern void __fscache_uncache_page(struct fscache_cookie *, struct page *); |
203 | extern bool __fscache_check_page_write(struct fscache_cookie *, struct page *); | 203 | extern bool __fscache_check_page_write(struct fscache_cookie *, struct page *); |
204 | extern void __fscache_wait_on_page_write(struct fscache_cookie *, struct page *); | 204 | extern void __fscache_wait_on_page_write(struct fscache_cookie *, struct page *); |
205 | extern bool __fscache_maybe_release_page(struct fscache_cookie *, struct page *, | ||
206 | gfp_t); | ||
205 | 207 | ||
206 | /** | 208 | /** |
207 | * fscache_register_netfs - Register a filesystem as desiring caching services | 209 | * fscache_register_netfs - Register a filesystem as desiring caching services |
@@ -615,4 +617,29 @@ void fscache_wait_on_page_write(struct fscache_cookie *cookie, | |||
615 | __fscache_wait_on_page_write(cookie, page); | 617 | __fscache_wait_on_page_write(cookie, page); |
616 | } | 618 | } |
617 | 619 | ||
620 | /** | ||
621 | * fscache_maybe_release_page - Consider releasing a page, cancelling a store | ||
622 | * @cookie: The cookie representing the cache object | ||
623 | * @page: The netfs page that is being cached. | ||
624 | * @gfp: The gfp flags passed to releasepage() | ||
625 | * | ||
626 | * Consider releasing a page for the vmscan algorithm, on behalf of the netfs's | ||
627 | * releasepage() call. A storage request on the page may cancelled if it is | ||
628 | * not currently being processed. | ||
629 | * | ||
630 | * The function returns true if the page no longer has a storage request on it, | ||
631 | * and false if a storage request is left in place. If true is returned, the | ||
632 | * page will have been passed to fscache_uncache_page(). If false is returned | ||
633 | * the page cannot be freed yet. | ||
634 | */ | ||
635 | static inline | ||
636 | bool fscache_maybe_release_page(struct fscache_cookie *cookie, | ||
637 | struct page *page, | ||
638 | gfp_t gfp) | ||
639 | { | ||
640 | if (fscache_cookie_valid(cookie) && PageFsCache(page)) | ||
641 | return __fscache_maybe_release_page(cookie, page, gfp); | ||
642 | return false; | ||
643 | } | ||
644 | |||
618 | #endif /* _LINUX_FSCACHE_H */ | 645 | #endif /* _LINUX_FSCACHE_H */ |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index f13255e06406..9eb07bbc6522 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
@@ -21,7 +21,7 @@ struct i2c_pnx_mif { | |||
21 | int mode; /* Interface mode */ | 21 | int mode; /* Interface mode */ |
22 | struct completion complete; /* I/O completion */ | 22 | struct completion complete; /* I/O completion */ |
23 | struct timer_list timer; /* Timeout */ | 23 | struct timer_list timer; /* Timeout */ |
24 | char * buf; /* Data buffer */ | 24 | u8 * buf; /* Data buffer */ |
25 | int len; /* Length of data buffer */ | 25 | int len; /* Length of data buffer */ |
26 | }; | 26 | }; |
27 | 27 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 57d41b0abce2..7b40cda57a70 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -361,6 +361,24 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data) | |||
361 | dev_set_drvdata(&dev->dev, data); | 361 | dev_set_drvdata(&dev->dev, data); |
362 | } | 362 | } |
363 | 363 | ||
364 | /** | ||
365 | * i2c_lock_adapter - Prevent access to an I2C bus segment | ||
366 | * @adapter: Target I2C bus segment | ||
367 | */ | ||
368 | static inline void i2c_lock_adapter(struct i2c_adapter *adapter) | ||
369 | { | ||
370 | mutex_lock(&adapter->bus_lock); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * i2c_unlock_adapter - Reauthorize access to an I2C bus segment | ||
375 | * @adapter: Target I2C bus segment | ||
376 | */ | ||
377 | static inline void i2c_unlock_adapter(struct i2c_adapter *adapter) | ||
378 | { | ||
379 | mutex_unlock(&adapter->bus_lock); | ||
380 | } | ||
381 | |||
364 | /*flags for the client struct: */ | 382 | /*flags for the client struct: */ |
365 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ | 383 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ |
366 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ | 384 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ |
diff --git a/include/linux/input.h b/include/linux/input.h index db563bbac9dd..7be8a6537b57 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1389,6 +1389,10 @@ extern struct class input_class; | |||
1389 | * methods; erase() is optional. set_gain() and set_autocenter() need | 1389 | * methods; erase() is optional. set_gain() and set_autocenter() need |
1390 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER | 1390 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER |
1391 | * bits. | 1391 | * bits. |
1392 | * | ||
1393 | * Note that playback(), set_gain() and set_autocenter() are called with | ||
1394 | * dev->event_lock spinlock held and interrupts off and thus may not | ||
1395 | * sleep. | ||
1392 | */ | 1396 | */ |
1393 | struct ff_device { | 1397 | struct ff_device { |
1394 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, | 1398 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, |
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 4c218ee7587a..8687a7dc0632 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h | |||
@@ -157,7 +157,7 @@ typedef struct { | |||
157 | 157 | ||
158 | typedef struct { | 158 | typedef struct { |
159 | int mp_mrru; /* unused */ | 159 | int mp_mrru; /* unused */ |
160 | struct sk_buff_head frags; /* fragments sl list */ | 160 | struct sk_buff * frags; /* fragments sl list -- use skb->next */ |
161 | long frames; /* number of frames in the frame list */ | 161 | long frames; /* number of frames in the frame list */ |
162 | unsigned int seq; /* last processed packet seq #: any packets | 162 | unsigned int seq; /* last processed packet seq #: any packets |
163 | * with smaller seq # will be dropped | 163 | * with smaller seq # will be dropped |
diff --git a/include/linux/mfd/wm831x/regulator.h b/include/linux/mfd/wm831x/regulator.h index f95466343fb2..955d30fc6a27 100644 --- a/include/linux/mfd/wm831x/regulator.h +++ b/include/linux/mfd/wm831x/regulator.h | |||
@@ -1212,7 +1212,7 @@ | |||
1212 | #define WM831X_LDO1_OK_SHIFT 0 /* LDO1_OK */ | 1212 | #define WM831X_LDO1_OK_SHIFT 0 /* LDO1_OK */ |
1213 | #define WM831X_LDO1_OK_WIDTH 1 /* LDO1_OK */ | 1213 | #define WM831X_LDO1_OK_WIDTH 1 /* LDO1_OK */ |
1214 | 1214 | ||
1215 | #define WM831X_ISINK_MAX_ISEL 56 | 1215 | #define WM831X_ISINK_MAX_ISEL 55 |
1216 | extern int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL]; | 1216 | extern int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1]; |
1217 | 1217 | ||
1218 | #endif | 1218 | #endif |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 79fec6af3f9f..ce520402e840 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -425,15 +425,6 @@ struct nilfs_dat_entry { | |||
425 | }; | 425 | }; |
426 | 426 | ||
427 | /** | 427 | /** |
428 | * struct nilfs_dat_group_desc - block group descriptor | ||
429 | * @dg_nfrees: number of free virtual block numbers in block group | ||
430 | */ | ||
431 | struct nilfs_dat_group_desc { | ||
432 | __le32 dg_nfrees; | ||
433 | }; | ||
434 | |||
435 | |||
436 | /** | ||
437 | * struct nilfs_snapshot_list - snapshot list | 428 | * struct nilfs_snapshot_list - snapshot list |
438 | * @ssl_next: next checkpoint number on snapshot list | 429 | * @ssl_next: next checkpoint number on snapshot list |
439 | * @ssl_prev: previous checkpoint number on snapshot list | 430 | * @ssl_prev: previous checkpoint number on snapshot list |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b0f0f3851cd4..84cf1f3b7838 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -543,7 +543,7 @@ | |||
543 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 | 543 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
544 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | 544 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 |
545 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 | 545 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 |
546 | #define PCI_DEVICE_ID_AMD_SB900_SMBUS 0x780b | 546 | #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS 0x780b |
547 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F | 547 | #define PCI_DEVICE_ID_AMD_CS5535_IDE 0x208F |
548 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 548 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
549 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 549 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
@@ -1956,6 +1956,8 @@ | |||
1956 | #define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ | 1956 | #define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ |
1957 | #define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ | 1957 | #define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ |
1958 | #define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ | 1958 | #define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ |
1959 | #define PCI_DEVICE_ID_LAVA_QUATTRO_A 0x0120 /* 2x 16550A, half of 4 port */ | ||
1960 | #define PCI_DEVICE_ID_LAVA_QUATTRO_B 0x0121 /* 2x 16550A, half of 4 port */ | ||
1959 | #define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */ | 1961 | #define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */ |
1960 | #define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */ | 1962 | #define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */ |
1961 | #define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ | 1963 | #define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ |
diff --git a/include/linux/slow-work.h b/include/linux/slow-work.h index b65c8881f07a..13337bf6c3f5 100644 --- a/include/linux/slow-work.h +++ b/include/linux/slow-work.h | |||
@@ -17,13 +17,20 @@ | |||
17 | #ifdef CONFIG_SLOW_WORK | 17 | #ifdef CONFIG_SLOW_WORK |
18 | 18 | ||
19 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
20 | #include <linux/timer.h> | ||
20 | 21 | ||
21 | struct slow_work; | 22 | struct slow_work; |
23 | #ifdef CONFIG_SLOW_WORK_DEBUG | ||
24 | struct seq_file; | ||
25 | #endif | ||
22 | 26 | ||
23 | /* | 27 | /* |
24 | * The operations used to support slow work items | 28 | * The operations used to support slow work items |
25 | */ | 29 | */ |
26 | struct slow_work_ops { | 30 | struct slow_work_ops { |
31 | /* owner */ | ||
32 | struct module *owner; | ||
33 | |||
27 | /* get a ref on a work item | 34 | /* get a ref on a work item |
28 | * - return 0 if successful, -ve if not | 35 | * - return 0 if successful, -ve if not |
29 | */ | 36 | */ |
@@ -34,6 +41,11 @@ struct slow_work_ops { | |||
34 | 41 | ||
35 | /* execute a work item */ | 42 | /* execute a work item */ |
36 | void (*execute)(struct slow_work *work); | 43 | void (*execute)(struct slow_work *work); |
44 | |||
45 | #ifdef CONFIG_SLOW_WORK_DEBUG | ||
46 | /* describe a work item for debugfs */ | ||
47 | void (*desc)(struct slow_work *work, struct seq_file *m); | ||
48 | #endif | ||
37 | }; | 49 | }; |
38 | 50 | ||
39 | /* | 51 | /* |
@@ -42,13 +54,24 @@ struct slow_work_ops { | |||
42 | * queued | 54 | * queued |
43 | */ | 55 | */ |
44 | struct slow_work { | 56 | struct slow_work { |
57 | struct module *owner; /* the owning module */ | ||
45 | unsigned long flags; | 58 | unsigned long flags; |
46 | #define SLOW_WORK_PENDING 0 /* item pending (further) execution */ | 59 | #define SLOW_WORK_PENDING 0 /* item pending (further) execution */ |
47 | #define SLOW_WORK_EXECUTING 1 /* item currently executing */ | 60 | #define SLOW_WORK_EXECUTING 1 /* item currently executing */ |
48 | #define SLOW_WORK_ENQ_DEFERRED 2 /* item enqueue deferred */ | 61 | #define SLOW_WORK_ENQ_DEFERRED 2 /* item enqueue deferred */ |
49 | #define SLOW_WORK_VERY_SLOW 3 /* item is very slow */ | 62 | #define SLOW_WORK_VERY_SLOW 3 /* item is very slow */ |
63 | #define SLOW_WORK_CANCELLING 4 /* item is being cancelled, don't enqueue */ | ||
64 | #define SLOW_WORK_DELAYED 5 /* item is struct delayed_slow_work with active timer */ | ||
50 | const struct slow_work_ops *ops; /* operations table for this item */ | 65 | const struct slow_work_ops *ops; /* operations table for this item */ |
51 | struct list_head link; /* link in queue */ | 66 | struct list_head link; /* link in queue */ |
67 | #ifdef CONFIG_SLOW_WORK_DEBUG | ||
68 | struct timespec mark; /* jiffies at which queued or exec begun */ | ||
69 | #endif | ||
70 | }; | ||
71 | |||
72 | struct delayed_slow_work { | ||
73 | struct slow_work work; | ||
74 | struct timer_list timer; | ||
52 | }; | 75 | }; |
53 | 76 | ||
54 | /** | 77 | /** |
@@ -67,6 +90,20 @@ static inline void slow_work_init(struct slow_work *work, | |||
67 | } | 90 | } |
68 | 91 | ||
69 | /** | 92 | /** |
93 | * slow_work_init - Initialise a delayed slow work item | ||
94 | * @work: The work item to initialise | ||
95 | * @ops: The operations to use to handle the slow work item | ||
96 | * | ||
97 | * Initialise a delayed slow work item. | ||
98 | */ | ||
99 | static inline void delayed_slow_work_init(struct delayed_slow_work *dwork, | ||
100 | const struct slow_work_ops *ops) | ||
101 | { | ||
102 | init_timer(&dwork->timer); | ||
103 | slow_work_init(&dwork->work, ops); | ||
104 | } | ||
105 | |||
106 | /** | ||
70 | * vslow_work_init - Initialise a very slow work item | 107 | * vslow_work_init - Initialise a very slow work item |
71 | * @work: The work item to initialise | 108 | * @work: The work item to initialise |
72 | * @ops: The operations to use to handle the slow work item | 109 | * @ops: The operations to use to handle the slow work item |
@@ -83,9 +120,40 @@ static inline void vslow_work_init(struct slow_work *work, | |||
83 | INIT_LIST_HEAD(&work->link); | 120 | INIT_LIST_HEAD(&work->link); |
84 | } | 121 | } |
85 | 122 | ||
123 | /** | ||
124 | * slow_work_is_queued - Determine if a slow work item is on the work queue | ||
125 | * work: The work item to test | ||
126 | * | ||
127 | * Determine if the specified slow-work item is on the work queue. This | ||
128 | * returns true if it is actually on the queue. | ||
129 | * | ||
130 | * If the item is executing and has been marked for requeue when execution | ||
131 | * finishes, then false will be returned. | ||
132 | * | ||
133 | * Anyone wishing to wait for completion of execution can wait on the | ||
134 | * SLOW_WORK_EXECUTING bit. | ||
135 | */ | ||
136 | static inline bool slow_work_is_queued(struct slow_work *work) | ||
137 | { | ||
138 | unsigned long flags = work->flags; | ||
139 | return flags & SLOW_WORK_PENDING && !(flags & SLOW_WORK_EXECUTING); | ||
140 | } | ||
141 | |||
86 | extern int slow_work_enqueue(struct slow_work *work); | 142 | extern int slow_work_enqueue(struct slow_work *work); |
87 | extern int slow_work_register_user(void); | 143 | extern void slow_work_cancel(struct slow_work *work); |
88 | extern void slow_work_unregister_user(void); | 144 | extern int slow_work_register_user(struct module *owner); |
145 | extern void slow_work_unregister_user(struct module *owner); | ||
146 | |||
147 | extern int delayed_slow_work_enqueue(struct delayed_slow_work *dwork, | ||
148 | unsigned long delay); | ||
149 | |||
150 | static inline void delayed_slow_work_cancel(struct delayed_slow_work *dwork) | ||
151 | { | ||
152 | slow_work_cancel(&dwork->work); | ||
153 | } | ||
154 | |||
155 | extern bool slow_work_sleep_till_thread_needed(struct slow_work *work, | ||
156 | signed long *_timeout); | ||
89 | 157 | ||
90 | #ifdef CONFIG_SYSCTL | 158 | #ifdef CONFIG_SYSCTL |
91 | extern ctl_table slow_work_sysctls[]; | 159 | extern ctl_table slow_work_sysctls[]; |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cd15df6c63cd..5e781d824e6d 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -301,6 +301,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
302 | #endif /* !CONFIG_PM_SLEEP */ | 302 | #endif /* !CONFIG_PM_SLEEP */ |
303 | 303 | ||
304 | extern struct mutex pm_mutex; | ||
305 | |||
304 | #ifndef CONFIG_HIBERNATION | 306 | #ifndef CONFIG_HIBERNATION |
305 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 307 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
306 | { | 308 | { |
@@ -308,8 +310,23 @@ static inline void register_nosave_region(unsigned long b, unsigned long e) | |||
308 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | 310 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) |
309 | { | 311 | { |
310 | } | 312 | } |
311 | #endif | ||
312 | 313 | ||
313 | extern struct mutex pm_mutex; | 314 | static inline void lock_system_sleep(void) {} |
315 | static inline void unlock_system_sleep(void) {} | ||
316 | |||
317 | #else | ||
318 | |||
319 | /* Let some subsystems like memory hotadd exclude hibernation */ | ||
320 | |||
321 | static inline void lock_system_sleep(void) | ||
322 | { | ||
323 | mutex_lock(&pm_mutex); | ||
324 | } | ||
325 | |||
326 | static inline void unlock_system_sleep(void) | ||
327 | { | ||
328 | mutex_unlock(&pm_mutex); | ||
329 | } | ||
330 | #endif | ||
314 | 331 | ||
315 | #endif /* _LINUX_SUSPEND_H */ | 332 | #endif /* _LINUX_SUSPEND_H */ |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 7afca0d72139..7ffa11f06232 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -70,8 +70,8 @@ struct vt_event { | |||
70 | #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ | 70 | #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ |
71 | #define VT_EVENT_RESIZE 0x0008 /* Resize display */ | 71 | #define VT_EVENT_RESIZE 0x0008 /* Resize display */ |
72 | #define VT_MAX_EVENT 0x000F | 72 | #define VT_MAX_EVENT 0x000F |
73 | unsigned int old; /* Old console */ | 73 | unsigned int oldev; /* Old console */ |
74 | unsigned int new; /* New console (if changing) */ | 74 | unsigned int newev; /* New console (if changing) */ |
75 | unsigned int pad[4]; /* Padding for expansion */ | 75 | unsigned int pad[4]; /* Padding for expansion */ |
76 | }; | 76 | }; |
77 | 77 | ||