diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-01-11 10:28:36 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-01-11 15:02:19 -0500 |
commit | a2c50f69168deec3f7e47644eb4ef4f8a3ee6910 (patch) | |
tree | 987197653dcdbf3d33a7c678dbef9cc884f36afa /include | |
parent | 8c3df3e58cde676de4df9363c00f37dbfce08e5c (diff) | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) |
Merge commit 'v2.6.37' into for-2.6.38-incoming
I made a slight mess of Documentation/filesystems/Locking; resolve
conflicts with upstream before fixing it up.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 10 | ||||
-rw-r--r-- | include/linux/bootmem.h | 2 | ||||
-rw-r--r-- | include/linux/ceph/libceph.h | 6 | ||||
-rw-r--r-- | include/linux/cnt32_to_63.h | 20 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 13 | ||||
-rw-r--r-- | include/linux/fanotify.h | 10 | ||||
-rw-r--r-- | include/linux/fsnotify.h | 3 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 2 | ||||
-rw-r--r-- | include/linux/input.h | 6 | ||||
-rw-r--r-- | include/linux/ioport.h | 2 | ||||
-rw-r--r-- | include/linux/kthread.h | 45 | ||||
-rw-r--r-- | include/linux/netlink.h | 2 | ||||
-rw-r--r-- | include/linux/perf_event.h | 1 | ||||
-rw-r--r-- | include/linux/pm_runtime.h | 3 | ||||
-rw-r--r-- | include/linux/sched.h | 2 | ||||
-rw-r--r-- | include/linux/ssb/ssb_driver_gige.h | 17 | ||||
-rw-r--r-- | include/linux/taskstats.h | 3 | ||||
-rw-r--r-- | include/linux/unaligned/packed_struct.h | 6 | ||||
-rw-r--r-- | include/media/saa7146.h | 2 | ||||
-rw-r--r-- | include/media/v4l2-device.h | 2 | ||||
-rw-r--r-- | include/media/wm8775.h | 3 | ||||
-rw-r--r-- | include/net/flow.h | 1 | ||||
-rw-r--r-- | include/net/ip6_route.h | 10 | ||||
-rw-r--r-- | include/net/mac80211.h | 28 | ||||
-rw-r--r-- | include/net/pkt_cls.h | 4 | ||||
-rw-r--r-- | include/net/sch_generic.h | 6 | ||||
-rw-r--r-- | include/net/sock.h | 3 |
27 files changed, 155 insertions, 57 deletions
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/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/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/input.h b/include/linux/input.h index a8af21d42bc1..9777668883be 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -104,8 +104,10 @@ struct input_keymap_entry { | |||
104 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 104 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
105 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ | 105 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
106 | 106 | ||
107 | #define EVIOCGKEYCODE _IOR('E', 0x04, struct input_keymap_entry) /* get keycode */ | 107 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
108 | #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) | ||
109 | 111 | ||
110 | #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 */ |
111 | #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 */ |
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/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/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/perf_event.h b/include/linux/perf_event.h index de2c41758e29..4f1279e105ee 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -887,6 +887,7 @@ struct perf_cpu_context { | |||
887 | int exclusive; | 887 | int exclusive; |
888 | struct list_head rotation_list; | 888 | struct list_head rotation_list; |
889 | int jiffies_interval; | 889 | int jiffies_interval; |
890 | struct pmu *active_pmu; | ||
890 | }; | 891 | }; |
891 | 892 | ||
892 | struct perf_output_handle { | 893 | struct perf_output_handle { |
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/sched.h b/include/linux/sched.h index 2c79e921a68b..223874538b33 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 | ||
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/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/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/media/saa7146.h b/include/media/saa7146.h index 7a9f76ecbbbd..ac7ce00f39cf 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h | |||
@@ -161,7 +161,7 @@ extern struct list_head saa7146_devices; | |||
161 | extern struct mutex saa7146_devices_lock; | 161 | extern struct mutex saa7146_devices_lock; |
162 | int saa7146_register_extension(struct saa7146_extension*); | 162 | int saa7146_register_extension(struct saa7146_extension*); |
163 | int saa7146_unregister_extension(struct saa7146_extension*); | 163 | int saa7146_unregister_extension(struct saa7146_extension*); |
164 | struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); | 164 | struct saa7146_format* saa7146_format_by_fourcc(struct saa7146_dev *dev, int fourcc); |
165 | int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt); | 165 | int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt); |
166 | void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt); | 166 | void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt); |
167 | int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length ); | 167 | int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length ); |
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 6648036b728d..b16f307d471a 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
@@ -51,6 +51,8 @@ struct v4l2_device { | |||
51 | unsigned int notification, void *arg); | 51 | unsigned int notification, void *arg); |
52 | /* The control handler. May be NULL. */ | 52 | /* The control handler. May be NULL. */ |
53 | struct v4l2_ctrl_handler *ctrl_handler; | 53 | struct v4l2_ctrl_handler *ctrl_handler; |
54 | /* BKL replacement mutex. Temporary solution only. */ | ||
55 | struct mutex ioctl_lock; | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | /* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev. | 58 | /* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev. |
diff --git a/include/media/wm8775.h b/include/media/wm8775.h index a1c4d417dfa2..60739c5a23ae 100644 --- a/include/media/wm8775.h +++ b/include/media/wm8775.h | |||
@@ -32,7 +32,4 @@ | |||
32 | #define WM8775_AIN3 4 | 32 | #define WM8775_AIN3 4 |
33 | #define WM8775_AIN4 8 | 33 | #define WM8775_AIN4 8 |
34 | 34 | ||
35 | /* subdev group ID */ | ||
36 | #define WM8775_GID (1 << 0) | ||
37 | |||
38 | #endif | 35 | #endif |
diff --git a/include/net/flow.h b/include/net/flow.h index 0ac3fb5e0973..bb08692a20b0 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -49,7 +49,6 @@ struct flowi { | |||
49 | __u8 proto; | 49 | __u8 proto; |
50 | __u8 flags; | 50 | __u8 flags; |
51 | #define FLOWI_FLAG_ANYSRC 0x01 | 51 | #define FLOWI_FLAG_ANYSRC 0x01 |
52 | #define FLOWI_FLAG_MATCH_ANY_IIF 0x02 | ||
53 | union { | 52 | union { |
54 | struct { | 53 | struct { |
55 | __be16 sport; | 54 | __be16 sport; |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 278312c95f96..2ab926860cd8 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -164,5 +164,15 @@ static inline int ipv6_unicast_destination(struct sk_buff *skb) | |||
164 | return rt->rt6i_flags & RTF_LOCAL; | 164 | return rt->rt6i_flags & RTF_LOCAL; |
165 | } | 165 | } |
166 | 166 | ||
167 | int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); | ||
168 | |||
169 | static inline int ip6_skb_dst_mtu(struct sk_buff *skb) | ||
170 | { | ||
171 | struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL; | ||
172 | |||
173 | return (np && np->pmtudisc == IPV6_PMTUDISC_PROBE) ? | ||
174 | skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); | ||
175 | } | ||
176 | |||
167 | #endif | 177 | #endif |
168 | #endif | 178 | #endif |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 9fdf982d1286..365359b24177 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2024,8 +2024,8 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw, | |||
2024 | * | 2024 | * |
2025 | * This function may not be called in IRQ context. Calls to this function | 2025 | * This function may not be called in IRQ context. Calls to this function |
2026 | * for a single hardware must be synchronized against each other. Calls | 2026 | * for a single hardware must be synchronized against each other. Calls |
2027 | * to this function and ieee80211_tx_status_irqsafe() may not be mixed | 2027 | * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() |
2028 | * for a single hardware. | 2028 | * may not be mixed for a single hardware. |
2029 | * | 2029 | * |
2030 | * @hw: the hardware the frame was transmitted by | 2030 | * @hw: the hardware the frame was transmitted by |
2031 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 2031 | * @skb: the frame that was transmitted, owned by mac80211 after this call |
@@ -2034,13 +2034,33 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, | |||
2034 | struct sk_buff *skb); | 2034 | struct sk_buff *skb); |
2035 | 2035 | ||
2036 | /** | 2036 | /** |
2037 | * ieee80211_tx_status_ni - transmit status callback (in process context) | ||
2038 | * | ||
2039 | * Like ieee80211_tx_status() but can be called in process context. | ||
2040 | * | ||
2041 | * Calls to this function, ieee80211_tx_status() and | ||
2042 | * ieee80211_tx_status_irqsafe() may not be mixed | ||
2043 | * for a single hardware. | ||
2044 | * | ||
2045 | * @hw: the hardware the frame was transmitted by | ||
2046 | * @skb: the frame that was transmitted, owned by mac80211 after this call | ||
2047 | */ | ||
2048 | static inline void ieee80211_tx_status_ni(struct ieee80211_hw *hw, | ||
2049 | struct sk_buff *skb) | ||
2050 | { | ||
2051 | local_bh_disable(); | ||
2052 | ieee80211_tx_status(hw, skb); | ||
2053 | local_bh_enable(); | ||
2054 | } | ||
2055 | |||
2056 | /** | ||
2037 | * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback | 2057 | * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback |
2038 | * | 2058 | * |
2039 | * Like ieee80211_tx_status() but can be called in IRQ context | 2059 | * Like ieee80211_tx_status() but can be called in IRQ context |
2040 | * (internally defers to a tasklet.) | 2060 | * (internally defers to a tasklet.) |
2041 | * | 2061 | * |
2042 | * Calls to this function and ieee80211_tx_status() may not be mixed for a | 2062 | * Calls to this function, ieee80211_tx_status() and |
2043 | * single hardware. | 2063 | * ieee80211_tx_status_ni() may not be mixed for a single hardware. |
2044 | * | 2064 | * |
2045 | * @hw: the hardware the frame was transmitted by | 2065 | * @hw: the hardware the frame was transmitted by |
2046 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 2066 | * @skb: the frame that was transmitted, owned by mac80211 after this call |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index dd3031aed9d5..9fcc680ab6b9 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
@@ -323,7 +323,9 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer) | |||
323 | static inline int tcf_valid_offset(const struct sk_buff *skb, | 323 | static inline int tcf_valid_offset(const struct sk_buff *skb, |
324 | const unsigned char *ptr, const int len) | 324 | const unsigned char *ptr, const int len) |
325 | { | 325 | { |
326 | return unlikely((ptr + len) < skb_tail_pointer(skb) && ptr > skb->head); | 326 | return likely((ptr + len) <= skb_tail_pointer(skb) && |
327 | ptr >= skb->head && | ||
328 | (ptr <= (ptr + len))); | ||
327 | } | 329 | } |
328 | 330 | ||
329 | #ifdef CONFIG_NET_CLS_IND | 331 | #ifdef CONFIG_NET_CLS_IND |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ea1f8a83160d..79f34e2b752f 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -610,11 +610,7 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask, | |||
610 | { | 610 | { |
611 | struct sk_buff *n; | 611 | struct sk_buff *n; |
612 | 612 | ||
613 | if ((action == TC_ACT_STOLEN || action == TC_ACT_QUEUED) && | 613 | n = skb_clone(skb, gfp_mask); |
614 | !skb_shared(skb)) | ||
615 | n = skb_get(skb); | ||
616 | else | ||
617 | n = skb_clone(skb, gfp_mask); | ||
618 | 614 | ||
619 | if (n) { | 615 | if (n) { |
620 | n->tc_verd = SET_TC_VERD(n->tc_verd, 0); | 616 | n->tc_verd = SET_TC_VERD(n->tc_verd, 0); |
diff --git a/include/net/sock.h b/include/net/sock.h index 659d968d95c5..7d3f7ce239b5 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -754,6 +754,7 @@ struct proto { | |||
754 | void (*unhash)(struct sock *sk); | 754 | void (*unhash)(struct sock *sk); |
755 | void (*rehash)(struct sock *sk); | 755 | void (*rehash)(struct sock *sk); |
756 | int (*get_port)(struct sock *sk, unsigned short snum); | 756 | int (*get_port)(struct sock *sk, unsigned short snum); |
757 | void (*clear_sk)(struct sock *sk, int size); | ||
757 | 758 | ||
758 | /* Keeping track of sockets in use */ | 759 | /* Keeping track of sockets in use */ |
759 | #ifdef CONFIG_PROC_FS | 760 | #ifdef CONFIG_PROC_FS |
@@ -852,6 +853,8 @@ static inline void __sk_prot_rehash(struct sock *sk) | |||
852 | sk->sk_prot->hash(sk); | 853 | sk->sk_prot->hash(sk); |
853 | } | 854 | } |
854 | 855 | ||
856 | void sk_prot_clear_portaddr_nulls(struct sock *sk, int size); | ||
857 | |||
855 | /* About 10 seconds */ | 858 | /* About 10 seconds */ |
856 | #define SOCK_DESTROY_TIME (10*HZ) | 859 | #define SOCK_DESTROY_TIME (10*HZ) |
857 | 860 | ||