diff options
Diffstat (limited to 'include')
52 files changed, 290 insertions, 93 deletions
diff --git a/include/acpi/video.h b/include/acpi/video.h index 551793c9b6e8..0e98e679d3a7 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
| @@ -1,6 +1,10 @@ | |||
| 1 | #ifndef __ACPI_VIDEO_H | 1 | #ifndef __ACPI_VIDEO_H |
| 2 | #define __ACPI_VIDEO_H | 2 | #define __ACPI_VIDEO_H |
| 3 | 3 | ||
| 4 | #include <linux/errno.h> /* for ENODEV */ | ||
| 5 | |||
| 6 | struct acpi_device; | ||
| 7 | |||
| 4 | #define ACPI_VIDEO_DISPLAY_CRT 1 | 8 | #define ACPI_VIDEO_DISPLAY_CRT 1 |
| 5 | #define ACPI_VIDEO_DISPLAY_TV 2 | 9 | #define ACPI_VIDEO_DISPLAY_TV 2 |
| 6 | #define ACPI_VIDEO_DISPLAY_DVI 3 | 10 | #define ACPI_VIDEO_DISPLAY_DVI 3 |
| @@ -26,4 +30,3 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type, | |||
| 26 | #endif | 30 | #endif |
| 27 | 31 | ||
| 28 | #endif | 32 | #endif |
| 29 | |||
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 8c641bed9bbd..a2776e2807a4 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
| @@ -287,6 +287,8 @@ typedef struct drm_i915_irq_wait { | |||
| 287 | #define I915_PARAM_HAS_EXECBUF2 9 | 287 | #define I915_PARAM_HAS_EXECBUF2 9 |
| 288 | #define I915_PARAM_HAS_BSD 10 | 288 | #define I915_PARAM_HAS_BSD 10 |
| 289 | #define I915_PARAM_HAS_BLT 11 | 289 | #define I915_PARAM_HAS_BLT 11 |
| 290 | #define I915_PARAM_HAS_RELAXED_FENCING 12 | ||
| 291 | #define I915_PARAM_HAS_COHERENT_RINGS 13 | ||
| 290 | 292 | ||
| 291 | typedef struct drm_i915_getparam { | 293 | typedef struct drm_i915_getparam { |
| 292 | int param; | 294 | int param; |
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/amba/serial.h b/include/linux/amba/serial.h index 6021588ba0a8..5479fdc849e9 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
| @@ -113,6 +113,21 @@ | |||
| 113 | #define UART01x_LCRH_PEN 0x02 | 113 | #define UART01x_LCRH_PEN 0x02 |
| 114 | #define UART01x_LCRH_BRK 0x01 | 114 | #define UART01x_LCRH_BRK 0x01 |
| 115 | 115 | ||
| 116 | #define ST_UART011_DMAWM_RX_1 (0 << 3) | ||
| 117 | #define ST_UART011_DMAWM_RX_2 (1 << 3) | ||
| 118 | #define ST_UART011_DMAWM_RX_4 (2 << 3) | ||
| 119 | #define ST_UART011_DMAWM_RX_8 (3 << 3) | ||
| 120 | #define ST_UART011_DMAWM_RX_16 (4 << 3) | ||
| 121 | #define ST_UART011_DMAWM_RX_32 (5 << 3) | ||
| 122 | #define ST_UART011_DMAWM_RX_48 (6 << 3) | ||
| 123 | #define ST_UART011_DMAWM_TX_1 0 | ||
| 124 | #define ST_UART011_DMAWM_TX_2 1 | ||
| 125 | #define ST_UART011_DMAWM_TX_4 2 | ||
| 126 | #define ST_UART011_DMAWM_TX_8 3 | ||
| 127 | #define ST_UART011_DMAWM_TX_16 4 | ||
| 128 | #define ST_UART011_DMAWM_TX_32 5 | ||
| 129 | #define ST_UART011_DMAWM_TX_48 6 | ||
| 130 | |||
| 116 | #define UART010_IIR_RTIS 0x08 | 131 | #define UART010_IIR_RTIS 0x08 |
| 117 | #define UART010_IIR_TIS 0x04 | 132 | #define UART010_IIR_TIS 0x04 |
| 118 | #define UART010_IIR_RIS 0x02 | 133 | #define UART010_IIR_RIS 0x02 |
| @@ -180,6 +195,13 @@ struct amba_device; /* in uncompress this is included but amba/bus.h is not */ | |||
| 180 | struct amba_pl010_data { | 195 | struct amba_pl010_data { |
| 181 | void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl); | 196 | void (*set_mctrl)(struct amba_device *dev, void __iomem *base, unsigned int mctrl); |
| 182 | }; | 197 | }; |
| 198 | |||
| 199 | struct dma_chan; | ||
| 200 | struct amba_pl011_data { | ||
| 201 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | ||
| 202 | void *dma_rx_param; | ||
| 203 | void *dma_tx_param; | ||
| 204 | }; | ||
| 183 | #endif | 205 | #endif |
| 184 | 206 | ||
| 185 | #endif | 207 | #endif |
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/cpu.h b/include/linux/cpu.h index 4823af64e9db..5f09323ee880 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -10,11 +10,6 @@ | |||
| 10 | * | 10 | * |
| 11 | * CPUs are exported via sysfs in the class/cpu/devices/ | 11 | * CPUs are exported via sysfs in the class/cpu/devices/ |
| 12 | * directory. | 12 | * directory. |
| 13 | * | ||
| 14 | * Per-cpu interfaces can be implemented using a struct device_interface. | ||
| 15 | * See the following for how to do this: | ||
| 16 | * - drivers/base/intf.c | ||
| 17 | * - Documentation/driver-model/interface.txt | ||
| 18 | */ | 13 | */ |
| 19 | #ifndef _LINUX_CPU_H_ | 14 | #ifndef _LINUX_CPU_H_ |
| 20 | #define _LINUX_CPU_H_ | 15 | #define _LINUX_CPU_H_ |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 0026f267da20..088cd4ace4ef 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
| @@ -20,7 +20,14 @@ extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, | |||
| 20 | #define vmcore_elf_check_arch_cross(x) 0 | 20 | #define vmcore_elf_check_arch_cross(x) 0 |
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) | 23 | /* |
| 24 | * Architecture code can redefine this if there are any special checks | ||
| 25 | * needed for 64-bit ELF vmcores. In case of 32-bit only architecture, | ||
| 26 | * this can be set to zero. | ||
| 27 | */ | ||
| 28 | #ifndef vmcore_elf64_check_arch | ||
| 29 | #define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) | ||
| 30 | #endif | ||
| 24 | 31 | ||
| 25 | /* | 32 | /* |
| 26 | * is_kdump_kernel() checks whether this kernel is booting after a panic of | 33 | * is_kdump_kernel() checks whether this kernel is booting after a panic of |
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/gfp.h b/include/linux/gfp.h index e8713d55360a..f54adfcbec9c 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -360,7 +360,7 @@ void drain_local_pages(void *dummy); | |||
| 360 | 360 | ||
| 361 | extern gfp_t gfp_allowed_mask; | 361 | extern gfp_t gfp_allowed_mask; |
| 362 | 362 | ||
| 363 | extern void set_gfp_allowed_mask(gfp_t mask); | 363 | extern void pm_restrict_gfp_mask(void); |
| 364 | extern gfp_t clear_gfp_allowed_mask(gfp_t mask); | 364 | extern void pm_restore_gfp_mask(void); |
| 365 | 365 | ||
| 366 | #endif /* __LINUX_GFP_H */ | 366 | #endif /* __LINUX_GFP_H */ |
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/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/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/memory_hotplug.h b/include/linux/memory_hotplug.h index 4307231bd22f..31c237a00c48 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -161,6 +161,9 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat); | |||
| 161 | extern void put_page_bootmem(struct page *page); | 161 | extern void put_page_bootmem(struct page *page); |
| 162 | #endif | 162 | #endif |
| 163 | 163 | ||
| 164 | void lock_memory_hotplug(void); | ||
| 165 | void unlock_memory_hotplug(void); | ||
| 166 | |||
| 164 | #else /* ! CONFIG_MEMORY_HOTPLUG */ | 167 | #else /* ! CONFIG_MEMORY_HOTPLUG */ |
| 165 | /* | 168 | /* |
| 166 | * Stub functions for when hotplug is off | 169 | * Stub functions for when hotplug is off |
| @@ -192,6 +195,9 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
| 192 | { | 195 | { |
| 193 | } | 196 | } |
| 194 | 197 | ||
| 198 | static inline void lock_memory_hotplug(void) {} | ||
| 199 | static inline void unlock_memory_hotplug(void) {} | ||
| 200 | |||
| 195 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 201 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
| 196 | 202 | ||
| 197 | #ifdef CONFIG_MEMORY_HOTREMOVE | 203 | #ifdef CONFIG_MEMORY_HOTREMOVE |
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/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/node.h b/include/linux/node.h index 06292dac3eab..1466945cc9ef 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
| @@ -10,11 +10,6 @@ | |||
| 10 | * | 10 | * |
| 11 | * Nodes are exported via driverfs in the class/node/devices/ | 11 | * Nodes are exported via driverfs in the class/node/devices/ |
| 12 | * directory. | 12 | * directory. |
| 13 | * | ||
| 14 | * Per-node interfaces can be implemented using a struct device_interface. | ||
| 15 | * See the following for how to do this: | ||
| 16 | * - drivers/base/intf.c | ||
| 17 | * - Documentation/driver-model/interface.txt | ||
| 18 | */ | 13 | */ |
| 19 | #ifndef _LINUX_NODE_H_ | 14 | #ifndef _LINUX_NODE_H_ |
| 20 | #define _LINUX_NODE_H_ | 15 | #define _LINUX_NODE_H_ |
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/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/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/tty.h b/include/linux/tty.h index 032d79ff1d9d..54e4eaaa0561 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -366,6 +366,7 @@ struct tty_file_private { | |||
| 366 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 366 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
| 367 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ | 367 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ |
| 368 | #define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ | 368 | #define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ |
| 369 | #define TTY_HUPPING 21 /* ->hangup() in progress */ | ||
| 369 | 370 | ||
| 370 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 371 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
| 371 | 372 | ||
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index d6188e5a52df..665517c05eaf 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright(C) 2005, Benedikt Spranger <b.spranger@linutronix.de> | 4 | * Copyright(C) 2005, Benedikt Spranger <b.spranger@linutronix.de> |
| 5 | * Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de> | 5 | * Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de> |
| 6 | * Copyright(C) 2006, Hans J. Koch <hjk@linutronix.de> | 6 | * Copyright(C) 2006, Hans J. Koch <hjk@hansjkoch.de> |
| 7 | * Copyright(C) 2006, Greg Kroah-Hartman <greg@kroah.com> | 7 | * Copyright(C) 2006, Greg Kroah-Hartman <greg@kroah.com> |
| 8 | * | 8 | * |
| 9 | * Userspace IO driver. | 9 | * Userspace IO driver. |
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/usb.h b/include/linux/usb.h index 24300d8a1bc1..a28eb2592577 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -313,6 +313,10 @@ struct usb_bus { | |||
| 313 | int busnum; /* Bus number (in order of reg) */ | 313 | int busnum; /* Bus number (in order of reg) */ |
| 314 | const char *bus_name; /* stable id (PCI slot_name etc) */ | 314 | const char *bus_name; /* stable id (PCI slot_name etc) */ |
| 315 | u8 uses_dma; /* Does the host controller use DMA? */ | 315 | u8 uses_dma; /* Does the host controller use DMA? */ |
| 316 | u8 uses_pio_for_control; /* | ||
| 317 | * Does the host controller use PIO | ||
| 318 | * for control transfers? | ||
| 319 | */ | ||
| 316 | u8 otg_port; /* 0, or number of OTG/HNP port */ | 320 | u8 otg_port; /* 0, or number of OTG/HNP port */ |
| 317 | unsigned is_b_host:1; /* true during some HNP roleswitches */ | 321 | unsigned is_b_host:1; /* true during some HNP roleswitches */ |
| 318 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ | 322 | unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ |
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/vmalloc.h b/include/linux/vmalloc.h index a03dcf62ca9d..44b54f619ac6 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -7,8 +7,6 @@ | |||
| 7 | 7 | ||
| 8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
| 9 | 9 | ||
| 10 | extern bool vmap_lazy_unmap; | ||
| 11 | |||
| 12 | /* bits in flags of vmalloc's vm_struct below */ | 10 | /* bits in flags of vmalloc's vm_struct below */ |
| 13 | #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ | 11 | #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ |
| 14 | #define VM_ALLOC 0x00000002 /* vmalloc() */ | 12 | #define VM_ALLOC 0x00000002 /* vmalloc() */ |
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-common.h b/include/media/v4l2-common.h index 41dd480e45f1..239125af3ea3 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
| @@ -137,31 +137,27 @@ struct v4l2_subdev_ops; | |||
| 137 | 137 | ||
| 138 | 138 | ||
| 139 | /* Load an i2c module and return an initialized v4l2_subdev struct. | 139 | /* Load an i2c module and return an initialized v4l2_subdev struct. |
| 140 | Only call request_module if module_name != NULL. | ||
| 141 | The client_type argument is the name of the chip that's on the adapter. */ | 140 | The client_type argument is the name of the chip that's on the adapter. */ |
| 142 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | 141 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, |
| 143 | struct i2c_adapter *adapter, | 142 | struct i2c_adapter *adapter, const char *client_type, |
| 144 | const char *module_name, const char *client_type, | ||
| 145 | int irq, void *platform_data, | 143 | int irq, void *platform_data, |
| 146 | u8 addr, const unsigned short *probe_addrs); | 144 | u8 addr, const unsigned short *probe_addrs); |
| 147 | 145 | ||
| 148 | /* Load an i2c module and return an initialized v4l2_subdev struct. | 146 | /* Load an i2c module and return an initialized v4l2_subdev struct. |
| 149 | Only call request_module if module_name != NULL. | ||
| 150 | The client_type argument is the name of the chip that's on the adapter. */ | 147 | The client_type argument is the name of the chip that's on the adapter. */ |
| 151 | static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, | 148 | static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, |
| 152 | struct i2c_adapter *adapter, | 149 | struct i2c_adapter *adapter, const char *client_type, |
| 153 | const char *module_name, const char *client_type, | ||
| 154 | u8 addr, const unsigned short *probe_addrs) | 150 | u8 addr, const unsigned short *probe_addrs) |
| 155 | { | 151 | { |
| 156 | return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, module_name, | 152 | return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, client_type, 0, NULL, |
| 157 | client_type, 0, NULL, addr, probe_addrs); | 153 | addr, probe_addrs); |
| 158 | } | 154 | } |
| 159 | 155 | ||
| 160 | struct i2c_board_info; | 156 | struct i2c_board_info; |
| 161 | 157 | ||
| 162 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | 158 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, |
| 163 | struct i2c_adapter *adapter, const char *module_name, | 159 | struct i2c_adapter *adapter, struct i2c_board_info *info, |
| 164 | struct i2c_board_info *info, const unsigned short *probe_addrs); | 160 | const unsigned short *probe_addrs); |
| 165 | 161 | ||
| 166 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ | 162 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ |
| 167 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | 163 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, |
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 a6338d039857..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 | ||
| @@ -1155,6 +1158,8 @@ extern void sk_common_release(struct sock *sk); | |||
| 1155 | /* Initialise core socket variables */ | 1158 | /* Initialise core socket variables */ |
| 1156 | extern void sock_init_data(struct socket *sock, struct sock *sk); | 1159 | extern void sock_init_data(struct socket *sock, struct sock *sk); |
| 1157 | 1160 | ||
| 1161 | extern void sk_filter_release_rcu(struct rcu_head *rcu); | ||
| 1162 | |||
| 1158 | /** | 1163 | /** |
| 1159 | * sk_filter_release - release a socket filter | 1164 | * sk_filter_release - release a socket filter |
| 1160 | * @fp: filter to remove | 1165 | * @fp: filter to remove |
| @@ -1165,7 +1170,7 @@ extern void sock_init_data(struct socket *sock, struct sock *sk); | |||
| 1165 | static inline void sk_filter_release(struct sk_filter *fp) | 1170 | static inline void sk_filter_release(struct sk_filter *fp) |
| 1166 | { | 1171 | { |
| 1167 | if (atomic_dec_and_test(&fp->refcnt)) | 1172 | if (atomic_dec_and_test(&fp->refcnt)) |
| 1168 | kfree(fp); | 1173 | call_rcu_bh(&fp->rcu, sk_filter_release_rcu); |
| 1169 | } | 1174 | } |
| 1170 | 1175 | ||
| 1171 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) | 1176 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) |
diff --git a/include/xen/events.h b/include/xen/events.h index 646dd17d3aa4..00f53ddcc062 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
| @@ -76,7 +76,9 @@ int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); | |||
| 76 | 76 | ||
| 77 | #ifdef CONFIG_PCI_MSI | 77 | #ifdef CONFIG_PCI_MSI |
| 78 | /* Allocate an irq and a pirq to be used with MSIs. */ | 78 | /* Allocate an irq and a pirq to be used with MSIs. */ |
| 79 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq); | 79 | #define XEN_ALLOC_PIRQ (1 << 0) |
| 80 | #define XEN_ALLOC_IRQ (1 << 1) | ||
| 81 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc_mask); | ||
| 80 | int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); | 82 | int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); |
| 81 | #endif | 83 | #endif |
| 82 | 84 | ||
| @@ -89,4 +91,7 @@ int xen_vector_from_irq(unsigned pirq); | |||
| 89 | /* Return gsi allocated to pirq */ | 91 | /* Return gsi allocated to pirq */ |
| 90 | int xen_gsi_from_irq(unsigned pirq); | 92 | int xen_gsi_from_irq(unsigned pirq); |
| 91 | 93 | ||
| 94 | /* Return irq from pirq */ | ||
| 95 | int xen_irq_from_pirq(unsigned pirq); | ||
| 96 | |||
| 92 | #endif /* _XEN_EVENTS_H */ | 97 | #endif /* _XEN_EVENTS_H */ |
diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h index e8cbf431c8cc..75271b9a8f61 100644 --- a/include/xen/interface/io/ring.h +++ b/include/xen/interface/io/ring.h | |||
| @@ -24,8 +24,15 @@ typedef unsigned int RING_IDX; | |||
| 24 | * A ring contains as many entries as will fit, rounded down to the nearest | 24 | * A ring contains as many entries as will fit, rounded down to the nearest |
| 25 | * power of two (so we can mask with (size-1) to loop around). | 25 | * power of two (so we can mask with (size-1) to loop around). |
| 26 | */ | 26 | */ |
| 27 | #define __RING_SIZE(_s, _sz) \ | 27 | #define __CONST_RING_SIZE(_s, _sz) \ |
| 28 | (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) | 28 | (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \ |
| 29 | sizeof(((struct _s##_sring *)0)->ring[0]))) | ||
| 30 | |||
| 31 | /* | ||
| 32 | * The same for passing in an actual pointer instead of a name tag. | ||
| 33 | */ | ||
| 34 | #define __RING_SIZE(_s, _sz) \ | ||
| 35 | (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) | ||
| 29 | 36 | ||
| 30 | /* | 37 | /* |
| 31 | * Macros to make the correct C datatypes for a new kind of ring. | 38 | * Macros to make the correct C datatypes for a new kind of ring. |
diff --git a/include/xen/interface/physdev.h b/include/xen/interface/physdev.h index 2b2c66c3df00..534cac89a77d 100644 --- a/include/xen/interface/physdev.h +++ b/include/xen/interface/physdev.h | |||
| @@ -188,6 +188,16 @@ struct physdev_nr_pirqs { | |||
| 188 | uint32_t nr_pirqs; | 188 | uint32_t nr_pirqs; |
| 189 | }; | 189 | }; |
| 190 | 190 | ||
| 191 | /* type is MAP_PIRQ_TYPE_GSI or MAP_PIRQ_TYPE_MSI | ||
| 192 | * the hypercall returns a free pirq */ | ||
| 193 | #define PHYSDEVOP_get_free_pirq 23 | ||
| 194 | struct physdev_get_free_pirq { | ||
| 195 | /* IN */ | ||
| 196 | int type; | ||
| 197 | /* OUT */ | ||
| 198 | uint32_t pirq; | ||
| 199 | }; | ||
| 200 | |||
| 191 | /* | 201 | /* |
| 192 | * Notify that some PIRQ-bound event channels have been unmasked. | 202 | * Notify that some PIRQ-bound event channels have been unmasked. |
| 193 | * ** This command is obsolete since interface version 0x00030202 and is ** | 203 | * ** This command is obsolete since interface version 0x00030202 and is ** |
