diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-09-02 02:20:32 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-09-02 02:20:35 -0400 |
| commit | f14eff1cc2f418a7c5e23aedc6a1bdca3343b871 (patch) | |
| tree | fd8d5f7ed2b2e94eff4007e8da0e9ed205d8d5c9 /include/linux | |
| parent | 84e9dabf6e6a78928c6a1a8ba235c9fb0908d0f8 (diff) | |
| parent | 326ba5010a5429a5a528b268b36a5900d4ab0eba (diff) | |
Merge commit 'v2.6.31-rc8' into sched/core
Merge reason: bump from rc5 to rc8, but also pick up TP_perf_assign()
API, a patch will be queued that depends on it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bitmap.h | 18 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/cpumask.h | 20 | ||||
| -rw-r--r-- | include/linux/decompress/generic.h | 32 | ||||
| -rw-r--r-- | include/linux/flex_array.h | 12 | ||||
| -rw-r--r-- | include/linux/fs.h | 5 | ||||
| -rw-r--r-- | include/linux/ftrace_event.h | 12 | ||||
| -rw-r--r-- | include/linux/gen_stats.h | 5 | ||||
| -rw-r--r-- | include/linux/hugetlb.h | 6 | ||||
| -rw-r--r-- | include/linux/inetdevice.h | 2 | ||||
| -rw-r--r-- | include/linux/input/matrix_keypad.h | 13 | ||||
| -rw-r--r-- | include/linux/kvm_host.h | 1 | ||||
| -rw-r--r-- | include/linux/mm.h | 15 | ||||
| -rw-r--r-- | include/linux/mm_types.h | 2 | ||||
| -rw-r--r-- | include/linux/mtd/mtd.h | 2 | ||||
| -rw-r--r-- | include/linux/mtd/partitions.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 5 | ||||
| -rw-r--r-- | include/linux/nodemask.h | 28 | ||||
| -rw-r--r-- | include/linux/perf_counter.h | 73 | ||||
| -rw-r--r-- | include/linux/sched.h | 1 | ||||
| -rw-r--r-- | include/linux/security.h | 24 | ||||
| -rw-r--r-- | include/linux/tty_ldisc.h | 2 | ||||
| -rw-r--r-- | include/linux/ucb1400.h | 4 | ||||
| -rw-r--r-- | include/linux/wait.h | 9 |
24 files changed, 200 insertions, 94 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 2878811c6134..756d78b8c1c5 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
| @@ -94,13 +94,13 @@ extern void __bitmap_shift_right(unsigned long *dst, | |||
| 94 | const unsigned long *src, int shift, int bits); | 94 | const unsigned long *src, int shift, int bits); |
| 95 | extern void __bitmap_shift_left(unsigned long *dst, | 95 | extern void __bitmap_shift_left(unsigned long *dst, |
| 96 | const unsigned long *src, int shift, int bits); | 96 | const unsigned long *src, int shift, int bits); |
| 97 | extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, | 97 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
| 98 | const unsigned long *bitmap2, int bits); | 98 | const unsigned long *bitmap2, int bits); |
| 99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, | 99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
| 100 | const unsigned long *bitmap2, int bits); | 100 | const unsigned long *bitmap2, int bits); |
| 101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, | 101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
| 102 | const unsigned long *bitmap2, int bits); | 102 | const unsigned long *bitmap2, int bits); |
| 103 | extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, | 103 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
| 104 | const unsigned long *bitmap2, int bits); | 104 | const unsigned long *bitmap2, int bits); |
| 105 | extern int __bitmap_intersects(const unsigned long *bitmap1, | 105 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
| 106 | const unsigned long *bitmap2, int bits); | 106 | const unsigned long *bitmap2, int bits); |
| @@ -171,13 +171,12 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, | |||
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static inline void bitmap_and(unsigned long *dst, const unsigned long *src1, | 174 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, |
| 175 | const unsigned long *src2, int nbits) | 175 | const unsigned long *src2, int nbits) |
| 176 | { | 176 | { |
| 177 | if (small_const_nbits(nbits)) | 177 | if (small_const_nbits(nbits)) |
| 178 | *dst = *src1 & *src2; | 178 | return (*dst = *src1 & *src2) != 0; |
| 179 | else | 179 | return __bitmap_and(dst, src1, src2, nbits); |
| 180 | __bitmap_and(dst, src1, src2, nbits); | ||
| 181 | } | 180 | } |
| 182 | 181 | ||
| 183 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, | 182 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, |
| @@ -198,13 +197,12 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, | |||
| 198 | __bitmap_xor(dst, src1, src2, nbits); | 197 | __bitmap_xor(dst, src1, src2, nbits); |
| 199 | } | 198 | } |
| 200 | 199 | ||
| 201 | static inline void bitmap_andnot(unsigned long *dst, const unsigned long *src1, | 200 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, |
| 202 | const unsigned long *src2, int nbits) | 201 | const unsigned long *src2, int nbits) |
| 203 | { | 202 | { |
| 204 | if (small_const_nbits(nbits)) | 203 | if (small_const_nbits(nbits)) |
| 205 | *dst = *src1 & ~(*src2); | 204 | return (*dst = *src1 & ~(*src2)) != 0; |
| 206 | else | 205 | return __bitmap_andnot(dst, src1, src2, nbits); |
| 207 | __bitmap_andnot(dst, src1, src2, nbits); | ||
| 208 | } | 206 | } |
| 209 | 207 | ||
| 210 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, | 208 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e7cb5dbf6c26..69103e053c92 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -913,6 +913,7 @@ extern void blk_queue_logical_block_size(struct request_queue *, unsigned short) | |||
| 913 | extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); | 913 | extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); |
| 914 | extern void blk_queue_alignment_offset(struct request_queue *q, | 914 | extern void blk_queue_alignment_offset(struct request_queue *q, |
| 915 | unsigned int alignment); | 915 | unsigned int alignment); |
| 916 | extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min); | ||
| 916 | extern void blk_queue_io_min(struct request_queue *q, unsigned int min); | 917 | extern void blk_queue_io_min(struct request_queue *q, unsigned int min); |
| 917 | extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); | 918 | extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); |
| 918 | extern void blk_set_default_limits(struct queue_limits *lim); | 919 | extern void blk_set_default_limits(struct queue_limits *lim); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c5ac87ca7bc6..796df12091b7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -43,10 +43,10 @@ | |||
| 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask | 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask |
| 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask | 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask |
| 45 | * | 45 | * |
| 46 | * void cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] | 46 | * int cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] |
| 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] | 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] |
| 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 | 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 |
| 49 | * void cpus_andnot(dst, src1, src2) dst = src1 & ~src2 | 49 | * int cpus_andnot(dst, src1, src2) dst = src1 & ~src2 |
| 50 | * void cpus_complement(dst, src) dst = ~src | 50 | * void cpus_complement(dst, src) dst = ~src |
| 51 | * | 51 | * |
| 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? | 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? |
| @@ -179,10 +179,10 @@ static inline int __cpu_test_and_set(int cpu, cpumask_t *addr) | |||
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) | 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) |
| 182 | static inline void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, | 182 | static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, |
| 183 | const cpumask_t *src2p, int nbits) | 183 | const cpumask_t *src2p, int nbits) |
| 184 | { | 184 | { |
| 185 | bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); | 185 | return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) | 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) |
| @@ -201,10 +201,10 @@ static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, | |||
| 201 | 201 | ||
| 202 | #define cpus_andnot(dst, src1, src2) \ | 202 | #define cpus_andnot(dst, src1, src2) \ |
| 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) | 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) |
| 204 | static inline void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, | 204 | static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, |
| 205 | const cpumask_t *src2p, int nbits) | 205 | const cpumask_t *src2p, int nbits) |
| 206 | { | 206 | { |
| 207 | bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); | 207 | return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) | 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) |
| @@ -738,11 +738,11 @@ static inline void cpumask_clear(struct cpumask *dstp) | |||
| 738 | * @src1p: the first input | 738 | * @src1p: the first input |
| 739 | * @src2p: the second input | 739 | * @src2p: the second input |
| 740 | */ | 740 | */ |
| 741 | static inline void cpumask_and(struct cpumask *dstp, | 741 | static inline int cpumask_and(struct cpumask *dstp, |
| 742 | const struct cpumask *src1p, | 742 | const struct cpumask *src1p, |
| 743 | const struct cpumask *src2p) | 743 | const struct cpumask *src2p) |
| 744 | { | 744 | { |
| 745 | bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), | 745 | return bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), |
| 746 | cpumask_bits(src2p), nr_cpumask_bits); | 746 | cpumask_bits(src2p), nr_cpumask_bits); |
| 747 | } | 747 | } |
| 748 | 748 | ||
| @@ -779,11 +779,11 @@ static inline void cpumask_xor(struct cpumask *dstp, | |||
| 779 | * @src1p: the first input | 779 | * @src1p: the first input |
| 780 | * @src2p: the second input | 780 | * @src2p: the second input |
| 781 | */ | 781 | */ |
| 782 | static inline void cpumask_andnot(struct cpumask *dstp, | 782 | static inline int cpumask_andnot(struct cpumask *dstp, |
| 783 | const struct cpumask *src1p, | 783 | const struct cpumask *src1p, |
| 784 | const struct cpumask *src2p) | 784 | const struct cpumask *src2p) |
| 785 | { | 785 | { |
| 786 | bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), | 786 | return bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), |
| 787 | cpumask_bits(src2p), nr_cpumask_bits); | 787 | cpumask_bits(src2p), nr_cpumask_bits); |
| 788 | } | 788 | } |
| 789 | 789 | ||
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h index 6dfb856327bb..0c7111a55a1a 100644 --- a/include/linux/decompress/generic.h +++ b/include/linux/decompress/generic.h | |||
| @@ -1,31 +1,37 @@ | |||
| 1 | #ifndef DECOMPRESS_GENERIC_H | 1 | #ifndef DECOMPRESS_GENERIC_H |
| 2 | #define DECOMPRESS_GENERIC_H | 2 | #define DECOMPRESS_GENERIC_H |
| 3 | 3 | ||
| 4 | /* Minimal chunksize to be read. | ||
| 5 | *Bzip2 prefers at least 4096 | ||
| 6 | *Lzma prefers 0x10000 */ | ||
| 7 | #define COMPR_IOBUF_SIZE 4096 | ||
| 8 | |||
| 9 | typedef int (*decompress_fn) (unsigned char *inbuf, int len, | 4 | typedef int (*decompress_fn) (unsigned char *inbuf, int len, |
| 10 | int(*fill)(void*, unsigned int), | 5 | int(*fill)(void*, unsigned int), |
| 11 | int(*writebb)(void*, unsigned int), | 6 | int(*flush)(void*, unsigned int), |
| 12 | unsigned char *output, | 7 | unsigned char *outbuf, |
| 13 | int *posp, | 8 | int *posp, |
| 14 | void(*error)(char *x)); | 9 | void(*error)(char *x)); |
| 15 | 10 | ||
| 16 | /* inbuf - input buffer | 11 | /* inbuf - input buffer |
| 17 | *len - len of pre-read data in inbuf | 12 | *len - len of pre-read data in inbuf |
| 18 | *fill - function to fill inbuf if empty | 13 | *fill - function to fill inbuf when empty |
| 19 | *writebb - function to write out outbug | 14 | *flush - function to write out outbuf |
| 15 | *outbuf - output buffer | ||
| 20 | *posp - if non-null, input position (number of bytes read) will be | 16 | *posp - if non-null, input position (number of bytes read) will be |
| 21 | * returned here | 17 | * returned here |
| 22 | * | 18 | * |
| 23 | *If len != 0, the inbuf is initialized (with as much data), and fill | 19 | *If len != 0, inbuf should contain all the necessary input data, and fill |
| 24 | *should not be called | 20 | *should be NULL |
| 25 | *If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE | 21 | *If len = 0, inbuf can be NULL, in which case the decompressor will allocate |
| 26 | *fill should be called (repeatedly...) to read data, at most IOBUF_SIZE | 22 | *the input buffer. If inbuf != NULL it must be at least XXX_IOBUF_SIZE bytes. |
| 23 | *fill will be called (repeatedly...) to read data, at most XXX_IOBUF_SIZE | ||
| 24 | *bytes should be read per call. Replace XXX with the appropriate decompressor | ||
| 25 | *name, i.e. LZMA_IOBUF_SIZE. | ||
| 26 | * | ||
| 27 | *If flush = NULL, outbuf must be large enough to buffer all the expected | ||
| 28 | *output. If flush != NULL, the output buffer will be allocated by the | ||
| 29 | *decompressor (outbuf = NULL), and the flush function will be called to | ||
| 30 | *flush the output buffer at the appropriate time (decompressor and stream | ||
| 31 | *dependent). | ||
| 27 | */ | 32 | */ |
| 28 | 33 | ||
| 34 | |||
| 29 | /* Utility routine to detect the decompression method */ | 35 | /* Utility routine to detect the decompression method */ |
| 30 | decompress_fn decompress_method(const unsigned char *inbuf, int len, | 36 | decompress_fn decompress_method(const unsigned char *inbuf, int len, |
| 31 | const char **name); | 37 | const char **name); |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 23c1ec79a31b..45ff18491514 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
| @@ -21,7 +21,7 @@ struct flex_array { | |||
| 21 | struct { | 21 | struct { |
| 22 | int element_size; | 22 | int element_size; |
| 23 | int total_nr_elements; | 23 | int total_nr_elements; |
| 24 | struct flex_array_part *parts[0]; | 24 | struct flex_array_part *parts[]; |
| 25 | }; | 25 | }; |
| 26 | /* | 26 | /* |
| 27 | * This little trick makes sure that | 27 | * This little trick makes sure that |
| @@ -36,12 +36,14 @@ struct flex_array { | |||
| 36 | .total_nr_elements = (total), \ | 36 | .total_nr_elements = (total), \ |
| 37 | } } } | 37 | } } } |
| 38 | 38 | ||
| 39 | struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags); | 39 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, |
| 40 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags); | 40 | gfp_t flags); |
| 41 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, | ||
| 42 | unsigned int end, gfp_t flags); | ||
| 41 | void flex_array_free(struct flex_array *fa); | 43 | void flex_array_free(struct flex_array *fa); |
| 42 | void flex_array_free_parts(struct flex_array *fa); | 44 | void flex_array_free_parts(struct flex_array *fa); |
| 43 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, | 45 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, |
| 44 | gfp_t flags); | 46 | gfp_t flags); |
| 45 | void *flex_array_get(struct flex_array *fa, int element_nr); | 47 | void *flex_array_get(struct flex_array *fa, unsigned int element_nr); |
| 46 | 48 | ||
| 47 | #endif /* _FLEX_ARRAY_H */ | 49 | #endif /* _FLEX_ARRAY_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index a36ffa5a77a4..73e9b643e455 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2123,7 +2123,7 @@ extern struct file *do_filp_open(int dfd, const char *pathname, | |||
| 2123 | int open_flag, int mode, int acc_mode); | 2123 | int open_flag, int mode, int acc_mode); |
| 2124 | extern int may_open(struct path *, int, int); | 2124 | extern int may_open(struct path *, int, int); |
| 2125 | 2125 | ||
| 2126 | extern int kernel_read(struct file *, unsigned long, char *, unsigned long); | 2126 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2127 | extern struct file * open_exec(const char *); | 2127 | extern struct file * open_exec(const char *); |
| 2128 | 2128 | ||
| 2129 | /* fs/dcache.c -- generic fs support functions */ | 2129 | /* fs/dcache.c -- generic fs support functions */ |
| @@ -2137,7 +2137,7 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin); | |||
| 2137 | 2137 | ||
| 2138 | extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | 2138 | extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); |
| 2139 | 2139 | ||
| 2140 | extern struct inode * inode_init_always(struct super_block *, struct inode *); | 2140 | extern int inode_init_always(struct super_block *, struct inode *); |
| 2141 | extern void inode_init_once(struct inode *); | 2141 | extern void inode_init_once(struct inode *); |
| 2142 | extern void inode_add_to_lists(struct super_block *, struct inode *); | 2142 | extern void inode_add_to_lists(struct super_block *, struct inode *); |
| 2143 | extern void iput(struct inode *); | 2143 | extern void iput(struct inode *); |
| @@ -2164,6 +2164,7 @@ extern void __iget(struct inode * inode); | |||
| 2164 | extern void iget_failed(struct inode *); | 2164 | extern void iget_failed(struct inode *); |
| 2165 | extern void clear_inode(struct inode *); | 2165 | extern void clear_inode(struct inode *); |
| 2166 | extern void destroy_inode(struct inode *); | 2166 | extern void destroy_inode(struct inode *); |
| 2167 | extern void __destroy_inode(struct inode *); | ||
| 2167 | extern struct inode *new_inode(struct super_block *); | 2168 | extern struct inode *new_inode(struct super_block *); |
| 2168 | extern int should_remove_suid(struct dentry *); | 2169 | extern int should_remove_suid(struct dentry *); |
| 2169 | extern int file_remove_suid(struct file *); | 2170 | extern int file_remove_suid(struct file *); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 5c093ffc655b..a81170de7f6b 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -89,7 +89,9 @@ enum print_line_t { | |||
| 89 | TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ | 89 | TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | 92 | void tracing_generic_entry_update(struct trace_entry *entry, | |
| 93 | unsigned long flags, | ||
| 94 | int pc); | ||
| 93 | struct ring_buffer_event * | 95 | struct ring_buffer_event * |
| 94 | trace_current_buffer_lock_reserve(int type, unsigned long len, | 96 | trace_current_buffer_lock_reserve(int type, unsigned long len, |
| 95 | unsigned long flags, int pc); | 97 | unsigned long flags, int pc); |
| @@ -119,11 +121,9 @@ struct ftrace_event_call { | |||
| 119 | void *filter; | 121 | void *filter; |
| 120 | void *mod; | 122 | void *mod; |
| 121 | 123 | ||
| 122 | #ifdef CONFIG_EVENT_PROFILE | 124 | atomic_t profile_count; |
| 123 | atomic_t profile_count; | 125 | int (*profile_enable)(struct ftrace_event_call *); |
| 124 | int (*profile_enable)(struct ftrace_event_call *); | 126 | void (*profile_disable)(struct ftrace_event_call *); |
| 125 | void (*profile_disable)(struct ftrace_event_call *); | ||
| 126 | #endif | ||
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | #define MAX_FILTER_PRED 32 | 129 | #define MAX_FILTER_PRED 32 |
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h index 0ffa41df0ee8..710e901085d0 100644 --- a/include/linux/gen_stats.h +++ b/include/linux/gen_stats.h | |||
| @@ -22,6 +22,11 @@ struct gnet_stats_basic | |||
| 22 | { | 22 | { |
| 23 | __u64 bytes; | 23 | __u64 bytes; |
| 24 | __u32 packets; | 24 | __u32 packets; |
| 25 | }; | ||
| 26 | struct gnet_stats_basic_packed | ||
| 27 | { | ||
| 28 | __u64 bytes; | ||
| 29 | __u32 packets; | ||
| 25 | } __attribute__ ((packed)); | 30 | } __attribute__ ((packed)); |
| 26 | 31 | ||
| 27 | /** | 32 | /** |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 2723513a5651..5cbc620bdfe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
| 11 | 11 | ||
| 12 | struct ctl_table; | 12 | struct ctl_table; |
| 13 | struct user_struct; | ||
| 13 | 14 | ||
| 14 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
| 15 | 16 | ||
| @@ -146,7 +147,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
| 146 | 147 | ||
| 147 | extern const struct file_operations hugetlbfs_file_operations; | 148 | extern const struct file_operations hugetlbfs_file_operations; |
| 148 | extern struct vm_operations_struct hugetlb_vm_ops; | 149 | extern struct vm_operations_struct hugetlb_vm_ops; |
| 149 | struct file *hugetlb_file_setup(const char *name, size_t, int); | 150 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, |
| 151 | struct user_struct **user); | ||
| 150 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 152 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
| 151 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 153 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
| 152 | 154 | ||
| @@ -168,7 +170,7 @@ static inline void set_file_hugepages(struct file *file) | |||
| 168 | 170 | ||
| 169 | #define is_file_hugepages(file) 0 | 171 | #define is_file_hugepages(file) 0 |
| 170 | #define set_file_hugepages(file) BUG() | 172 | #define set_file_hugepages(file) BUG() |
| 171 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) | 173 | #define hugetlb_file_setup(name,size,acct,user) ERR_PTR(-ENOSYS) |
| 172 | 174 | ||
| 173 | #endif /* !CONFIG_HUGETLBFS */ | 175 | #endif /* !CONFIG_HUGETLBFS */ |
| 174 | 176 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index acef2a770b6b..ad27c7da8798 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -82,7 +82,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
| 82 | 82 | ||
| 83 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) | 83 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) |
| 84 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) | 84 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) |
| 85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_ANDCONF((in_dev), RP_FILTER) | 85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) |
| 86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ | 86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ |
| 87 | ACCEPT_SOURCE_ROUTE) | 87 | ACCEPT_SOURCE_ROUTE) |
| 88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) | 88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 7964516c6954..15d5903af2dd 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -15,12 +15,13 @@ | |||
| 15 | #define KEY_COL(k) (((k) >> 16) & 0xff) | 15 | #define KEY_COL(k) (((k) >> 16) & 0xff) |
| 16 | #define KEY_VAL(k) ((k) & 0xffff) | 16 | #define KEY_VAL(k) ((k) & 0xffff) |
| 17 | 17 | ||
| 18 | #define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col)) | ||
| 19 | |||
| 18 | /** | 20 | /** |
| 19 | * struct matrix_keymap_data - keymap for matrix keyboards | 21 | * struct matrix_keymap_data - keymap for matrix keyboards |
| 20 | * @keymap: pointer to array of uint32 values encoded with KEY() macro | 22 | * @keymap: pointer to array of uint32 values encoded with KEY() macro |
| 21 | * representing keymap | 23 | * representing keymap |
| 22 | * @keymap_size: number of entries (initialized) in this keymap | 24 | * @keymap_size: number of entries (initialized) in this keymap |
| 23 | * @max_keymap_size: maximum size of keymap supported by the device | ||
| 24 | * | 25 | * |
| 25 | * This structure is supposed to be used by platform code to supply | 26 | * This structure is supposed to be used by platform code to supply |
| 26 | * keymaps to drivers that implement matrix-like keypads/keyboards. | 27 | * keymaps to drivers that implement matrix-like keypads/keyboards. |
| @@ -28,14 +29,13 @@ | |||
| 28 | struct matrix_keymap_data { | 29 | struct matrix_keymap_data { |
| 29 | const uint32_t *keymap; | 30 | const uint32_t *keymap; |
| 30 | unsigned int keymap_size; | 31 | unsigned int keymap_size; |
| 31 | unsigned int max_keymap_size; | ||
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | * struct matrix_keypad_platform_data - platform-dependent keypad data | 35 | * struct matrix_keypad_platform_data - platform-dependent keypad data |
| 36 | * @keymap_data: pointer to &matrix_keymap_data | 36 | * @keymap_data: pointer to &matrix_keymap_data |
| 37 | * @row_gpios: array of gpio numbers reporesenting rows | 37 | * @row_gpios: pointer to array of gpio numbers representing rows |
| 38 | * @col_gpios: array of gpio numbers reporesenting colums | 38 | * @col_gpios: pointer to array of gpio numbers reporesenting colums |
| 39 | * @num_row_gpios: actual number of row gpios used by device | 39 | * @num_row_gpios: actual number of row gpios used by device |
| 40 | * @num_col_gpios: actual number of col gpios used by device | 40 | * @num_col_gpios: actual number of col gpios used by device |
| 41 | * @col_scan_delay_us: delay, measured in microseconds, that is | 41 | * @col_scan_delay_us: delay, measured in microseconds, that is |
| @@ -48,8 +48,9 @@ struct matrix_keymap_data { | |||
| 48 | struct matrix_keypad_platform_data { | 48 | struct matrix_keypad_platform_data { |
| 49 | const struct matrix_keymap_data *keymap_data; | 49 | const struct matrix_keymap_data *keymap_data; |
| 50 | 50 | ||
| 51 | unsigned int row_gpios[MATRIX_MAX_ROWS]; | 51 | const unsigned int *row_gpios; |
| 52 | unsigned int col_gpios[MATRIX_MAX_COLS]; | 52 | const unsigned int *col_gpios; |
| 53 | |||
| 53 | unsigned int num_row_gpios; | 54 | unsigned int num_row_gpios; |
| 54 | unsigned int num_col_gpios; | 55 | unsigned int num_col_gpios; |
| 55 | 56 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 16713dc672e4..3060bdc35ffe 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -110,6 +110,7 @@ struct kvm_memory_slot { | |||
| 110 | 110 | ||
| 111 | struct kvm_kernel_irq_routing_entry { | 111 | struct kvm_kernel_irq_routing_entry { |
| 112 | u32 gsi; | 112 | u32 gsi; |
| 113 | u32 type; | ||
| 113 | int (*set)(struct kvm_kernel_irq_routing_entry *e, | 114 | int (*set)(struct kvm_kernel_irq_routing_entry *e, |
| 114 | struct kvm *kvm, int level); | 115 | struct kvm *kvm, int level); |
| 115 | union { | 116 | union { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index ba3a7cb1eaa0..9a72cc78e6b8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -34,8 +34,6 @@ extern int sysctl_legacy_va_layout; | |||
| 34 | #define sysctl_legacy_va_layout 0 | 34 | #define sysctl_legacy_va_layout 0 |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | extern unsigned long mmap_min_addr; | ||
| 38 | |||
| 39 | #include <asm/page.h> | 37 | #include <asm/page.h> |
| 40 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
| 41 | #include <asm/processor.h> | 39 | #include <asm/processor.h> |
| @@ -575,19 +573,6 @@ static inline void set_page_links(struct page *page, enum zone_type zone, | |||
| 575 | } | 573 | } |
| 576 | 574 | ||
| 577 | /* | 575 | /* |
| 578 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
| 579 | * low as possible but still greater than mmap_min_addr | ||
| 580 | */ | ||
| 581 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
| 582 | { | ||
| 583 | hint &= PAGE_MASK; | ||
| 584 | if (((void *)hint != NULL) && | ||
| 585 | (hint < mmap_min_addr)) | ||
| 586 | return PAGE_ALIGN(mmap_min_addr); | ||
| 587 | return hint; | ||
| 588 | } | ||
| 589 | |||
| 590 | /* | ||
| 591 | * Some inline functions in vmstat.h depend on page_zone() | 576 | * Some inline functions in vmstat.h depend on page_zone() |
| 592 | */ | 577 | */ |
| 593 | #include <linux/vmstat.h> | 578 | #include <linux/vmstat.h> |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 7acc8439d9b3..0042090a4d70 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -240,8 +240,6 @@ struct mm_struct { | |||
| 240 | 240 | ||
| 241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ | 241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ |
| 242 | 242 | ||
| 243 | s8 oom_adj; /* OOM kill score adjustment (bit shift) */ | ||
| 244 | |||
| 245 | cpumask_t cpu_vm_mask; | 243 | cpumask_t cpu_vm_mask; |
| 246 | 244 | ||
| 247 | /* Architecture-specific MM context */ | 245 | /* Architecture-specific MM context */ |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 5675b63a0631..0f32a9b6ff55 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -251,7 +251,7 @@ struct mtd_info { | |||
| 251 | 251 | ||
| 252 | static inline struct mtd_info *dev_to_mtd(struct device *dev) | 252 | static inline struct mtd_info *dev_to_mtd(struct device *dev) |
| 253 | { | 253 | { |
| 254 | return dev ? container_of(dev, struct mtd_info, dev) : NULL; | 254 | return dev ? dev_get_drvdata(dev) : NULL; |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) | 257 | static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index af6dcb992bc3..b70313d33ff8 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
| @@ -47,6 +47,8 @@ struct mtd_partition { | |||
| 47 | #define MTDPART_SIZ_FULL (0) | 47 | #define MTDPART_SIZ_FULL (0) |
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | struct mtd_info; | ||
| 51 | |||
| 50 | int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); | 52 | int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); |
| 51 | int del_mtd_partitions(struct mtd_info *); | 53 | int del_mtd_partitions(struct mtd_info *); |
| 52 | 54 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index fdffb413b192..f6b90240dd41 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -473,7 +473,6 @@ extern int nfs_writepages(struct address_space *, struct writeback_control *); | |||
| 473 | extern int nfs_flush_incompatible(struct file *file, struct page *page); | 473 | extern int nfs_flush_incompatible(struct file *file, struct page *page); |
| 474 | extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); | 474 | extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); |
| 475 | extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); | 475 | extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); |
| 476 | extern void nfs_writedata_release(void *); | ||
| 477 | 476 | ||
| 478 | /* | 477 | /* |
| 479 | * Try to write back everything synchronously (but check the | 478 | * Try to write back everything synchronously (but check the |
| @@ -488,7 +487,6 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | |||
| 488 | extern int nfs_commit_inode(struct inode *, int); | 487 | extern int nfs_commit_inode(struct inode *, int); |
| 489 | extern struct nfs_write_data *nfs_commitdata_alloc(void); | 488 | extern struct nfs_write_data *nfs_commitdata_alloc(void); |
| 490 | extern void nfs_commit_free(struct nfs_write_data *wdata); | 489 | extern void nfs_commit_free(struct nfs_write_data *wdata); |
| 491 | extern void nfs_commitdata_release(void *wdata); | ||
| 492 | #else | 490 | #else |
| 493 | static inline int | 491 | static inline int |
| 494 | nfs_commit_inode(struct inode *inode, int how) | 492 | nfs_commit_inode(struct inode *inode, int how) |
| @@ -507,6 +505,7 @@ nfs_have_writebacks(struct inode *inode) | |||
| 507 | * Allocate nfs_write_data structures | 505 | * Allocate nfs_write_data structures |
| 508 | */ | 506 | */ |
| 509 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages); | 507 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages); |
| 508 | extern void nfs_writedata_free(struct nfs_write_data *); | ||
| 510 | 509 | ||
| 511 | /* | 510 | /* |
| 512 | * linux/fs/nfs/read.c | 511 | * linux/fs/nfs/read.c |
| @@ -515,7 +514,6 @@ extern int nfs_readpage(struct file *, struct page *); | |||
| 515 | extern int nfs_readpages(struct file *, struct address_space *, | 514 | extern int nfs_readpages(struct file *, struct address_space *, |
| 516 | struct list_head *, unsigned); | 515 | struct list_head *, unsigned); |
| 517 | extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); | 516 | extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); |
| 518 | extern void nfs_readdata_release(void *data); | ||
| 519 | extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, | 517 | extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, |
| 520 | struct page *); | 518 | struct page *); |
| 521 | 519 | ||
| @@ -523,6 +521,7 @@ extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, | |||
| 523 | * Allocate nfs_read_data structures | 521 | * Allocate nfs_read_data structures |
| 524 | */ | 522 | */ |
| 525 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages); | 523 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages); |
| 524 | extern void nfs_readdata_free(struct nfs_read_data *); | ||
| 526 | 525 | ||
| 527 | /* | 526 | /* |
| 528 | * linux/fs/nfs3proc.c | 527 | * linux/fs/nfs3proc.c |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 829b94b156f2..b359c4a9ec9e 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
| @@ -82,6 +82,12 @@ | |||
| 82 | * to generate slightly worse code. So use a simple one-line #define | 82 | * to generate slightly worse code. So use a simple one-line #define |
| 83 | * for node_isset(), instead of wrapping an inline inside a macro, the | 83 | * for node_isset(), instead of wrapping an inline inside a macro, the |
| 84 | * way we do the other calls. | 84 | * way we do the other calls. |
| 85 | * | ||
| 86 | * NODEMASK_SCRATCH | ||
| 87 | * When doing above logical AND, OR, XOR, Remap operations the callers tend to | ||
| 88 | * need temporary nodemask_t's on the stack. But if NODES_SHIFT is large, | ||
| 89 | * nodemask_t's consume too much stack space. NODEMASK_SCRATCH is a helper | ||
| 90 | * for such situations. See below and CPUMASK_ALLOC also. | ||
| 85 | */ | 91 | */ |
| 86 | 92 | ||
| 87 | #include <linux/kernel.h> | 93 | #include <linux/kernel.h> |
| @@ -473,4 +479,26 @@ static inline int num_node_state(enum node_states state) | |||
| 473 | #define for_each_node(node) for_each_node_state(node, N_POSSIBLE) | 479 | #define for_each_node(node) for_each_node_state(node, N_POSSIBLE) |
| 474 | #define for_each_online_node(node) for_each_node_state(node, N_ONLINE) | 480 | #define for_each_online_node(node) for_each_node_state(node, N_ONLINE) |
| 475 | 481 | ||
| 482 | /* | ||
| 483 | * For nodemask scrach area.(See CPUMASK_ALLOC() in cpumask.h) | ||
| 484 | */ | ||
| 485 | |||
| 486 | #if NODES_SHIFT > 8 /* nodemask_t > 64 bytes */ | ||
| 487 | #define NODEMASK_ALLOC(x, m) struct x *m = kmalloc(sizeof(*m), GFP_KERNEL) | ||
| 488 | #define NODEMASK_FREE(m) kfree(m) | ||
| 489 | #else | ||
| 490 | #define NODEMASK_ALLOC(x, m) struct x _m, *m = &_m | ||
| 491 | #define NODEMASK_FREE(m) | ||
| 492 | #endif | ||
| 493 | |||
| 494 | /* A example struture for using NODEMASK_ALLOC, used in mempolicy. */ | ||
| 495 | struct nodemask_scratch { | ||
| 496 | nodemask_t mask1; | ||
| 497 | nodemask_t mask2; | ||
| 498 | }; | ||
| 499 | |||
| 500 | #define NODEMASK_SCRATCH(x) NODEMASK_ALLOC(nodemask_scratch, x) | ||
| 501 | #define NODEMASK_SCRATCH_FREE(x) NODEMASK_FREE(x) | ||
| 502 | |||
| 503 | |||
| 476 | #endif /* __LINUX_NODEMASK_H */ | 504 | #endif /* __LINUX_NODEMASK_H */ |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index bd15d7a5f5ce..b53f7006cc4e 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
| @@ -115,27 +115,44 @@ enum perf_counter_sample_format { | |||
| 115 | PERF_SAMPLE_TID = 1U << 1, | 115 | PERF_SAMPLE_TID = 1U << 1, |
| 116 | PERF_SAMPLE_TIME = 1U << 2, | 116 | PERF_SAMPLE_TIME = 1U << 2, |
| 117 | PERF_SAMPLE_ADDR = 1U << 3, | 117 | PERF_SAMPLE_ADDR = 1U << 3, |
| 118 | PERF_SAMPLE_GROUP = 1U << 4, | 118 | PERF_SAMPLE_READ = 1U << 4, |
| 119 | PERF_SAMPLE_CALLCHAIN = 1U << 5, | 119 | PERF_SAMPLE_CALLCHAIN = 1U << 5, |
| 120 | PERF_SAMPLE_ID = 1U << 6, | 120 | PERF_SAMPLE_ID = 1U << 6, |
| 121 | PERF_SAMPLE_CPU = 1U << 7, | 121 | PERF_SAMPLE_CPU = 1U << 7, |
| 122 | PERF_SAMPLE_PERIOD = 1U << 8, | 122 | PERF_SAMPLE_PERIOD = 1U << 8, |
| 123 | PERF_SAMPLE_STREAM_ID = 1U << 9, | 123 | PERF_SAMPLE_STREAM_ID = 1U << 9, |
| 124 | PERF_SAMPLE_RAW = 1U << 10, | ||
| 124 | 125 | ||
| 125 | PERF_SAMPLE_MAX = 1U << 10, /* non-ABI */ | 126 | PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */ |
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| 128 | /* | 129 | /* |
| 129 | * Bits that can be set in attr.read_format to request that | 130 | * The format of the data returned by read() on a perf counter fd, |
| 130 | * reads on the counter should return the indicated quantities, | 131 | * as specified by attr.read_format: |
| 131 | * in increasing order of bit value, after the counter value. | 132 | * |
| 133 | * struct read_format { | ||
| 134 | * { u64 value; | ||
| 135 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
| 136 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
| 137 | * { u64 id; } && PERF_FORMAT_ID | ||
| 138 | * } && !PERF_FORMAT_GROUP | ||
| 139 | * | ||
| 140 | * { u64 nr; | ||
| 141 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
| 142 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
| 143 | * { u64 value; | ||
| 144 | * { u64 id; } && PERF_FORMAT_ID | ||
| 145 | * } cntr[nr]; | ||
| 146 | * } && PERF_FORMAT_GROUP | ||
| 147 | * }; | ||
| 132 | */ | 148 | */ |
| 133 | enum perf_counter_read_format { | 149 | enum perf_counter_read_format { |
| 134 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, | 150 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, |
| 135 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, | 151 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, |
| 136 | PERF_FORMAT_ID = 1U << 2, | 152 | PERF_FORMAT_ID = 1U << 2, |
| 153 | PERF_FORMAT_GROUP = 1U << 3, | ||
| 137 | 154 | ||
| 138 | PERF_FORMAT_MAX = 1U << 3, /* non-ABI */ | 155 | PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ |
| 139 | }; | 156 | }; |
| 140 | 157 | ||
| 141 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | 158 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ |
| @@ -181,8 +198,9 @@ struct perf_counter_attr { | |||
| 181 | freq : 1, /* use freq, not period */ | 198 | freq : 1, /* use freq, not period */ |
| 182 | inherit_stat : 1, /* per task counts */ | 199 | inherit_stat : 1, /* per task counts */ |
| 183 | enable_on_exec : 1, /* next exec enables */ | 200 | enable_on_exec : 1, /* next exec enables */ |
| 201 | task : 1, /* trace fork/exit */ | ||
| 184 | 202 | ||
| 185 | __reserved_1 : 51; | 203 | __reserved_1 : 50; |
| 186 | 204 | ||
| 187 | __u32 wakeup_events; /* wakeup every n events */ | 205 | __u32 wakeup_events; /* wakeup every n events */ |
| 188 | __u32 __reserved_2; | 206 | __u32 __reserved_2; |
| @@ -311,6 +329,15 @@ enum perf_event_type { | |||
| 311 | /* | 329 | /* |
| 312 | * struct { | 330 | * struct { |
| 313 | * struct perf_event_header header; | 331 | * struct perf_event_header header; |
| 332 | * u32 pid, ppid; | ||
| 333 | * u32 tid, ptid; | ||
| 334 | * }; | ||
| 335 | */ | ||
| 336 | PERF_EVENT_EXIT = 4, | ||
| 337 | |||
| 338 | /* | ||
| 339 | * struct { | ||
| 340 | * struct perf_event_header header; | ||
| 314 | * u64 time; | 341 | * u64 time; |
| 315 | * u64 id; | 342 | * u64 id; |
| 316 | * u64 stream_id; | 343 | * u64 stream_id; |
| @@ -323,6 +350,7 @@ enum perf_event_type { | |||
| 323 | * struct { | 350 | * struct { |
| 324 | * struct perf_event_header header; | 351 | * struct perf_event_header header; |
| 325 | * u32 pid, ppid; | 352 | * u32 pid, ppid; |
| 353 | * u32 tid, ptid; | ||
| 326 | * }; | 354 | * }; |
| 327 | */ | 355 | */ |
| 328 | PERF_EVENT_FORK = 7, | 356 | PERF_EVENT_FORK = 7, |
| @@ -331,10 +359,8 @@ enum perf_event_type { | |||
| 331 | * struct { | 359 | * struct { |
| 332 | * struct perf_event_header header; | 360 | * struct perf_event_header header; |
| 333 | * u32 pid, tid; | 361 | * u32 pid, tid; |
| 334 | * u64 value; | 362 | * |
| 335 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | 363 | * struct read_format values; |
| 336 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
| 337 | * { u64 parent_id; } && PERF_FORMAT_ID | ||
| 338 | * }; | 364 | * }; |
| 339 | */ | 365 | */ |
| 340 | PERF_EVENT_READ = 8, | 366 | PERF_EVENT_READ = 8, |
| @@ -352,11 +378,24 @@ enum perf_event_type { | |||
| 352 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 378 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
| 353 | * { u64 period; } && PERF_SAMPLE_PERIOD | 379 | * { u64 period; } && PERF_SAMPLE_PERIOD |
| 354 | * | 380 | * |
| 355 | * { u64 nr; | 381 | * { struct read_format values; } && PERF_SAMPLE_READ |
| 356 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP | ||
| 357 | * | 382 | * |
| 358 | * { u64 nr, | 383 | * { u64 nr, |
| 359 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN | 384 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN |
| 385 | * | ||
| 386 | * # | ||
| 387 | * # The RAW record below is opaque data wrt the ABI | ||
| 388 | * # | ||
| 389 | * # That is, the ABI doesn't make any promises wrt to | ||
| 390 | * # the stability of its content, it may vary depending | ||
| 391 | * # on event, hardware, kernel version and phase of | ||
| 392 | * # the moon. | ||
| 393 | * # | ||
| 394 | * # In other words, PERF_SAMPLE_RAW contents are not an ABI. | ||
| 395 | * # | ||
| 396 | * | ||
| 397 | * { u32 size; | ||
| 398 | * char data[size];}&& PERF_SAMPLE_RAW | ||
| 360 | * }; | 399 | * }; |
| 361 | */ | 400 | */ |
| 362 | PERF_EVENT_SAMPLE = 9, | 401 | PERF_EVENT_SAMPLE = 9, |
| @@ -402,6 +441,11 @@ struct perf_callchain_entry { | |||
| 402 | __u64 ip[PERF_MAX_STACK_DEPTH]; | 441 | __u64 ip[PERF_MAX_STACK_DEPTH]; |
| 403 | }; | 442 | }; |
| 404 | 443 | ||
| 444 | struct perf_raw_record { | ||
| 445 | u32 size; | ||
| 446 | void *data; | ||
| 447 | }; | ||
| 448 | |||
| 405 | struct task_struct; | 449 | struct task_struct; |
| 406 | 450 | ||
| 407 | /** | 451 | /** |
| @@ -670,10 +714,13 @@ struct perf_sample_data { | |||
| 670 | struct pt_regs *regs; | 714 | struct pt_regs *regs; |
| 671 | u64 addr; | 715 | u64 addr; |
| 672 | u64 period; | 716 | u64 period; |
| 717 | struct perf_raw_record *raw; | ||
| 673 | }; | 718 | }; |
| 674 | 719 | ||
| 675 | extern int perf_counter_overflow(struct perf_counter *counter, int nmi, | 720 | extern int perf_counter_overflow(struct perf_counter *counter, int nmi, |
| 676 | struct perf_sample_data *data); | 721 | struct perf_sample_data *data); |
| 722 | extern void perf_counter_output(struct perf_counter *counter, int nmi, | ||
| 723 | struct perf_sample_data *data); | ||
| 677 | 724 | ||
| 678 | /* | 725 | /* |
| 679 | * Return 1 for a software counter, 0 for a hardware counter | 726 | * Return 1 for a software counter, 0 for a hardware counter |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 7bc2d9290837..e209ae0e7a8a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1199,6 +1199,7 @@ struct task_struct { | |||
| 1199 | * a short time | 1199 | * a short time |
| 1200 | */ | 1200 | */ |
| 1201 | unsigned char fpu_counter; | 1201 | unsigned char fpu_counter; |
| 1202 | s8 oomkilladj; /* OOM kill score adjustment (bit shift). */ | ||
| 1202 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 1203 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
| 1203 | unsigned int btrace_seq; | 1204 | unsigned int btrace_seq; |
| 1204 | #endif | 1205 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 5eff459b3833..1f16eea2017b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/resource.h> | 28 | #include <linux/resource.h> |
| 29 | #include <linux/sem.h> | 29 | #include <linux/sem.h> |
| 30 | #include <linux/shm.h> | 30 | #include <linux/shm.h> |
| 31 | #include <linux/mm.h> /* PAGE_ALIGN */ | ||
| 31 | #include <linux/msg.h> | 32 | #include <linux/msg.h> |
| 32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
| 33 | #include <linux/key.h> | 34 | #include <linux/key.h> |
| @@ -66,6 +67,9 @@ extern int cap_inode_setxattr(struct dentry *dentry, const char *name, | |||
| 66 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); | 67 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); |
| 67 | extern int cap_inode_need_killpriv(struct dentry *dentry); | 68 | extern int cap_inode_need_killpriv(struct dentry *dentry); |
| 68 | extern int cap_inode_killpriv(struct dentry *dentry); | 69 | extern int cap_inode_killpriv(struct dentry *dentry); |
| 70 | extern int cap_file_mmap(struct file *file, unsigned long reqprot, | ||
| 71 | unsigned long prot, unsigned long flags, | ||
| 72 | unsigned long addr, unsigned long addr_only); | ||
| 69 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 73 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
| 70 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 74 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
| 71 | unsigned long arg4, unsigned long arg5); | 75 | unsigned long arg4, unsigned long arg5); |
| @@ -92,6 +96,7 @@ extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | |||
| 92 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
| 93 | 97 | ||
| 94 | extern unsigned long mmap_min_addr; | 98 | extern unsigned long mmap_min_addr; |
| 99 | extern unsigned long dac_mmap_min_addr; | ||
| 95 | /* | 100 | /* |
| 96 | * Values used in the task_security_ops calls | 101 | * Values used in the task_security_ops calls |
| 97 | */ | 102 | */ |
| @@ -116,6 +121,21 @@ struct request_sock; | |||
| 116 | #define LSM_UNSAFE_PTRACE 2 | 121 | #define LSM_UNSAFE_PTRACE 2 |
| 117 | #define LSM_UNSAFE_PTRACE_CAP 4 | 122 | #define LSM_UNSAFE_PTRACE_CAP 4 |
| 118 | 123 | ||
| 124 | /* | ||
| 125 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
| 126 | * low as possible but still greater than mmap_min_addr | ||
| 127 | */ | ||
| 128 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
| 129 | { | ||
| 130 | hint &= PAGE_MASK; | ||
| 131 | if (((void *)hint != NULL) && | ||
| 132 | (hint < mmap_min_addr)) | ||
| 133 | return PAGE_ALIGN(mmap_min_addr); | ||
| 134 | return hint; | ||
| 135 | } | ||
| 136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp, | ||
| 137 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
| 138 | |||
| 119 | #ifdef CONFIG_SECURITY | 139 | #ifdef CONFIG_SECURITY |
| 120 | 140 | ||
| 121 | struct security_mnt_opts { | 141 | struct security_mnt_opts { |
| @@ -2197,9 +2217,7 @@ static inline int security_file_mmap(struct file *file, unsigned long reqprot, | |||
| 2197 | unsigned long addr, | 2217 | unsigned long addr, |
| 2198 | unsigned long addr_only) | 2218 | unsigned long addr_only) |
| 2199 | { | 2219 | { |
| 2200 | if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO)) | 2220 | return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); |
| 2201 | return -EACCES; | ||
| 2202 | return 0; | ||
| 2203 | } | 2221 | } |
| 2204 | 2222 | ||
| 2205 | static inline int security_file_mprotect(struct vm_area_struct *vma, | 2223 | static inline int security_file_mprotect(struct vm_area_struct *vma, |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 40f38d896777..0c4ee9b88f85 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
| @@ -144,7 +144,7 @@ struct tty_ldisc_ops { | |||
| 144 | 144 | ||
| 145 | struct tty_ldisc { | 145 | struct tty_ldisc { |
| 146 | struct tty_ldisc_ops *ops; | 146 | struct tty_ldisc_ops *ops; |
| 147 | int refcount; | 147 | atomic_t users; |
| 148 | }; | 148 | }; |
| 149 | 149 | ||
| 150 | #define TTY_LDISC_MAGIC 0x5403 | 150 | #define TTY_LDISC_MAGIC 0x5403 |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index ed889f4168f3..ae779bb8cc0f 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
| @@ -73,6 +73,10 @@ | |||
| 73 | 73 | ||
| 74 | #define UCB_ADC_DATA 0x68 | 74 | #define UCB_ADC_DATA 0x68 |
| 75 | #define UCB_ADC_DAT_VALID (1 << 15) | 75 | #define UCB_ADC_DAT_VALID (1 << 15) |
| 76 | |||
| 77 | #define UCB_FCSR 0x6c | ||
| 78 | #define UCB_FCSR_AVE (1 << 12) | ||
| 79 | |||
| 76 | #define UCB_ADC_DAT_MASK 0x3ff | 80 | #define UCB_ADC_DAT_MASK 0x3ff |
| 77 | 81 | ||
| 78 | #define UCB_ID 0x7e | 82 | #define UCB_ID 0x7e |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 6788e1a4d4ca..cf3c2f5dba51 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -77,7 +77,14 @@ struct task_struct; | |||
| 77 | #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ | 77 | #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ |
| 78 | { .flags = word, .bit_nr = bit, } | 78 | { .flags = word, .bit_nr = bit, } |
| 79 | 79 | ||
| 80 | extern void init_waitqueue_head(wait_queue_head_t *q); | 80 | extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *); |
| 81 | |||
| 82 | #define init_waitqueue_head(q) \ | ||
| 83 | do { \ | ||
| 84 | static struct lock_class_key __key; \ | ||
| 85 | \ | ||
| 86 | __init_waitqueue_head((q), &__key); \ | ||
| 87 | } while (0) | ||
| 81 | 88 | ||
| 82 | #ifdef CONFIG_LOCKDEP | 89 | #ifdef CONFIG_LOCKDEP |
| 83 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ | 90 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ |
