diff options
Diffstat (limited to 'include/linux')
47 files changed, 436 insertions, 127 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 050a7bccb836..67c91b4418b0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -219,7 +219,7 @@ static inline int acpi_video_display_switch_support(void) | |||
| 219 | 219 | ||
| 220 | extern int acpi_blacklisted(void); | 220 | extern int acpi_blacklisted(void); |
| 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
| 222 | extern int acpi_osi_setup(char *str); | 222 | extern void acpi_osi_setup(char *str); |
| 223 | 223 | ||
| 224 | #ifdef CONFIG_ACPI_NUMA | 224 | #ifdef CONFIG_ACPI_NUMA |
| 225 | int acpi_get_pxm(acpi_handle handle); | 225 | int acpi_get_pxm(acpi_handle handle); |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index a8e4e832cdbb..475f8c42c0e9 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -427,8 +427,10 @@ extern rwlock_t vcc_sklist_lock; | |||
| 427 | 427 | ||
| 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) | 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) |
| 429 | 429 | ||
| 430 | struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, | 430 | struct atm_dev *atm_dev_register(const char *type, struct device *parent, |
| 431 | int number,unsigned long *flags); /* number == -1: pick first available */ | 431 | const struct atmdev_ops *ops, |
| 432 | int number, /* -1 == pick first available */ | ||
| 433 | unsigned long *flags); | ||
| 432 | struct atm_dev *atm_dev_lookup(int number); | 434 | struct atm_dev *atm_dev_lookup(int number); |
| 433 | void atm_dev_deregister(struct atm_dev *dev); | 435 | void atm_dev_deregister(struct atm_dev *dev); |
| 434 | 436 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index aae86fd10c4f..36ab42c9bb99 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -250,7 +250,7 @@ struct queue_limits { | |||
| 250 | 250 | ||
| 251 | unsigned char misaligned; | 251 | unsigned char misaligned; |
| 252 | unsigned char discard_misaligned; | 252 | unsigned char discard_misaligned; |
| 253 | unsigned char no_cluster; | 253 | unsigned char cluster; |
| 254 | signed char discard_zeroes_data; | 254 | signed char discard_zeroes_data; |
| 255 | }; | 255 | }; |
| 256 | 256 | ||
| @@ -380,7 +380,6 @@ struct request_queue | |||
| 380 | #endif | 380 | #endif |
| 381 | }; | 381 | }; |
| 382 | 382 | ||
| 383 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | ||
| 384 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ | 383 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ |
| 385 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ | 384 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ |
| 386 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ | 385 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ |
| @@ -403,7 +402,6 @@ struct request_queue | |||
| 403 | #define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */ | 402 | #define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */ |
| 404 | 403 | ||
| 405 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 404 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
| 406 | (1 << QUEUE_FLAG_CLUSTER) | \ | ||
| 407 | (1 << QUEUE_FLAG_STACKABLE) | \ | 405 | (1 << QUEUE_FLAG_STACKABLE) | \ |
| 408 | (1 << QUEUE_FLAG_SAME_COMP) | \ | 406 | (1 << QUEUE_FLAG_SAME_COMP) | \ |
| 409 | (1 << QUEUE_FLAG_ADD_RANDOM)) | 407 | (1 << QUEUE_FLAG_ADD_RANDOM)) |
| @@ -510,6 +508,11 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | |||
| 510 | 508 | ||
| 511 | #define rq_data_dir(rq) ((rq)->cmd_flags & 1) | 509 | #define rq_data_dir(rq) ((rq)->cmd_flags & 1) |
| 512 | 510 | ||
| 511 | static inline unsigned int blk_queue_cluster(struct request_queue *q) | ||
| 512 | { | ||
| 513 | return q->limits.cluster; | ||
| 514 | } | ||
| 515 | |||
| 513 | /* | 516 | /* |
| 514 | * We regard a request as sync, if either a read or a sync write | 517 | * We regard a request as sync, if either a read or a sync write |
| 515 | */ | 518 | */ |
| @@ -805,6 +808,7 @@ extern struct request_queue *blk_init_allocated_queue(struct request_queue *, | |||
| 805 | extern void blk_cleanup_queue(struct request_queue *); | 808 | extern void blk_cleanup_queue(struct request_queue *); |
| 806 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 809 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
| 807 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 810 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
| 811 | extern void blk_limits_max_hw_sectors(struct queue_limits *, unsigned int); | ||
| 808 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 812 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
| 809 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 813 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
| 810 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 814 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 266ab9291232..499dfe982a0e 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
| @@ -105,6 +105,8 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
| 105 | 105 | ||
| 106 | #define alloc_bootmem(x) \ | 106 | #define alloc_bootmem(x) \ |
| 107 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 107 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
| 108 | #define alloc_bootmem_align(x, align) \ | ||
| 109 | __alloc_bootmem(x, align, __pa(MAX_DMA_ADDRESS)) | ||
| 108 | #define alloc_bootmem_nopanic(x) \ | 110 | #define alloc_bootmem_nopanic(x) \ |
| 109 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 111 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
| 110 | #define alloc_bootmem_pages(x) \ | 112 | #define alloc_bootmem_pages(x) \ |
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 9e76d35670d2..72c72bfccb88 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
| @@ -227,8 +227,10 @@ extern int ceph_open_session(struct ceph_client *client); | |||
| 227 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | 227 | extern void ceph_release_page_vector(struct page **pages, int num_pages); |
| 228 | 228 | ||
| 229 | extern struct page **ceph_get_direct_page_vector(const char __user *data, | 229 | extern struct page **ceph_get_direct_page_vector(const char __user *data, |
| 230 | int num_pages); | 230 | int num_pages, |
| 231 | extern void ceph_put_page_vector(struct page **pages, int num_pages); | 231 | bool write_page); |
| 232 | extern void ceph_put_page_vector(struct page **pages, int num_pages, | ||
| 233 | bool dirty); | ||
| 232 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | 234 | extern void ceph_release_page_vector(struct page **pages, int num_pages); |
| 233 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); | 235 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); |
| 234 | extern int ceph_copy_user_to_page_vector(struct page **pages, | 236 | extern int ceph_copy_user_to_page_vector(struct page **pages, |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h index 7605fdd1eb65..e3d8bf26e5eb 100644 --- a/include/linux/cnt32_to_63.h +++ b/include/linux/cnt32_to_63.h | |||
| @@ -61,13 +61,31 @@ union cnt32_to_63 { | |||
| 61 | * | 61 | * |
| 62 | * 2) this code must not be preempted for a duration longer than the | 62 | * 2) this code must not be preempted for a duration longer than the |
| 63 | * 32-bit counter half period minus the longest period between two | 63 | * 32-bit counter half period minus the longest period between two |
| 64 | * calls to this code. | 64 | * calls to this code; |
| 65 | * | 65 | * |
| 66 | * Those requirements ensure proper update to the state bit in memory. | 66 | * Those requirements ensure proper update to the state bit in memory. |
| 67 | * This is usually not a problem in practice, but if it is then a kernel | 67 | * This is usually not a problem in practice, but if it is then a kernel |
| 68 | * timer should be scheduled to manage for this code to be executed often | 68 | * timer should be scheduled to manage for this code to be executed often |
| 69 | * enough. | 69 | * enough. |
| 70 | * | 70 | * |
| 71 | * And finally: | ||
| 72 | * | ||
| 73 | * 3) the cnt_lo argument must be seen as a globally incrementing value, | ||
| 74 | * meaning that it should be a direct reference to the counter data which | ||
| 75 | * can be evaluated according to a specific ordering within the macro, | ||
| 76 | * and not the result of a previous evaluation stored in a variable. | ||
| 77 | * | ||
| 78 | * For example, this is wrong: | ||
| 79 | * | ||
| 80 | * u32 partial = get_hw_count(); | ||
| 81 | * u64 full = cnt32_to_63(partial); | ||
| 82 | * return full; | ||
| 83 | * | ||
| 84 | * This is fine: | ||
| 85 | * | ||
| 86 | * u64 full = cnt32_to_63(get_hw_count()); | ||
| 87 | * return full; | ||
| 88 | * | ||
| 71 | * Note that the top bit (bit 63) in the returned value should be considered | 89 | * Note that the top bit (bit 63) in the returned value should be considered |
| 72 | * as garbage. It is not cleared here because callers are likely to use a | 90 | * as garbage. It is not cleared here because callers are likely to use a |
| 73 | * multiplier on the returned value which can get rid of the top bit | 91 | * multiplier on the returned value which can get rid of the top bit |
diff --git a/include/linux/completion.h b/include/linux/completion.h index 36d57f74cd01..51494e6b5548 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
| @@ -81,10 +81,10 @@ extern int wait_for_completion_interruptible(struct completion *x); | |||
| 81 | extern int wait_for_completion_killable(struct completion *x); | 81 | extern int wait_for_completion_killable(struct completion *x); |
| 82 | extern unsigned long wait_for_completion_timeout(struct completion *x, | 82 | extern unsigned long wait_for_completion_timeout(struct completion *x, |
| 83 | unsigned long timeout); | 83 | unsigned long timeout); |
| 84 | extern unsigned long wait_for_completion_interruptible_timeout( | 84 | extern long wait_for_completion_interruptible_timeout( |
| 85 | struct completion *x, unsigned long timeout); | 85 | struct completion *x, unsigned long timeout); |
| 86 | extern unsigned long wait_for_completion_killable_timeout( | 86 | extern long wait_for_completion_killable_timeout( |
| 87 | struct completion *x, unsigned long timeout); | 87 | struct completion *x, unsigned long timeout); |
| 88 | extern bool try_wait_for_completion(struct completion *x); | 88 | extern bool try_wait_for_completion(struct completion *x); |
| 89 | extern bool completion_done(struct completion *x); | 89 | extern bool completion_done(struct completion *x); |
| 90 | 90 | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 9d8688b92d8b..8cd00ad98d37 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -824,6 +824,8 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | |||
| 824 | #ifdef CONFIG_DMA_ENGINE | 824 | #ifdef CONFIG_DMA_ENGINE |
| 825 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | 825 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); |
| 826 | void dma_issue_pending_all(void); | 826 | void dma_issue_pending_all(void); |
| 827 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); | ||
| 828 | void dma_release_channel(struct dma_chan *chan); | ||
| 827 | #else | 829 | #else |
| 828 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | 830 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) |
| 829 | { | 831 | { |
| @@ -831,7 +833,14 @@ static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descript | |||
| 831 | } | 833 | } |
| 832 | static inline void dma_issue_pending_all(void) | 834 | static inline void dma_issue_pending_all(void) |
| 833 | { | 835 | { |
| 834 | do { } while (0); | 836 | } |
| 837 | static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, | ||
| 838 | dma_filter_fn fn, void *fn_param) | ||
| 839 | { | ||
| 840 | return NULL; | ||
| 841 | } | ||
| 842 | static inline void dma_release_channel(struct dma_chan *chan) | ||
| 843 | { | ||
| 835 | } | 844 | } |
| 836 | #endif | 845 | #endif |
| 837 | 846 | ||
| @@ -842,8 +851,6 @@ void dma_async_device_unregister(struct dma_device *device); | |||
| 842 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); | 851 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); |
| 843 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); | 852 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); |
| 844 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) | 853 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) |
| 845 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); | ||
| 846 | void dma_release_channel(struct dma_chan *chan); | ||
| 847 | 854 | ||
| 848 | /* --- Helper iov-locking functions --- */ | 855 | /* --- Helper iov-locking functions --- */ |
| 849 | 856 | ||
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h index 0f0121467fc4..6c6133f76e16 100644 --- a/include/linux/fanotify.h +++ b/include/linux/fanotify.h | |||
| @@ -83,11 +83,13 @@ | |||
| 83 | FAN_ALL_PERM_EVENTS |\ | 83 | FAN_ALL_PERM_EVENTS |\ |
| 84 | FAN_Q_OVERFLOW) | 84 | FAN_Q_OVERFLOW) |
| 85 | 85 | ||
| 86 | #define FANOTIFY_METADATA_VERSION 2 | 86 | #define FANOTIFY_METADATA_VERSION 3 |
| 87 | 87 | ||
| 88 | struct fanotify_event_metadata { | 88 | struct fanotify_event_metadata { |
| 89 | __u32 event_len; | 89 | __u32 event_len; |
| 90 | __u32 vers; | 90 | __u8 vers; |
| 91 | __u8 reserved; | ||
| 92 | __u16 metadata_len; | ||
| 91 | __aligned_u64 mask; | 93 | __aligned_u64 mask; |
| 92 | __s32 fd; | 94 | __s32 fd; |
| 93 | __s32 pid; | 95 | __s32 pid; |
| @@ -96,11 +98,13 @@ struct fanotify_event_metadata { | |||
| 96 | struct fanotify_response { | 98 | struct fanotify_response { |
| 97 | __s32 fd; | 99 | __s32 fd; |
| 98 | __u32 response; | 100 | __u32 response; |
| 99 | } __attribute__ ((packed)); | 101 | }; |
| 100 | 102 | ||
| 101 | /* Legit userspace responses to a _PERM event */ | 103 | /* Legit userspace responses to a _PERM event */ |
| 102 | #define FAN_ALLOW 0x01 | 104 | #define FAN_ALLOW 0x01 |
| 103 | #define FAN_DENY 0x02 | 105 | #define FAN_DENY 0x02 |
| 106 | /* No fd set in event */ | ||
| 107 | #define FAN_NOFD -1 | ||
| 104 | 108 | ||
| 105 | /* Helper functions to deal with fanotify_event_metadata buffers */ | 109 | /* Helper functions to deal with fanotify_event_metadata buffers */ |
| 106 | #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) | 110 | #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index c9e06cc70dad..090f0eacde29 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -602,6 +602,7 @@ struct address_space_operations { | |||
| 602 | sector_t (*bmap)(struct address_space *, sector_t); | 602 | sector_t (*bmap)(struct address_space *, sector_t); |
| 603 | void (*invalidatepage) (struct page *, unsigned long); | 603 | void (*invalidatepage) (struct page *, unsigned long); |
| 604 | int (*releasepage) (struct page *, gfp_t); | 604 | int (*releasepage) (struct page *, gfp_t); |
| 605 | void (*freepage)(struct page *); | ||
| 605 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 606 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
| 606 | loff_t offset, unsigned long nr_segs); | 607 | loff_t offset, unsigned long nr_segs); |
| 607 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, | 608 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 5c185fa27089..b10bcdeaef76 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -235,9 +235,6 @@ static inline void fsnotify_open(struct file *file) | |||
| 235 | if (S_ISDIR(inode->i_mode)) | 235 | if (S_ISDIR(inode->i_mode)) |
| 236 | mask |= FS_ISDIR; | 236 | mask |= FS_ISDIR; |
| 237 | 237 | ||
| 238 | /* FMODE_NONOTIFY must never be set from user */ | ||
| 239 | file->f_mode &= ~FMODE_NONOTIFY; | ||
| 240 | |||
| 241 | fsnotify_parent(path, NULL, mask); | 238 | fsnotify_parent(path, NULL, mask); |
| 242 | fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); | 239 | fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); |
| 243 | } | 240 | } |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 0a68f924f06f..7380763595d3 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -166,7 +166,7 @@ struct fsnotify_group { | |||
| 166 | struct mutex access_mutex; | 166 | struct mutex access_mutex; |
| 167 | struct list_head access_list; | 167 | struct list_head access_list; |
| 168 | wait_queue_head_t access_waitq; | 168 | wait_queue_head_t access_waitq; |
| 169 | bool bypass_perm; /* protected by access_mutex */ | 169 | atomic_t bypass_perm; |
| 170 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ | 170 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ |
| 171 | int f_flags; | 171 | int f_flags; |
| 172 | unsigned int max_marks; | 172 | unsigned int max_marks; |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 8beabb958f61..47e3997f7b5c 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -154,12 +154,14 @@ enum { | |||
| 154 | TRACE_EVENT_FL_ENABLED_BIT, | 154 | TRACE_EVENT_FL_ENABLED_BIT, |
| 155 | TRACE_EVENT_FL_FILTERED_BIT, | 155 | TRACE_EVENT_FL_FILTERED_BIT, |
| 156 | TRACE_EVENT_FL_RECORDED_CMD_BIT, | 156 | TRACE_EVENT_FL_RECORDED_CMD_BIT, |
| 157 | TRACE_EVENT_FL_CAP_ANY_BIT, | ||
| 157 | }; | 158 | }; |
| 158 | 159 | ||
| 159 | enum { | 160 | enum { |
| 160 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), | 161 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), |
| 161 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), | 162 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), |
| 162 | TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), | 163 | TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), |
| 164 | TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), | ||
| 163 | }; | 165 | }; |
| 164 | 166 | ||
| 165 | struct ftrace_event_call { | 167 | struct ftrace_event_call { |
| @@ -196,6 +198,14 @@ struct ftrace_event_call { | |||
| 196 | #endif | 198 | #endif |
| 197 | }; | 199 | }; |
| 198 | 200 | ||
| 201 | #define __TRACE_EVENT_FLAGS(name, value) \ | ||
| 202 | static int __init trace_init_flags_##name(void) \ | ||
| 203 | { \ | ||
| 204 | event_##name.flags = value; \ | ||
| 205 | return 0; \ | ||
| 206 | } \ | ||
| 207 | early_initcall(trace_init_flags_##name); | ||
| 208 | |||
| 199 | #define PERF_MAX_TRACE_SIZE 2048 | 209 | #define PERF_MAX_TRACE_SIZE 2048 |
| 200 | 210 | ||
| 201 | #define MAX_FILTER_PRED 32 | 211 | #define MAX_FILTER_PRED 32 |
| @@ -215,6 +225,10 @@ enum { | |||
| 215 | FILTER_PTR_STRING, | 225 | FILTER_PTR_STRING, |
| 216 | }; | 226 | }; |
| 217 | 227 | ||
| 228 | #define EVENT_STORAGE_SIZE 128 | ||
| 229 | extern struct mutex event_storage_mutex; | ||
| 230 | extern char event_storage[EVENT_STORAGE_SIZE]; | ||
| 231 | |||
| 218 | extern int trace_event_raw_init(struct ftrace_event_call *call); | 232 | extern int trace_event_raw_init(struct ftrace_event_call *call); |
| 219 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, | 233 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, |
| 220 | const char *name, int offset, int size, | 234 | const char *name, int offset, int size, |
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index ce73a30113b4..dd1a56fbe924 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
| @@ -16,6 +16,8 @@ struct gpio_keys_button { | |||
| 16 | struct gpio_keys_platform_data { | 16 | struct gpio_keys_platform_data { |
| 17 | struct gpio_keys_button *buttons; | 17 | struct gpio_keys_button *buttons; |
| 18 | int nbuttons; | 18 | int nbuttons; |
| 19 | unsigned int poll_interval; /* polling interval in msecs - | ||
| 20 | for polling driver only */ | ||
| 19 | unsigned int rep:1; /* enable input subsystem auto repeat */ | 21 | unsigned int rep:1; /* enable input subsystem auto repeat */ |
| 20 | int (*enable)(struct device *dev); | 22 | int (*enable)(struct device *dev); |
| 21 | void (*disable)(struct device *dev); | 23 | void (*disable)(struct device *dev); |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fd0c1b857d3d..330586ffffbb 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
| 23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
| 24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
| 25 | 25 | #include <linux/timerqueue.h> | |
| 26 | 26 | ||
| 27 | struct hrtimer_clock_base; | 27 | struct hrtimer_clock_base; |
| 28 | struct hrtimer_cpu_base; | 28 | struct hrtimer_cpu_base; |
| @@ -79,8 +79,8 @@ enum hrtimer_restart { | |||
| 79 | 79 | ||
| 80 | /** | 80 | /** |
| 81 | * struct hrtimer - the basic hrtimer structure | 81 | * struct hrtimer - the basic hrtimer structure |
| 82 | * @node: red black tree node for time ordered insertion | 82 | * @node: timerqueue node, which also manages node.expires, |
| 83 | * @_expires: the absolute expiry time in the hrtimers internal | 83 | * the absolute expiry time in the hrtimers internal |
| 84 | * representation. The time is related to the clock on | 84 | * representation. The time is related to the clock on |
| 85 | * which the timer is based. Is setup by adding | 85 | * which the timer is based. Is setup by adding |
| 86 | * slack to the _softexpires value. For non range timers | 86 | * slack to the _softexpires value. For non range timers |
| @@ -101,8 +101,7 @@ enum hrtimer_restart { | |||
| 101 | * The hrtimer structure must be initialized by hrtimer_init() | 101 | * The hrtimer structure must be initialized by hrtimer_init() |
| 102 | */ | 102 | */ |
| 103 | struct hrtimer { | 103 | struct hrtimer { |
| 104 | struct rb_node node; | 104 | struct timerqueue_node node; |
| 105 | ktime_t _expires; | ||
| 106 | ktime_t _softexpires; | 105 | ktime_t _softexpires; |
| 107 | enum hrtimer_restart (*function)(struct hrtimer *); | 106 | enum hrtimer_restart (*function)(struct hrtimer *); |
| 108 | struct hrtimer_clock_base *base; | 107 | struct hrtimer_clock_base *base; |
| @@ -141,8 +140,7 @@ struct hrtimer_sleeper { | |||
| 141 | struct hrtimer_clock_base { | 140 | struct hrtimer_clock_base { |
| 142 | struct hrtimer_cpu_base *cpu_base; | 141 | struct hrtimer_cpu_base *cpu_base; |
| 143 | clockid_t index; | 142 | clockid_t index; |
| 144 | struct rb_root active; | 143 | struct timerqueue_head active; |
| 145 | struct rb_node *first; | ||
| 146 | ktime_t resolution; | 144 | ktime_t resolution; |
| 147 | ktime_t (*get_time)(void); | 145 | ktime_t (*get_time)(void); |
| 148 | ktime_t softirq_time; | 146 | ktime_t softirq_time; |
| @@ -158,7 +156,6 @@ struct hrtimer_clock_base { | |||
| 158 | * @lock: lock protecting the base and associated clock bases | 156 | * @lock: lock protecting the base and associated clock bases |
| 159 | * and timers | 157 | * and timers |
| 160 | * @clock_base: array of clock bases for this cpu | 158 | * @clock_base: array of clock bases for this cpu |
| 161 | * @curr_timer: the timer which is executing a callback right now | ||
| 162 | * @expires_next: absolute time of the next event which was scheduled | 159 | * @expires_next: absolute time of the next event which was scheduled |
| 163 | * via clock_set_next_event() | 160 | * via clock_set_next_event() |
| 164 | * @hres_active: State of high resolution mode | 161 | * @hres_active: State of high resolution mode |
| @@ -184,43 +181,43 @@ struct hrtimer_cpu_base { | |||
| 184 | 181 | ||
| 185 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 182 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
| 186 | { | 183 | { |
| 187 | timer->_expires = time; | 184 | timer->node.expires = time; |
| 188 | timer->_softexpires = time; | 185 | timer->_softexpires = time; |
| 189 | } | 186 | } |
| 190 | 187 | ||
| 191 | static inline void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta) | 188 | static inline void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta) |
| 192 | { | 189 | { |
| 193 | timer->_softexpires = time; | 190 | timer->_softexpires = time; |
| 194 | timer->_expires = ktime_add_safe(time, delta); | 191 | timer->node.expires = ktime_add_safe(time, delta); |
| 195 | } | 192 | } |
| 196 | 193 | ||
| 197 | static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta) | 194 | static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta) |
| 198 | { | 195 | { |
| 199 | timer->_softexpires = time; | 196 | timer->_softexpires = time; |
| 200 | timer->_expires = ktime_add_safe(time, ns_to_ktime(delta)); | 197 | timer->node.expires = ktime_add_safe(time, ns_to_ktime(delta)); |
| 201 | } | 198 | } |
| 202 | 199 | ||
| 203 | static inline void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64) | 200 | static inline void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64) |
| 204 | { | 201 | { |
| 205 | timer->_expires.tv64 = tv64; | 202 | timer->node.expires.tv64 = tv64; |
| 206 | timer->_softexpires.tv64 = tv64; | 203 | timer->_softexpires.tv64 = tv64; |
| 207 | } | 204 | } |
| 208 | 205 | ||
| 209 | static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) | 206 | static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) |
| 210 | { | 207 | { |
| 211 | timer->_expires = ktime_add_safe(timer->_expires, time); | 208 | timer->node.expires = ktime_add_safe(timer->node.expires, time); |
| 212 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); | 209 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); |
| 213 | } | 210 | } |
| 214 | 211 | ||
| 215 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) | 212 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) |
| 216 | { | 213 | { |
| 217 | timer->_expires = ktime_add_ns(timer->_expires, ns); | 214 | timer->node.expires = ktime_add_ns(timer->node.expires, ns); |
| 218 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); | 215 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); |
| 219 | } | 216 | } |
| 220 | 217 | ||
| 221 | static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer) | 218 | static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer) |
| 222 | { | 219 | { |
| 223 | return timer->_expires; | 220 | return timer->node.expires; |
| 224 | } | 221 | } |
| 225 | 222 | ||
| 226 | static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) | 223 | static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) |
| @@ -230,7 +227,7 @@ static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) | |||
| 230 | 227 | ||
| 231 | static inline s64 hrtimer_get_expires_tv64(const struct hrtimer *timer) | 228 | static inline s64 hrtimer_get_expires_tv64(const struct hrtimer *timer) |
| 232 | { | 229 | { |
| 233 | return timer->_expires.tv64; | 230 | return timer->node.expires.tv64; |
| 234 | } | 231 | } |
| 235 | static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) | 232 | static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) |
| 236 | { | 233 | { |
| @@ -239,12 +236,12 @@ static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) | |||
| 239 | 236 | ||
| 240 | static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer) | 237 | static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer) |
| 241 | { | 238 | { |
| 242 | return ktime_to_ns(timer->_expires); | 239 | return ktime_to_ns(timer->node.expires); |
| 243 | } | 240 | } |
| 244 | 241 | ||
| 245 | static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) | 242 | static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) |
| 246 | { | 243 | { |
| 247 | return ktime_sub(timer->_expires, timer->base->get_time()); | 244 | return ktime_sub(timer->node.expires, timer->base->get_time()); |
| 248 | } | 245 | } |
| 249 | 246 | ||
| 250 | #ifdef CONFIG_HIGH_RES_TIMERS | 247 | #ifdef CONFIG_HIGH_RES_TIMERS |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 1f8c06ce0fa6..caa151fbebb7 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -12,6 +12,13 @@ | |||
| 12 | #include <linux/securebits.h> | 12 | #include <linux/securebits.h> |
| 13 | #include <net/net_namespace.h> | 13 | #include <net/net_namespace.h> |
| 14 | 14 | ||
| 15 | #ifdef CONFIG_SMP | ||
| 16 | # define INIT_PUSHABLE_TASKS(tsk) \ | ||
| 17 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), | ||
| 18 | #else | ||
| 19 | # define INIT_PUSHABLE_TASKS(tsk) | ||
| 20 | #endif | ||
| 21 | |||
| 15 | extern struct files_struct init_files; | 22 | extern struct files_struct init_files; |
| 16 | extern struct fs_struct init_fs; | 23 | extern struct fs_struct init_fs; |
| 17 | 24 | ||
| @@ -83,6 +90,12 @@ extern struct group_info init_groups; | |||
| 83 | */ | 90 | */ |
| 84 | # define CAP_INIT_BSET CAP_FULL_SET | 91 | # define CAP_INIT_BSET CAP_FULL_SET |
| 85 | 92 | ||
| 93 | #ifdef CONFIG_RCU_BOOST | ||
| 94 | #define INIT_TASK_RCU_BOOST() \ | ||
| 95 | .rcu_boost_mutex = NULL, | ||
| 96 | #else | ||
| 97 | #define INIT_TASK_RCU_BOOST() | ||
| 98 | #endif | ||
| 86 | #ifdef CONFIG_TREE_PREEMPT_RCU | 99 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 87 | #define INIT_TASK_RCU_TREE_PREEMPT() \ | 100 | #define INIT_TASK_RCU_TREE_PREEMPT() \ |
| 88 | .rcu_blocked_node = NULL, | 101 | .rcu_blocked_node = NULL, |
| @@ -94,7 +107,8 @@ extern struct group_info init_groups; | |||
| 94 | .rcu_read_lock_nesting = 0, \ | 107 | .rcu_read_lock_nesting = 0, \ |
| 95 | .rcu_read_unlock_special = 0, \ | 108 | .rcu_read_unlock_special = 0, \ |
| 96 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ | 109 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ |
| 97 | INIT_TASK_RCU_TREE_PREEMPT() | 110 | INIT_TASK_RCU_TREE_PREEMPT() \ |
| 111 | INIT_TASK_RCU_BOOST() | ||
| 98 | #else | 112 | #else |
| 99 | #define INIT_TASK_RCU_PREEMPT(tsk) | 113 | #define INIT_TASK_RCU_PREEMPT(tsk) |
| 100 | #endif | 114 | #endif |
| @@ -137,7 +151,7 @@ extern struct cred init_cred; | |||
| 137 | .nr_cpus_allowed = NR_CPUS, \ | 151 | .nr_cpus_allowed = NR_CPUS, \ |
| 138 | }, \ | 152 | }, \ |
| 139 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 153 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
| 140 | .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO), \ | 154 | INIT_PUSHABLE_TASKS(tsk) \ |
| 141 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ | 155 | .ptraced = LIST_HEAD_INIT(tsk.ptraced), \ |
| 142 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ | 156 | .ptrace_entry = LIST_HEAD_INIT(tsk.ptrace_entry), \ |
| 143 | .real_parent = &tsk, \ | 157 | .real_parent = &tsk, \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 6ef44465db8d..9777668883be 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -47,6 +47,25 @@ struct input_id { | |||
| 47 | __u16 version; | 47 | __u16 version; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | /** | ||
| 51 | * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls | ||
| 52 | * @value: latest reported value for the axis. | ||
| 53 | * @minimum: specifies minimum value for the axis. | ||
| 54 | * @maximum: specifies maximum value for the axis. | ||
| 55 | * @fuzz: specifies fuzz value that is used to filter noise from | ||
| 56 | * the event stream. | ||
| 57 | * @flat: values that are within this value will be discarded by | ||
| 58 | * joydev interface and reported as 0 instead. | ||
| 59 | * @resolution: specifies resolution for the values reported for | ||
| 60 | * the axis. | ||
| 61 | * | ||
| 62 | * Note that input core does not clamp reported values to the | ||
| 63 | * [minimum, maximum] limits, such task is left to userspace. | ||
| 64 | * | ||
| 65 | * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in | ||
| 66 | * units per millimeter (units/mm), resolution for rotational axes | ||
| 67 | * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. | ||
| 68 | */ | ||
| 50 | struct input_absinfo { | 69 | struct input_absinfo { |
| 51 | __s32 value; | 70 | __s32 value; |
| 52 | __s32 minimum; | 71 | __s32 minimum; |
| @@ -85,8 +104,10 @@ struct input_keymap_entry { | |||
| 85 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 104 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| 86 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ | 105 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
| 87 | 106 | ||
| 88 | #define EVIOCGKEYCODE _IOR('E', 0x04, struct input_keymap_entry) /* get keycode */ | 107 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
| 89 | #define EVIOCSKEYCODE _IOW('E', 0x04, struct input_keymap_entry) /* set keycode */ | 108 | #define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) |
| 109 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ | ||
| 110 | #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) | ||
| 90 | 111 | ||
| 91 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| 92 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| @@ -624,6 +645,10 @@ struct input_keymap_entry { | |||
| 624 | #define KEY_CAMERA_FOCUS 0x210 | 645 | #define KEY_CAMERA_FOCUS 0x210 |
| 625 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | 646 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
| 626 | 647 | ||
| 648 | #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ | ||
| 649 | #define KEY_TOUCHPAD_ON 0x213 | ||
| 650 | #define KEY_TOUCHPAD_OFF 0x214 | ||
| 651 | |||
| 627 | #define BTN_TRIGGER_HAPPY 0x2c0 | 652 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 628 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 653 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
| 629 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 654 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
| @@ -1130,7 +1155,7 @@ struct input_mt_slot { | |||
| 1130 | * of tracked contacts | 1155 | * of tracked contacts |
| 1131 | * @mtsize: number of MT slots the device uses | 1156 | * @mtsize: number of MT slots the device uses |
| 1132 | * @slot: MT slot currently being transmitted | 1157 | * @slot: MT slot currently being transmitted |
| 1133 | * @absinfo: array of &struct absinfo elements holding information | 1158 | * @absinfo: array of &struct input_absinfo elements holding information |
| 1134 | * about absolute axes (current value, min, max, flat, fuzz, | 1159 | * about absolute axes (current value, min, max, flat, fuzz, |
| 1135 | * resolution) | 1160 | * resolution) |
| 1136 | * @key: reflects current state of device's keys/buttons | 1161 | * @key: reflects current state of device's keys/buttons |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 79d0c4f6d071..55e0d4253e49 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -114,15 +114,15 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
| 114 | struct irqaction { | 114 | struct irqaction { |
| 115 | irq_handler_t handler; | 115 | irq_handler_t handler; |
| 116 | unsigned long flags; | 116 | unsigned long flags; |
| 117 | const char *name; | ||
| 118 | void *dev_id; | 117 | void *dev_id; |
| 119 | struct irqaction *next; | 118 | struct irqaction *next; |
| 120 | int irq; | 119 | int irq; |
| 121 | struct proc_dir_entry *dir; | ||
| 122 | irq_handler_t thread_fn; | 120 | irq_handler_t thread_fn; |
| 123 | struct task_struct *thread; | 121 | struct task_struct *thread; |
| 124 | unsigned long thread_flags; | 122 | unsigned long thread_flags; |
| 125 | }; | 123 | const char *name; |
| 124 | struct proc_dir_entry *dir; | ||
| 125 | } ____cacheline_internodealigned_in_smp; | ||
| 126 | 126 | ||
| 127 | extern irqreturn_t no_action(int cpl, void *dev_id); | 127 | extern irqreturn_t no_action(int cpl, void *dev_id); |
| 128 | 128 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d377ea815d45..e9bb22cba764 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -112,7 +112,6 @@ struct resource_list { | |||
| 112 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 112 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
| 113 | extern struct resource ioport_resource; | 113 | extern struct resource ioport_resource; |
| 114 | extern struct resource iomem_resource; | 114 | extern struct resource iomem_resource; |
| 115 | extern int resource_alloc_from_bottom; | ||
| 116 | 115 | ||
| 117 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | 116 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); |
| 118 | extern int request_resource(struct resource *root, struct resource *new); | 117 | extern int request_resource(struct resource *root, struct resource *new); |
| @@ -124,6 +123,7 @@ extern void reserve_region_with_split(struct resource *root, | |||
| 124 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | 123 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); |
| 125 | extern int insert_resource(struct resource *parent, struct resource *new); | 124 | extern int insert_resource(struct resource *parent, struct resource *new); |
| 126 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 125 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
| 126 | extern void arch_remove_reservations(struct resource *avail); | ||
| 127 | extern int allocate_resource(struct resource *root, struct resource *new, | 127 | extern int allocate_resource(struct resource *root, struct resource *new, |
| 128 | resource_size_t size, resource_size_t min, | 128 | resource_size_t size, resource_size_t min, |
| 129 | resource_size_t max, resource_size_t align, | 129 | resource_size_t max, resource_size_t align, |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index e7d1b2e0070d..b78edb58ee66 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -275,7 +275,9 @@ extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn); | |||
| 275 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); | 275 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); |
| 276 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); | 276 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); |
| 277 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); | 277 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); |
| 278 | extern int arch_optimize_kprobe(struct optimized_kprobe *op); | 278 | extern void arch_optimize_kprobes(struct list_head *oplist); |
| 279 | extern void arch_unoptimize_kprobes(struct list_head *oplist, | ||
| 280 | struct list_head *done_list); | ||
| 279 | extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); | 281 | extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); |
| 280 | extern kprobe_opcode_t *get_optinsn_slot(void); | 282 | extern kprobe_opcode_t *get_optinsn_slot(void); |
| 281 | extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); | 283 | extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 685ea65eb803..ce0775aa64c3 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -81,16 +81,41 @@ struct kthread_work { | |||
| 81 | #define DEFINE_KTHREAD_WORK(work, fn) \ | 81 | #define DEFINE_KTHREAD_WORK(work, fn) \ |
| 82 | struct kthread_work work = KTHREAD_WORK_INIT(work, fn) | 82 | struct kthread_work work = KTHREAD_WORK_INIT(work, fn) |
| 83 | 83 | ||
| 84 | static inline void init_kthread_worker(struct kthread_worker *worker) | 84 | /* |
| 85 | { | 85 | * kthread_worker.lock and kthread_work.done need their own lockdep class |
| 86 | *worker = (struct kthread_worker)KTHREAD_WORKER_INIT(*worker); | 86 | * keys if they are defined on stack with lockdep enabled. Use the |
| 87 | } | 87 | * following macros when defining them on stack. |
| 88 | 88 | */ | |
| 89 | static inline void init_kthread_work(struct kthread_work *work, | 89 | #ifdef CONFIG_LOCKDEP |
| 90 | kthread_work_func_t fn) | 90 | # define KTHREAD_WORKER_INIT_ONSTACK(worker) \ |
| 91 | { | 91 | ({ init_kthread_worker(&worker); worker; }) |
| 92 | *work = (struct kthread_work)KTHREAD_WORK_INIT(*work, fn); | 92 | # define DEFINE_KTHREAD_WORKER_ONSTACK(worker) \ |
| 93 | } | 93 | struct kthread_worker worker = KTHREAD_WORKER_INIT_ONSTACK(worker) |
| 94 | # define KTHREAD_WORK_INIT_ONSTACK(work, fn) \ | ||
| 95 | ({ init_kthread_work((&work), fn); work; }) | ||
| 96 | # define DEFINE_KTHREAD_WORK_ONSTACK(work, fn) \ | ||
| 97 | struct kthread_work work = KTHREAD_WORK_INIT_ONSTACK(work, fn) | ||
| 98 | #else | ||
| 99 | # define DEFINE_KTHREAD_WORKER_ONSTACK(worker) DEFINE_KTHREAD_WORKER(worker) | ||
| 100 | # define DEFINE_KTHREAD_WORK_ONSTACK(work, fn) DEFINE_KTHREAD_WORK(work, fn) | ||
| 101 | #endif | ||
| 102 | |||
| 103 | extern void __init_kthread_worker(struct kthread_worker *worker, | ||
| 104 | const char *name, struct lock_class_key *key); | ||
| 105 | |||
| 106 | #define init_kthread_worker(worker) \ | ||
| 107 | do { \ | ||
| 108 | static struct lock_class_key __key; \ | ||
| 109 | __init_kthread_worker((worker), "("#worker")->lock", &__key); \ | ||
| 110 | } while (0) | ||
| 111 | |||
| 112 | #define init_kthread_work(work, fn) \ | ||
| 113 | do { \ | ||
| 114 | memset((work), 0, sizeof(struct kthread_work)); \ | ||
| 115 | INIT_LIST_HEAD(&(work)->node); \ | ||
| 116 | (work)->func = (fn); \ | ||
| 117 | init_waitqueue_head(&(work)->done); \ | ||
| 118 | } while (0) | ||
| 94 | 119 | ||
| 95 | int kthread_worker_fn(void *worker_ptr); | 120 | int kthread_worker_fn(void *worker_ptr); |
| 96 | 121 | ||
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 5c51f367c061..add8a1b8bcf0 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
| @@ -29,7 +29,7 @@ struct wm8994_ldo_pdata { | |||
| 29 | #define WM8994_CONFIGURE_GPIO 0x8000 | 29 | #define WM8994_CONFIGURE_GPIO 0x8000 |
| 30 | 30 | ||
| 31 | #define WM8994_DRC_REGS 5 | 31 | #define WM8994_DRC_REGS 5 |
| 32 | #define WM8994_EQ_REGS 19 | 32 | #define WM8994_EQ_REGS 20 |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | * DRC configurations are specified with a label and a set of register | 35 | * DRC configurations are specified with a label and a set of register |
diff --git a/include/linux/module.h b/include/linux/module.h index 7575bbbdf2a2..8b17fd8c790d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -308,6 +308,9 @@ struct module | |||
| 308 | /* The size of the executable code in each section. */ | 308 | /* The size of the executable code in each section. */ |
| 309 | unsigned int init_text_size, core_text_size; | 309 | unsigned int init_text_size, core_text_size; |
| 310 | 310 | ||
| 311 | /* Size of RO sections of the module (text+rodata) */ | ||
| 312 | unsigned int init_ro_size, core_ro_size; | ||
| 313 | |||
| 311 | /* Arch-specific module values */ | 314 | /* Arch-specific module values */ |
| 312 | struct mod_arch_specific arch; | 315 | struct mod_arch_specific arch; |
| 313 | 316 | ||
| @@ -672,7 +675,6 @@ static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter) | |||
| 672 | { | 675 | { |
| 673 | return 0; | 676 | return 0; |
| 674 | } | 677 | } |
| 675 | |||
| 676 | #endif /* CONFIG_MODULES */ | 678 | #endif /* CONFIG_MODULES */ |
| 677 | 679 | ||
| 678 | #ifdef CONFIG_SYSFS | 680 | #ifdef CONFIG_SYSFS |
| @@ -687,6 +689,13 @@ extern int module_sysfs_initialized; | |||
| 687 | 689 | ||
| 688 | #define __MODULE_STRING(x) __stringify(x) | 690 | #define __MODULE_STRING(x) __stringify(x) |
| 689 | 691 | ||
| 692 | #ifdef CONFIG_DEBUG_SET_MODULE_RONX | ||
| 693 | extern void set_all_modules_text_rw(void); | ||
| 694 | extern void set_all_modules_text_ro(void); | ||
| 695 | #else | ||
| 696 | static inline void set_all_modules_text_rw(void) { } | ||
| 697 | static inline void set_all_modules_text_ro(void) { } | ||
| 698 | #endif | ||
| 690 | 699 | ||
| 691 | #ifdef CONFIG_GENERIC_BUG | 700 | #ifdef CONFIG_GENERIC_BUG |
| 692 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, | 701 | void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index f363bc8fdc74..94b48bd40dd7 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -160,4 +160,8 @@ extern int mutex_trylock(struct mutex *lock); | |||
| 160 | extern void mutex_unlock(struct mutex *lock); | 160 | extern void mutex_unlock(struct mutex *lock); |
| 161 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | 161 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); |
| 162 | 162 | ||
| 163 | #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX | ||
| 164 | #define arch_mutex_cpu_relax() cpu_relax() | ||
| 165 | #endif | ||
| 166 | |||
| 163 | #endif | 167 | #endif |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 123566912d73..e2b9e63afa68 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -70,7 +70,7 @@ struct nlmsghdr { | |||
| 70 | Check NLM_F_EXCL | 70 | Check NLM_F_EXCL |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | #define NLMSG_ALIGNTO 4 | 73 | #define NLMSG_ALIGNTO 4U |
| 74 | #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) | 74 | #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) |
| 75 | #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) | 75 | #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
| 76 | #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) | 76 | #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c66fdb7d6998..29d504d5d1c3 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -401,6 +401,7 @@ extern const struct inode_operations nfs3_file_inode_operations; | |||
| 401 | #endif /* CONFIG_NFS_V3 */ | 401 | #endif /* CONFIG_NFS_V3 */ |
| 402 | extern const struct file_operations nfs_file_operations; | 402 | extern const struct file_operations nfs_file_operations; |
| 403 | extern const struct address_space_operations nfs_file_aops; | 403 | extern const struct address_space_operations nfs_file_aops; |
| 404 | extern const struct address_space_operations nfs_dir_aops; | ||
| 404 | 405 | ||
| 405 | static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) | 406 | static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) |
| 406 | { | 407 | { |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index f8b60e7f4c44..d55cee73f634 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | */ | 29 | */ |
| 30 | enum { | 30 | enum { |
| 31 | PG_BUSY = 0, | 31 | PG_BUSY = 0, |
| 32 | PG_MAPPED, | ||
| 32 | PG_CLEAN, | 33 | PG_CLEAN, |
| 33 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
| 34 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 06aab5eee134..c536f8545f74 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
| @@ -14,22 +14,14 @@ | |||
| 14 | * may be used to reset the timeout - for code which intentionally | 14 | * may be used to reset the timeout - for code which intentionally |
| 15 | * disables interrupts for a long time. This call is stateless. | 15 | * disables interrupts for a long time. This call is stateless. |
| 16 | */ | 16 | */ |
| 17 | #ifdef ARCH_HAS_NMI_WATCHDOG | 17 | #if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) |
| 18 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
| 19 | extern void touch_nmi_watchdog(void); | 19 | extern void touch_nmi_watchdog(void); |
| 20 | extern void acpi_nmi_disable(void); | ||
| 21 | extern void acpi_nmi_enable(void); | ||
| 22 | #else | 20 | #else |
| 23 | #ifndef CONFIG_HARDLOCKUP_DETECTOR | ||
| 24 | static inline void touch_nmi_watchdog(void) | 21 | static inline void touch_nmi_watchdog(void) |
| 25 | { | 22 | { |
| 26 | touch_softlockup_watchdog(); | 23 | touch_softlockup_watchdog(); |
| 27 | } | 24 | } |
| 28 | #else | ||
| 29 | extern void touch_nmi_watchdog(void); | ||
| 30 | #endif | ||
| 31 | static inline void acpi_nmi_disable(void) { } | ||
| 32 | static inline void acpi_nmi_enable(void) { } | ||
| 33 | #endif | 25 | #endif |
| 34 | 26 | ||
| 35 | /* | 27 | /* |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index de2c41758e29..dda5b0a3ff60 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -215,8 +215,9 @@ struct perf_event_attr { | |||
| 215 | */ | 215 | */ |
| 216 | precise_ip : 2, /* skid constraint */ | 216 | precise_ip : 2, /* skid constraint */ |
| 217 | mmap_data : 1, /* non-exec mmap data */ | 217 | mmap_data : 1, /* non-exec mmap data */ |
| 218 | sample_id_all : 1, /* sample_type all events */ | ||
| 218 | 219 | ||
| 219 | __reserved_1 : 46; | 220 | __reserved_1 : 45; |
| 220 | 221 | ||
| 221 | union { | 222 | union { |
| 222 | __u32 wakeup_events; /* wakeup every n events */ | 223 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -327,6 +328,15 @@ struct perf_event_header { | |||
| 327 | enum perf_event_type { | 328 | enum perf_event_type { |
| 328 | 329 | ||
| 329 | /* | 330 | /* |
| 331 | * If perf_event_attr.sample_id_all is set then all event types will | ||
| 332 | * have the sample_type selected fields related to where/when | ||
| 333 | * (identity) an event took place (TID, TIME, ID, CPU, STREAM_ID) | ||
| 334 | * described in PERF_RECORD_SAMPLE below, it will be stashed just after | ||
| 335 | * the perf_event_header and the fields already present for the existing | ||
| 336 | * fields, i.e. at the end of the payload. That way a newer perf.data | ||
| 337 | * file will be supported by older perf tools, with these new optional | ||
| 338 | * fields being ignored. | ||
| 339 | * | ||
| 330 | * The MMAP events record the PROT_EXEC mappings so that we can | 340 | * The MMAP events record the PROT_EXEC mappings so that we can |
| 331 | * correlate userspace IPs to code. They have the following structure: | 341 | * correlate userspace IPs to code. They have the following structure: |
| 332 | * | 342 | * |
| @@ -578,6 +588,10 @@ struct perf_event; | |||
| 578 | struct pmu { | 588 | struct pmu { |
| 579 | struct list_head entry; | 589 | struct list_head entry; |
| 580 | 590 | ||
| 591 | struct device *dev; | ||
| 592 | char *name; | ||
| 593 | int type; | ||
| 594 | |||
| 581 | int * __percpu pmu_disable_count; | 595 | int * __percpu pmu_disable_count; |
| 582 | struct perf_cpu_context * __percpu pmu_cpu_context; | 596 | struct perf_cpu_context * __percpu pmu_cpu_context; |
| 583 | int task_ctx_nr; | 597 | int task_ctx_nr; |
| @@ -758,6 +772,9 @@ struct perf_event { | |||
| 758 | u64 shadow_ctx_time; | 772 | u64 shadow_ctx_time; |
| 759 | 773 | ||
| 760 | struct perf_event_attr attr; | 774 | struct perf_event_attr attr; |
| 775 | u16 header_size; | ||
| 776 | u16 id_header_size; | ||
| 777 | u16 read_size; | ||
| 761 | struct hw_perf_event hw; | 778 | struct hw_perf_event hw; |
| 762 | 779 | ||
| 763 | struct perf_event_context *ctx; | 780 | struct perf_event_context *ctx; |
| @@ -887,6 +904,7 @@ struct perf_cpu_context { | |||
| 887 | int exclusive; | 904 | int exclusive; |
| 888 | struct list_head rotation_list; | 905 | struct list_head rotation_list; |
| 889 | int jiffies_interval; | 906 | int jiffies_interval; |
| 907 | struct pmu *active_pmu; | ||
| 890 | }; | 908 | }; |
| 891 | 909 | ||
| 892 | struct perf_output_handle { | 910 | struct perf_output_handle { |
| @@ -902,7 +920,7 @@ struct perf_output_handle { | |||
| 902 | 920 | ||
| 903 | #ifdef CONFIG_PERF_EVENTS | 921 | #ifdef CONFIG_PERF_EVENTS |
| 904 | 922 | ||
| 905 | extern int perf_pmu_register(struct pmu *pmu); | 923 | extern int perf_pmu_register(struct pmu *pmu, char *name, int type); |
| 906 | extern void perf_pmu_unregister(struct pmu *pmu); | 924 | extern void perf_pmu_unregister(struct pmu *pmu); |
| 907 | 925 | ||
| 908 | extern int perf_num_counters(void); | 926 | extern int perf_num_counters(void); |
| @@ -969,6 +987,11 @@ extern int perf_event_overflow(struct perf_event *event, int nmi, | |||
| 969 | struct perf_sample_data *data, | 987 | struct perf_sample_data *data, |
| 970 | struct pt_regs *regs); | 988 | struct pt_regs *regs); |
| 971 | 989 | ||
| 990 | static inline bool is_sampling_event(struct perf_event *event) | ||
| 991 | { | ||
| 992 | return event->attr.sample_period != 0; | ||
| 993 | } | ||
| 994 | |||
| 972 | /* | 995 | /* |
| 973 | * Return 1 for a software event, 0 for a hardware event | 996 | * Return 1 for a software event, 0 for a hardware event |
| 974 | */ | 997 | */ |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 3ec2358f8692..d19f1cca7f74 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -77,7 +77,8 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
| 77 | 77 | ||
| 78 | static inline bool pm_runtime_suspended(struct device *dev) | 78 | static inline bool pm_runtime_suspended(struct device *dev) |
| 79 | { | 79 | { |
| 80 | return dev->power.runtime_status == RPM_SUSPENDED; | 80 | return dev->power.runtime_status == RPM_SUSPENDED |
| 81 | && !dev->power.disable_depth; | ||
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | static inline void pm_runtime_mark_last_busy(struct device *dev) | 84 | static inline void pm_runtime_mark_last_busy(struct device *dev) |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index f31ef61f1c65..2dea94fc4402 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -241,11 +241,6 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
| 241 | #define list_first_entry_rcu(ptr, type, member) \ | 241 | #define list_first_entry_rcu(ptr, type, member) \ |
| 242 | list_entry_rcu((ptr)->next, type, member) | 242 | list_entry_rcu((ptr)->next, type, member) |
| 243 | 243 | ||
| 244 | #define __list_for_each_rcu(pos, head) \ | ||
| 245 | for (pos = rcu_dereference_raw(list_next_rcu(head)); \ | ||
| 246 | pos != (head); \ | ||
| 247 | pos = rcu_dereference_raw(list_next_rcu((pos))) | ||
| 248 | |||
| 249 | /** | 244 | /** |
| 250 | * list_for_each_entry_rcu - iterate over rcu list of given type | 245 | * list_for_each_entry_rcu - iterate over rcu list of given type |
| 251 | * @pos: the type * to use as a loop cursor. | 246 | * @pos: the type * to use as a loop cursor. |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 03cda7bed985..af5614856285 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -47,6 +47,8 @@ | |||
| 47 | extern int rcutorture_runnable; /* for sysctl */ | 47 | extern int rcutorture_runnable; /* for sysctl */ |
| 48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
| 49 | 49 | ||
| 50 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) | ||
| 51 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | ||
| 50 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 52 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
| 51 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | 53 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) |
| 52 | 54 | ||
| @@ -66,7 +68,6 @@ extern void call_rcu_sched(struct rcu_head *head, | |||
| 66 | extern void synchronize_sched(void); | 68 | extern void synchronize_sched(void); |
| 67 | extern void rcu_barrier_bh(void); | 69 | extern void rcu_barrier_bh(void); |
| 68 | extern void rcu_barrier_sched(void); | 70 | extern void rcu_barrier_sched(void); |
| 69 | extern void synchronize_sched_expedited(void); | ||
| 70 | extern int sched_expedited_torture_stats(char *page); | 71 | extern int sched_expedited_torture_stats(char *page); |
| 71 | 72 | ||
| 72 | static inline void __rcu_read_lock_bh(void) | 73 | static inline void __rcu_read_lock_bh(void) |
| @@ -118,7 +119,6 @@ static inline int rcu_preempt_depth(void) | |||
| 118 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ | 119 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ |
| 119 | 120 | ||
| 120 | /* Internal to kernel */ | 121 | /* Internal to kernel */ |
| 121 | extern void rcu_init(void); | ||
| 122 | extern void rcu_sched_qs(int cpu); | 122 | extern void rcu_sched_qs(int cpu); |
| 123 | extern void rcu_bh_qs(int cpu); | 123 | extern void rcu_bh_qs(int cpu); |
| 124 | extern void rcu_check_callbacks(int cpu, int user); | 124 | extern void rcu_check_callbacks(int cpu, int user); |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 13877cb93a60..30ebd7c8d874 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -27,7 +27,9 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
| 29 | 29 | ||
| 30 | #define rcu_init_sched() do { } while (0) | 30 | static inline void rcu_init(void) |
| 31 | { | ||
| 32 | } | ||
| 31 | 33 | ||
| 32 | #ifdef CONFIG_TINY_RCU | 34 | #ifdef CONFIG_TINY_RCU |
| 33 | 35 | ||
| @@ -58,6 +60,11 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
| 58 | synchronize_sched(); | 60 | synchronize_sched(); |
| 59 | } | 61 | } |
| 60 | 62 | ||
| 63 | static inline void synchronize_sched_expedited(void) | ||
| 64 | { | ||
| 65 | synchronize_sched(); | ||
| 66 | } | ||
| 67 | |||
| 61 | #ifdef CONFIG_TINY_RCU | 68 | #ifdef CONFIG_TINY_RCU |
| 62 | 69 | ||
| 63 | static inline void rcu_preempt_note_context_switch(void) | 70 | static inline void rcu_preempt_note_context_switch(void) |
| @@ -125,16 +132,12 @@ static inline void rcu_cpu_stall_reset(void) | |||
| 125 | } | 132 | } |
| 126 | 133 | ||
| 127 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 134 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 128 | |||
| 129 | extern int rcu_scheduler_active __read_mostly; | 135 | extern int rcu_scheduler_active __read_mostly; |
| 130 | extern void rcu_scheduler_starting(void); | 136 | extern void rcu_scheduler_starting(void); |
| 131 | |||
| 132 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 137 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 133 | |||
| 134 | static inline void rcu_scheduler_starting(void) | 138 | static inline void rcu_scheduler_starting(void) |
| 135 | { | 139 | { |
| 136 | } | 140 | } |
| 137 | |||
| 138 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 141 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 139 | 142 | ||
| 140 | #endif /* __LINUX_RCUTINY_H */ | 143 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 95518e628794..3a933482734a 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
| 31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
| 32 | 32 | ||
| 33 | extern void rcu_init(void); | ||
| 33 | extern void rcu_note_context_switch(int cpu); | 34 | extern void rcu_note_context_switch(int cpu); |
| 34 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu); |
| 35 | extern void rcu_cpu_stall_reset(void); | 36 | extern void rcu_cpu_stall_reset(void); |
| @@ -47,6 +48,7 @@ static inline void exit_rcu(void) | |||
| 47 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ | 48 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ |
| 48 | 49 | ||
| 49 | extern void synchronize_rcu_bh(void); | 50 | extern void synchronize_rcu_bh(void); |
| 51 | extern void synchronize_sched_expedited(void); | ||
| 50 | extern void synchronize_rcu_expedited(void); | 52 | extern void synchronize_rcu_expedited(void); |
| 51 | 53 | ||
| 52 | static inline void synchronize_rcu_bh_expedited(void) | 54 | static inline void synchronize_rcu_bh_expedited(void) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2c79e921a68b..777cd01e240e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -143,7 +143,7 @@ extern unsigned long nr_iowait_cpu(int cpu); | |||
| 143 | extern unsigned long this_cpu_load(void); | 143 | extern unsigned long this_cpu_load(void); |
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | extern void calc_global_load(void); | 146 | extern void calc_global_load(unsigned long ticks); |
| 147 | 147 | ||
| 148 | extern unsigned long get_parent_ip(unsigned long addr); | 148 | extern unsigned long get_parent_ip(unsigned long addr); |
| 149 | 149 | ||
| @@ -316,6 +316,7 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write, | |||
| 316 | size_t *lenp, loff_t *ppos); | 316 | size_t *lenp, loff_t *ppos); |
| 317 | extern unsigned int softlockup_panic; | 317 | extern unsigned int softlockup_panic; |
| 318 | extern int softlockup_thresh; | 318 | extern int softlockup_thresh; |
| 319 | void lockup_detector_init(void); | ||
| 319 | #else | 320 | #else |
| 320 | static inline void touch_softlockup_watchdog(void) | 321 | static inline void touch_softlockup_watchdog(void) |
| 321 | { | 322 | { |
| @@ -326,6 +327,9 @@ static inline void touch_softlockup_watchdog_sync(void) | |||
| 326 | static inline void touch_all_softlockup_watchdogs(void) | 327 | static inline void touch_all_softlockup_watchdogs(void) |
| 327 | { | 328 | { |
| 328 | } | 329 | } |
| 330 | static inline void lockup_detector_init(void) | ||
| 331 | { | ||
| 332 | } | ||
| 329 | #endif | 333 | #endif |
| 330 | 334 | ||
| 331 | #ifdef CONFIG_DETECT_HUNG_TASK | 335 | #ifdef CONFIG_DETECT_HUNG_TASK |
| @@ -509,6 +513,8 @@ struct thread_group_cputimer { | |||
| 509 | spinlock_t lock; | 513 | spinlock_t lock; |
| 510 | }; | 514 | }; |
| 511 | 515 | ||
| 516 | struct autogroup; | ||
| 517 | |||
| 512 | /* | 518 | /* |
| 513 | * NOTE! "signal_struct" does not have it's own | 519 | * NOTE! "signal_struct" does not have it's own |
| 514 | * locking, because a shared signal_struct always | 520 | * locking, because a shared signal_struct always |
| @@ -576,6 +582,9 @@ struct signal_struct { | |||
| 576 | 582 | ||
| 577 | struct tty_struct *tty; /* NULL if no tty */ | 583 | struct tty_struct *tty; /* NULL if no tty */ |
| 578 | 584 | ||
| 585 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
| 586 | struct autogroup *autogroup; | ||
| 587 | #endif | ||
| 579 | /* | 588 | /* |
| 580 | * Cumulative resource counters for dead threads in the group, | 589 | * Cumulative resource counters for dead threads in the group, |
| 581 | * and for reaped dead child processes forked by this group. | 590 | * and for reaped dead child processes forked by this group. |
| @@ -1229,13 +1238,18 @@ struct task_struct { | |||
| 1229 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1238 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 1230 | struct rcu_node *rcu_blocked_node; | 1239 | struct rcu_node *rcu_blocked_node; |
| 1231 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 1240 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
| 1241 | #ifdef CONFIG_RCU_BOOST | ||
| 1242 | struct rt_mutex *rcu_boost_mutex; | ||
| 1243 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
| 1232 | 1244 | ||
| 1233 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1245 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
| 1234 | struct sched_info sched_info; | 1246 | struct sched_info sched_info; |
| 1235 | #endif | 1247 | #endif |
| 1236 | 1248 | ||
| 1237 | struct list_head tasks; | 1249 | struct list_head tasks; |
| 1250 | #ifdef CONFIG_SMP | ||
| 1238 | struct plist_node pushable_tasks; | 1251 | struct plist_node pushable_tasks; |
| 1252 | #endif | ||
| 1239 | 1253 | ||
| 1240 | struct mm_struct *mm, *active_mm; | 1254 | struct mm_struct *mm, *active_mm; |
| 1241 | #if defined(SPLIT_RSS_COUNTING) | 1255 | #if defined(SPLIT_RSS_COUNTING) |
| @@ -1759,7 +1773,8 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
| 1759 | #ifdef CONFIG_PREEMPT_RCU | 1773 | #ifdef CONFIG_PREEMPT_RCU |
| 1760 | 1774 | ||
| 1761 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1775 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
| 1762 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | 1776 | #define RCU_READ_UNLOCK_BOOSTED (1 << 1) /* boosted while in RCU read-side. */ |
| 1777 | #define RCU_READ_UNLOCK_NEED_QS (1 << 2) /* RCU core needs CPU response. */ | ||
| 1763 | 1778 | ||
| 1764 | static inline void rcu_copy_process(struct task_struct *p) | 1779 | static inline void rcu_copy_process(struct task_struct *p) |
| 1765 | { | 1780 | { |
| @@ -1767,7 +1782,10 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
| 1767 | p->rcu_read_unlock_special = 0; | 1782 | p->rcu_read_unlock_special = 0; |
| 1768 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1783 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 1769 | p->rcu_blocked_node = NULL; | 1784 | p->rcu_blocked_node = NULL; |
| 1770 | #endif | 1785 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
| 1786 | #ifdef CONFIG_RCU_BOOST | ||
| 1787 | p->rcu_boost_mutex = NULL; | ||
| 1788 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
| 1771 | INIT_LIST_HEAD(&p->rcu_node_entry); | 1789 | INIT_LIST_HEAD(&p->rcu_node_entry); |
| 1772 | } | 1790 | } |
| 1773 | 1791 | ||
| @@ -1872,14 +1890,11 @@ extern void sched_clock_idle_sleep_event(void); | |||
| 1872 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1890 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
| 1873 | 1891 | ||
| 1874 | #ifdef CONFIG_HOTPLUG_CPU | 1892 | #ifdef CONFIG_HOTPLUG_CPU |
| 1875 | extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p); | ||
| 1876 | extern void idle_task_exit(void); | 1893 | extern void idle_task_exit(void); |
| 1877 | #else | 1894 | #else |
| 1878 | static inline void idle_task_exit(void) {} | 1895 | static inline void idle_task_exit(void) {} |
| 1879 | #endif | 1896 | #endif |
| 1880 | 1897 | ||
| 1881 | extern void sched_idle_next(void); | ||
| 1882 | |||
| 1883 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) | 1898 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) |
| 1884 | extern void wake_up_idle_cpu(int cpu); | 1899 | extern void wake_up_idle_cpu(int cpu); |
| 1885 | #else | 1900 | #else |
| @@ -1889,8 +1904,6 @@ static inline void wake_up_idle_cpu(int cpu) { } | |||
| 1889 | extern unsigned int sysctl_sched_latency; | 1904 | extern unsigned int sysctl_sched_latency; |
| 1890 | extern unsigned int sysctl_sched_min_granularity; | 1905 | extern unsigned int sysctl_sched_min_granularity; |
| 1891 | extern unsigned int sysctl_sched_wakeup_granularity; | 1906 | extern unsigned int sysctl_sched_wakeup_granularity; |
| 1892 | extern unsigned int sysctl_sched_shares_ratelimit; | ||
| 1893 | extern unsigned int sysctl_sched_shares_thresh; | ||
| 1894 | extern unsigned int sysctl_sched_child_runs_first; | 1907 | extern unsigned int sysctl_sched_child_runs_first; |
| 1895 | 1908 | ||
| 1896 | enum sched_tunable_scaling { | 1909 | enum sched_tunable_scaling { |
| @@ -1906,6 +1919,7 @@ extern unsigned int sysctl_sched_migration_cost; | |||
| 1906 | extern unsigned int sysctl_sched_nr_migrate; | 1919 | extern unsigned int sysctl_sched_nr_migrate; |
| 1907 | extern unsigned int sysctl_sched_time_avg; | 1920 | extern unsigned int sysctl_sched_time_avg; |
| 1908 | extern unsigned int sysctl_timer_migration; | 1921 | extern unsigned int sysctl_timer_migration; |
| 1922 | extern unsigned int sysctl_sched_shares_window; | ||
| 1909 | 1923 | ||
| 1910 | int sched_proc_update_handler(struct ctl_table *table, int write, | 1924 | int sched_proc_update_handler(struct ctl_table *table, int write, |
| 1911 | void __user *buffer, size_t *length, | 1925 | void __user *buffer, size_t *length, |
| @@ -1931,6 +1945,24 @@ int sched_rt_handler(struct ctl_table *table, int write, | |||
| 1931 | 1945 | ||
| 1932 | extern unsigned int sysctl_sched_compat_yield; | 1946 | extern unsigned int sysctl_sched_compat_yield; |
| 1933 | 1947 | ||
| 1948 | #ifdef CONFIG_SCHED_AUTOGROUP | ||
| 1949 | extern unsigned int sysctl_sched_autogroup_enabled; | ||
| 1950 | |||
| 1951 | extern void sched_autogroup_create_attach(struct task_struct *p); | ||
| 1952 | extern void sched_autogroup_detach(struct task_struct *p); | ||
| 1953 | extern void sched_autogroup_fork(struct signal_struct *sig); | ||
| 1954 | extern void sched_autogroup_exit(struct signal_struct *sig); | ||
| 1955 | #ifdef CONFIG_PROC_FS | ||
| 1956 | extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m); | ||
| 1957 | extern int proc_sched_autogroup_set_nice(struct task_struct *p, int *nice); | ||
| 1958 | #endif | ||
| 1959 | #else | ||
| 1960 | static inline void sched_autogroup_create_attach(struct task_struct *p) { } | ||
| 1961 | static inline void sched_autogroup_detach(struct task_struct *p) { } | ||
| 1962 | static inline void sched_autogroup_fork(struct signal_struct *sig) { } | ||
| 1963 | static inline void sched_autogroup_exit(struct signal_struct *sig) { } | ||
| 1964 | #endif | ||
| 1965 | |||
| 1934 | #ifdef CONFIG_RT_MUTEXES | 1966 | #ifdef CONFIG_RT_MUTEXES |
| 1935 | extern int rt_mutex_getprio(struct task_struct *p); | 1967 | extern int rt_mutex_getprio(struct task_struct *p); |
| 1936 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 1968 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
| @@ -1949,9 +1981,10 @@ extern int task_nice(const struct task_struct *p); | |||
| 1949 | extern int can_nice(const struct task_struct *p, const int nice); | 1981 | extern int can_nice(const struct task_struct *p, const int nice); |
| 1950 | extern int task_curr(const struct task_struct *p); | 1982 | extern int task_curr(const struct task_struct *p); |
| 1951 | extern int idle_cpu(int cpu); | 1983 | extern int idle_cpu(int cpu); |
| 1952 | extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); | 1984 | extern int sched_setscheduler(struct task_struct *, int, |
| 1985 | const struct sched_param *); | ||
| 1953 | extern int sched_setscheduler_nocheck(struct task_struct *, int, | 1986 | extern int sched_setscheduler_nocheck(struct task_struct *, int, |
| 1954 | struct sched_param *); | 1987 | const struct sched_param *); |
| 1955 | extern struct task_struct *idle_task(int cpu); | 1988 | extern struct task_struct *idle_task(int cpu); |
| 1956 | extern struct task_struct *curr_task(int cpu); | 1989 | extern struct task_struct *curr_task(int cpu); |
| 1957 | extern void set_curr_task(int cpu, struct task_struct *p); | 1990 | extern void set_curr_task(int cpu, struct task_struct *p); |
diff --git a/include/linux/sfi.h b/include/linux/sfi.h index 7f770c638e99..fe817918b30e 100644 --- a/include/linux/sfi.h +++ b/include/linux/sfi.h | |||
| @@ -77,6 +77,8 @@ | |||
| 77 | #define SFI_OEM_ID_SIZE 6 | 77 | #define SFI_OEM_ID_SIZE 6 |
| 78 | #define SFI_OEM_TABLE_ID_SIZE 8 | 78 | #define SFI_OEM_TABLE_ID_SIZE 8 |
| 79 | 79 | ||
| 80 | #define SFI_NAME_LEN 16 | ||
| 81 | |||
| 80 | #define SFI_SYST_SEARCH_BEGIN 0x000E0000 | 82 | #define SFI_SYST_SEARCH_BEGIN 0x000E0000 |
| 81 | #define SFI_SYST_SEARCH_END 0x000FFFFF | 83 | #define SFI_SYST_SEARCH_END 0x000FFFFF |
| 82 | 84 | ||
| @@ -156,13 +158,13 @@ struct sfi_device_table_entry { | |||
| 156 | u16 addr; | 158 | u16 addr; |
| 157 | u8 irq; | 159 | u8 irq; |
| 158 | u32 max_freq; | 160 | u32 max_freq; |
| 159 | char name[16]; | 161 | char name[SFI_NAME_LEN]; |
| 160 | } __packed; | 162 | } __packed; |
| 161 | 163 | ||
| 162 | struct sfi_gpio_table_entry { | 164 | struct sfi_gpio_table_entry { |
| 163 | char controller_name[16]; | 165 | char controller_name[SFI_NAME_LEN]; |
| 164 | u16 pin_no; | 166 | u16 pin_no; |
| 165 | char pin_name[16]; | 167 | char pin_name[SFI_NAME_LEN]; |
| 166 | } __packed; | 168 | } __packed; |
| 167 | 169 | ||
| 168 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); | 170 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index ebb0c80ffd6e..12b2b18e50c1 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -230,6 +230,7 @@ enum | |||
| 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ |
| 231 | LINUX_MIB_TCPDEFERACCEPTDROP, | 231 | LINUX_MIB_TCPDEFERACCEPTDROP, |
| 232 | LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ | 232 | LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ |
| 233 | LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */ | ||
| 233 | __LINUX_MIB_MAX | 234 | __LINUX_MIB_MAX |
| 234 | }; | 235 | }; |
| 235 | 236 | ||
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 942e38736901..eba52a100533 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
| @@ -96,16 +96,21 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev) | |||
| 96 | return 0; | 96 | return 0; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | extern char * nvram_get(const char *name); | 99 | #ifdef CONFIG_BCM47XX |
| 100 | #include <asm/mach-bcm47xx/nvram.h> | ||
| 100 | /* Get the device MAC address */ | 101 | /* Get the device MAC address */ |
| 101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | 102 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) |
| 102 | { | 103 | { |
| 103 | #ifdef CONFIG_BCM47XX | 104 | char buf[20]; |
| 104 | char *res = nvram_get("et0macaddr"); | 105 | if (nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0) |
| 105 | if (res) | 106 | return; |
| 106 | memcpy(macaddr, res, 6); | 107 | nvram_parse_macaddr(buf, macaddr); |
| 107 | #endif | ||
| 108 | } | 108 | } |
| 109 | #else | ||
| 110 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | ||
| 111 | { | ||
| 112 | } | ||
| 113 | #endif | ||
| 109 | 114 | ||
| 110 | extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, | 115 | extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, |
| 111 | struct pci_dev *pdev); | 116 | struct pci_dev *pdev); |
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 51efbef38fb0..25310f1d7f37 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define __LINUX_STACKTRACE_H | 2 | #define __LINUX_STACKTRACE_H |
| 3 | 3 | ||
| 4 | struct task_struct; | 4 | struct task_struct; |
| 5 | struct pt_regs; | ||
| 5 | 6 | ||
| 6 | #ifdef CONFIG_STACKTRACE | 7 | #ifdef CONFIG_STACKTRACE |
| 7 | struct task_struct; | 8 | struct task_struct; |
| @@ -13,7 +14,8 @@ struct stack_trace { | |||
| 13 | }; | 14 | }; |
| 14 | 15 | ||
| 15 | extern void save_stack_trace(struct stack_trace *trace); | 16 | extern void save_stack_trace(struct stack_trace *trace); |
| 16 | extern void save_stack_trace_bp(struct stack_trace *trace, unsigned long bp); | 17 | extern void save_stack_trace_regs(struct stack_trace *trace, |
| 18 | struct pt_regs *regs); | ||
| 17 | extern void save_stack_trace_tsk(struct task_struct *tsk, | 19 | extern void save_stack_trace_tsk(struct task_struct *tsk, |
| 18 | struct stack_trace *trace); | 20 | struct stack_trace *trace); |
| 19 | 21 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index cacc27a0e285..18cd0684fc4e 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -127,8 +127,6 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
| 128 | static struct syscall_metadata \ | 128 | static struct syscall_metadata \ |
| 129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | 129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ |
| 130 | static struct ftrace_event_call \ | ||
| 131 | __attribute__((__aligned__(4))) event_enter_##sname; \ | ||
| 132 | static struct ftrace_event_call __used \ | 130 | static struct ftrace_event_call __used \ |
| 133 | __attribute__((__aligned__(4))) \ | 131 | __attribute__((__aligned__(4))) \ |
| 134 | __attribute__((section("_ftrace_events"))) \ | 132 | __attribute__((section("_ftrace_events"))) \ |
| @@ -137,13 +135,12 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 137 | .class = &event_class_syscall_enter, \ | 135 | .class = &event_class_syscall_enter, \ |
| 138 | .event.funcs = &enter_syscall_print_funcs, \ | 136 | .event.funcs = &enter_syscall_print_funcs, \ |
| 139 | .data = (void *)&__syscall_meta_##sname,\ | 137 | .data = (void *)&__syscall_meta_##sname,\ |
| 140 | } | 138 | }; \ |
| 139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) | ||
| 141 | 140 | ||
| 142 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
| 143 | static struct syscall_metadata \ | 142 | static struct syscall_metadata \ |
| 144 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | 143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ |
| 145 | static struct ftrace_event_call \ | ||
| 146 | __attribute__((__aligned__(4))) event_exit_##sname; \ | ||
| 147 | static struct ftrace_event_call __used \ | 144 | static struct ftrace_event_call __used \ |
| 148 | __attribute__((__aligned__(4))) \ | 145 | __attribute__((__aligned__(4))) \ |
| 149 | __attribute__((section("_ftrace_events"))) \ | 146 | __attribute__((section("_ftrace_events"))) \ |
| @@ -152,7 +149,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 152 | .class = &event_class_syscall_exit, \ | 149 | .class = &event_class_syscall_exit, \ |
| 153 | .event.funcs = &exit_syscall_print_funcs, \ | 150 | .event.funcs = &exit_syscall_print_funcs, \ |
| 154 | .data = (void *)&__syscall_meta_##sname,\ | 151 | .data = (void *)&__syscall_meta_##sname,\ |
| 155 | } | 152 | }; \ |
| 153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) | ||
| 156 | 154 | ||
| 157 | #define SYSCALL_METADATA(sname, nb) \ | 155 | #define SYSCALL_METADATA(sname, nb) \ |
| 158 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 341dddb55090..2466e550a41d 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | #define TASKSTATS_VERSION 7 | 36 | #define TASKSTATS_VERSION 8 |
| 37 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 37 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
| 38 | * in linux/sched.h */ | 38 | * in linux/sched.h */ |
| 39 | 39 | ||
| @@ -188,6 +188,7 @@ enum { | |||
| 188 | TASKSTATS_TYPE_STATS, /* taskstats structure */ | 188 | TASKSTATS_TYPE_STATS, /* taskstats structure */ |
| 189 | TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */ | 189 | TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */ |
| 190 | TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */ | 190 | TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */ |
| 191 | TASKSTATS_TYPE_NULL, /* contains nothing */ | ||
| 191 | __TASKSTATS_TYPE_MAX, | 192 | __TASKSTATS_TYPE_MAX, |
| 192 | }; | 193 | }; |
| 193 | 194 | ||
diff --git a/include/linux/timer.h b/include/linux/timer.h index 38cf093ef62c..6abd9138beda 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -24,9 +24,9 @@ struct timer_list { | |||
| 24 | int slack; | 24 | int slack; |
| 25 | 25 | ||
| 26 | #ifdef CONFIG_TIMER_STATS | 26 | #ifdef CONFIG_TIMER_STATS |
| 27 | int start_pid; | ||
| 27 | void *start_site; | 28 | void *start_site; |
| 28 | char start_comm[16]; | 29 | char start_comm[16]; |
| 29 | int start_pid; | ||
| 30 | #endif | 30 | #endif |
| 31 | #ifdef CONFIG_LOCKDEP | 31 | #ifdef CONFIG_LOCKDEP |
| 32 | struct lockdep_map lockdep_map; | 32 | struct lockdep_map lockdep_map; |
| @@ -48,12 +48,38 @@ extern struct tvec_base boot_tvec_bases; | |||
| 48 | #define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn) | 48 | #define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn) |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* | ||
| 52 | * Note that all tvec_bases are 2 byte aligned and lower bit of | ||
| 53 | * base in timer_list is guaranteed to be zero. Use the LSB to | ||
| 54 | * indicate whether the timer is deferrable. | ||
| 55 | * | ||
| 56 | * A deferrable timer will work normally when the system is busy, but | ||
| 57 | * will not cause a CPU to come out of idle just to service it; instead, | ||
| 58 | * the timer will be serviced when the CPU eventually wakes up with a | ||
| 59 | * subsequent non-deferrable timer. | ||
| 60 | */ | ||
| 61 | #define TBASE_DEFERRABLE_FLAG (0x1) | ||
| 62 | |||
| 51 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 63 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
| 52 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | 64 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ |
| 53 | .function = (_function), \ | 65 | .function = (_function), \ |
| 54 | .expires = (_expires), \ | 66 | .expires = (_expires), \ |
| 55 | .data = (_data), \ | 67 | .data = (_data), \ |
| 56 | .base = &boot_tvec_bases, \ | 68 | .base = &boot_tvec_bases, \ |
| 69 | .slack = -1, \ | ||
| 70 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | ||
| 71 | __FILE__ ":" __stringify(__LINE__)) \ | ||
| 72 | } | ||
| 73 | |||
| 74 | #define TBASE_MAKE_DEFERRED(ptr) ((struct tvec_base *) \ | ||
| 75 | ((unsigned char *)(ptr) + TBASE_DEFERRABLE_FLAG)) | ||
| 76 | |||
| 77 | #define TIMER_DEFERRED_INITIALIZER(_function, _expires, _data) {\ | ||
| 78 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | ||
| 79 | .function = (_function), \ | ||
| 80 | .expires = (_expires), \ | ||
| 81 | .data = (_data), \ | ||
| 82 | .base = TBASE_MAKE_DEFERRED(&boot_tvec_bases), \ | ||
| 57 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | 83 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ |
| 58 | __FILE__ ":" __stringify(__LINE__)) \ | 84 | __FILE__ ":" __stringify(__LINE__)) \ |
| 59 | } | 85 | } |
| @@ -248,11 +274,11 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | |||
| 248 | 274 | ||
| 249 | extern void add_timer(struct timer_list *timer); | 275 | extern void add_timer(struct timer_list *timer); |
| 250 | 276 | ||
| 277 | extern int try_to_del_timer_sync(struct timer_list *timer); | ||
| 278 | |||
| 251 | #ifdef CONFIG_SMP | 279 | #ifdef CONFIG_SMP |
| 252 | extern int try_to_del_timer_sync(struct timer_list *timer); | ||
| 253 | extern int del_timer_sync(struct timer_list *timer); | 280 | extern int del_timer_sync(struct timer_list *timer); |
| 254 | #else | 281 | #else |
| 255 | # define try_to_del_timer_sync(t) del_timer(t) | ||
| 256 | # define del_timer_sync(t) del_timer(t) | 282 | # define del_timer_sync(t) del_timer(t) |
| 257 | #endif | 283 | #endif |
| 258 | 284 | ||
diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h new file mode 100644 index 000000000000..d24aabaca474 --- /dev/null +++ b/include/linux/timerqueue.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | #ifndef _LINUX_TIMERQUEUE_H | ||
| 2 | #define _LINUX_TIMERQUEUE_H | ||
| 3 | |||
| 4 | #include <linux/rbtree.h> | ||
| 5 | #include <linux/ktime.h> | ||
| 6 | |||
| 7 | |||
| 8 | struct timerqueue_node { | ||
| 9 | struct rb_node node; | ||
| 10 | ktime_t expires; | ||
| 11 | }; | ||
| 12 | |||
| 13 | struct timerqueue_head { | ||
| 14 | struct rb_root head; | ||
| 15 | struct timerqueue_node *next; | ||
| 16 | }; | ||
| 17 | |||
| 18 | |||
| 19 | extern void timerqueue_add(struct timerqueue_head *head, | ||
| 20 | struct timerqueue_node *node); | ||
| 21 | extern void timerqueue_del(struct timerqueue_head *head, | ||
| 22 | struct timerqueue_node *node); | ||
| 23 | extern struct timerqueue_node *timerqueue_iterate_next( | ||
| 24 | struct timerqueue_node *node); | ||
| 25 | |||
| 26 | /** | ||
| 27 | * timerqueue_getnext - Returns the timer with the earlies expiration time | ||
| 28 | * | ||
| 29 | * @head: head of timerqueue | ||
| 30 | * | ||
| 31 | * Returns a pointer to the timer node that has the | ||
| 32 | * earliest expiration time. | ||
| 33 | */ | ||
| 34 | static inline | ||
| 35 | struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) | ||
| 36 | { | ||
| 37 | return head->next; | ||
| 38 | } | ||
| 39 | |||
| 40 | static inline void timerqueue_init(struct timerqueue_node *node) | ||
| 41 | { | ||
| 42 | RB_CLEAR_NODE(&node->node); | ||
| 43 | } | ||
| 44 | |||
| 45 | static inline void timerqueue_init_head(struct timerqueue_head *head) | ||
| 46 | { | ||
| 47 | head->head = RB_ROOT; | ||
| 48 | head->next = NULL; | ||
| 49 | } | ||
| 50 | #endif /* _LINUX_TIMERQUEUE_H */ | ||
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index a4a90b6726ce..d3e4f87e95c0 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -106,6 +106,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
| 106 | 106 | ||
| 107 | #define TP_PROTO(args...) args | 107 | #define TP_PROTO(args...) args |
| 108 | #define TP_ARGS(args...) args | 108 | #define TP_ARGS(args...) args |
| 109 | #define TP_CONDITION(args...) args | ||
| 109 | 110 | ||
| 110 | #ifdef CONFIG_TRACEPOINTS | 111 | #ifdef CONFIG_TRACEPOINTS |
| 111 | 112 | ||
| @@ -119,12 +120,14 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
| 119 | * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just | 120 | * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just |
| 120 | * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". | 121 | * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". |
| 121 | */ | 122 | */ |
| 122 | #define __DO_TRACE(tp, proto, args) \ | 123 | #define __DO_TRACE(tp, proto, args, cond) \ |
| 123 | do { \ | 124 | do { \ |
| 124 | struct tracepoint_func *it_func_ptr; \ | 125 | struct tracepoint_func *it_func_ptr; \ |
| 125 | void *it_func; \ | 126 | void *it_func; \ |
| 126 | void *__data; \ | 127 | void *__data; \ |
| 127 | \ | 128 | \ |
| 129 | if (!(cond)) \ | ||
| 130 | return; \ | ||
| 128 | rcu_read_lock_sched_notrace(); \ | 131 | rcu_read_lock_sched_notrace(); \ |
| 129 | it_func_ptr = rcu_dereference_sched((tp)->funcs); \ | 132 | it_func_ptr = rcu_dereference_sched((tp)->funcs); \ |
| 130 | if (it_func_ptr) { \ | 133 | if (it_func_ptr) { \ |
| @@ -142,7 +145,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
| 142 | * not add unwanted padding between the beginning of the section and the | 145 | * not add unwanted padding between the beginning of the section and the |
| 143 | * structure. Force alignment to the same alignment as the section start. | 146 | * structure. Force alignment to the same alignment as the section start. |
| 144 | */ | 147 | */ |
| 145 | #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ | 148 | #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ |
| 146 | extern struct tracepoint __tracepoint_##name; \ | 149 | extern struct tracepoint __tracepoint_##name; \ |
| 147 | static inline void trace_##name(proto) \ | 150 | static inline void trace_##name(proto) \ |
| 148 | { \ | 151 | { \ |
| @@ -151,7 +154,8 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
| 151 | do_trace: \ | 154 | do_trace: \ |
| 152 | __DO_TRACE(&__tracepoint_##name, \ | 155 | __DO_TRACE(&__tracepoint_##name, \ |
| 153 | TP_PROTO(data_proto), \ | 156 | TP_PROTO(data_proto), \ |
| 154 | TP_ARGS(data_args)); \ | 157 | TP_ARGS(data_args), \ |
| 158 | TP_CONDITION(cond)); \ | ||
| 155 | } \ | 159 | } \ |
| 156 | static inline int \ | 160 | static inline int \ |
| 157 | register_trace_##name(void (*probe)(data_proto), void *data) \ | 161 | register_trace_##name(void (*probe)(data_proto), void *data) \ |
| @@ -186,7 +190,7 @@ do_trace: \ | |||
| 186 | EXPORT_SYMBOL(__tracepoint_##name) | 190 | EXPORT_SYMBOL(__tracepoint_##name) |
| 187 | 191 | ||
| 188 | #else /* !CONFIG_TRACEPOINTS */ | 192 | #else /* !CONFIG_TRACEPOINTS */ |
| 189 | #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ | 193 | #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ |
| 190 | static inline void trace_##name(proto) \ | 194 | static inline void trace_##name(proto) \ |
| 191 | { } \ | 195 | { } \ |
| 192 | static inline int \ | 196 | static inline int \ |
| @@ -227,13 +231,20 @@ do_trace: \ | |||
| 227 | * "void *__data, proto" as the callback prototype. | 231 | * "void *__data, proto" as the callback prototype. |
| 228 | */ | 232 | */ |
| 229 | #define DECLARE_TRACE_NOARGS(name) \ | 233 | #define DECLARE_TRACE_NOARGS(name) \ |
| 230 | __DECLARE_TRACE(name, void, , void *__data, __data) | 234 | __DECLARE_TRACE(name, void, , 1, void *__data, __data) |
| 231 | 235 | ||
| 232 | #define DECLARE_TRACE(name, proto, args) \ | 236 | #define DECLARE_TRACE(name, proto, args) \ |
| 233 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ | 237 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \ |
| 234 | PARAMS(void *__data, proto), \ | 238 | PARAMS(void *__data, proto), \ |
| 235 | PARAMS(__data, args)) | 239 | PARAMS(__data, args)) |
| 236 | 240 | ||
| 241 | #define DECLARE_TRACE_CONDITION(name, proto, args, cond) \ | ||
| 242 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), PARAMS(cond), \ | ||
| 243 | PARAMS(void *__data, proto), \ | ||
| 244 | PARAMS(__data, args)) | ||
| 245 | |||
| 246 | #define TRACE_EVENT_FLAGS(event, flag) | ||
| 247 | |||
| 237 | #endif /* DECLARE_TRACE */ | 248 | #endif /* DECLARE_TRACE */ |
| 238 | 249 | ||
| 239 | #ifndef TRACE_EVENT | 250 | #ifndef TRACE_EVENT |
| @@ -347,11 +358,21 @@ do_trace: \ | |||
| 347 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 358 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
| 348 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ | 359 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ |
| 349 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 360 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
| 361 | #define DEFINE_EVENT_CONDITION(template, name, proto, \ | ||
| 362 | args, cond) \ | ||
| 363 | DECLARE_TRACE_CONDITION(name, PARAMS(proto), \ | ||
| 364 | PARAMS(args), PARAMS(cond)) | ||
| 350 | 365 | ||
| 351 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ | 366 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ |
| 352 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 367 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
| 353 | #define TRACE_EVENT_FN(name, proto, args, struct, \ | 368 | #define TRACE_EVENT_FN(name, proto, args, struct, \ |
| 354 | assign, print, reg, unreg) \ | 369 | assign, print, reg, unreg) \ |
| 355 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 370 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
| 371 | #define TRACE_EVENT_CONDITION(name, proto, args, cond, \ | ||
| 372 | struct, assign, print) \ | ||
| 373 | DECLARE_TRACE_CONDITION(name, PARAMS(proto), \ | ||
| 374 | PARAMS(args), PARAMS(cond)) | ||
| 375 | |||
| 376 | #define TRACE_EVENT_FLAGS(event, flag) | ||
| 356 | 377 | ||
| 357 | #endif /* ifdef TRACE_EVENT (see note above) */ | 378 | #endif /* ifdef TRACE_EVENT (see note above) */ |
diff --git a/include/linux/unaligned/packed_struct.h b/include/linux/unaligned/packed_struct.h index 2498bb9fe002..c9a6abd972a1 100644 --- a/include/linux/unaligned/packed_struct.h +++ b/include/linux/unaligned/packed_struct.h | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
| 5 | 5 | ||
| 6 | struct __una_u16 { u16 x __attribute__((packed)); }; | 6 | struct __una_u16 { u16 x; } __attribute__((packed)); |
| 7 | struct __una_u32 { u32 x __attribute__((packed)); }; | 7 | struct __una_u32 { u32 x; } __attribute__((packed)); |
| 8 | struct __una_u64 { u64 x __attribute__((packed)); }; | 8 | struct __una_u64 { u64 x; } __attribute__((packed)); |
| 9 | 9 | ||
| 10 | static inline u16 __get_unaligned_cpu16(const void *p) | 10 | static inline u16 __get_unaligned_cpu16(const void *p) |
| 11 | { | 11 | { |
diff --git a/include/linux/video_output.h b/include/linux/video_output.h index 2fb46bc9340d..ed5cdeb3604d 100644 --- a/include/linux/video_output.h +++ b/include/linux/video_output.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #ifndef _LINUX_VIDEO_OUTPUT_H | 23 | #ifndef _LINUX_VIDEO_OUTPUT_H |
| 24 | #define _LINUX_VIDEO_OUTPUT_H | 24 | #define _LINUX_VIDEO_OUTPUT_H |
| 25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
| 26 | #include <linux/err.h> | ||
| 26 | struct output_device; | 27 | struct output_device; |
| 27 | struct output_properties { | 28 | struct output_properties { |
| 28 | int (*set_state)(struct output_device *); | 29 | int (*set_state)(struct output_device *); |
| @@ -34,9 +35,23 @@ struct output_device { | |||
| 34 | struct device dev; | 35 | struct device dev; |
| 35 | }; | 36 | }; |
| 36 | #define to_output_device(obj) container_of(obj, struct output_device, dev) | 37 | #define to_output_device(obj) container_of(obj, struct output_device, dev) |
| 38 | #if defined(CONFIG_VIDEO_OUTPUT_CONTROL) || defined(CONFIG_VIDEO_OUTPUT_CONTROL_MODULE) | ||
| 37 | struct output_device *video_output_register(const char *name, | 39 | struct output_device *video_output_register(const char *name, |
| 38 | struct device *dev, | 40 | struct device *dev, |
| 39 | void *devdata, | 41 | void *devdata, |
| 40 | struct output_properties *op); | 42 | struct output_properties *op); |
| 41 | void video_output_unregister(struct output_device *dev); | 43 | void video_output_unregister(struct output_device *dev); |
| 44 | #else | ||
| 45 | static struct output_device *video_output_register(const char *name, | ||
| 46 | struct device *dev, | ||
| 47 | void *devdata, | ||
| 48 | struct output_properties *op) | ||
| 49 | { | ||
| 50 | return ERR_PTR(-ENODEV); | ||
| 51 | } | ||
| 52 | static void video_output_unregister(struct output_device *dev) | ||
| 53 | { | ||
| 54 | return; | ||
| 55 | } | ||
| 56 | #endif | ||
| 42 | #endif | 57 | #endif |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 0c0771f06bfa..bd257fee6031 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -127,12 +127,20 @@ struct execute_work { | |||
| 127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | 127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | #define __DEFERRED_WORK_INITIALIZER(n, f) { \ | ||
| 131 | .work = __WORK_INITIALIZER((n).work, (f)), \ | ||
| 132 | .timer = TIMER_DEFERRED_INITIALIZER(NULL, 0, 0), \ | ||
| 133 | } | ||
| 134 | |||
| 130 | #define DECLARE_WORK(n, f) \ | 135 | #define DECLARE_WORK(n, f) \ |
| 131 | struct work_struct n = __WORK_INITIALIZER(n, f) | 136 | struct work_struct n = __WORK_INITIALIZER(n, f) |
| 132 | 137 | ||
| 133 | #define DECLARE_DELAYED_WORK(n, f) \ | 138 | #define DECLARE_DELAYED_WORK(n, f) \ |
| 134 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) | 139 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) |
| 135 | 140 | ||
| 141 | #define DECLARE_DEFERRED_WORK(n, f) \ | ||
| 142 | struct delayed_work n = __DEFERRED_WORK_INITIALIZER(n, f) | ||
| 143 | |||
| 136 | /* | 144 | /* |
| 137 | * initialize a work item's function pointer | 145 | * initialize a work item's function pointer |
| 138 | */ | 146 | */ |
