diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-03-04 05:47:50 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-03-04 05:47:52 -0500 |
| commit | 4f16d4e0c9a4b20d9f0db365587b96d6001efd7d (patch) | |
| tree | fa25dcf285b26f1fac2bf267d0d1cd2c4eba90b8 /include/linux | |
| parent | 1e259e0a9982078896f3404240096cbea01daca4 (diff) | |
| parent | 6630125419ef37ff8781713c5e9d416f2a4ba357 (diff) | |
Merge branch 'perf/core' into perf/urgent
Merge reason: Switch from pre-merge topical split to the post-merge urgent track
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/amba/bus.h | 6 | ||||
| -rw-r--r-- | include/linux/ata.h | 4 | ||||
| -rw-r--r-- | include/linux/bitops.h | 29 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 4 | ||||
| -rw-r--r-- | include/linux/compiler.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/ftrace.h | 7 | ||||
| -rw-r--r-- | include/linux/ftrace_event.h | 20 | ||||
| -rw-r--r-- | include/linux/hw_breakpoint.h | 8 | ||||
| -rw-r--r-- | include/linux/ima.h | 4 | ||||
| -rw-r--r-- | include/linux/input.h | 1 | ||||
| -rw-r--r-- | include/linux/kfifo.h | 2 | ||||
| -rw-r--r-- | include/linux/list.h | 14 | ||||
| -rw-r--r-- | include/linux/perf_event.h | 75 | ||||
| -rw-r--r-- | include/linux/sched.h | 4 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 4 |
16 files changed, 136 insertions, 50 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index ab94335b4bb9..6816be6c3f77 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/include/asm-arm/hardware/amba.h | 2 | * linux/include/amba/bus.h |
| 3 | * | ||
| 4 | * This device type deals with ARM PrimeCells and anything else that | ||
| 5 | * presents a proper CID (0xB105F00D) at the end of the I/O register | ||
| 6 | * region or that is derived from a PrimeCell. | ||
| 3 | * | 7 | * |
| 4 | * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved. | 8 | * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved. |
| 5 | * | 9 | * |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 38a6948ce0c2..20f31567ccee 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -647,9 +647,9 @@ static inline int ata_id_has_large_logical_sectors(const u16 *id) | |||
| 647 | return id[ATA_ID_SECTOR_SIZE] & (1 << 13); | 647 | return id[ATA_ID_SECTOR_SIZE] & (1 << 13); |
| 648 | } | 648 | } |
| 649 | 649 | ||
| 650 | static inline u8 ata_id_logical_per_physical_sectors(const u16 *id) | 650 | static inline u16 ata_id_logical_per_physical_sectors(const u16 *id) |
| 651 | { | 651 | { |
| 652 | return id[ATA_ID_SECTOR_SIZE] & 0xf; | 652 | return 1 << (id[ATA_ID_SECTOR_SIZE] & 0xf); |
| 653 | } | 653 | } |
| 654 | 654 | ||
| 655 | static inline int ata_id_has_lba48(const u16 *id) | 655 | static inline int ata_id_has_lba48(const u16 *id) |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index c05a29cb9bb2..25b8b2f33ae9 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | static __inline__ int get_bitmask_order(unsigned int count) | 25 | static __inline__ int get_bitmask_order(unsigned int count) |
| 26 | { | 26 | { |
| 27 | int order; | 27 | int order; |
| 28 | 28 | ||
| 29 | order = fls(count); | 29 | order = fls(count); |
| 30 | return order; /* We could be slightly more clever with -1 here... */ | 30 | return order; /* We could be slightly more clever with -1 here... */ |
| 31 | } | 31 | } |
| @@ -33,7 +33,7 @@ static __inline__ int get_bitmask_order(unsigned int count) | |||
| 33 | static __inline__ int get_count_order(unsigned int count) | 33 | static __inline__ int get_count_order(unsigned int count) |
| 34 | { | 34 | { |
| 35 | int order; | 35 | int order; |
| 36 | 36 | ||
| 37 | order = fls(count) - 1; | 37 | order = fls(count) - 1; |
| 38 | if (count & (count - 1)) | 38 | if (count & (count - 1)) |
| 39 | order++; | 39 | order++; |
| @@ -45,6 +45,31 @@ static inline unsigned long hweight_long(unsigned long w) | |||
| 45 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); | 45 | return sizeof(w) == 4 ? hweight32(w) : hweight64(w); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /* | ||
| 49 | * Clearly slow versions of the hweightN() functions, their benefit is | ||
| 50 | * of course compile time evaluation of constant arguments. | ||
| 51 | */ | ||
| 52 | #define HWEIGHT8(w) \ | ||
| 53 | ( BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + \ | ||
| 54 | (!!((w) & (1ULL << 0))) + \ | ||
| 55 | (!!((w) & (1ULL << 1))) + \ | ||
| 56 | (!!((w) & (1ULL << 2))) + \ | ||
| 57 | (!!((w) & (1ULL << 3))) + \ | ||
| 58 | (!!((w) & (1ULL << 4))) + \ | ||
| 59 | (!!((w) & (1ULL << 5))) + \ | ||
| 60 | (!!((w) & (1ULL << 6))) + \ | ||
| 61 | (!!((w) & (1ULL << 7))) ) | ||
| 62 | |||
| 63 | #define HWEIGHT16(w) (HWEIGHT8(w) + HWEIGHT8((w) >> 8)) | ||
| 64 | #define HWEIGHT32(w) (HWEIGHT16(w) + HWEIGHT16((w) >> 16)) | ||
| 65 | #define HWEIGHT64(w) (HWEIGHT32(w) + HWEIGHT32((w) >> 32)) | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Type invariant version that simply casts things to the | ||
| 69 | * largest type. | ||
| 70 | */ | ||
| 71 | #define HWEIGHT(w) HWEIGHT64((u64)(w)) | ||
| 72 | |||
| 48 | /** | 73 | /** |
| 49 | * rol32 - rotate a 32-bit value left | 74 | * rol32 - rotate a 32-bit value left |
| 50 | * @word: value to rotate | 75 | * @word: value to rotate |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5c8018977efa..1896e868854f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -461,8 +461,7 @@ struct request_queue | |||
| 461 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ | 461 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ |
| 462 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 462 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
| 463 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | 463 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ |
| 464 | #define QUEUE_FLAG_CQ 16 /* hardware does queuing */ | 464 | #define QUEUE_FLAG_DISCARD 16 /* supports DISCARD */ |
| 465 | #define QUEUE_FLAG_DISCARD 17 /* supports DISCARD */ | ||
| 466 | 465 | ||
| 467 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 466 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
| 468 | (1 << QUEUE_FLAG_CLUSTER) | \ | 467 | (1 << QUEUE_FLAG_CLUSTER) | \ |
| @@ -586,7 +585,6 @@ enum { | |||
| 586 | 585 | ||
| 587 | #define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags) | 586 | #define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags) |
| 588 | #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) | 587 | #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) |
| 589 | #define blk_queue_queuing(q) test_bit(QUEUE_FLAG_CQ, &(q)->queue_flags) | ||
| 590 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 588 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
| 591 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) | 589 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) |
| 592 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) | 590 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5be3dab4a695..188fcae10a99 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | # define __acquire(x) __context__(x,1) | 15 | # define __acquire(x) __context__(x,1) |
| 16 | # define __release(x) __context__(x,-1) | 16 | # define __release(x) __context__(x,-1) |
| 17 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) | 17 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) |
| 18 | # define __percpu __attribute__((noderef, address_space(3))) | ||
| 18 | extern void __chk_user_ptr(const volatile void __user *); | 19 | extern void __chk_user_ptr(const volatile void __user *); |
| 19 | extern void __chk_io_ptr(const volatile void __iomem *); | 20 | extern void __chk_io_ptr(const volatile void __iomem *); |
| 20 | #else | 21 | #else |
| @@ -32,6 +33,7 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
| 32 | # define __acquire(x) (void)0 | 33 | # define __acquire(x) (void)0 |
| 33 | # define __release(x) (void)0 | 34 | # define __release(x) (void)0 |
| 34 | # define __cond_lock(x,c) (c) | 35 | # define __cond_lock(x,c) (c) |
| 36 | # define __percpu | ||
| 35 | #endif | 37 | #endif |
| 36 | 38 | ||
| 37 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b1bcb275b596..ebb1cd5bc241 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -729,6 +729,7 @@ struct inode { | |||
| 729 | uid_t i_uid; | 729 | uid_t i_uid; |
| 730 | gid_t i_gid; | 730 | gid_t i_gid; |
| 731 | dev_t i_rdev; | 731 | dev_t i_rdev; |
| 732 | unsigned int i_blkbits; | ||
| 732 | u64 i_version; | 733 | u64 i_version; |
| 733 | loff_t i_size; | 734 | loff_t i_size; |
| 734 | #ifdef __NEED_I_SIZE_ORDERED | 735 | #ifdef __NEED_I_SIZE_ORDERED |
| @@ -738,7 +739,6 @@ struct inode { | |||
| 738 | struct timespec i_mtime; | 739 | struct timespec i_mtime; |
| 739 | struct timespec i_ctime; | 740 | struct timespec i_ctime; |
| 740 | blkcnt_t i_blocks; | 741 | blkcnt_t i_blocks; |
| 741 | unsigned int i_blkbits; | ||
| 742 | unsigned short i_bytes; | 742 | unsigned short i_bytes; |
| 743 | umode_t i_mode; | 743 | umode_t i_mode; |
| 744 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 744 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 0b4f97d24d7f..eb054ae95605 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -134,6 +134,8 @@ extern void | |||
| 134 | unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops); | 134 | unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops); |
| 135 | extern void unregister_ftrace_function_probe_all(char *glob); | 135 | extern void unregister_ftrace_function_probe_all(char *glob); |
| 136 | 136 | ||
| 137 | extern int ftrace_text_reserved(void *start, void *end); | ||
| 138 | |||
| 137 | enum { | 139 | enum { |
| 138 | FTRACE_FL_FREE = (1 << 0), | 140 | FTRACE_FL_FREE = (1 << 0), |
| 139 | FTRACE_FL_FAILED = (1 << 1), | 141 | FTRACE_FL_FAILED = (1 << 1), |
| @@ -141,7 +143,6 @@ enum { | |||
| 141 | FTRACE_FL_ENABLED = (1 << 3), | 143 | FTRACE_FL_ENABLED = (1 << 3), |
| 142 | FTRACE_FL_NOTRACE = (1 << 4), | 144 | FTRACE_FL_NOTRACE = (1 << 4), |
| 143 | FTRACE_FL_CONVERTED = (1 << 5), | 145 | FTRACE_FL_CONVERTED = (1 << 5), |
| 144 | FTRACE_FL_FROZEN = (1 << 6), | ||
| 145 | }; | 146 | }; |
| 146 | 147 | ||
| 147 | struct dyn_ftrace { | 148 | struct dyn_ftrace { |
| @@ -250,6 +251,10 @@ static inline int unregister_ftrace_command(char *cmd_name) | |||
| 250 | { | 251 | { |
| 251 | return -EINVAL; | 252 | return -EINVAL; |
| 252 | } | 253 | } |
| 254 | static inline int ftrace_text_reserved(void *start, void *end) | ||
| 255 | { | ||
| 256 | return 0; | ||
| 257 | } | ||
| 253 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 258 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
| 254 | 259 | ||
| 255 | /* totally disable ftrace - can not re-enable after this */ | 260 | /* totally disable ftrace - can not re-enable after this */ |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 2233c98d80df..cd95919d9ff3 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/trace_seq.h> | 5 | #include <linux/trace_seq.h> |
| 6 | #include <linux/percpu.h> | 6 | #include <linux/percpu.h> |
| 7 | #include <linux/hardirq.h> | 7 | #include <linux/hardirq.h> |
| 8 | #include <linux/perf_event.h> | ||
| 8 | 9 | ||
| 9 | struct trace_array; | 10 | struct trace_array; |
| 10 | struct tracer; | 11 | struct tracer; |
| @@ -138,9 +139,6 @@ struct ftrace_event_call { | |||
| 138 | 139 | ||
| 139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 140 | #define FTRACE_MAX_PROFILE_SIZE 2048 |
| 140 | 141 | ||
| 141 | extern char *perf_trace_buf; | ||
| 142 | extern char *perf_trace_buf_nmi; | ||
| 143 | |||
| 144 | #define MAX_FILTER_PRED 32 | 142 | #define MAX_FILTER_PRED 32 |
| 145 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 143 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
| 146 | 144 | ||
| @@ -188,13 +186,27 @@ do { \ | |||
| 188 | __trace_printk(ip, fmt, ##args); \ | 186 | __trace_printk(ip, fmt, ##args); \ |
| 189 | } while (0) | 187 | } while (0) |
| 190 | 188 | ||
| 191 | #ifdef CONFIG_EVENT_PROFILE | 189 | #ifdef CONFIG_PERF_EVENTS |
| 192 | struct perf_event; | 190 | struct perf_event; |
| 193 | extern int ftrace_profile_enable(int event_id); | 191 | extern int ftrace_profile_enable(int event_id); |
| 194 | extern void ftrace_profile_disable(int event_id); | 192 | extern void ftrace_profile_disable(int event_id); |
| 195 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 193 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, |
| 196 | char *filter_str); | 194 | char *filter_str); |
| 197 | extern void ftrace_profile_free_filter(struct perf_event *event); | 195 | extern void ftrace_profile_free_filter(struct perf_event *event); |
| 196 | extern void * | ||
| 197 | ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp, | ||
| 198 | unsigned long *irq_flags); | ||
| 199 | |||
| 200 | static inline void | ||
| 201 | ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr, | ||
| 202 | u64 count, unsigned long irq_flags) | ||
| 203 | { | ||
| 204 | struct trace_entry *entry = raw_data; | ||
| 205 | |||
| 206 | perf_tp_event(entry->type, addr, count, raw_data, size); | ||
| 207 | perf_swevent_put_recursion_context(rctx); | ||
| 208 | local_irq_restore(irq_flags); | ||
| 209 | } | ||
| 198 | #endif | 210 | #endif |
| 199 | 211 | ||
| 200 | #endif /* _LINUX_FTRACE_EVENT_H */ | 212 | #endif /* _LINUX_FTRACE_EVENT_H */ |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 5977b724f7c6..c70d27af03f9 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -66,14 +66,14 @@ register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | |||
| 66 | perf_overflow_handler_t triggered, | 66 | perf_overflow_handler_t triggered, |
| 67 | int cpu); | 67 | int cpu); |
| 68 | 68 | ||
| 69 | extern struct perf_event ** | 69 | extern struct perf_event * __percpu * |
| 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
| 71 | perf_overflow_handler_t triggered); | 71 | perf_overflow_handler_t triggered); |
| 72 | 72 | ||
| 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); | 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); |
| 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); | 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); |
| 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); | 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); |
| 76 | extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events); | 76 | extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events); |
| 77 | 77 | ||
| 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); | 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); |
| 79 | extern int dbg_release_bp_slot(struct perf_event *bp); | 79 | extern int dbg_release_bp_slot(struct perf_event *bp); |
| @@ -100,7 +100,7 @@ static inline struct perf_event * | |||
| 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
| 101 | perf_overflow_handler_t triggered, | 101 | perf_overflow_handler_t triggered, |
| 102 | int cpu) { return NULL; } | 102 | int cpu) { return NULL; } |
| 103 | static inline struct perf_event ** | 103 | static inline struct perf_event * __percpu * |
| 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
| 105 | perf_overflow_handler_t triggered) { return NULL; } | 105 | perf_overflow_handler_t triggered) { return NULL; } |
| 106 | static inline int | 106 | static inline int |
| @@ -109,7 +109,7 @@ static inline int | |||
| 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } | 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } |
| 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } | 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } |
| 111 | static inline void | 111 | static inline void |
| 112 | unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { } | 112 | unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { } |
| 113 | static inline int | 113 | static inline int |
| 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } | 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } |
| 115 | static inline void release_bp_slot(struct perf_event *bp) { } | 115 | static inline void release_bp_slot(struct perf_event *bp) { } |
diff --git a/include/linux/ima.h b/include/linux/ima.h index 99dc6d5cf7e5..975837e7d6c0 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
| @@ -17,7 +17,7 @@ struct linux_binprm; | |||
| 17 | extern int ima_bprm_check(struct linux_binprm *bprm); | 17 | extern int ima_bprm_check(struct linux_binprm *bprm); |
| 18 | extern int ima_inode_alloc(struct inode *inode); | 18 | extern int ima_inode_alloc(struct inode *inode); |
| 19 | extern void ima_inode_free(struct inode *inode); | 19 | extern void ima_inode_free(struct inode *inode); |
| 20 | extern int ima_path_check(struct path *path, int mask); | 20 | extern int ima_file_check(struct file *file, int mask); |
| 21 | extern void ima_file_free(struct file *file); | 21 | extern void ima_file_free(struct file *file); |
| 22 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 22 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
| 23 | extern void ima_counts_get(struct file *file); | 23 | extern void ima_counts_get(struct file *file); |
| @@ -38,7 +38,7 @@ static inline void ima_inode_free(struct inode *inode) | |||
| 38 | return; | 38 | return; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static inline int ima_path_check(struct path *path, int mask) | 41 | static inline int ima_file_check(struct file *file, int mask) |
| 42 | { | 42 | { |
| 43 | return 0; | 43 | return 0; |
| 44 | } | 44 | } |
diff --git a/include/linux/input.h b/include/linux/input.h index 735ceaf1bc2d..663208afb64c 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -376,6 +376,7 @@ struct input_absinfo { | |||
| 376 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | 376 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ |
| 377 | 377 | ||
| 378 | #define KEY_WIMAX 246 | 378 | #define KEY_WIMAX 246 |
| 379 | #define KEY_RFKILL 247 /* Key that controls all radios */ | ||
| 379 | 380 | ||
| 380 | /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ | 381 | /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ |
| 381 | 382 | ||
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 6f6c5f300af6..bc0fc795bd35 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -124,7 +124,7 @@ extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, | |||
| 124 | */ | 124 | */ |
| 125 | static inline bool kfifo_initialized(struct kfifo *fifo) | 125 | static inline bool kfifo_initialized(struct kfifo *fifo) |
| 126 | { | 126 | { |
| 127 | return fifo->buffer != 0; | 127 | return fifo->buffer != NULL; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | /** | 130 | /** |
diff --git a/include/linux/list.h b/include/linux/list.h index 969f6e92d089..5d9c6558e8ab 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -206,6 +206,20 @@ static inline int list_empty_careful(const struct list_head *head) | |||
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | /** | 208 | /** |
| 209 | * list_rotate_left - rotate the list to the left | ||
| 210 | * @head: the head of the list | ||
| 211 | */ | ||
| 212 | static inline void list_rotate_left(struct list_head *head) | ||
| 213 | { | ||
| 214 | struct list_head *first; | ||
| 215 | |||
| 216 | if (!list_empty(head)) { | ||
| 217 | first = head->next; | ||
| 218 | list_move_tail(first, head); | ||
| 219 | } | ||
| 220 | } | ||
| 221 | |||
| 222 | /** | ||
| 209 | * list_is_singular - tests whether a list has just one entry. | 223 | * list_is_singular - tests whether a list has just one entry. |
| 210 | * @head: the list to test. | 224 | * @head: the list to test. |
| 211 | */ | 225 | */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index a177698d95e2..90e0521b1690 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -288,7 +288,7 @@ struct perf_event_mmap_page { | |||
| 288 | }; | 288 | }; |
| 289 | 289 | ||
| 290 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) | 290 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) |
| 291 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 291 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
| 292 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 292 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
| 293 | #define PERF_RECORD_MISC_USER (2 << 0) | 293 | #define PERF_RECORD_MISC_USER (2 << 0) |
| 294 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) | 294 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) |
| @@ -354,8 +354,8 @@ enum perf_event_type { | |||
| 354 | * u64 stream_id; | 354 | * u64 stream_id; |
| 355 | * }; | 355 | * }; |
| 356 | */ | 356 | */ |
| 357 | PERF_RECORD_THROTTLE = 5, | 357 | PERF_RECORD_THROTTLE = 5, |
| 358 | PERF_RECORD_UNTHROTTLE = 6, | 358 | PERF_RECORD_UNTHROTTLE = 6, |
| 359 | 359 | ||
| 360 | /* | 360 | /* |
| 361 | * struct { | 361 | * struct { |
| @@ -369,10 +369,10 @@ enum perf_event_type { | |||
| 369 | 369 | ||
| 370 | /* | 370 | /* |
| 371 | * struct { | 371 | * struct { |
| 372 | * struct perf_event_header header; | 372 | * struct perf_event_header header; |
| 373 | * u32 pid, tid; | 373 | * u32 pid, tid; |
| 374 | * | 374 | * |
| 375 | * struct read_format values; | 375 | * struct read_format values; |
| 376 | * }; | 376 | * }; |
| 377 | */ | 377 | */ |
| 378 | PERF_RECORD_READ = 8, | 378 | PERF_RECORD_READ = 8, |
| @@ -410,7 +410,7 @@ enum perf_event_type { | |||
| 410 | * char data[size];}&& PERF_SAMPLE_RAW | 410 | * char data[size];}&& PERF_SAMPLE_RAW |
| 411 | * }; | 411 | * }; |
| 412 | */ | 412 | */ |
| 413 | PERF_RECORD_SAMPLE = 9, | 413 | PERF_RECORD_SAMPLE = 9, |
| 414 | 414 | ||
| 415 | PERF_RECORD_MAX, /* non-ABI */ | 415 | PERF_RECORD_MAX, /* non-ABI */ |
| 416 | }; | 416 | }; |
| @@ -476,18 +476,19 @@ struct hw_perf_event { | |||
| 476 | union { | 476 | union { |
| 477 | struct { /* hardware */ | 477 | struct { /* hardware */ |
| 478 | u64 config; | 478 | u64 config; |
| 479 | u64 last_tag; | ||
| 479 | unsigned long config_base; | 480 | unsigned long config_base; |
| 480 | unsigned long event_base; | 481 | unsigned long event_base; |
| 481 | int idx; | 482 | int idx; |
| 483 | int last_cpu; | ||
| 482 | }; | 484 | }; |
| 483 | struct { /* software */ | 485 | struct { /* software */ |
| 484 | s64 remaining; | 486 | s64 remaining; |
| 485 | struct hrtimer hrtimer; | 487 | struct hrtimer hrtimer; |
| 486 | }; | 488 | }; |
| 487 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 488 | union { /* breakpoint */ | 490 | /* breakpoint */ |
| 489 | struct arch_hw_breakpoint info; | 491 | struct arch_hw_breakpoint info; |
| 490 | }; | ||
| 491 | #endif | 492 | #endif |
| 492 | }; | 493 | }; |
| 493 | atomic64_t prev_count; | 494 | atomic64_t prev_count; |
| @@ -496,9 +497,8 @@ struct hw_perf_event { | |||
| 496 | atomic64_t period_left; | 497 | atomic64_t period_left; |
| 497 | u64 interrupts; | 498 | u64 interrupts; |
| 498 | 499 | ||
| 499 | u64 freq_count; | 500 | u64 freq_time_stamp; |
| 500 | u64 freq_interrupts; | 501 | u64 freq_count_stamp; |
| 501 | u64 freq_stamp; | ||
| 502 | #endif | 502 | #endif |
| 503 | }; | 503 | }; |
| 504 | 504 | ||
| @@ -510,6 +510,8 @@ struct perf_event; | |||
| 510 | struct pmu { | 510 | struct pmu { |
| 511 | int (*enable) (struct perf_event *event); | 511 | int (*enable) (struct perf_event *event); |
| 512 | void (*disable) (struct perf_event *event); | 512 | void (*disable) (struct perf_event *event); |
| 513 | int (*start) (struct perf_event *event); | ||
| 514 | void (*stop) (struct perf_event *event); | ||
| 513 | void (*read) (struct perf_event *event); | 515 | void (*read) (struct perf_event *event); |
| 514 | void (*unthrottle) (struct perf_event *event); | 516 | void (*unthrottle) (struct perf_event *event); |
| 515 | }; | 517 | }; |
| @@ -563,6 +565,10 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | |||
| 563 | struct perf_sample_data *, | 565 | struct perf_sample_data *, |
| 564 | struct pt_regs *regs); | 566 | struct pt_regs *regs); |
| 565 | 567 | ||
| 568 | enum perf_group_flag { | ||
| 569 | PERF_GROUP_SOFTWARE = 0x1, | ||
| 570 | }; | ||
| 571 | |||
| 566 | /** | 572 | /** |
| 567 | * struct perf_event - performance event kernel representation: | 573 | * struct perf_event - performance event kernel representation: |
| 568 | */ | 574 | */ |
| @@ -572,6 +578,7 @@ struct perf_event { | |||
| 572 | struct list_head event_entry; | 578 | struct list_head event_entry; |
| 573 | struct list_head sibling_list; | 579 | struct list_head sibling_list; |
| 574 | int nr_siblings; | 580 | int nr_siblings; |
| 581 | int group_flags; | ||
| 575 | struct perf_event *group_leader; | 582 | struct perf_event *group_leader; |
| 576 | struct perf_event *output; | 583 | struct perf_event *output; |
| 577 | const struct pmu *pmu; | 584 | const struct pmu *pmu; |
| @@ -656,7 +663,7 @@ struct perf_event { | |||
| 656 | 663 | ||
| 657 | perf_overflow_handler_t overflow_handler; | 664 | perf_overflow_handler_t overflow_handler; |
| 658 | 665 | ||
| 659 | #ifdef CONFIG_EVENT_PROFILE | 666 | #ifdef CONFIG_EVENT_TRACING |
| 660 | struct event_filter *filter; | 667 | struct event_filter *filter; |
| 661 | #endif | 668 | #endif |
| 662 | 669 | ||
| @@ -681,7 +688,8 @@ struct perf_event_context { | |||
| 681 | */ | 688 | */ |
| 682 | struct mutex mutex; | 689 | struct mutex mutex; |
| 683 | 690 | ||
| 684 | struct list_head group_list; | 691 | struct list_head pinned_groups; |
| 692 | struct list_head flexible_groups; | ||
| 685 | struct list_head event_list; | 693 | struct list_head event_list; |
| 686 | int nr_events; | 694 | int nr_events; |
| 687 | int nr_active; | 695 | int nr_active; |
| @@ -744,10 +752,9 @@ extern int perf_max_events; | |||
| 744 | 752 | ||
| 745 | extern const struct pmu *hw_perf_event_init(struct perf_event *event); | 753 | extern const struct pmu *hw_perf_event_init(struct perf_event *event); |
| 746 | 754 | ||
| 747 | extern void perf_event_task_sched_in(struct task_struct *task, int cpu); | 755 | extern void perf_event_task_sched_in(struct task_struct *task); |
| 748 | extern void perf_event_task_sched_out(struct task_struct *task, | 756 | extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); |
| 749 | struct task_struct *next, int cpu); | 757 | extern void perf_event_task_tick(struct task_struct *task); |
| 750 | extern void perf_event_task_tick(struct task_struct *task, int cpu); | ||
| 751 | extern int perf_event_init_task(struct task_struct *child); | 758 | extern int perf_event_init_task(struct task_struct *child); |
| 752 | extern void perf_event_exit_task(struct task_struct *child); | 759 | extern void perf_event_exit_task(struct task_struct *child); |
| 753 | extern void perf_event_free_task(struct task_struct *task); | 760 | extern void perf_event_free_task(struct task_struct *task); |
| @@ -762,7 +769,7 @@ extern int perf_event_task_disable(void); | |||
| 762 | extern int perf_event_task_enable(void); | 769 | extern int perf_event_task_enable(void); |
| 763 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, | 770 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, |
| 764 | struct perf_cpu_context *cpuctx, | 771 | struct perf_cpu_context *cpuctx, |
| 765 | struct perf_event_context *ctx, int cpu); | 772 | struct perf_event_context *ctx); |
| 766 | extern void perf_event_update_userpage(struct perf_event *event); | 773 | extern void perf_event_update_userpage(struct perf_event *event); |
| 767 | extern int perf_event_release_kernel(struct perf_event *event); | 774 | extern int perf_event_release_kernel(struct perf_event *event); |
| 768 | extern struct perf_event * | 775 | extern struct perf_event * |
| @@ -850,9 +857,23 @@ extern int sysctl_perf_event_paranoid; | |||
| 850 | extern int sysctl_perf_event_mlock; | 857 | extern int sysctl_perf_event_mlock; |
| 851 | extern int sysctl_perf_event_sample_rate; | 858 | extern int sysctl_perf_event_sample_rate; |
| 852 | 859 | ||
| 860 | static inline bool perf_paranoid_tracepoint_raw(void) | ||
| 861 | { | ||
| 862 | return sysctl_perf_event_paranoid > -1; | ||
| 863 | } | ||
| 864 | |||
| 865 | static inline bool perf_paranoid_cpu(void) | ||
| 866 | { | ||
| 867 | return sysctl_perf_event_paranoid > 0; | ||
| 868 | } | ||
| 869 | |||
| 870 | static inline bool perf_paranoid_kernel(void) | ||
| 871 | { | ||
| 872 | return sysctl_perf_event_paranoid > 1; | ||
| 873 | } | ||
| 874 | |||
| 853 | extern void perf_event_init(void); | 875 | extern void perf_event_init(void); |
| 854 | extern void perf_tp_event(int event_id, u64 addr, u64 count, | 876 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); |
| 855 | void *record, int entry_size); | ||
| 856 | extern void perf_bp_event(struct perf_event *event, void *data); | 877 | extern void perf_bp_event(struct perf_event *event, void *data); |
| 857 | 878 | ||
| 858 | #ifndef perf_misc_flags | 879 | #ifndef perf_misc_flags |
| @@ -873,12 +894,12 @@ extern void perf_event_enable(struct perf_event *event); | |||
| 873 | extern void perf_event_disable(struct perf_event *event); | 894 | extern void perf_event_disable(struct perf_event *event); |
| 874 | #else | 895 | #else |
| 875 | static inline void | 896 | static inline void |
| 876 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } | 897 | perf_event_task_sched_in(struct task_struct *task) { } |
| 877 | static inline void | 898 | static inline void |
| 878 | perf_event_task_sched_out(struct task_struct *task, | 899 | perf_event_task_sched_out(struct task_struct *task, |
| 879 | struct task_struct *next, int cpu) { } | 900 | struct task_struct *next) { } |
| 880 | static inline void | 901 | static inline void |
| 881 | perf_event_task_tick(struct task_struct *task, int cpu) { } | 902 | perf_event_task_tick(struct task_struct *task) { } |
| 882 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } | 903 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } |
| 883 | static inline void perf_event_exit_task(struct task_struct *child) { } | 904 | static inline void perf_event_exit_task(struct task_struct *child) { } |
| 884 | static inline void perf_event_free_task(struct task_struct *task) { } | 905 | static inline void perf_event_free_task(struct task_struct *task) { } |
| @@ -893,13 +914,13 @@ static inline void | |||
| 893 | perf_sw_event(u32 event_id, u64 nr, int nmi, | 914 | perf_sw_event(u32 event_id, u64 nr, int nmi, |
| 894 | struct pt_regs *regs, u64 addr) { } | 915 | struct pt_regs *regs, u64 addr) { } |
| 895 | static inline void | 916 | static inline void |
| 896 | perf_bp_event(struct perf_event *event, void *data) { } | 917 | perf_bp_event(struct perf_event *event, void *data) { } |
| 897 | 918 | ||
| 898 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 919 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
| 899 | static inline void perf_event_comm(struct task_struct *tsk) { } | 920 | static inline void perf_event_comm(struct task_struct *tsk) { } |
| 900 | static inline void perf_event_fork(struct task_struct *tsk) { } | 921 | static inline void perf_event_fork(struct task_struct *tsk) { } |
| 901 | static inline void perf_event_init(void) { } | 922 | static inline void perf_event_init(void) { } |
| 902 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 923 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
| 903 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 924 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
| 904 | static inline void perf_event_enable(struct perf_event *event) { } | 925 | static inline void perf_event_enable(struct perf_event *event) { } |
| 905 | static inline void perf_event_disable(struct perf_event *event) { } | 926 | static inline void perf_event_disable(struct perf_event *event) { } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index abdfacc58653..78efe7c485ac 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -310,6 +310,7 @@ extern void sched_show_task(struct task_struct *p); | |||
| 310 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 310 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
| 311 | extern void softlockup_tick(void); | 311 | extern void softlockup_tick(void); |
| 312 | extern void touch_softlockup_watchdog(void); | 312 | extern void touch_softlockup_watchdog(void); |
| 313 | extern void touch_softlockup_watchdog_sync(void); | ||
| 313 | extern void touch_all_softlockup_watchdogs(void); | 314 | extern void touch_all_softlockup_watchdogs(void); |
| 314 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | 315 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, |
| 315 | void __user *buffer, | 316 | void __user *buffer, |
| @@ -323,6 +324,9 @@ static inline void softlockup_tick(void) | |||
| 323 | static inline void touch_softlockup_watchdog(void) | 324 | static inline void touch_softlockup_watchdog(void) |
| 324 | { | 325 | { |
| 325 | } | 326 | } |
| 327 | static inline void touch_softlockup_watchdog_sync(void) | ||
| 328 | { | ||
| 329 | } | ||
| 326 | static inline void touch_all_softlockup_watchdogs(void) | 330 | static inline void touch_all_softlockup_watchdogs(void) |
| 327 | { | 331 | { |
| 328 | } | 332 | } |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 207466a49f3d..feee739afe21 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -99,7 +99,7 @@ struct perf_event_attr; | |||
| 99 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 99 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
| 100 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 100 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_EVENT_PROFILE | 102 | #ifdef CONFIG_PERF_EVENTS |
| 103 | 103 | ||
| 104 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 104 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ |
| 105 | .profile_enable = prof_sysenter_enable, \ | 105 | .profile_enable = prof_sysenter_enable, \ |
| @@ -113,7 +113,7 @@ struct perf_event_attr; | |||
| 113 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) | 113 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) |
| 114 | #define TRACE_SYS_EXIT_PROFILE(sname) | 114 | #define TRACE_SYS_EXIT_PROFILE(sname) |
| 115 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) | 115 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) |
| 116 | #endif | 116 | #endif /* CONFIG_PERF_EVENTS */ |
| 117 | 117 | ||
| 118 | #ifdef CONFIG_FTRACE_SYSCALLS | 118 | #ifdef CONFIG_FTRACE_SYSCALLS |
| 119 | #define __SC_STR_ADECL1(t, a) #a | 119 | #define __SC_STR_ADECL1(t, a) #a |
