diff options
Diffstat (limited to 'include/linux')
47 files changed, 380 insertions, 175 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index a30ef13c9e62..43dc2ebfaa0e 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
| @@ -226,7 +226,8 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, | |||
| 226 | __put_ioctx(kioctx); \ | 226 | __put_ioctx(kioctx); \ |
| 227 | } while (0) | 227 | } while (0) |
| 228 | 228 | ||
| 229 | #define in_aio() !is_sync_wait(current->io_wait) | 229 | #define in_aio() (unlikely(!is_sync_wait(current->io_wait))) |
| 230 | |||
| 230 | /* may be used for debugging */ | 231 | /* may be used for debugging */ |
| 231 | #define warn_if_async() \ | 232 | #define warn_if_async() \ |
| 232 | do { \ | 233 | do { \ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a686eabe22d6..db5b00a792f5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -854,7 +854,7 @@ static inline void put_dev_sector(Sector p) | |||
| 854 | 854 | ||
| 855 | struct work_struct; | 855 | struct work_struct; |
| 856 | int kblockd_schedule_work(struct work_struct *work); | 856 | int kblockd_schedule_work(struct work_struct *work); |
| 857 | void kblockd_flush(void); | 857 | void kblockd_flush_work(struct work_struct *work); |
| 858 | 858 | ||
| 859 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ | 859 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ |
| 860 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) | 860 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 2665ca04cf8f..bf297b03a4e4 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -49,6 +49,7 @@ struct clocksource; | |||
| 49 | * @shift: cycle to nanosecond divisor (power of two) | 49 | * @shift: cycle to nanosecond divisor (power of two) |
| 50 | * @flags: flags describing special properties | 50 | * @flags: flags describing special properties |
| 51 | * @vread: vsyscall based read | 51 | * @vread: vsyscall based read |
| 52 | * @resume: resume function for the clocksource, if necessary | ||
| 52 | * @cycle_interval: Used internally by timekeeping core, please ignore. | 53 | * @cycle_interval: Used internally by timekeeping core, please ignore. |
| 53 | * @xtime_interval: Used internally by timekeeping core, please ignore. | 54 | * @xtime_interval: Used internally by timekeeping core, please ignore. |
| 54 | */ | 55 | */ |
| @@ -65,6 +66,7 @@ struct clocksource { | |||
| 65 | u32 shift; | 66 | u32 shift; |
| 66 | unsigned long flags; | 67 | unsigned long flags; |
| 67 | cycle_t (*vread)(void); | 68 | cycle_t (*vread)(void); |
| 69 | void (*resume)(void); | ||
| 68 | 70 | ||
| 69 | /* timekeeping specific data, ignore */ | 71 | /* timekeeping specific data, ignore */ |
| 70 | cycle_t cycle_interval; | 72 | cycle_t cycle_interval; |
| @@ -209,6 +211,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c, | |||
| 209 | extern int clocksource_register(struct clocksource*); | 211 | extern int clocksource_register(struct clocksource*); |
| 210 | extern struct clocksource* clocksource_get_next(void); | 212 | extern struct clocksource* clocksource_get_next(void); |
| 211 | extern void clocksource_change_rating(struct clocksource *cs, int rating); | 213 | extern void clocksource_change_rating(struct clocksource *cs, int rating); |
| 214 | extern void clocksource_resume(void); | ||
| 212 | 215 | ||
| 213 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | 216 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL |
| 214 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); | 217 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); |
diff --git a/include/linux/compat.h b/include/linux/compat.h index ccd863dd77fa..70a157a130bb 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -253,5 +253,8 @@ asmlinkage long compat_sys_epoll_pwait(int epfd, | |||
| 253 | const compat_sigset_t __user *sigmask, | 253 | const compat_sigset_t __user *sigmask, |
| 254 | compat_size_t sigsetsize); | 254 | compat_size_t sigsetsize); |
| 255 | 255 | ||
| 256 | asmlinkage long compat_sys_utimensat(unsigned int dfd, char __user *filename, | ||
| 257 | struct compat_timespec __user *t, int flags); | ||
| 258 | |||
| 256 | #endif /* CONFIG_COMPAT */ | 259 | #endif /* CONFIG_COMPAT */ |
| 257 | #endif /* _LINUX_COMPAT_H */ | 260 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index a9f794716a81..03ec2311fb29 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -40,3 +40,4 @@ | |||
| 40 | #define noinline __attribute__((noinline)) | 40 | #define noinline __attribute__((noinline)) |
| 41 | #define __attribute_pure__ __attribute__((pure)) | 41 | #define __attribute_pure__ __attribute__((pure)) |
| 42 | #define __attribute_const__ __attribute__((__const__)) | 42 | #define __attribute_const__ __attribute__((__const__)) |
| 43 | #define __maybe_unused __attribute__((unused)) | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index ecd621fd27d2..a9e2863c2dbf 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
| @@ -4,9 +4,11 @@ | |||
| 4 | #include <linux/compiler-gcc.h> | 4 | #include <linux/compiler-gcc.h> |
| 5 | 5 | ||
| 6 | #if __GNUC_MINOR__ >= 3 | 6 | #if __GNUC_MINOR__ >= 3 |
| 7 | # define __attribute_used__ __attribute__((__used__)) | 7 | # define __used __attribute__((__used__)) |
| 8 | # define __attribute_used__ __used /* deprecated */ | ||
| 8 | #else | 9 | #else |
| 9 | # define __attribute_used__ __attribute__((__unused__)) | 10 | # define __used __attribute__((__unused__)) |
| 11 | # define __attribute_used__ __used /* deprecated */ | ||
| 10 | #endif | 12 | #endif |
| 11 | 13 | ||
| 12 | #if __GNUC_MINOR__ >= 4 | 14 | #if __GNUC_MINOR__ >= 4 |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index fd0cc7c4a636..a03e9398a6c2 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -12,7 +12,8 @@ | |||
| 12 | # define __inline __inline __attribute__((always_inline)) | 12 | # define __inline __inline __attribute__((always_inline)) |
| 13 | #endif | 13 | #endif |
| 14 | 14 | ||
| 15 | #define __attribute_used__ __attribute__((__used__)) | 15 | #define __used __attribute__((__used__)) |
| 16 | #define __attribute_used__ __used /* deprecated */ | ||
| 16 | #define __must_check __attribute__((warn_unused_result)) | 17 | #define __must_check __attribute__((warn_unused_result)) |
| 17 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 18 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
| 18 | #define __always_inline inline __attribute__((always_inline)) | 19 | #define __always_inline inline __attribute__((always_inline)) |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 3b6949b41745..498c35920762 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -108,15 +108,30 @@ extern void __chk_io_ptr(const void __iomem *); | |||
| 108 | * 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, |
| 109 | * 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. |
| 110 | * | 110 | * |
| 111 | * As of gcc 3.3, static functions that are not marked with attribute((used)) | 111 | * As of gcc 3.4, static functions that are not marked with attribute((used)) |
| 112 | * may be elided from the assembly file. As of gcc 3.3, static data not so | 112 | * may be elided from the assembly file. As of gcc 3.4, static data not so |
| 113 | * marked will not be elided, but this may change in a future gcc version. | 113 | * marked will not be elided, but this may change in a future gcc version. |
| 114 | * | 114 | * |
| 115 | * NOTE: Because distributions shipped with a backported unit-at-a-time | ||
| 116 | * compiler in gcc 3.3, we must define __used to be __attribute__((used)) | ||
| 117 | * for gcc >=3.3 instead of 3.4. | ||
| 118 | * | ||
| 115 | * In prior versions of gcc, such functions and data would be emitted, but | 119 | * In prior versions of gcc, such functions and data would be emitted, but |
| 116 | * would be warned about except with attribute((unused)). | 120 | * would be warned about except with attribute((unused)). |
| 121 | * | ||
| 122 | * Mark functions that are referenced only in inline assembly as __used so | ||
| 123 | * the code is emitted even though it appears to be unreferenced. | ||
| 117 | */ | 124 | */ |
| 118 | #ifndef __attribute_used__ | 125 | #ifndef __attribute_used__ |
| 119 | # define __attribute_used__ /* unimplemented */ | 126 | # define __attribute_used__ /* deprecated */ |
| 127 | #endif | ||
| 128 | |||
| 129 | #ifndef __used | ||
| 130 | # define __used /* unimplemented */ | ||
| 131 | #endif | ||
| 132 | |||
| 133 | #ifndef __maybe_unused | ||
| 134 | # define __maybe_unused /* unimplemented */ | ||
| 120 | #endif | 135 | #endif |
| 121 | 136 | ||
| 122 | /* | 137 | /* |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 4395e5206746..7894dd0f3b77 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
| @@ -54,7 +54,7 @@ struct ext3_block_alloc_info { | |||
| 54 | /* | 54 | /* |
| 55 | * Was i_next_alloc_goal in ext3_inode_info | 55 | * Was i_next_alloc_goal in ext3_inode_info |
| 56 | * is the *physical* companion to i_next_alloc_block. | 56 | * is the *physical* companion to i_next_alloc_block. |
| 57 | * it the the physical block number of the block which was most-recentl | 57 | * it the physical block number of the block which was most-recentl |
| 58 | * allocated to this file. This give us the goal (target) for the next | 58 | * allocated to this file. This give us the goal (target) for the next |
| 59 | * allocation when we detect linearly ascending requests. | 59 | * allocation when we detect linearly ascending requests. |
| 60 | */ | 60 | */ |
diff --git a/include/linux/ext4_fs_i.h b/include/linux/ext4_fs_i.h index bb42379cb7fd..d5b177e5b395 100644 --- a/include/linux/ext4_fs_i.h +++ b/include/linux/ext4_fs_i.h | |||
| @@ -52,7 +52,7 @@ struct ext4_block_alloc_info { | |||
| 52 | /* | 52 | /* |
| 53 | * Was i_next_alloc_goal in ext4_inode_info | 53 | * Was i_next_alloc_goal in ext4_inode_info |
| 54 | * is the *physical* companion to i_next_alloc_block. | 54 | * is the *physical* companion to i_next_alloc_block. |
| 55 | * it the the physical block number of the block which was most-recentl | 55 | * it the physical block number of the block which was most-recentl |
| 56 | * allocated to this file. This give us the goal (target) for the next | 56 | * allocated to this file. This give us the goal (target) for the next |
| 57 | * allocation when we detect linearly ascending requests. | 57 | * allocation when we detect linearly ascending requests. |
| 58 | */ | 58 | */ |
diff --git a/include/linux/fb.h b/include/linux/fb.h index dff7a728948c..c654d0e9ce33 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -868,7 +868,7 @@ struct fb_info { | |||
| 868 | #define fb_writeq sbus_writeq | 868 | #define fb_writeq sbus_writeq |
| 869 | #define fb_memset sbus_memset_io | 869 | #define fb_memset sbus_memset_io |
| 870 | 870 | ||
| 871 | #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) | 871 | #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) || defined(__avr32__) |
| 872 | 872 | ||
| 873 | #define fb_readb __raw_readb | 873 | #define fb_readb __raw_readb |
| 874 | #define fb_readw __raw_readw | 874 | #define fb_readw __raw_readw |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 820125c628c1..899fc7f20edd 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
| 5 | 5 | ||
| 6 | union ktime; | ||
| 7 | |||
| 6 | /* Second argument to futex syscall */ | 8 | /* Second argument to futex syscall */ |
| 7 | 9 | ||
| 8 | 10 | ||
| @@ -15,6 +17,19 @@ | |||
| 15 | #define FUTEX_LOCK_PI 6 | 17 | #define FUTEX_LOCK_PI 6 |
| 16 | #define FUTEX_UNLOCK_PI 7 | 18 | #define FUTEX_UNLOCK_PI 7 |
| 17 | #define FUTEX_TRYLOCK_PI 8 | 19 | #define FUTEX_TRYLOCK_PI 8 |
| 20 | #define FUTEX_CMP_REQUEUE_PI 9 | ||
| 21 | |||
| 22 | #define FUTEX_PRIVATE_FLAG 128 | ||
| 23 | #define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG | ||
| 24 | |||
| 25 | #define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG) | ||
| 26 | #define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG) | ||
| 27 | #define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG) | ||
| 28 | #define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG) | ||
| 29 | #define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG) | ||
| 30 | #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) | ||
| 31 | #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) | ||
| 32 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) | ||
| 18 | 33 | ||
| 19 | /* | 34 | /* |
| 20 | * Support for robust futexes: the kernel cleans up held futexes at | 35 | * Support for robust futexes: the kernel cleans up held futexes at |
| @@ -83,9 +98,14 @@ struct robust_list_head { | |||
| 83 | #define FUTEX_OWNER_DIED 0x40000000 | 98 | #define FUTEX_OWNER_DIED 0x40000000 |
| 84 | 99 | ||
| 85 | /* | 100 | /* |
| 101 | * Some processes have been requeued on this PI-futex | ||
| 102 | */ | ||
| 103 | #define FUTEX_WAITER_REQUEUED 0x20000000 | ||
| 104 | |||
| 105 | /* | ||
| 86 | * The rest of the robust-futex field is for the TID: | 106 | * The rest of the robust-futex field is for the TID: |
| 87 | */ | 107 | */ |
| 88 | #define FUTEX_TID_MASK 0x3fffffff | 108 | #define FUTEX_TID_MASK 0x0fffffff |
| 89 | 109 | ||
| 90 | /* | 110 | /* |
| 91 | * This limit protects against a deliberately circular list. | 111 | * This limit protects against a deliberately circular list. |
| @@ -94,7 +114,7 @@ struct robust_list_head { | |||
| 94 | #define ROBUST_LIST_LIMIT 2048 | 114 | #define ROBUST_LIST_LIMIT 2048 |
| 95 | 115 | ||
| 96 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
| 97 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, | 117 | long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout, |
| 98 | u32 __user *uaddr2, u32 val2, u32 val3); | 118 | u32 __user *uaddr2, u32 val2, u32 val3); |
| 99 | 119 | ||
| 100 | extern int | 120 | extern int |
| @@ -106,9 +126,20 @@ handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); | |||
| 106 | * Don't rearrange members without looking at hash_futex(). | 126 | * Don't rearrange members without looking at hash_futex(). |
| 107 | * | 127 | * |
| 108 | * offset is aligned to a multiple of sizeof(u32) (== 4) by definition. | 128 | * offset is aligned to a multiple of sizeof(u32) (== 4) by definition. |
| 109 | * We set bit 0 to indicate if it's an inode-based key. | 129 | * We use the two low order bits of offset to tell what is the kind of key : |
| 110 | */ | 130 | * 00 : Private process futex (PTHREAD_PROCESS_PRIVATE) |
| 131 | * (no reference on an inode or mm) | ||
| 132 | * 01 : Shared futex (PTHREAD_PROCESS_SHARED) | ||
| 133 | * mapped on a file (reference on the underlying inode) | ||
| 134 | * 10 : Shared futex (PTHREAD_PROCESS_SHARED) | ||
| 135 | * (but private mapping on an mm, and reference taken on it) | ||
| 136 | */ | ||
| 137 | |||
| 138 | #define FUT_OFF_INODE 1 /* We set bit 0 if key has a reference on inode */ | ||
| 139 | #define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ | ||
| 140 | |||
| 111 | union futex_key { | 141 | union futex_key { |
| 142 | u32 __user *uaddr; | ||
| 112 | struct { | 143 | struct { |
| 113 | unsigned long pgoff; | 144 | unsigned long pgoff; |
| 114 | struct inode *inode; | 145 | struct inode *inode; |
| @@ -125,7 +156,8 @@ union futex_key { | |||
| 125 | int offset; | 156 | int offset; |
| 126 | } both; | 157 | } both; |
| 127 | }; | 158 | }; |
| 128 | int get_futex_key(u32 __user *uaddr, union futex_key *key); | 159 | int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared, |
| 160 | union futex_key *key); | ||
| 129 | void get_futex_key_refs(union futex_key *key); | 161 | void get_futex_key_refs(union futex_key *key); |
| 130 | void drop_futex_key_refs(union futex_key *key); | 162 | void drop_futex_key_refs(union futex_key *key); |
| 131 | 163 | ||
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h index 80764f40be75..886f5faa08cb 100644 --- a/include/linux/generic_acl.h +++ b/include/linux/generic_acl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * fs/generic_acl.c | 2 | * include/linux/generic_acl.h |
| 3 | * | 3 | * |
| 4 | * (C) 2005 Andreas Gruenbacher <agruen@suse.de> | 4 | * (C) 2005 Andreas Gruenbacher <agruen@suse.de> |
| 5 | * | 5 | * |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 2c65da7cabb2..f589559cf070 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -413,6 +413,7 @@ char *disk_name (struct gendisk *hd, int part, char *buf); | |||
| 413 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 413 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
| 414 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); | 414 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); |
| 415 | extern void delete_partition(struct gendisk *, int); | 415 | extern void delete_partition(struct gendisk *, int); |
| 416 | extern void printk_all_partitions(void); | ||
| 416 | 417 | ||
| 417 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | 418 | extern struct gendisk *alloc_disk_node(int minors, int node_id); |
| 418 | extern struct gendisk *alloc_disk(int minors); | 419 | extern struct gendisk *alloc_disk(int minors); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 97a36c3d96e2..0d2ef0b082a6 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -176,10 +176,6 @@ extern void FASTCALL(free_cold_page(struct page *page)); | |||
| 176 | #define free_page(addr) free_pages((addr),0) | 176 | #define free_page(addr) free_pages((addr),0) |
| 177 | 177 | ||
| 178 | void page_alloc_init(void); | 178 | void page_alloc_init(void); |
| 179 | #ifdef CONFIG_NUMA | 179 | void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); |
| 180 | void drain_node_pages(int node); | ||
| 181 | #else | ||
| 182 | static inline void drain_node_pages(int node) { }; | ||
| 183 | #endif | ||
| 184 | 180 | ||
| 185 | #endif /* __LINUX_GFP_H */ | 181 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index a515eb0afdfb..98e2cce996a4 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -94,17 +94,26 @@ static inline void clear_highpage(struct page *page) | |||
| 94 | 94 | ||
| 95 | /* | 95 | /* |
| 96 | * Same but also flushes aliased cache contents to RAM. | 96 | * Same but also flushes aliased cache contents to RAM. |
| 97 | * | ||
| 98 | * This must be a macro because KM_USER0 and friends aren't defined if | ||
| 99 | * !CONFIG_HIGHMEM | ||
| 97 | */ | 100 | */ |
| 98 | static inline void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size) | 101 | #define zero_user_page(page, offset, size, km_type) \ |
| 102 | do { \ | ||
| 103 | void *kaddr; \ | ||
| 104 | \ | ||
| 105 | BUG_ON((offset) + (size) > PAGE_SIZE); \ | ||
| 106 | \ | ||
| 107 | kaddr = kmap_atomic(page, km_type); \ | ||
| 108 | memset((char *)kaddr + (offset), 0, (size)); \ | ||
| 109 | flush_dcache_page(page); \ | ||
| 110 | kunmap_atomic(kaddr, (km_type)); \ | ||
| 111 | } while (0) | ||
| 112 | |||
| 113 | static inline void __deprecated memclear_highpage_flush(struct page *page, | ||
| 114 | unsigned int offset, unsigned int size) | ||
| 99 | { | 115 | { |
| 100 | void *kaddr; | 116 | zero_user_page(page, offset, size, KM_USER0); |
| 101 | |||
| 102 | BUG_ON(offset + size > PAGE_SIZE); | ||
| 103 | |||
| 104 | kaddr = kmap_atomic(page, KM_USER0); | ||
| 105 | memset((char *)kaddr + offset, 0, size); | ||
| 106 | flush_dcache_page(page); | ||
| 107 | kunmap_atomic(kaddr, KM_USER0); | ||
| 108 | } | 117 | } |
| 109 | 118 | ||
| 110 | #ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE | 119 | #ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE |
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index 9ee0f800592f..111334f5b922 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | /* ------------------------------------------------------------------------- */ | 19 | /* ------------------------------------------------------------------------- */ |
| 20 | 20 | ||
| 21 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | 21 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even |
| 22 | Frodo Looijaard <frodol@dds.nl> */ | 22 | Frodo Looijaard <frodol@dds.nl> */ |
| 23 | 23 | ||
| 24 | #ifndef _LINUX_I2C_ALGO_BIT_H | 24 | #ifndef _LINUX_I2C_ALGO_BIT_H |
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h index 994eb86f882c..77afbb60fd11 100644 --- a/include/linux/i2c-algo-pcf.h +++ b/include/linux/i2c-algo-pcf.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 20 | /* ------------------------------------------------------------------------- */ | 20 | /* ------------------------------------------------------------------------- */ |
| 21 | 21 | ||
| 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even |
| 23 | Frodo Looijaard <frodol@dds.nl> */ | 23 | Frodo Looijaard <frodol@dds.nl> */ |
| 24 | 24 | ||
| 25 | #ifndef _LINUX_I2C_ALGO_PCF_H | 25 | #ifndef _LINUX_I2C_ALGO_PCF_H |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 795102309bf1..45170b2fa253 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -95,7 +95,7 @@ extern struct group_info init_groups; | |||
| 95 | #define INIT_TASK(tsk) \ | 95 | #define INIT_TASK(tsk) \ |
| 96 | { \ | 96 | { \ |
| 97 | .state = 0, \ | 97 | .state = 0, \ |
| 98 | .thread_info = &init_thread_info, \ | 98 | .stack = &init_thread_info, \ |
| 99 | .usage = ATOMIC_INIT(2), \ | 99 | .usage = ATOMIC_INIT(2), \ |
| 100 | .flags = 0, \ | 100 | .flags = 0, \ |
| 101 | .lock_depth = -1, \ | 101 | .lock_depth = -1, \ |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 09d8f105a5a8..945ba3110874 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
| 17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
| 18 | * | 18 | * |
| 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
| 20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
| 21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
| 22 | * | 22 | * |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 1c65e7a9f186..00dd957e245b 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -30,4 +30,7 @@ void kthread_bind(struct task_struct *k, unsigned int cpu); | |||
| 30 | int kthread_stop(struct task_struct *k); | 30 | int kthread_stop(struct task_struct *k); |
| 31 | int kthread_should_stop(void); | 31 | int kthread_should_stop(void); |
| 32 | 32 | ||
| 33 | int kthreadd(void *unused); | ||
| 34 | extern struct task_struct *kthreadd_task; | ||
| 35 | |||
| 33 | #endif /* _LINUX_KTHREAD_H */ | 36 | #endif /* _LINUX_KTHREAD_H */ |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 81bb9c7a4eb3..c762954bda14 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | * plain scalar nanosecond based representation can be selected by the | 43 | * plain scalar nanosecond based representation can be selected by the |
| 44 | * config switch CONFIG_KTIME_SCALAR. | 44 | * config switch CONFIG_KTIME_SCALAR. |
| 45 | */ | 45 | */ |
| 46 | typedef union { | 46 | union ktime { |
| 47 | s64 tv64; | 47 | s64 tv64; |
| 48 | #if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR) | 48 | #if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR) |
| 49 | struct { | 49 | struct { |
| @@ -54,7 +54,9 @@ typedef union { | |||
| 54 | # endif | 54 | # endif |
| 55 | } tv; | 55 | } tv; |
| 56 | #endif | 56 | #endif |
| 57 | } ktime_t; | 57 | }; |
| 58 | |||
| 59 | typedef union ktime ktime_t; /* Kill this */ | ||
| 58 | 60 | ||
| 59 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | 61 | #define KTIME_MAX ((s64)~((u64)1 << 63)) |
| 60 | #if (BITS_PER_LONG == 64) | 62 | #if (BITS_PER_LONG == 64) |
diff --git a/include/linux/mca.h b/include/linux/mca.h index 5cff2923092b..37972704617f 100644 --- a/include/linux/mca.h +++ b/include/linux/mca.h | |||
| @@ -94,6 +94,7 @@ struct mca_bus { | |||
| 94 | struct mca_driver { | 94 | struct mca_driver { |
| 95 | const short *id_table; | 95 | const short *id_table; |
| 96 | void *driver_data; | 96 | void *driver_data; |
| 97 | int integrated_id; | ||
| 97 | struct device_driver driver; | 98 | struct device_driver driver; |
| 98 | }; | 99 | }; |
| 99 | #define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver) | 100 | #define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver) |
| @@ -125,6 +126,7 @@ extern enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev); | |||
| 125 | extern struct bus_type mca_bus_type; | 126 | extern struct bus_type mca_bus_type; |
| 126 | 127 | ||
| 127 | extern int mca_register_driver(struct mca_driver *drv); | 128 | extern int mca_register_driver(struct mca_driver *drv); |
| 129 | extern int mca_register_driver_integrated(struct mca_driver *, int); | ||
| 128 | extern void mca_unregister_driver(struct mca_driver *drv); | 130 | extern void mca_unregister_driver(struct mca_driver *drv); |
| 129 | 131 | ||
| 130 | /* WARNING: only called by the boot time device setup */ | 132 | /* WARNING: only called by the boot time device setup */ |
diff --git a/include/linux/meye.h b/include/linux/meye.h index 11ec45e9a132..39fd9c8ddd4b 100644 --- a/include/linux/meye.h +++ b/include/linux/meye.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> | 4 | * Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
| 7 | * | 7 | * |
| 8 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> | 8 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> |
| 9 | * | 9 | * |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2f1544e83042..d09b1345a3a1 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -83,6 +83,9 @@ struct per_cpu_pages { | |||
| 83 | 83 | ||
| 84 | struct per_cpu_pageset { | 84 | struct per_cpu_pageset { |
| 85 | struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ | 85 | struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ |
| 86 | #ifdef CONFIG_NUMA | ||
| 87 | s8 expire; | ||
| 88 | #endif | ||
| 86 | #ifdef CONFIG_SMP | 89 | #ifdef CONFIG_SMP |
| 87 | s8 stat_threshold; | 90 | s8 stat_threshold; |
| 88 | s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; | 91 | s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; |
diff --git a/include/linux/module.h b/include/linux/module.h index 6d3dc9c4ff96..792d483c9af7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -356,6 +356,9 @@ struct module | |||
| 356 | keeping pointers to this stuff */ | 356 | keeping pointers to this stuff */ |
| 357 | char *args; | 357 | char *args; |
| 358 | }; | 358 | }; |
| 359 | #ifndef MODULE_ARCH_INIT | ||
| 360 | #define MODULE_ARCH_INIT {} | ||
| 361 | #endif | ||
| 359 | 362 | ||
| 360 | /* FIXME: It'd be nice to isolate modules during init, too, so they | 363 | /* FIXME: It'd be nice to isolate modules during init, too, so they |
| 361 | aren't used before they (may) fail. But presently too much code | 364 | aren't used before they (may) fail. But presently too much code |
diff --git a/include/linux/mount.h b/include/linux/mount.h index dab69afee2fa..6d3047d8c91c 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -33,7 +33,7 @@ struct mnt_namespace; | |||
| 33 | 33 | ||
| 34 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ | 34 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ |
| 35 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ | 35 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ |
| 36 | #define MNT_PNODE_MASK 0x3000 /* propogation flag mask */ | 36 | #define MNT_PNODE_MASK 0x3000 /* propagation flag mask */ |
| 37 | 37 | ||
| 38 | struct vfsmount { | 38 | struct vfsmount { |
| 39 | struct list_head mnt_hash; | 39 | struct list_head mnt_hash; |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index b81bc2adaeff..0d50ea3df689 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -121,11 +121,12 @@ static inline int fastcall mutex_is_locked(struct mutex *lock) | |||
| 121 | * Also see Documentation/mutex-design.txt. | 121 | * Also see Documentation/mutex-design.txt. |
| 122 | */ | 122 | */ |
| 123 | extern void fastcall mutex_lock(struct mutex *lock); | 123 | extern void fastcall mutex_lock(struct mutex *lock); |
| 124 | extern int fastcall mutex_lock_interruptible(struct mutex *lock); | 124 | extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock); |
| 125 | 125 | ||
| 126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 126 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 127 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 127 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
| 128 | extern int mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass); | 128 | extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, |
| 129 | unsigned int subclass); | ||
| 129 | #else | 130 | #else |
| 130 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) | 131 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock) |
| 131 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) | 132 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) |
diff --git a/include/linux/nfs4_acl.h b/include/linux/nfs4_acl.h index 409b6e02f337..c9c05a78e9bb 100644 --- a/include/linux/nfs4_acl.h +++ b/include/linux/nfs4_acl.h | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | #define NFS4_ACL_MAX 170 | 44 | #define NFS4_ACL_MAX 170 |
| 45 | 45 | ||
| 46 | struct nfs4_acl *nfs4_acl_new(int); | 46 | struct nfs4_acl *nfs4_acl_new(int); |
| 47 | void nfs4_acl_add_ace(struct nfs4_acl *, u32, u32, u32, int, uid_t); | ||
| 48 | int nfs4_acl_get_whotype(char *, u32); | 47 | int nfs4_acl_get_whotype(char *, u32); |
| 49 | int nfs4_acl_write_who(int who, char *p); | 48 | int nfs4_acl_write_who(int who, char *p); |
| 50 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, | 49 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 10a43ed0527e..9431101bf876 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
| @@ -112,32 +112,40 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh); | |||
| 112 | 112 | ||
| 113 | #ifdef __KERNEL__ | 113 | #ifdef __KERNEL__ |
| 114 | 114 | ||
| 115 | extern int atomic_notifier_chain_register(struct atomic_notifier_head *, | 115 | extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh, |
| 116 | struct notifier_block *); | 116 | struct notifier_block *nb); |
| 117 | extern int blocking_notifier_chain_register(struct blocking_notifier_head *, | 117 | extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh, |
| 118 | struct notifier_block *); | 118 | struct notifier_block *nb); |
| 119 | extern int raw_notifier_chain_register(struct raw_notifier_head *, | 119 | extern int raw_notifier_chain_register(struct raw_notifier_head *nh, |
| 120 | struct notifier_block *); | 120 | struct notifier_block *nb); |
| 121 | extern int srcu_notifier_chain_register(struct srcu_notifier_head *, | 121 | extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, |
| 122 | struct notifier_block *); | 122 | struct notifier_block *nb); |
| 123 | 123 | ||
| 124 | extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *, | 124 | extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, |
| 125 | struct notifier_block *); | 125 | struct notifier_block *nb); |
| 126 | extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *, | 126 | extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, |
| 127 | struct notifier_block *); | 127 | struct notifier_block *nb); |
| 128 | extern int raw_notifier_chain_unregister(struct raw_notifier_head *, | 128 | extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh, |
| 129 | struct notifier_block *); | 129 | struct notifier_block *nb); |
| 130 | extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *, | 130 | extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh, |
| 131 | struct notifier_block *); | 131 | struct notifier_block *nb); |
| 132 | 132 | ||
| 133 | extern int atomic_notifier_call_chain(struct atomic_notifier_head *, | 133 | extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh, |
| 134 | unsigned long val, void *v); | 134 | unsigned long val, void *v); |
| 135 | extern int blocking_notifier_call_chain(struct blocking_notifier_head *, | 135 | extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh, |
| 136 | unsigned long val, void *v, int nr_to_call, int *nr_calls); | ||
| 137 | extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh, | ||
| 136 | unsigned long val, void *v); | 138 | unsigned long val, void *v); |
| 137 | extern int raw_notifier_call_chain(struct raw_notifier_head *, | 139 | extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh, |
| 140 | unsigned long val, void *v, int nr_to_call, int *nr_calls); | ||
| 141 | extern int raw_notifier_call_chain(struct raw_notifier_head *nh, | ||
| 138 | unsigned long val, void *v); | 142 | unsigned long val, void *v); |
| 139 | extern int srcu_notifier_call_chain(struct srcu_notifier_head *, | 143 | extern int __raw_notifier_call_chain(struct raw_notifier_head *nh, |
| 144 | unsigned long val, void *v, int nr_to_call, int *nr_calls); | ||
| 145 | extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh, | ||
| 140 | unsigned long val, void *v); | 146 | unsigned long val, void *v); |
| 147 | extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, | ||
| 148 | unsigned long val, void *v, int nr_to_call, int *nr_calls); | ||
| 141 | 149 | ||
| 142 | #define NOTIFY_DONE 0x0000 /* Don't care */ | 150 | #define NOTIFY_DONE 0x0000 /* Don't care */ |
| 143 | #define NOTIFY_OK 0x0001 /* Suits me */ | 151 | #define NOTIFY_OK 0x0001 /* Suits me */ |
| @@ -186,6 +194,20 @@ extern int srcu_notifier_call_chain(struct srcu_notifier_head *, | |||
| 186 | #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ | 194 | #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ |
| 187 | #define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ | 195 | #define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ |
| 188 | #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ | 196 | #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ |
| 197 | #define CPU_LOCK_ACQUIRE 0x0008 /* Acquire all hotcpu locks */ | ||
| 198 | #define CPU_LOCK_RELEASE 0x0009 /* Release all hotcpu locks */ | ||
| 199 | |||
| 200 | /* Used for CPU hotplug events occuring while tasks are frozen due to a suspend | ||
| 201 | * operation in progress | ||
| 202 | */ | ||
| 203 | #define CPU_TASKS_FROZEN 0x0010 | ||
| 204 | |||
| 205 | #define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN) | ||
| 206 | #define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN) | ||
| 207 | #define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN) | ||
| 208 | #define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN) | ||
| 209 | #define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN) | ||
| 210 | #define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN) | ||
| 189 | 211 | ||
| 190 | #endif /* __KERNEL__ */ | 212 | #endif /* __KERNEL__ */ |
| 191 | #endif /* _LINUX_NOTIFIER_H */ | 213 | #endif /* _LINUX_NOTIFIER_H */ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 6e8fa3049e5d..87545e0f0b58 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -107,26 +107,11 @@ typedef int __bitwise suspend_state_t; | |||
| 107 | #define PM_SUSPEND_ON ((__force suspend_state_t) 0) | 107 | #define PM_SUSPEND_ON ((__force suspend_state_t) 0) |
| 108 | #define PM_SUSPEND_STANDBY ((__force suspend_state_t) 1) | 108 | #define PM_SUSPEND_STANDBY ((__force suspend_state_t) 1) |
| 109 | #define PM_SUSPEND_MEM ((__force suspend_state_t) 3) | 109 | #define PM_SUSPEND_MEM ((__force suspend_state_t) 3) |
| 110 | #define PM_SUSPEND_DISK ((__force suspend_state_t) 4) | 110 | #define PM_SUSPEND_MAX ((__force suspend_state_t) 4) |
| 111 | #define PM_SUSPEND_MAX ((__force suspend_state_t) 5) | ||
| 112 | |||
| 113 | typedef int __bitwise suspend_disk_method_t; | ||
| 114 | |||
| 115 | /* invalid must be 0 so struct pm_ops initialisers can leave it out */ | ||
| 116 | #define PM_DISK_INVALID ((__force suspend_disk_method_t) 0) | ||
| 117 | #define PM_DISK_PLATFORM ((__force suspend_disk_method_t) 1) | ||
| 118 | #define PM_DISK_SHUTDOWN ((__force suspend_disk_method_t) 2) | ||
| 119 | #define PM_DISK_REBOOT ((__force suspend_disk_method_t) 3) | ||
| 120 | #define PM_DISK_TEST ((__force suspend_disk_method_t) 4) | ||
| 121 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 5) | ||
| 122 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 6) | ||
| 123 | 111 | ||
| 124 | /** | 112 | /** |
| 125 | * struct pm_ops - Callbacks for managing platform dependent suspend states. | 113 | * struct pm_ops - Callbacks for managing platform dependent suspend states. |
| 126 | * @valid: Callback to determine whether the given state can be entered. | 114 | * @valid: Callback to determine whether the given state can be entered. |
| 127 | * If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is | ||
| 128 | * always valid and never passed to this call. If not assigned, | ||
| 129 | * no suspend states are valid. | ||
| 130 | * Valid states are advertised in /sys/power/state but can still | 115 | * Valid states are advertised in /sys/power/state but can still |
| 131 | * be rejected by prepare or enter if the conditions aren't right. | 116 | * be rejected by prepare or enter if the conditions aren't right. |
| 132 | * There is a %pm_valid_only_mem function available that can be assigned | 117 | * There is a %pm_valid_only_mem function available that can be assigned |
| @@ -140,24 +125,12 @@ typedef int __bitwise suspend_disk_method_t; | |||
| 140 | * | 125 | * |
| 141 | * @finish: Called when the system has left the given state and all devices | 126 | * @finish: Called when the system has left the given state and all devices |
| 142 | * are resumed. The return value is ignored. | 127 | * are resumed. The return value is ignored. |
| 143 | * | ||
| 144 | * @pm_disk_mode: The generic code always allows one of the shutdown methods | ||
| 145 | * %PM_DISK_SHUTDOWN, %PM_DISK_REBOOT, %PM_DISK_TEST and | ||
| 146 | * %PM_DISK_TESTPROC. If this variable is set, the mode it is set | ||
| 147 | * to is allowed in addition to those modes and is also made default. | ||
| 148 | * When this mode is sent selected, the @prepare call will be called | ||
| 149 | * before suspending to disk (if present), the @enter call should be | ||
| 150 | * present and will be called after all state has been saved and the | ||
| 151 | * machine is ready to be powered off; the @finish callback is called | ||
| 152 | * after state has been restored. All these calls are called with | ||
| 153 | * %PM_SUSPEND_DISK as the state. | ||
| 154 | */ | 128 | */ |
| 155 | struct pm_ops { | 129 | struct pm_ops { |
| 156 | int (*valid)(suspend_state_t state); | 130 | int (*valid)(suspend_state_t state); |
| 157 | int (*prepare)(suspend_state_t state); | 131 | int (*prepare)(suspend_state_t state); |
| 158 | int (*enter)(suspend_state_t state); | 132 | int (*enter)(suspend_state_t state); |
| 159 | int (*finish)(suspend_state_t state); | 133 | int (*finish)(suspend_state_t state); |
| 160 | suspend_disk_method_t pm_disk_mode; | ||
| 161 | }; | 134 | }; |
| 162 | 135 | ||
| 163 | /** | 136 | /** |
| @@ -276,8 +249,6 @@ extern void device_power_up(void); | |||
| 276 | extern void device_resume(void); | 249 | extern void device_resume(void); |
| 277 | 250 | ||
| 278 | #ifdef CONFIG_PM | 251 | #ifdef CONFIG_PM |
| 279 | extern suspend_disk_method_t pm_disk_mode; | ||
| 280 | |||
| 281 | extern int device_suspend(pm_message_t state); | 252 | extern int device_suspend(pm_message_t state); |
| 282 | extern int device_prepare_suspend(pm_message_t state); | 253 | extern int device_prepare_suspend(pm_message_t state); |
| 283 | 254 | ||
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 0deb842541ac..f9e77d2ee320 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -87,10 +87,10 @@ do { \ | |||
| 87 | * management of their lifetimes must be completely managed by API users. | 87 | * management of their lifetimes must be completely managed by API users. |
| 88 | * | 88 | * |
| 89 | * For API usage, in general, | 89 | * For API usage, in general, |
| 90 | * - any function _modifying_ the the tree or tags (inserting or deleting | 90 | * - any function _modifying_ the tree or tags (inserting or deleting |
| 91 | * items, setting or clearing tags must exclude other modifications, and | 91 | * items, setting or clearing tags must exclude other modifications, and |
| 92 | * exclude any functions reading the tree. | 92 | * exclude any functions reading the tree. |
| 93 | * - any function _reading_ the the tree or tags (looking up items or tags, | 93 | * - any function _reading_ the tree or tags (looking up items or tags, |
| 94 | * gang lookups) must exclude modifications to the tree, but may occur | 94 | * gang lookups) must exclude modifications to the tree, but may occur |
| 95 | * concurrently with other readers. | 95 | * concurrently with other readers. |
| 96 | * | 96 | * |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index de72c49747c8..a121f36f4437 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
| @@ -201,7 +201,6 @@ struct mddev_s | |||
| 201 | struct mutex reconfig_mutex; | 201 | struct mutex reconfig_mutex; |
| 202 | atomic_t active; | 202 | atomic_t active; |
| 203 | 203 | ||
| 204 | int changed; /* true if we might need to reread partition info */ | ||
| 205 | int degraded; /* whether md should consider | 204 | int degraded; /* whether md should consider |
| 206 | * adding a spare | 205 | * adding a spare |
| 207 | */ | 206 | */ |
diff --git a/include/linux/relay.h b/include/linux/relay.h index 759a0f97bec2..6cd8c4425fc7 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
| 15 | #include <linux/timer.h> | ||
| 15 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
| 16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
| @@ -38,7 +39,7 @@ struct rchan_buf | |||
| 38 | size_t subbufs_consumed; /* count of sub-buffers consumed */ | 39 | size_t subbufs_consumed; /* count of sub-buffers consumed */ |
| 39 | struct rchan *chan; /* associated channel */ | 40 | struct rchan *chan; /* associated channel */ |
| 40 | wait_queue_head_t read_wait; /* reader wait queue */ | 41 | wait_queue_head_t read_wait; /* reader wait queue */ |
| 41 | struct delayed_work wake_readers; /* reader wake-up work struct */ | 42 | struct timer_list timer; /* reader wake-up timer */ |
| 42 | struct dentry *dentry; /* channel file dentry */ | 43 | struct dentry *dentry; /* channel file dentry */ |
| 43 | struct kref kref; /* channel buffer refcount */ | 44 | struct kref kref; /* channel buffer refcount */ |
| 44 | struct page **page_array; /* array of current buffer pages */ | 45 | struct page **page_array; /* array of current buffer pages */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 3d95c480f58d..17b72d88c4cb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -817,7 +817,7 @@ struct prio_array; | |||
| 817 | 817 | ||
| 818 | struct task_struct { | 818 | struct task_struct { |
| 819 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 819 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
| 820 | struct thread_info *thread_info; | 820 | void *stack; |
| 821 | atomic_t usage; | 821 | atomic_t usage; |
| 822 | unsigned int flags; /* per process flags, defined below */ | 822 | unsigned int flags; /* per process flags, defined below */ |
| 823 | unsigned int ptrace; | 823 | unsigned int ptrace; |
| @@ -1317,6 +1317,7 @@ extern int in_egroup_p(gid_t); | |||
| 1317 | 1317 | ||
| 1318 | extern void proc_caches_init(void); | 1318 | extern void proc_caches_init(void); |
| 1319 | extern void flush_signals(struct task_struct *); | 1319 | extern void flush_signals(struct task_struct *); |
| 1320 | extern void ignore_signals(struct task_struct *); | ||
| 1320 | extern void flush_signal_handlers(struct task_struct *, int force_default); | 1321 | extern void flush_signal_handlers(struct task_struct *, int force_default); |
| 1321 | extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); | 1322 | extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); |
| 1322 | 1323 | ||
| @@ -1512,8 +1513,8 @@ static inline void unlock_task_sighand(struct task_struct *tsk, | |||
| 1512 | 1513 | ||
| 1513 | #ifndef __HAVE_THREAD_FUNCTIONS | 1514 | #ifndef __HAVE_THREAD_FUNCTIONS |
| 1514 | 1515 | ||
| 1515 | #define task_thread_info(task) (task)->thread_info | 1516 | #define task_thread_info(task) ((struct thread_info *)(task)->stack) |
| 1516 | #define task_stack_page(task) ((void*)((task)->thread_info)) | 1517 | #define task_stack_page(task) ((task)->stack) |
| 1517 | 1518 | ||
| 1518 | static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) | 1519 | static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) |
| 1519 | { | 1520 | { |
| @@ -1523,7 +1524,7 @@ static inline void setup_thread_stack(struct task_struct *p, struct task_struct | |||
| 1523 | 1524 | ||
| 1524 | static inline unsigned long *end_of_stack(struct task_struct *p) | 1525 | static inline unsigned long *end_of_stack(struct task_struct *p) |
| 1525 | { | 1526 | { |
| 1526 | return (unsigned long *)(p->thread_info + 1); | 1527 | return (unsigned long *)(task_thread_info(p) + 1); |
| 1527 | } | 1528 | } |
| 1528 | 1529 | ||
| 1529 | #endif | 1530 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 47e82c120f9a..9eb9e0fe0331 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -322,7 +322,7 @@ struct request_sock; | |||
| 322 | * @dir contains the inode structure of parent of the new file. | 322 | * @dir contains the inode structure of parent of the new file. |
| 323 | * @dentry contains the dentry structure of the new file. | 323 | * @dentry contains the dentry structure of the new file. |
| 324 | * @mode contains the mode of the new file. | 324 | * @mode contains the mode of the new file. |
| 325 | * @dev contains the the device number. | 325 | * @dev contains the device number. |
| 326 | * Return 0 if permission is granted. | 326 | * Return 0 if permission is granted. |
| 327 | * @inode_rename: | 327 | * @inode_rename: |
| 328 | * Check for permission to rename a file or directory. | 328 | * Check for permission to rename a file or directory. |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 14749056dd63..3fa0fab4a04b 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -243,6 +243,131 @@ extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, | |||
| 243 | 243 | ||
| 244 | extern struct kmem_cache *sighand_cachep; | 244 | extern struct kmem_cache *sighand_cachep; |
| 245 | 245 | ||
| 246 | /* | ||
| 247 | * In POSIX a signal is sent either to a specific thread (Linux task) | ||
| 248 | * or to the process as a whole (Linux thread group). How the signal | ||
| 249 | * is sent determines whether it's to one thread or the whole group, | ||
| 250 | * which determines which signal mask(s) are involved in blocking it | ||
| 251 | * from being delivered until later. When the signal is delivered, | ||
| 252 | * either it's caught or ignored by a user handler or it has a default | ||
| 253 | * effect that applies to the whole thread group (POSIX process). | ||
| 254 | * | ||
| 255 | * The possible effects an unblocked signal set to SIG_DFL can have are: | ||
| 256 | * ignore - Nothing Happens | ||
| 257 | * terminate - kill the process, i.e. all threads in the group, | ||
| 258 | * similar to exit_group. The group leader (only) reports | ||
| 259 | * WIFSIGNALED status to its parent. | ||
| 260 | * coredump - write a core dump file describing all threads using | ||
| 261 | * the same mm and then kill all those threads | ||
| 262 | * stop - stop all the threads in the group, i.e. TASK_STOPPED state | ||
| 263 | * | ||
| 264 | * SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. | ||
| 265 | * Other signals when not blocked and set to SIG_DFL behaves as follows. | ||
| 266 | * The job control signals also have other special effects. | ||
| 267 | * | ||
| 268 | * +--------------------+------------------+ | ||
| 269 | * | POSIX signal | default action | | ||
| 270 | * +--------------------+------------------+ | ||
| 271 | * | SIGHUP | terminate | | ||
| 272 | * | SIGINT | terminate | | ||
| 273 | * | SIGQUIT | coredump | | ||
| 274 | * | SIGILL | coredump | | ||
| 275 | * | SIGTRAP | coredump | | ||
| 276 | * | SIGABRT/SIGIOT | coredump | | ||
| 277 | * | SIGBUS | coredump | | ||
| 278 | * | SIGFPE | coredump | | ||
| 279 | * | SIGKILL | terminate(+) | | ||
| 280 | * | SIGUSR1 | terminate | | ||
| 281 | * | SIGSEGV | coredump | | ||
| 282 | * | SIGUSR2 | terminate | | ||
| 283 | * | SIGPIPE | terminate | | ||
| 284 | * | SIGALRM | terminate | | ||
| 285 | * | SIGTERM | terminate | | ||
| 286 | * | SIGCHLD | ignore | | ||
| 287 | * | SIGCONT | ignore(*) | | ||
| 288 | * | SIGSTOP | stop(*)(+) | | ||
| 289 | * | SIGTSTP | stop(*) | | ||
| 290 | * | SIGTTIN | stop(*) | | ||
| 291 | * | SIGTTOU | stop(*) | | ||
| 292 | * | SIGURG | ignore | | ||
| 293 | * | SIGXCPU | coredump | | ||
| 294 | * | SIGXFSZ | coredump | | ||
| 295 | * | SIGVTALRM | terminate | | ||
| 296 | * | SIGPROF | terminate | | ||
| 297 | * | SIGPOLL/SIGIO | terminate | | ||
| 298 | * | SIGSYS/SIGUNUSED | coredump | | ||
| 299 | * | SIGSTKFLT | terminate | | ||
| 300 | * | SIGWINCH | ignore | | ||
| 301 | * | SIGPWR | terminate | | ||
| 302 | * | SIGRTMIN-SIGRTMAX | terminate | | ||
| 303 | * +--------------------+------------------+ | ||
| 304 | * | non-POSIX signal | default action | | ||
| 305 | * +--------------------+------------------+ | ||
| 306 | * | SIGEMT | coredump | | ||
| 307 | * +--------------------+------------------+ | ||
| 308 | * | ||
| 309 | * (+) For SIGKILL and SIGSTOP the action is "always", not just "default". | ||
| 310 | * (*) Special job control effects: | ||
| 311 | * When SIGCONT is sent, it resumes the process (all threads in the group) | ||
| 312 | * from TASK_STOPPED state and also clears any pending/queued stop signals | ||
| 313 | * (any of those marked with "stop(*)"). This happens regardless of blocking, | ||
| 314 | * catching, or ignoring SIGCONT. When any stop signal is sent, it clears | ||
| 315 | * any pending/queued SIGCONT signals; this happens regardless of blocking, | ||
| 316 | * catching, or ignored the stop signal, though (except for SIGSTOP) the | ||
| 317 | * default action of stopping the process may happen later or never. | ||
| 318 | */ | ||
| 319 | |||
| 320 | #ifdef SIGEMT | ||
| 321 | #define SIGEMT_MASK rt_sigmask(SIGEMT) | ||
| 322 | #else | ||
| 323 | #define SIGEMT_MASK 0 | ||
| 324 | #endif | ||
| 325 | |||
| 326 | #if SIGRTMIN > BITS_PER_LONG | ||
| 327 | #define rt_sigmask(sig) (1ULL << ((sig)-1)) | ||
| 328 | #else | ||
| 329 | #define rt_sigmask(sig) sigmask(sig) | ||
| 330 | #endif | ||
| 331 | #define siginmask(sig, mask) (rt_sigmask(sig) & (mask)) | ||
| 332 | |||
| 333 | #define SIG_KERNEL_ONLY_MASK (\ | ||
| 334 | rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP)) | ||
| 335 | |||
| 336 | #define SIG_KERNEL_STOP_MASK (\ | ||
| 337 | rt_sigmask(SIGSTOP) | rt_sigmask(SIGTSTP) | \ | ||
| 338 | rt_sigmask(SIGTTIN) | rt_sigmask(SIGTTOU) ) | ||
| 339 | |||
| 340 | #define SIG_KERNEL_COREDUMP_MASK (\ | ||
| 341 | rt_sigmask(SIGQUIT) | rt_sigmask(SIGILL) | \ | ||
| 342 | rt_sigmask(SIGTRAP) | rt_sigmask(SIGABRT) | \ | ||
| 343 | rt_sigmask(SIGFPE) | rt_sigmask(SIGSEGV) | \ | ||
| 344 | rt_sigmask(SIGBUS) | rt_sigmask(SIGSYS) | \ | ||
| 345 | rt_sigmask(SIGXCPU) | rt_sigmask(SIGXFSZ) | \ | ||
| 346 | SIGEMT_MASK ) | ||
| 347 | |||
| 348 | #define SIG_KERNEL_IGNORE_MASK (\ | ||
| 349 | rt_sigmask(SIGCONT) | rt_sigmask(SIGCHLD) | \ | ||
| 350 | rt_sigmask(SIGWINCH) | rt_sigmask(SIGURG) ) | ||
| 351 | |||
| 352 | #define sig_kernel_only(sig) \ | ||
| 353 | (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_ONLY_MASK)) | ||
| 354 | #define sig_kernel_coredump(sig) \ | ||
| 355 | (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_COREDUMP_MASK)) | ||
| 356 | #define sig_kernel_ignore(sig) \ | ||
| 357 | (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_IGNORE_MASK)) | ||
| 358 | #define sig_kernel_stop(sig) \ | ||
| 359 | (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_STOP_MASK)) | ||
| 360 | |||
| 361 | #define sig_needs_tasklist(sig) ((sig) == SIGCONT) | ||
| 362 | |||
| 363 | #define sig_user_defined(t, signr) \ | ||
| 364 | (((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_DFL) && \ | ||
| 365 | ((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_IGN)) | ||
| 366 | |||
| 367 | #define sig_fatal(t, signr) \ | ||
| 368 | (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \ | ||
| 369 | (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL) | ||
| 370 | |||
| 246 | #endif /* __KERNEL__ */ | 371 | #endif /* __KERNEL__ */ |
| 247 | 372 | ||
| 248 | #endif /* _LINUX_SIGNAL_H */ | 373 | #endif /* _LINUX_SIGNAL_H */ |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 7ba23ec8211b..3f70149eabbb 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -83,7 +83,6 @@ void smp_prepare_boot_cpu(void); | |||
| 83 | * These macros fold the SMP functionality into a single CPU system | 83 | * These macros fold the SMP functionality into a single CPU system |
| 84 | */ | 84 | */ |
| 85 | #define raw_smp_processor_id() 0 | 85 | #define raw_smp_processor_id() 0 |
| 86 | #define hard_smp_processor_id() 0 | ||
| 87 | static inline int up_smp_call_function(void) | 86 | static inline int up_smp_call_function(void) |
| 88 | { | 87 | { |
| 89 | return 0; | 88 | return 0; |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index f56d24734950..34d4b075f7b8 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> | 6 | * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> |
| 7 | 7 | ||
| 8 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 8 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
| 9 | * | 9 | * |
| 10 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> | 10 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> |
| 11 | * | 11 | * |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 35fa4d5aadd0..4a7ae8ab6eb8 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -396,4 +396,23 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t); | |||
| 396 | 396 | ||
| 397 | #define RPC_MAX_ADDRBUFLEN (63U) | 397 | #define RPC_MAX_ADDRBUFLEN (63U) |
| 398 | 398 | ||
| 399 | /* | ||
| 400 | * When we want to reduce the size of the reserved space in the response | ||
| 401 | * buffer, we need to take into account the size of any checksum data that | ||
| 402 | * may be at the end of the packet. This is difficult to determine exactly | ||
| 403 | * for all cases without actually generating the checksum, so we just use a | ||
| 404 | * static value. | ||
| 405 | */ | ||
| 406 | static inline void | ||
| 407 | svc_reserve_auth(struct svc_rqst *rqstp, int space) | ||
| 408 | { | ||
| 409 | int added_space = 0; | ||
| 410 | |||
| 411 | switch(rqstp->rq_authop->flavour) { | ||
| 412 | case RPC_AUTH_GSS: | ||
| 413 | added_space = RPC_MAX_AUTH_SIZE; | ||
| 414 | } | ||
| 415 | return svc_reserve(rqstp, space + added_space); | ||
| 416 | } | ||
| 417 | |||
| 399 | #endif /* SUNRPC_SVC_H */ | 418 | #endif /* SUNRPC_SVC_H */ |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 7909687557bf..e21dd93ac4b7 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -37,7 +37,8 @@ struct svc_sock { | |||
| 37 | 37 | ||
| 38 | atomic_t sk_reserved; /* space on outq that is reserved */ | 38 | atomic_t sk_reserved; /* space on outq that is reserved */ |
| 39 | 39 | ||
| 40 | spinlock_t sk_defer_lock; /* protects sk_deferred */ | 40 | spinlock_t sk_lock; /* protects sk_deferred and |
| 41 | * sk_info_authunix */ | ||
| 41 | struct list_head sk_deferred; /* deferred requests that need to | 42 | struct list_head sk_deferred; /* deferred requests that need to |
| 42 | * be revisted */ | 43 | * be revisted */ |
| 43 | struct mutex sk_mutex; /* to serialize sending data */ | 44 | struct mutex sk_mutex; /* to serialize sending data */ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 1f2f7ba9e709..9c7cb6430666 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -32,6 +32,24 @@ static inline int pm_prepare_console(void) { return 0; } | |||
| 32 | static inline void pm_restore_console(void) {} | 32 | static inline void pm_restore_console(void) {} |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | /** | ||
| 36 | * struct hibernation_ops - hibernation platform support | ||
| 37 | * | ||
| 38 | * The methods in this structure allow a platform to override the default | ||
| 39 | * mechanism of shutting down the machine during a hibernation transition. | ||
| 40 | * | ||
| 41 | * All three methods must be assigned. | ||
| 42 | * | ||
| 43 | * @prepare: prepare system for hibernation | ||
| 44 | * @enter: shut down system after state has been saved to disk | ||
| 45 | * @finish: finish/clean up after state has been reloaded | ||
| 46 | */ | ||
| 47 | struct hibernation_ops { | ||
| 48 | int (*prepare)(void); | ||
| 49 | int (*enter)(void); | ||
| 50 | void (*finish)(void); | ||
| 51 | }; | ||
| 52 | |||
| 35 | #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) | 53 | #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) |
| 36 | /* kernel/power/snapshot.c */ | 54 | /* kernel/power/snapshot.c */ |
| 37 | extern void __register_nosave_region(unsigned long b, unsigned long e, int km); | 55 | extern void __register_nosave_region(unsigned long b, unsigned long e, int km); |
| @@ -47,12 +65,18 @@ extern int swsusp_page_is_forbidden(struct page *); | |||
| 47 | extern void swsusp_set_page_free(struct page *); | 65 | extern void swsusp_set_page_free(struct page *); |
| 48 | extern void swsusp_unset_page_free(struct page *); | 66 | extern void swsusp_unset_page_free(struct page *); |
| 49 | extern unsigned long get_safe_page(gfp_t gfp_mask); | 67 | extern unsigned long get_safe_page(gfp_t gfp_mask); |
| 68 | |||
| 69 | extern void hibernation_set_ops(struct hibernation_ops *ops); | ||
| 70 | extern int hibernate(void); | ||
| 50 | #else | 71 | #else |
| 51 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} | 72 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} |
| 52 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | 73 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} |
| 53 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 74 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
| 54 | static inline void swsusp_set_page_free(struct page *p) {} | 75 | static inline void swsusp_set_page_free(struct page *p) {} |
| 55 | static inline void swsusp_unset_page_free(struct page *p) {} | 76 | static inline void swsusp_unset_page_free(struct page *p) {} |
| 77 | |||
| 78 | static inline void hibernation_set_ops(struct hibernation_ops *ops) {} | ||
| 79 | static inline int hibernate(void) { return -ENOSYS; } | ||
| 56 | #endif /* defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) */ | 80 | #endif /* defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) */ |
| 57 | 81 | ||
| 58 | void save_processor_state(void); | 82 | void save_processor_state(void); |
diff --git a/include/linux/svga.h b/include/linux/svga.h index e1cc552e04fe..13ad0b82ac28 100644 --- a/include/linux/svga.h +++ b/include/linux/svga.h | |||
| @@ -113,6 +113,8 @@ void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); | |||
| 113 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); | 113 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); |
| 114 | void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); | 114 | void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); |
| 115 | int svga_get_tilemax(struct fb_info *info); | 115 | int svga_get_tilemax(struct fb_info *info); |
| 116 | void svga_get_caps(struct fb_info *info, struct fb_blit_caps *caps, | ||
| 117 | struct fb_var_screeninfo *var); | ||
| 116 | 118 | ||
| 117 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); | 119 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); |
| 118 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); | 120 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 1912c6cbef55..3139f4412297 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -576,6 +576,8 @@ asmlinkage long sys_fstatat64(int dfd, char __user *filename, | |||
| 576 | struct stat64 __user *statbuf, int flag); | 576 | struct stat64 __user *statbuf, int flag); |
| 577 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, | 577 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, |
| 578 | int bufsiz); | 578 | int bufsiz); |
| 579 | asmlinkage long sys_utimensat(int dfd, char __user *filename, | ||
| 580 | struct timespec __user *utimes, int flags); | ||
| 579 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | 581 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, |
| 580 | struct compat_timeval __user *t); | 582 | struct compat_timeval __user *t); |
| 581 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | 583 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, |
diff --git a/include/linux/usb.h b/include/linux/usb.h index cfbd2bb8fa2c..94bd38a6d947 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -126,7 +126,7 @@ enum usb_interface_condition { | |||
| 126 | * Each interface may have alternate settings. The initial configuration | 126 | * Each interface may have alternate settings. The initial configuration |
| 127 | * of a device sets altsetting 0, but the device driver can change | 127 | * of a device sets altsetting 0, but the device driver can change |
| 128 | * that setting using usb_set_interface(). Alternate settings are often | 128 | * that setting using usb_set_interface(). Alternate settings are often |
| 129 | * used to control the the use of periodic endpoints, such as by having | 129 | * used to control the use of periodic endpoints, such as by having |
| 130 | * different endpoints use different amounts of reserved USB bandwidth. | 130 | * different endpoints use different amounts of reserved USB bandwidth. |
| 131 | * All standards-conformant USB devices that use isochronous endpoints | 131 | * All standards-conformant USB devices that use isochronous endpoints |
| 132 | * will use them in non-default settings. | 132 | * will use them in non-default settings. |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index acb1f105870c..d9325cf8a134 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -212,8 +212,6 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item); | |||
| 212 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); | 212 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); |
| 213 | 213 | ||
| 214 | void refresh_cpu_vm_stats(int); | 214 | void refresh_cpu_vm_stats(int); |
| 215 | void refresh_vm_stats(void); | ||
| 216 | |||
| 217 | #else /* CONFIG_SMP */ | 215 | #else /* CONFIG_SMP */ |
| 218 | 216 | ||
| 219 | /* | 217 | /* |
| @@ -260,7 +258,6 @@ static inline void __dec_zone_page_state(struct page *page, | |||
| 260 | #define mod_zone_page_state __mod_zone_page_state | 258 | #define mod_zone_page_state __mod_zone_page_state |
| 261 | 259 | ||
| 262 | static inline void refresh_cpu_vm_stats(int cpu) { } | 260 | static inline void refresh_cpu_vm_stats(int cpu) { } |
| 263 | static inline void refresh_vm_stats(void) { } | ||
| 264 | #endif | 261 | #endif |
| 265 | 262 | ||
| 266 | #endif /* _LINUX_VMSTAT_H */ | 263 | #endif /* _LINUX_VMSTAT_H */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index f16ba1e0687d..d555f31c0746 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -24,15 +24,13 @@ typedef void (*work_func_t)(struct work_struct *work); | |||
| 24 | struct work_struct { | 24 | struct work_struct { |
| 25 | atomic_long_t data; | 25 | atomic_long_t data; |
| 26 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ | 26 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ |
| 27 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ | ||
| 28 | #define WORK_STRUCT_FLAG_MASK (3UL) | 27 | #define WORK_STRUCT_FLAG_MASK (3UL) |
| 29 | #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) | 28 | #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) |
| 30 | struct list_head entry; | 29 | struct list_head entry; |
| 31 | work_func_t func; | 30 | work_func_t func; |
| 32 | }; | 31 | }; |
| 33 | 32 | ||
| 34 | #define WORK_DATA_INIT(autorelease) \ | 33 | #define WORK_DATA_INIT() ATOMIC_LONG_INIT(0) |
| 35 | ATOMIC_LONG_INIT((autorelease) << WORK_STRUCT_NOAUTOREL) | ||
| 36 | 34 | ||
| 37 | struct delayed_work { | 35 | struct delayed_work { |
| 38 | struct work_struct work; | 36 | struct work_struct work; |
| @@ -44,14 +42,8 @@ struct execute_work { | |||
| 44 | }; | 42 | }; |
| 45 | 43 | ||
| 46 | #define __WORK_INITIALIZER(n, f) { \ | 44 | #define __WORK_INITIALIZER(n, f) { \ |
| 47 | .data = WORK_DATA_INIT(0), \ | 45 | .data = WORK_DATA_INIT(), \ |
| 48 | .entry = { &(n).entry, &(n).entry }, \ | 46 | .entry = { &(n).entry, &(n).entry }, \ |
| 49 | .func = (f), \ | ||
| 50 | } | ||
| 51 | |||
| 52 | #define __WORK_INITIALIZER_NAR(n, f) { \ | ||
| 53 | .data = WORK_DATA_INIT(1), \ | ||
| 54 | .entry = { &(n).entry, &(n).entry }, \ | ||
| 55 | .func = (f), \ | 47 | .func = (f), \ |
| 56 | } | 48 | } |
| 57 | 49 | ||
| @@ -60,23 +52,12 @@ struct execute_work { | |||
| 60 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | 52 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ |
| 61 | } | 53 | } |
| 62 | 54 | ||
| 63 | #define __DELAYED_WORK_INITIALIZER_NAR(n, f) { \ | ||
| 64 | .work = __WORK_INITIALIZER_NAR((n).work, (f)), \ | ||
| 65 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | ||
| 66 | } | ||
| 67 | |||
| 68 | #define DECLARE_WORK(n, f) \ | 55 | #define DECLARE_WORK(n, f) \ |
| 69 | struct work_struct n = __WORK_INITIALIZER(n, f) | 56 | struct work_struct n = __WORK_INITIALIZER(n, f) |
| 70 | 57 | ||
| 71 | #define DECLARE_WORK_NAR(n, f) \ | ||
| 72 | struct work_struct n = __WORK_INITIALIZER_NAR(n, f) | ||
| 73 | |||
| 74 | #define DECLARE_DELAYED_WORK(n, f) \ | 58 | #define DECLARE_DELAYED_WORK(n, f) \ |
| 75 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) | 59 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) |
| 76 | 60 | ||
| 77 | #define DECLARE_DELAYED_WORK_NAR(n, f) \ | ||
| 78 | struct dwork_struct n = __DELAYED_WORK_INITIALIZER_NAR(n, f) | ||
| 79 | |||
| 80 | /* | 61 | /* |
| 81 | * initialize a work item's function pointer | 62 | * initialize a work item's function pointer |
| 82 | */ | 63 | */ |
| @@ -95,16 +76,9 @@ struct execute_work { | |||
| 95 | * assignment of the work data initializer allows the compiler | 76 | * assignment of the work data initializer allows the compiler |
| 96 | * to generate better code. | 77 | * to generate better code. |
| 97 | */ | 78 | */ |
| 98 | #define INIT_WORK(_work, _func) \ | 79 | #define INIT_WORK(_work, _func) \ |
| 99 | do { \ | ||
| 100 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(0); \ | ||
| 101 | INIT_LIST_HEAD(&(_work)->entry); \ | ||
| 102 | PREPARE_WORK((_work), (_func)); \ | ||
| 103 | } while (0) | ||
| 104 | |||
| 105 | #define INIT_WORK_NAR(_work, _func) \ | ||
| 106 | do { \ | 80 | do { \ |
| 107 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(1); \ | 81 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
| 108 | INIT_LIST_HEAD(&(_work)->entry); \ | 82 | INIT_LIST_HEAD(&(_work)->entry); \ |
| 109 | PREPARE_WORK((_work), (_func)); \ | 83 | PREPARE_WORK((_work), (_func)); \ |
| 110 | } while (0) | 84 | } while (0) |
| @@ -115,12 +89,6 @@ struct execute_work { | |||
| 115 | init_timer(&(_work)->timer); \ | 89 | init_timer(&(_work)->timer); \ |
| 116 | } while (0) | 90 | } while (0) |
| 117 | 91 | ||
| 118 | #define INIT_DELAYED_WORK_NAR(_work, _func) \ | ||
| 119 | do { \ | ||
| 120 | INIT_WORK_NAR(&(_work)->work, (_func)); \ | ||
| 121 | init_timer(&(_work)->timer); \ | ||
| 122 | } while (0) | ||
| 123 | |||
| 124 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ | 92 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ |
| 125 | do { \ | 93 | do { \ |
| 126 | INIT_WORK(&(_work)->work, (_func)); \ | 94 | INIT_WORK(&(_work)->work, (_func)); \ |
| @@ -143,24 +111,10 @@ struct execute_work { | |||
| 143 | work_pending(&(w)->work) | 111 | work_pending(&(w)->work) |
| 144 | 112 | ||
| 145 | /** | 113 | /** |
| 146 | * work_release - Release a work item under execution | 114 | * work_clear_pending - for internal use only, mark a work item as not pending |
| 147 | * @work: The work item to release | 115 | * @work: The work item in question |
| 148 | * | ||
| 149 | * This is used to release a work item that has been initialised with automatic | ||
| 150 | * release mode disabled (WORK_STRUCT_NOAUTOREL is set). This gives the work | ||
| 151 | * function the opportunity to grab auxiliary data from the container of the | ||
| 152 | * work_struct before clearing the pending bit as the work_struct may be | ||
| 153 | * subject to deallocation the moment the pending bit is cleared. | ||
| 154 | * | ||
| 155 | * In such a case, this should be called in the work function after it has | ||
| 156 | * fetched any data it may require from the containter of the work_struct. | ||
| 157 | * After this function has been called, the work_struct may be scheduled for | ||
| 158 | * further execution or it may be deallocated unless other precautions are | ||
| 159 | * taken. | ||
| 160 | * | ||
| 161 | * This should also be used to release a delayed work item. | ||
| 162 | */ | 116 | */ |
| 163 | #define work_release(work) \ | 117 | #define work_clear_pending(work) \ |
| 164 | clear_bit(WORK_STRUCT_PENDING, work_data_bits(work)) | 118 | clear_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
| 165 | 119 | ||
| 166 | 120 | ||
| @@ -174,27 +128,28 @@ extern struct workqueue_struct *__create_workqueue(const char *name, | |||
| 174 | extern void destroy_workqueue(struct workqueue_struct *wq); | 128 | extern void destroy_workqueue(struct workqueue_struct *wq); |
| 175 | 129 | ||
| 176 | extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); | 130 | extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); |
| 177 | extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay)); | 131 | extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, |
| 132 | struct delayed_work *work, unsigned long delay)); | ||
| 178 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 133 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
| 179 | struct delayed_work *work, unsigned long delay); | 134 | struct delayed_work *work, unsigned long delay); |
| 135 | |||
| 180 | extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); | 136 | extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); |
| 137 | extern void flush_scheduled_work(void); | ||
| 181 | 138 | ||
| 182 | extern int FASTCALL(schedule_work(struct work_struct *work)); | 139 | extern int FASTCALL(schedule_work(struct work_struct *work)); |
| 183 | extern int FASTCALL(run_scheduled_work(struct work_struct *work)); | 140 | extern int FASTCALL(schedule_delayed_work(struct delayed_work *work, |
| 184 | extern int FASTCALL(schedule_delayed_work(struct delayed_work *work, unsigned long delay)); | 141 | unsigned long delay)); |
| 185 | 142 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, | |
| 186 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, unsigned long delay); | 143 | unsigned long delay); |
| 187 | extern int schedule_on_each_cpu(work_func_t func); | 144 | extern int schedule_on_each_cpu(work_func_t func); |
| 188 | extern void flush_scheduled_work(void); | ||
| 189 | extern int current_is_keventd(void); | 145 | extern int current_is_keventd(void); |
| 190 | extern int keventd_up(void); | 146 | extern int keventd_up(void); |
| 191 | 147 | ||
| 192 | extern void init_workqueues(void); | 148 | extern void init_workqueues(void); |
| 193 | void cancel_rearming_delayed_work(struct delayed_work *work); | ||
| 194 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, | ||
| 195 | struct delayed_work *); | ||
| 196 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 149 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
| 197 | 150 | ||
| 151 | extern void cancel_work_sync(struct work_struct *work); | ||
| 152 | |||
| 198 | /* | 153 | /* |
| 199 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 154 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
| 200 | * function may still be running on return from cancel_delayed_work(), unless | 155 | * function may still be running on return from cancel_delayed_work(), unless |
| @@ -207,8 +162,18 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
| 207 | 162 | ||
| 208 | ret = del_timer(&work->timer); | 163 | ret = del_timer(&work->timer); |
| 209 | if (ret) | 164 | if (ret) |
| 210 | work_release(&work->work); | 165 | work_clear_pending(&work->work); |
| 211 | return ret; | 166 | return ret; |
| 212 | } | 167 | } |
| 213 | 168 | ||
| 169 | extern void cancel_rearming_delayed_work(struct delayed_work *work); | ||
| 170 | |||
| 171 | /* Obsolete. use cancel_rearming_delayed_work() */ | ||
| 172 | static inline | ||
| 173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | ||
| 174 | struct delayed_work *work) | ||
| 175 | { | ||
| 176 | cancel_rearming_delayed_work(work); | ||
| 177 | } | ||
| 178 | |||
| 214 | #endif | 179 | #endif |
