diff options
Diffstat (limited to 'include')
91 files changed, 645 insertions, 461 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/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index 01a714119506..bc5590b1a1ac 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
| @@ -80,6 +80,7 @@ struct drm_nouveau_gpuobj_free { | |||
| 80 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 | 80 | #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 |
| 81 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 | 81 | #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 |
| 82 | #define NOUVEAU_GETPARAM_PTIMER_TIME 14 | 82 | #define NOUVEAU_GETPARAM_PTIMER_TIME 14 |
| 83 | #define NOUVEAU_GETPARAM_HAS_BO_USAGE 15 | ||
| 83 | struct drm_nouveau_getparam { | 84 | struct drm_nouveau_getparam { |
| 84 | uint64_t param; | 85 | uint64_t param; |
| 85 | uint64_t value; | 86 | uint64_t value; |
| @@ -95,6 +96,12 @@ struct drm_nouveau_setparam { | |||
| 95 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) | 96 | #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) |
| 96 | #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) | 97 | #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) |
| 97 | 98 | ||
| 99 | #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 | ||
| 100 | #define NOUVEAU_GEM_TILE_16BPP 0x00000001 | ||
| 101 | #define NOUVEAU_GEM_TILE_32BPP 0x00000002 | ||
| 102 | #define NOUVEAU_GEM_TILE_ZETA 0x00000004 | ||
| 103 | #define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 | ||
| 104 | |||
| 98 | struct drm_nouveau_gem_info { | 105 | struct drm_nouveau_gem_info { |
| 99 | uint32_t handle; | 106 | uint32_t handle; |
| 100 | uint32_t domain; | 107 | uint32_t domain; |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 050a7bccb836..67c91b4418b0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -219,7 +219,7 @@ static inline int acpi_video_display_switch_support(void) | |||
| 219 | 219 | ||
| 220 | extern int acpi_blacklisted(void); | 220 | extern int acpi_blacklisted(void); |
| 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
| 222 | extern int acpi_osi_setup(char *str); | 222 | extern void acpi_osi_setup(char *str); |
| 223 | 223 | ||
| 224 | #ifdef CONFIG_ACPI_NUMA | 224 | #ifdef CONFIG_ACPI_NUMA |
| 225 | int acpi_get_pxm(acpi_handle handle); | 225 | int acpi_get_pxm(acpi_handle handle); |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index a8e4e832cdbb..475f8c42c0e9 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -427,8 +427,10 @@ extern rwlock_t vcc_sklist_lock; | |||
| 427 | 427 | ||
| 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) | 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) |
| 429 | 429 | ||
| 430 | struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, | 430 | struct atm_dev *atm_dev_register(const char *type, struct device *parent, |
| 431 | int number,unsigned long *flags); /* number == -1: pick first available */ | 431 | const struct atmdev_ops *ops, |
| 432 | int number, /* -1 == pick first available */ | ||
| 433 | unsigned long *flags); | ||
| 432 | struct atm_dev *atm_dev_lookup(int number); | 434 | struct atm_dev *atm_dev_lookup(int number); |
| 433 | void atm_dev_deregister(struct atm_dev *dev); | 435 | void atm_dev_deregister(struct atm_dev *dev); |
| 434 | 436 | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index a065612fc928..64a7114a9394 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -29,6 +29,7 @@ struct linux_binprm{ | |||
| 29 | char buf[BINPRM_BUF_SIZE]; | 29 | char buf[BINPRM_BUF_SIZE]; |
| 30 | #ifdef CONFIG_MMU | 30 | #ifdef CONFIG_MMU |
| 31 | struct vm_area_struct *vma; | 31 | struct vm_area_struct *vma; |
| 32 | unsigned long vma_pages; | ||
| 32 | #else | 33 | #else |
| 33 | # define MAX_ARG_PAGES 32 | 34 | # define MAX_ARG_PAGES 32 |
| 34 | struct page *page[MAX_ARG_PAGES]; | 35 | struct page *page[MAX_ARG_PAGES]; |
| @@ -59,6 +60,10 @@ struct linux_binprm{ | |||
| 59 | unsigned long loader, exec; | 60 | unsigned long loader, exec; |
| 60 | }; | 61 | }; |
| 61 | 62 | ||
| 63 | extern void acct_arg_size(struct linux_binprm *bprm, unsigned long pages); | ||
| 64 | extern struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | ||
| 65 | int write); | ||
| 66 | |||
| 62 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 | 67 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 |
| 63 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) | 68 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) |
| 64 | 69 | ||
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 f22b2e941686..72c72bfccb88 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
| @@ -227,9 +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 | loff_t off, size_t len); | 231 | bool write_page); |
| 232 | extern void ceph_put_page_vector(struct page **pages, int num_pages); | 232 | extern void ceph_put_page_vector(struct page **pages, int num_pages, |
| 233 | bool dirty); | ||
| 233 | 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); |
| 234 | 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); |
| 235 | 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/ceph/messenger.h b/include/linux/ceph/messenger.h index 5956d62c3057..a108b425fee2 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
| @@ -82,6 +82,7 @@ struct ceph_msg { | |||
| 82 | struct ceph_buffer *middle; | 82 | struct ceph_buffer *middle; |
| 83 | struct page **pages; /* data payload. NOT OWNER. */ | 83 | struct page **pages; /* data payload. NOT OWNER. */ |
| 84 | unsigned nr_pages; /* size of page array */ | 84 | unsigned nr_pages; /* size of page array */ |
| 85 | unsigned page_alignment; /* io offset in first page */ | ||
| 85 | struct ceph_pagelist *pagelist; /* instead of pages */ | 86 | struct ceph_pagelist *pagelist; /* instead of pages */ |
| 86 | struct list_head list_head; | 87 | struct list_head list_head; |
| 87 | struct kref kref; | 88 | struct kref kref; |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 6c91fb032c39..a1af29648fb5 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -79,6 +79,7 @@ struct ceph_osd_request { | |||
| 79 | struct ceph_file_layout r_file_layout; | 79 | struct ceph_file_layout r_file_layout; |
| 80 | struct ceph_snap_context *r_snapc; /* snap context for writes */ | 80 | struct ceph_snap_context *r_snapc; /* snap context for writes */ |
| 81 | unsigned r_num_pages; /* size of page array (follows) */ | 81 | unsigned r_num_pages; /* size of page array (follows) */ |
| 82 | unsigned r_page_alignment; /* io offset in first page */ | ||
| 82 | struct page **r_pages; /* pages for data payload */ | 83 | struct page **r_pages; /* pages for data payload */ |
| 83 | int r_pages_from_pool; | 84 | int r_pages_from_pool; |
| 84 | int r_own_pages; /* if true, i own page list */ | 85 | int r_own_pages; /* if true, i own page list */ |
| @@ -194,7 +195,8 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *, | |||
| 194 | int do_sync, u32 truncate_seq, | 195 | int do_sync, u32 truncate_seq, |
| 195 | u64 truncate_size, | 196 | u64 truncate_size, |
| 196 | struct timespec *mtime, | 197 | struct timespec *mtime, |
| 197 | bool use_mempool, int num_reply); | 198 | bool use_mempool, int num_reply, |
| 199 | int page_align); | ||
| 198 | 200 | ||
| 199 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) | 201 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) |
| 200 | { | 202 | { |
| @@ -218,7 +220,8 @@ extern int ceph_osdc_readpages(struct ceph_osd_client *osdc, | |||
| 218 | struct ceph_file_layout *layout, | 220 | struct ceph_file_layout *layout, |
| 219 | u64 off, u64 *plen, | 221 | u64 off, u64 *plen, |
| 220 | u32 truncate_seq, u64 truncate_size, | 222 | u32 truncate_seq, u64 truncate_size, |
| 221 | struct page **pages, int nr_pages); | 223 | struct page **pages, int nr_pages, |
| 224 | int page_align); | ||
| 222 | 225 | ||
| 223 | extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, | 226 | extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, |
| 224 | struct ceph_vino vino, | 227 | struct ceph_vino vino, |
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/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/dmar.h b/include/linux/dmar.h index a7d9dc21391d..7b776d71d36d 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -175,10 +175,21 @@ static inline int set_msi_sid(struct irte *irte, struct pci_dev *dev) | |||
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | #define enable_intr_remapping(mode) (-1) | ||
| 179 | #define disable_intr_remapping() (0) | ||
| 180 | #define reenable_intr_remapping(mode) (0) | ||
| 181 | #define intr_remapping_enabled (0) | 178 | #define intr_remapping_enabled (0) |
| 179 | |||
| 180 | static inline int enable_intr_remapping(int eim) | ||
| 181 | { | ||
| 182 | return -1; | ||
| 183 | } | ||
| 184 | |||
| 185 | static inline void disable_intr_remapping(void) | ||
| 186 | { | ||
| 187 | } | ||
| 188 | |||
| 189 | static inline int reenable_intr_remapping(int eim) | ||
| 190 | { | ||
| 191 | return 0; | ||
| 192 | } | ||
| 182 | #endif | 193 | #endif |
| 183 | 194 | ||
| 184 | /* Can't use the common MSI interrupt functions | 195 | /* Can't use the common MSI interrupt functions |
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/fb.h b/include/linux/fb.h index 7fca3dc4e475..d1631d37e9e0 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -1122,6 +1122,7 @@ extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs | |||
| 1122 | 1122 | ||
| 1123 | /* drivers/video/fbcmap.c */ | 1123 | /* drivers/video/fbcmap.c */ |
| 1124 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 1124 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
| 1125 | extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags); | ||
| 1125 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); | 1126 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); |
| 1126 | extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to); | 1127 | extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to); |
| 1127 | extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to); | 1128 | extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 334d68a17108..090f0eacde29 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -34,9 +34,9 @@ | |||
| 34 | #define SEEK_MAX SEEK_END | 34 | #define SEEK_MAX SEEK_END |
| 35 | 35 | ||
| 36 | struct fstrim_range { | 36 | struct fstrim_range { |
| 37 | uint64_t start; | 37 | __u64 start; |
| 38 | uint64_t len; | 38 | __u64 len; |
| 39 | uint64_t minlen; | 39 | __u64 minlen; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | /* And dynamically-tunable limits and defaults: */ | 42 | /* And dynamically-tunable limits and defaults: */ |
| @@ -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, |
| @@ -1612,7 +1613,6 @@ struct super_operations { | |||
| 1612 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1613 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
| 1613 | #endif | 1614 | #endif |
| 1614 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); | 1615 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); |
| 1615 | int (*trim_fs) (struct super_block *, struct fstrim_range *); | ||
| 1616 | }; | 1616 | }; |
| 1617 | 1617 | ||
| 1618 | /* | 1618 | /* |
diff --git a/include/linux/fsl-diu-fb.h b/include/linux/fsl-diu-fb.h index fc295d7ea463..781d4671415f 100644 --- a/include/linux/fsl-diu-fb.h +++ b/include/linux/fsl-diu-fb.h | |||
| @@ -54,7 +54,6 @@ struct aoi_display_offset { | |||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) | 56 | #define MFB_SET_CHROMA_KEY _IOW('M', 1, struct mfb_chroma_key) |
| 57 | #define MFB_WAIT_FOR_VSYNC _IOW('F', 0x20, u_int32_t) | ||
| 58 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) | 57 | #define MFB_SET_BRIGHTNESS _IOW('M', 3, __u8) |
| 59 | 58 | ||
| 60 | #define MFB_SET_ALPHA 0x80014d00 | 59 | #define MFB_SET_ALPHA 0x80014d00 |
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/hardirq.h b/include/linux/hardirq.h index 41cb31f14ee3..32f9fd6619b4 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -2,9 +2,6 @@ | |||
| 2 | #define LINUX_HARDIRQ_H | 2 | #define LINUX_HARDIRQ_H |
| 3 | 3 | ||
| 4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
| 5 | #ifdef CONFIG_PREEMPT | ||
| 6 | #include <linux/smp_lock.h> | ||
| 7 | #endif | ||
| 8 | #include <linux/lockdep.h> | 5 | #include <linux/lockdep.h> |
| 9 | #include <linux/ftrace_irq.h> | 6 | #include <linux/ftrace_irq.h> |
| 10 | #include <asm/hardirq.h> | 7 | #include <asm/hardirq.h> |
| @@ -97,7 +94,8 @@ | |||
| 97 | #define in_nmi() (preempt_count() & NMI_MASK) | 94 | #define in_nmi() (preempt_count() & NMI_MASK) |
| 98 | 95 | ||
| 99 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL) | 96 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL) |
| 100 | # define PREEMPT_INATOMIC_BASE kernel_locked() | 97 | # include <linux/sched.h> |
| 98 | # define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0) | ||
| 101 | #else | 99 | #else |
| 102 | # define PREEMPT_INATOMIC_BASE 0 | 100 | # define PREEMPT_INATOMIC_BASE 0 |
| 103 | #endif | 101 | #endif |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index a2d6ea49ec56..d1e55fed2c7d 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -33,6 +33,8 @@ enum bp_type_idx { | |||
| 33 | 33 | ||
| 34 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 34 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 35 | 35 | ||
| 36 | extern int __init init_hw_breakpoint(void); | ||
| 37 | |||
| 36 | static inline void hw_breakpoint_init(struct perf_event_attr *attr) | 38 | static inline void hw_breakpoint_init(struct perf_event_attr *attr) |
| 37 | { | 39 | { |
| 38 | memset(attr, 0, sizeof(*attr)); | 40 | memset(attr, 0, sizeof(*attr)); |
| @@ -108,6 +110,8 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) | |||
| 108 | 110 | ||
| 109 | #else /* !CONFIG_HAVE_HW_BREAKPOINT */ | 111 | #else /* !CONFIG_HAVE_HW_BREAKPOINT */ |
| 110 | 112 | ||
| 113 | static inline int __init init_hw_breakpoint(void) { return 0; } | ||
| 114 | |||
| 111 | static inline struct perf_event * | 115 | static inline struct perf_event * |
| 112 | register_user_hw_breakpoint(struct perf_event_attr *attr, | 116 | register_user_hw_breakpoint(struct perf_event_attr *attr, |
| 113 | perf_overflow_handler_t triggered, | 117 | perf_overflow_handler_t triggered, |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index e844a0b18695..4bef5c557160 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -32,28 +32,6 @@ | |||
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | /* --- Bit algorithm adapters */ | 34 | /* --- Bit algorithm adapters */ |
| 35 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | ||
| 36 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ | ||
| 37 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ | ||
| 38 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ | 35 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ |
| 39 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | ||
| 40 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | ||
| 41 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | ||
| 42 | #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ | ||
| 43 | #define I2C_HW_B_CX231XX 0x010024 /* Conexant CX231XX USB based cards */ | ||
| 44 | #define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */ | ||
| 45 | |||
| 46 | /* --- SGI adapters */ | ||
| 47 | #define I2C_HW_SGI_VINO 0x160000 | ||
| 48 | |||
| 49 | /* --- SMBus only adapters */ | ||
| 50 | #define I2C_HW_SMBUS_W9968CF 0x04000d | ||
| 51 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ | ||
| 52 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | ||
| 53 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | ||
| 54 | |||
| 55 | /* --- Miscellaneous adapters */ | ||
| 56 | #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ | ||
| 57 | #define I2C_HW_SAA7134 0x090000 /* SAA7134 video decoder bus */ | ||
| 58 | 36 | ||
| 59 | #endif /* LINUX_I2C_ID_H */ | 37 | #endif /* LINUX_I2C_ID_H */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 889b35abaeda..56cfe23ffb39 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -353,7 +353,7 @@ struct i2c_algorithm { | |||
| 353 | */ | 353 | */ |
| 354 | struct i2c_adapter { | 354 | struct i2c_adapter { |
| 355 | struct module *owner; | 355 | struct module *owner; |
| 356 | unsigned int id; | 356 | unsigned int id __deprecated; |
| 357 | unsigned int class; /* classes to allow probing for */ | 357 | unsigned int class; /* classes to allow probing for */ |
| 358 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ | 358 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
| 359 | void *algo_data; | 359 | void *algo_data; |
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/kernel.h b/include/linux/kernel.h index fc3da9e4da19..b6de9a6f7018 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -17,13 +17,11 @@ | |||
| 17 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
| 18 | #include <linux/log2.h> | 18 | #include <linux/log2.h> |
| 19 | #include <linux/typecheck.h> | 19 | #include <linux/typecheck.h> |
| 20 | #include <linux/printk.h> | ||
| 20 | #include <linux/dynamic_debug.h> | 21 | #include <linux/dynamic_debug.h> |
| 21 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
| 22 | #include <asm/bug.h> | 23 | #include <asm/bug.h> |
| 23 | 24 | ||
| 24 | extern const char linux_banner[]; | ||
| 25 | extern const char linux_proc_banner[]; | ||
| 26 | |||
| 27 | #define USHRT_MAX ((u16)(~0U)) | 25 | #define USHRT_MAX ((u16)(~0U)) |
| 28 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | 26 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) |
| 29 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) | 27 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) |
| @@ -110,31 +108,6 @@ extern const char linux_proc_banner[]; | |||
| 110 | */ | 108 | */ |
| 111 | #define lower_32_bits(n) ((u32)(n)) | 109 | #define lower_32_bits(n) ((u32)(n)) |
| 112 | 110 | ||
| 113 | #define KERN_EMERG "<0>" /* system is unusable */ | ||
| 114 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | ||
| 115 | #define KERN_CRIT "<2>" /* critical conditions */ | ||
| 116 | #define KERN_ERR "<3>" /* error conditions */ | ||
| 117 | #define KERN_WARNING "<4>" /* warning conditions */ | ||
| 118 | #define KERN_NOTICE "<5>" /* normal but significant condition */ | ||
| 119 | #define KERN_INFO "<6>" /* informational */ | ||
| 120 | #define KERN_DEBUG "<7>" /* debug-level messages */ | ||
| 121 | |||
| 122 | /* Use the default kernel loglevel */ | ||
| 123 | #define KERN_DEFAULT "<d>" | ||
| 124 | /* | ||
| 125 | * Annotation for a "continued" line of log printout (only done after a | ||
| 126 | * line that had no enclosing \n). Only to be used by core/arch code | ||
| 127 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
| 128 | */ | ||
| 129 | #define KERN_CONT "<c>" | ||
| 130 | |||
| 131 | extern int console_printk[]; | ||
| 132 | |||
| 133 | #define console_loglevel (console_printk[0]) | ||
| 134 | #define default_message_loglevel (console_printk[1]) | ||
| 135 | #define minimum_console_loglevel (console_printk[2]) | ||
| 136 | #define default_console_loglevel (console_printk[3]) | ||
| 137 | |||
| 138 | struct completion; | 111 | struct completion; |
| 139 | struct pt_regs; | 112 | struct pt_regs; |
| 140 | struct user; | 113 | struct user; |
| @@ -187,11 +160,6 @@ static inline void might_fault(void) | |||
| 187 | } | 160 | } |
| 188 | #endif | 161 | #endif |
| 189 | 162 | ||
| 190 | struct va_format { | ||
| 191 | const char *fmt; | ||
| 192 | va_list *va; | ||
| 193 | }; | ||
| 194 | |||
| 195 | extern struct atomic_notifier_head panic_notifier_list; | 163 | extern struct atomic_notifier_head panic_notifier_list; |
| 196 | extern long (*panic_blink)(int state); | 164 | extern long (*panic_blink)(int state); |
| 197 | NORET_TYPE void panic(const char * fmt, ...) | 165 | NORET_TYPE void panic(const char * fmt, ...) |
| @@ -245,115 +213,8 @@ extern int func_ptr_is_kernel_text(void *ptr); | |||
| 245 | struct pid; | 213 | struct pid; |
| 246 | extern struct pid *session_of_pgrp(struct pid *pgrp); | 214 | extern struct pid *session_of_pgrp(struct pid *pgrp); |
| 247 | 215 | ||
| 248 | /* | ||
| 249 | * FW_BUG | ||
| 250 | * Add this to a message where you are sure the firmware is buggy or behaves | ||
| 251 | * really stupid or out of spec. Be aware that the responsible BIOS developer | ||
| 252 | * should be able to fix this issue or at least get a concrete idea of the | ||
| 253 | * problem by reading your message without the need of looking at the kernel | ||
| 254 | * code. | ||
| 255 | * | ||
| 256 | * Use it for definite and high priority BIOS bugs. | ||
| 257 | * | ||
| 258 | * FW_WARN | ||
| 259 | * Use it for not that clear (e.g. could the kernel messed up things already?) | ||
| 260 | * and medium priority BIOS bugs. | ||
| 261 | * | ||
| 262 | * FW_INFO | ||
| 263 | * Use this one if you want to tell the user or vendor about something | ||
| 264 | * suspicious, but generally harmless related to the firmware. | ||
| 265 | * | ||
| 266 | * Use it for information or very low priority BIOS bugs. | ||
| 267 | */ | ||
| 268 | #define FW_BUG "[Firmware Bug]: " | ||
| 269 | #define FW_WARN "[Firmware Warn]: " | ||
| 270 | #define FW_INFO "[Firmware Info]: " | ||
| 271 | |||
| 272 | /* | ||
| 273 | * HW_ERR | ||
| 274 | * Add this to a message for hardware errors, so that user can report | ||
| 275 | * it to hardware vendor instead of LKML or software vendor. | ||
| 276 | */ | ||
| 277 | #define HW_ERR "[Hardware Error]: " | ||
| 278 | |||
| 279 | #ifdef CONFIG_PRINTK | ||
| 280 | asmlinkage int vprintk(const char *fmt, va_list args) | ||
| 281 | __attribute__ ((format (printf, 1, 0))); | ||
| 282 | asmlinkage int printk(const char * fmt, ...) | ||
| 283 | __attribute__ ((format (printf, 1, 2))) __cold; | ||
| 284 | |||
| 285 | /* | ||
| 286 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
| 287 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
| 288 | * printk_ratelimited() or plain old __ratelimit(). | ||
| 289 | */ | ||
| 290 | extern int __printk_ratelimit(const char *func); | ||
| 291 | #define printk_ratelimit() __printk_ratelimit(__func__) | ||
| 292 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
| 293 | unsigned int interval_msec); | ||
| 294 | |||
| 295 | extern int printk_delay_msec; | ||
| 296 | extern int dmesg_restrict; | ||
| 297 | |||
| 298 | /* | ||
| 299 | * Print a one-time message (analogous to WARN_ONCE() et al): | ||
| 300 | */ | ||
| 301 | #define printk_once(x...) ({ \ | ||
| 302 | static bool __print_once; \ | ||
| 303 | \ | ||
| 304 | if (!__print_once) { \ | ||
| 305 | __print_once = true; \ | ||
| 306 | printk(x); \ | ||
| 307 | } \ | ||
| 308 | }) | ||
| 309 | |||
| 310 | void log_buf_kexec_setup(void); | ||
| 311 | #else | ||
| 312 | static inline int vprintk(const char *s, va_list args) | ||
| 313 | __attribute__ ((format (printf, 1, 0))); | ||
| 314 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
| 315 | static inline int printk(const char *s, ...) | ||
| 316 | __attribute__ ((format (printf, 1, 2))); | ||
| 317 | static inline int __cold printk(const char *s, ...) { return 0; } | ||
| 318 | static inline int printk_ratelimit(void) { return 0; } | ||
| 319 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
| 320 | unsigned int interval_msec) \ | ||
| 321 | { return false; } | ||
| 322 | |||
| 323 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 324 | #define printk_once(x...) printk(x) | ||
| 325 | |||
| 326 | static inline void log_buf_kexec_setup(void) | ||
| 327 | { | ||
| 328 | } | ||
| 329 | #endif | ||
| 330 | |||
| 331 | /* | ||
| 332 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
| 333 | * gcc's format and side-effect checking. | ||
| 334 | */ | ||
| 335 | static inline __attribute__ ((format (printf, 1, 2))) | ||
| 336 | int no_printk(const char *s, ...) { return 0; } | ||
| 337 | |||
| 338 | extern int printk_needs_cpu(int cpu); | ||
| 339 | extern void printk_tick(void); | ||
| 340 | |||
| 341 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | ||
| 342 | early_printk(const char *fmt, ...); | ||
| 343 | |||
| 344 | unsigned long int_sqrt(unsigned long); | 216 | unsigned long int_sqrt(unsigned long); |
| 345 | 217 | ||
| 346 | static inline void console_silent(void) | ||
| 347 | { | ||
| 348 | console_loglevel = 0; | ||
| 349 | } | ||
| 350 | |||
| 351 | static inline void console_verbose(void) | ||
| 352 | { | ||
| 353 | if (console_loglevel) | ||
| 354 | console_loglevel = 15; | ||
| 355 | } | ||
| 356 | |||
| 357 | extern void bust_spinlocks(int yes); | 218 | extern void bust_spinlocks(int yes); |
| 358 | extern void wake_up_klogd(void); | 219 | extern void wake_up_klogd(void); |
| 359 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 220 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
| @@ -390,22 +251,6 @@ extern enum system_states { | |||
| 390 | #define TAINT_CRAP 10 | 251 | #define TAINT_CRAP 10 |
| 391 | #define TAINT_FIRMWARE_WORKAROUND 11 | 252 | #define TAINT_FIRMWARE_WORKAROUND 11 |
| 392 | 253 | ||
| 393 | extern void dump_stack(void) __cold; | ||
| 394 | |||
| 395 | enum { | ||
| 396 | DUMP_PREFIX_NONE, | ||
| 397 | DUMP_PREFIX_ADDRESS, | ||
| 398 | DUMP_PREFIX_OFFSET | ||
| 399 | }; | ||
| 400 | extern void hex_dump_to_buffer(const void *buf, size_t len, | ||
| 401 | int rowsize, int groupsize, | ||
| 402 | char *linebuf, size_t linebuflen, bool ascii); | ||
| 403 | extern void print_hex_dump(const char *level, const char *prefix_str, | ||
| 404 | int prefix_type, int rowsize, int groupsize, | ||
| 405 | const void *buf, size_t len, bool ascii); | ||
| 406 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
| 407 | const void *buf, size_t len); | ||
| 408 | |||
| 409 | extern const char hex_asc[]; | 254 | extern const char hex_asc[]; |
| 410 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | 255 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] |
| 411 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] | 256 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] |
| @@ -419,94 +264,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 419 | 264 | ||
| 420 | extern int hex_to_bin(char ch); | 265 | extern int hex_to_bin(char ch); |
| 421 | 266 | ||
| 422 | #ifndef pr_fmt | ||
| 423 | #define pr_fmt(fmt) fmt | ||
| 424 | #endif | ||
| 425 | |||
| 426 | #define pr_emerg(fmt, ...) \ | ||
| 427 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 428 | #define pr_alert(fmt, ...) \ | ||
| 429 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 430 | #define pr_crit(fmt, ...) \ | ||
| 431 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 432 | #define pr_err(fmt, ...) \ | ||
| 433 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 434 | #define pr_warning(fmt, ...) \ | ||
| 435 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 436 | #define pr_warn pr_warning | ||
| 437 | #define pr_notice(fmt, ...) \ | ||
| 438 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 439 | #define pr_info(fmt, ...) \ | ||
| 440 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 441 | #define pr_cont(fmt, ...) \ | ||
| 442 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
| 443 | |||
| 444 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
| 445 | #ifdef DEBUG | ||
| 446 | #define pr_devel(fmt, ...) \ | ||
| 447 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 448 | #else | ||
| 449 | #define pr_devel(fmt, ...) \ | ||
| 450 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 451 | #endif | ||
| 452 | |||
| 453 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 454 | #if defined(DEBUG) | ||
| 455 | #define pr_debug(fmt, ...) \ | ||
| 456 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 457 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
| 458 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
| 459 | #define pr_debug(fmt, ...) \ | ||
| 460 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ||
| 461 | #else | ||
| 462 | #define pr_debug(fmt, ...) \ | ||
| 463 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 464 | #endif | ||
| 465 | |||
| 466 | /* | ||
| 467 | * ratelimited messages with local ratelimit_state, | ||
| 468 | * no local ratelimit_state used in the !PRINTK case | ||
| 469 | */ | ||
| 470 | #ifdef CONFIG_PRINTK | ||
| 471 | #define printk_ratelimited(fmt, ...) ({ \ | ||
| 472 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
| 473 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
| 474 | DEFAULT_RATELIMIT_BURST); \ | ||
| 475 | \ | ||
| 476 | if (__ratelimit(&_rs)) \ | ||
| 477 | printk(fmt, ##__VA_ARGS__); \ | ||
| 478 | }) | ||
| 479 | #else | ||
| 480 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 481 | #define printk_ratelimited printk | ||
| 482 | #endif | ||
| 483 | |||
| 484 | #define pr_emerg_ratelimited(fmt, ...) \ | ||
| 485 | printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 486 | #define pr_alert_ratelimited(fmt, ...) \ | ||
| 487 | printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 488 | #define pr_crit_ratelimited(fmt, ...) \ | ||
| 489 | printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 490 | #define pr_err_ratelimited(fmt, ...) \ | ||
| 491 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 492 | #define pr_warning_ratelimited(fmt, ...) \ | ||
| 493 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 494 | #define pr_warn_ratelimited pr_warning_ratelimited | ||
| 495 | #define pr_notice_ratelimited(fmt, ...) \ | ||
| 496 | printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 497 | #define pr_info_ratelimited(fmt, ...) \ | ||
| 498 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 499 | /* no pr_cont_ratelimited, don't do that... */ | ||
| 500 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 501 | #if defined(DEBUG) | ||
| 502 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 503 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 504 | #else | ||
| 505 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 506 | ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ | ||
| 507 | ##__VA_ARGS__); 0; }) | ||
| 508 | #endif | ||
| 509 | |||
| 510 | /* | 267 | /* |
| 511 | * General tracing related utility functions - trace_printk(), | 268 | * General tracing related utility functions - trace_printk(), |
| 512 | * tracing_on/tracing_off and tracing_start()/tracing_stop | 269 | * tracing_on/tracing_off and tracing_start()/tracing_stop |
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/libata.h b/include/linux/libata.h index 15b77b8dc7e1..d947b1231662 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -986,7 +986,7 @@ extern void ata_host_init(struct ata_host *, struct device *, | |||
| 986 | unsigned long, struct ata_port_operations *); | 986 | unsigned long, struct ata_port_operations *); |
| 987 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 987 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
| 988 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 988 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 989 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 989 | extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd); |
| 990 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | 990 | extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, |
| 991 | int cmd, void __user *arg); | 991 | int cmd, void __user *arg); |
| 992 | extern void ata_sas_port_destroy(struct ata_port *); | 992 | extern void ata_sas_port_destroy(struct ata_port *); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index a34dea46b629..2dee05e5119a 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -43,6 +43,7 @@ struct nlm_host { | |||
| 43 | struct sockaddr_storage h_addr; /* peer address */ | 43 | struct sockaddr_storage h_addr; /* peer address */ |
| 44 | size_t h_addrlen; | 44 | size_t h_addrlen; |
| 45 | struct sockaddr_storage h_srcaddr; /* our address (optional) */ | 45 | struct sockaddr_storage h_srcaddr; /* our address (optional) */ |
| 46 | size_t h_srcaddrlen; | ||
| 46 | struct rpc_clnt *h_rpcclnt; /* RPC client to talk to peer */ | 47 | struct rpc_clnt *h_rpcclnt; /* RPC client to talk to peer */ |
| 47 | char *h_name; /* remote hostname */ | 48 | char *h_name; /* remote hostname */ |
| 48 | u32 h_version; /* interface version */ | 49 | u32 h_version; /* interface version */ |
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h index 1ff81b51b656..dd3c34ebca9a 100644 --- a/include/linux/marvell_phy.h +++ b/include/linux/marvell_phy.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #define MARVELL_PHY_ID_88E1118 0x01410e10 | 11 | #define MARVELL_PHY_ID_88E1118 0x01410e10 |
| 12 | #define MARVELL_PHY_ID_88E1121R 0x01410cb0 | 12 | #define MARVELL_PHY_ID_88E1121R 0x01410cb0 |
| 13 | #define MARVELL_PHY_ID_88E1145 0x01410cd0 | 13 | #define MARVELL_PHY_ID_88E1145 0x01410cd0 |
| 14 | #define MARVELL_PHY_ID_88E1149R 0x01410e50 | ||
| 14 | #define MARVELL_PHY_ID_88E1240 0x01410e30 | 15 | #define MARVELL_PHY_ID_88E1240 0x01410e30 |
| 15 | #define MARVELL_PHY_ID_88E1318S 0x01410e90 | 16 | #define MARVELL_PHY_ID_88E1318S 0x01410e90 |
| 16 | 17 | ||
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/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index a95141eafce3..bd581c6fa085 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
| @@ -522,9 +522,6 @@ | |||
| 522 | #define WM8350_MCLK_SEL_PLL_32K 3 | 522 | #define WM8350_MCLK_SEL_PLL_32K 3 |
| 523 | #define WM8350_MCLK_SEL_MCLK 5 | 523 | #define WM8350_MCLK_SEL_MCLK 5 |
| 524 | 524 | ||
| 525 | #define WM8350_MCLK_DIR_OUT 0 | ||
| 526 | #define WM8350_MCLK_DIR_IN 1 | ||
| 527 | |||
| 528 | /* clock divider id's */ | 525 | /* clock divider id's */ |
| 529 | #define WM8350_ADC_CLKDIV 0 | 526 | #define WM8350_ADC_CLKDIV 0 |
| 530 | #define WM8350_DAC_CLKDIV 1 | 527 | #define WM8350_DAC_CLKDIV 1 |
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/mmc/host.h b/include/linux/mmc/host.h index 6d87f68ce4b6..30f6fad99a58 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -168,6 +168,7 @@ struct mmc_host { | |||
| 168 | /* DDR mode at 1.8V */ | 168 | /* DDR mode at 1.8V */ |
| 169 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ | 169 | #define MMC_CAP_1_2V_DDR (1 << 12) /* can support */ |
| 170 | /* DDR mode at 1.2V */ | 170 | /* DDR mode at 1.2V */ |
| 171 | #define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */ | ||
| 171 | 172 | ||
| 172 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 173 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
| 173 | 174 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index b29e7458b966..7575bbbdf2a2 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -517,7 +517,7 @@ static inline void __module_get(struct module *module) | |||
| 517 | #define symbol_put_addr(p) do { } while(0) | 517 | #define symbol_put_addr(p) do { } while(0) |
| 518 | 518 | ||
| 519 | #endif /* CONFIG_MODULE_UNLOAD */ | 519 | #endif /* CONFIG_MODULE_UNLOAD */ |
| 520 | int use_module(struct module *a, struct module *b); | 520 | int ref_module(struct module *a, struct module *b); |
| 521 | 521 | ||
| 522 | /* This is a #define so the string doesn't get put in every .o file */ | 522 | /* This is a #define so the string doesn't get put in every .o file */ |
| 523 | #define module_name(mod) \ | 523 | #define module_name(mod) \ |
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 bba26684acdc..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 | { |
| @@ -593,12 +594,6 @@ nfs_fileid_to_ino_t(u64 fileid) | |||
| 593 | return ino; | 594 | return ino; |
| 594 | } | 595 | } |
| 595 | 596 | ||
| 596 | #define nfs_wait_event(clnt, wq, condition) \ | ||
| 597 | ({ \ | ||
| 598 | int __retval = wait_event_killable(wq, condition); \ | ||
| 599 | __retval; \ | ||
| 600 | }) | ||
| 601 | |||
| 602 | #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) | 597 | #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) |
| 603 | 598 | ||
| 604 | #endif /* __KERNEL__ */ | 599 | #endif /* __KERNEL__ */ |
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/nfs_xdr.h b/include/linux/nfs_xdr.h index ba6cc8f223c9..80f07198a31a 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -483,6 +483,7 @@ struct nfs_entry { | |||
| 483 | int eof; | 483 | int eof; |
| 484 | struct nfs_fh * fh; | 484 | struct nfs_fh * fh; |
| 485 | struct nfs_fattr * fattr; | 485 | struct nfs_fattr * fattr; |
| 486 | unsigned char d_type; | ||
| 486 | }; | 487 | }; |
| 487 | 488 | ||
| 488 | /* | 489 | /* |
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/page_cgroup.h b/include/linux/page_cgroup.h index 5bb13b3db84d..b02195dfc1b0 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -59,8 +59,6 @@ static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \ | |||
| 59 | static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \ | 59 | static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \ |
| 60 | { return test_and_clear_bit(PCG_##lname, &pc->flags); } | 60 | { return test_and_clear_bit(PCG_##lname, &pc->flags); } |
| 61 | 61 | ||
| 62 | TESTPCGFLAG(Locked, LOCK) | ||
| 63 | |||
| 64 | /* Cache flag is set only once (at allocation) */ | 62 | /* Cache flag is set only once (at allocation) */ |
| 65 | TESTPCGFLAG(Cache, CACHE) | 63 | TESTPCGFLAG(Cache, CACHE) |
| 66 | CLEARPCGFLAG(Cache, CACHE) | 64 | CLEARPCGFLAG(Cache, CACHE) |
| @@ -104,6 +102,11 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc) | |||
| 104 | bit_spin_unlock(PCG_LOCK, &pc->flags); | 102 | bit_spin_unlock(PCG_LOCK, &pc->flags); |
| 105 | } | 103 | } |
| 106 | 104 | ||
| 105 | static inline int page_is_cgroup_locked(struct page_cgroup *pc) | ||
| 106 | { | ||
| 107 | return bit_spin_is_locked(PCG_LOCK, &pc->flags); | ||
| 108 | } | ||
| 109 | |||
| 107 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 110 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
| 108 | struct page_cgroup; | 111 | struct page_cgroup; |
| 109 | 112 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c6bcfe93b9ca..cb845c16ad7d 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2047,6 +2047,7 @@ | |||
| 2047 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 | 2047 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 |
| 2048 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 | 2048 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 |
| 2049 | 2049 | ||
| 2050 | #define PCI_VENDOR_ID_BCM_GVC 0x14a4 | ||
| 2050 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 2051 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
| 2051 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 2052 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
| 2052 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 | 2053 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 |
| @@ -2441,6 +2442,7 @@ | |||
| 2441 | #define PCI_DEVICE_ID_INTEL_MFD_SDIO2 0x0822 | 2442 | #define PCI_DEVICE_ID_INTEL_MFD_SDIO2 0x0822 |
| 2442 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC0 0x0823 | 2443 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC0 0x0823 |
| 2443 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC1 0x0824 | 2444 | #define PCI_DEVICE_ID_INTEL_MFD_EMMC1 0x0824 |
| 2445 | #define PCI_DEVICE_ID_INTEL_MRST_SD2 0x084F | ||
| 2444 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 | 2446 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 |
| 2445 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 | 2447 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 |
| 2446 | #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 | 2448 | #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 40150f345982..4f1279e105ee 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -850,6 +850,7 @@ struct perf_event_context { | |||
| 850 | int nr_active; | 850 | int nr_active; |
| 851 | int is_active; | 851 | int is_active; |
| 852 | int nr_stat; | 852 | int nr_stat; |
| 853 | int rotate_disable; | ||
| 853 | atomic_t refcount; | 854 | atomic_t refcount; |
| 854 | struct task_struct *task; | 855 | struct task_struct *task; |
| 855 | 856 | ||
| @@ -886,6 +887,7 @@ struct perf_cpu_context { | |||
| 886 | int exclusive; | 887 | int exclusive; |
| 887 | struct list_head rotation_list; | 888 | struct list_head rotation_list; |
| 888 | int jiffies_interval; | 889 | int jiffies_interval; |
| 890 | struct pmu *active_pmu; | ||
| 889 | }; | 891 | }; |
| 890 | 892 | ||
| 891 | struct perf_output_handle { | 893 | struct perf_output_handle { |
| @@ -908,20 +910,6 @@ extern int perf_num_counters(void); | |||
| 908 | extern const char *perf_pmu_name(void); | 910 | extern const char *perf_pmu_name(void); |
| 909 | extern void __perf_event_task_sched_in(struct task_struct *task); | 911 | extern void __perf_event_task_sched_in(struct task_struct *task); |
| 910 | extern void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); | 912 | extern void __perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); |
| 911 | |||
| 912 | extern atomic_t perf_task_events; | ||
| 913 | |||
| 914 | static inline void perf_event_task_sched_in(struct task_struct *task) | ||
| 915 | { | ||
| 916 | COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); | ||
| 917 | } | ||
| 918 | |||
| 919 | static inline | ||
| 920 | void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) | ||
| 921 | { | ||
| 922 | COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); | ||
| 923 | } | ||
| 924 | |||
| 925 | extern int perf_event_init_task(struct task_struct *child); | 913 | extern int perf_event_init_task(struct task_struct *child); |
| 926 | extern void perf_event_exit_task(struct task_struct *child); | 914 | extern void perf_event_exit_task(struct task_struct *child); |
| 927 | extern void perf_event_free_task(struct task_struct *task); | 915 | extern void perf_event_free_task(struct task_struct *task); |
| @@ -1030,6 +1018,21 @@ have_event: | |||
| 1030 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 1018 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
| 1031 | } | 1019 | } |
| 1032 | 1020 | ||
| 1021 | extern atomic_t perf_task_events; | ||
| 1022 | |||
| 1023 | static inline void perf_event_task_sched_in(struct task_struct *task) | ||
| 1024 | { | ||
| 1025 | COND_STMT(&perf_task_events, __perf_event_task_sched_in(task)); | ||
| 1026 | } | ||
| 1027 | |||
| 1028 | static inline | ||
| 1029 | void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next) | ||
| 1030 | { | ||
| 1031 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | ||
| 1032 | |||
| 1033 | COND_STMT(&perf_task_events, __perf_event_task_sched_out(task, next)); | ||
| 1034 | } | ||
| 1035 | |||
| 1033 | extern void perf_event_mmap(struct vm_area_struct *vma); | 1036 | extern void perf_event_mmap(struct vm_area_struct *vma); |
| 1034 | extern struct perf_guest_info_callbacks *perf_guest_cbs; | 1037 | extern struct perf_guest_info_callbacks *perf_guest_cbs; |
| 1035 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); | 1038 | extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks); |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 445796945ac9..bb27d7ec2fb9 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -160,5 +160,6 @@ void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); | |||
| 160 | 160 | ||
| 161 | /* for F_SETPIPE_SZ and F_GETPIPE_SZ */ | 161 | /* for F_SETPIPE_SZ and F_GETPIPE_SZ */ |
| 162 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); | 162 | long pipe_fcntl(struct file *, unsigned int, unsigned long arg); |
| 163 | struct pipe_inode_info *get_pipe_info(struct file *file); | ||
| 163 | 164 | ||
| 164 | #endif | 165 | #endif |
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/printk.h b/include/linux/printk.h new file mode 100644 index 000000000000..b772ca5fbdf0 --- /dev/null +++ b/include/linux/printk.h | |||
| @@ -0,0 +1,248 @@ | |||
| 1 | #ifndef __KERNEL_PRINTK__ | ||
| 2 | #define __KERNEL_PRINTK__ | ||
| 3 | |||
| 4 | extern const char linux_banner[]; | ||
| 5 | extern const char linux_proc_banner[]; | ||
| 6 | |||
| 7 | #define KERN_EMERG "<0>" /* system is unusable */ | ||
| 8 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | ||
| 9 | #define KERN_CRIT "<2>" /* critical conditions */ | ||
| 10 | #define KERN_ERR "<3>" /* error conditions */ | ||
| 11 | #define KERN_WARNING "<4>" /* warning conditions */ | ||
| 12 | #define KERN_NOTICE "<5>" /* normal but significant condition */ | ||
| 13 | #define KERN_INFO "<6>" /* informational */ | ||
| 14 | #define KERN_DEBUG "<7>" /* debug-level messages */ | ||
| 15 | |||
| 16 | /* Use the default kernel loglevel */ | ||
| 17 | #define KERN_DEFAULT "<d>" | ||
| 18 | /* | ||
| 19 | * Annotation for a "continued" line of log printout (only done after a | ||
| 20 | * line that had no enclosing \n). Only to be used by core/arch code | ||
| 21 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
| 22 | */ | ||
| 23 | #define KERN_CONT "<c>" | ||
| 24 | |||
| 25 | extern int console_printk[]; | ||
| 26 | |||
| 27 | #define console_loglevel (console_printk[0]) | ||
| 28 | #define default_message_loglevel (console_printk[1]) | ||
| 29 | #define minimum_console_loglevel (console_printk[2]) | ||
| 30 | #define default_console_loglevel (console_printk[3]) | ||
| 31 | |||
| 32 | struct va_format { | ||
| 33 | const char *fmt; | ||
| 34 | va_list *va; | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* | ||
| 38 | * FW_BUG | ||
| 39 | * Add this to a message where you are sure the firmware is buggy or behaves | ||
| 40 | * really stupid or out of spec. Be aware that the responsible BIOS developer | ||
| 41 | * should be able to fix this issue or at least get a concrete idea of the | ||
| 42 | * problem by reading your message without the need of looking at the kernel | ||
| 43 | * code. | ||
| 44 | * | ||
| 45 | * Use it for definite and high priority BIOS bugs. | ||
| 46 | * | ||
| 47 | * FW_WARN | ||
| 48 | * Use it for not that clear (e.g. could the kernel messed up things already?) | ||
| 49 | * and medium priority BIOS bugs. | ||
| 50 | * | ||
| 51 | * FW_INFO | ||
| 52 | * Use this one if you want to tell the user or vendor about something | ||
| 53 | * suspicious, but generally harmless related to the firmware. | ||
| 54 | * | ||
| 55 | * Use it for information or very low priority BIOS bugs. | ||
| 56 | */ | ||
| 57 | #define FW_BUG "[Firmware Bug]: " | ||
| 58 | #define FW_WARN "[Firmware Warn]: " | ||
| 59 | #define FW_INFO "[Firmware Info]: " | ||
| 60 | |||
| 61 | /* | ||
| 62 | * HW_ERR | ||
| 63 | * Add this to a message for hardware errors, so that user can report | ||
| 64 | * it to hardware vendor instead of LKML or software vendor. | ||
| 65 | */ | ||
| 66 | #define HW_ERR "[Hardware Error]: " | ||
| 67 | |||
| 68 | #ifdef CONFIG_PRINTK | ||
| 69 | asmlinkage int vprintk(const char *fmt, va_list args) | ||
| 70 | __attribute__ ((format (printf, 1, 0))); | ||
| 71 | asmlinkage int printk(const char * fmt, ...) | ||
| 72 | __attribute__ ((format (printf, 1, 2))) __cold; | ||
| 73 | |||
| 74 | /* | ||
| 75 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
| 76 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
| 77 | * printk_ratelimited() or plain old __ratelimit(). | ||
| 78 | */ | ||
| 79 | extern int __printk_ratelimit(const char *func); | ||
| 80 | #define printk_ratelimit() __printk_ratelimit(__func__) | ||
| 81 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
| 82 | unsigned int interval_msec); | ||
| 83 | |||
| 84 | extern int printk_delay_msec; | ||
| 85 | extern int dmesg_restrict; | ||
| 86 | |||
| 87 | /* | ||
| 88 | * Print a one-time message (analogous to WARN_ONCE() et al): | ||
| 89 | */ | ||
| 90 | #define printk_once(x...) ({ \ | ||
| 91 | static bool __print_once; \ | ||
| 92 | \ | ||
| 93 | if (!__print_once) { \ | ||
| 94 | __print_once = true; \ | ||
| 95 | printk(x); \ | ||
| 96 | } \ | ||
| 97 | }) | ||
| 98 | |||
| 99 | void log_buf_kexec_setup(void); | ||
| 100 | #else | ||
| 101 | static inline int vprintk(const char *s, va_list args) | ||
| 102 | __attribute__ ((format (printf, 1, 0))); | ||
| 103 | static inline int vprintk(const char *s, va_list args) { return 0; } | ||
| 104 | static inline int printk(const char *s, ...) | ||
| 105 | __attribute__ ((format (printf, 1, 2))); | ||
| 106 | static inline int __cold printk(const char *s, ...) { return 0; } | ||
| 107 | static inline int printk_ratelimit(void) { return 0; } | ||
| 108 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
| 109 | unsigned int interval_msec) \ | ||
| 110 | { return false; } | ||
| 111 | |||
| 112 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 113 | #define printk_once(x...) printk(x) | ||
| 114 | |||
| 115 | static inline void log_buf_kexec_setup(void) | ||
| 116 | { | ||
| 117 | } | ||
| 118 | #endif | ||
| 119 | |||
| 120 | /* | ||
| 121 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
| 122 | * gcc's format and side-effect checking. | ||
| 123 | */ | ||
| 124 | static inline __attribute__ ((format (printf, 1, 2))) | ||
| 125 | int no_printk(const char *s, ...) { return 0; } | ||
| 126 | |||
| 127 | extern int printk_needs_cpu(int cpu); | ||
| 128 | extern void printk_tick(void); | ||
| 129 | |||
| 130 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | ||
| 131 | early_printk(const char *fmt, ...); | ||
| 132 | |||
| 133 | static inline void console_silent(void) | ||
| 134 | { | ||
| 135 | console_loglevel = 0; | ||
| 136 | } | ||
| 137 | |||
| 138 | static inline void console_verbose(void) | ||
| 139 | { | ||
| 140 | if (console_loglevel) | ||
| 141 | console_loglevel = 15; | ||
| 142 | } | ||
| 143 | |||
| 144 | extern void dump_stack(void) __cold; | ||
| 145 | |||
| 146 | enum { | ||
| 147 | DUMP_PREFIX_NONE, | ||
| 148 | DUMP_PREFIX_ADDRESS, | ||
| 149 | DUMP_PREFIX_OFFSET | ||
| 150 | }; | ||
| 151 | extern void hex_dump_to_buffer(const void *buf, size_t len, | ||
| 152 | int rowsize, int groupsize, | ||
| 153 | char *linebuf, size_t linebuflen, bool ascii); | ||
| 154 | extern void print_hex_dump(const char *level, const char *prefix_str, | ||
| 155 | int prefix_type, int rowsize, int groupsize, | ||
| 156 | const void *buf, size_t len, bool ascii); | ||
| 157 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
| 158 | const void *buf, size_t len); | ||
| 159 | |||
| 160 | #ifndef pr_fmt | ||
| 161 | #define pr_fmt(fmt) fmt | ||
| 162 | #endif | ||
| 163 | |||
| 164 | #define pr_emerg(fmt, ...) \ | ||
| 165 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 166 | #define pr_alert(fmt, ...) \ | ||
| 167 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 168 | #define pr_crit(fmt, ...) \ | ||
| 169 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 170 | #define pr_err(fmt, ...) \ | ||
| 171 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 172 | #define pr_warning(fmt, ...) \ | ||
| 173 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 174 | #define pr_warn pr_warning | ||
| 175 | #define pr_notice(fmt, ...) \ | ||
| 176 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 177 | #define pr_info(fmt, ...) \ | ||
| 178 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 179 | #define pr_cont(fmt, ...) \ | ||
| 180 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
| 181 | |||
| 182 | /* pr_devel() should produce zero code unless DEBUG is defined */ | ||
| 183 | #ifdef DEBUG | ||
| 184 | #define pr_devel(fmt, ...) \ | ||
| 185 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 186 | #else | ||
| 187 | #define pr_devel(fmt, ...) \ | ||
| 188 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 189 | #endif | ||
| 190 | |||
| 191 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 192 | #if defined(DEBUG) | ||
| 193 | #define pr_debug(fmt, ...) \ | ||
| 194 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 195 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
| 196 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
| 197 | #define pr_debug(fmt, ...) \ | ||
| 198 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ||
| 199 | #else | ||
| 200 | #define pr_debug(fmt, ...) \ | ||
| 201 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) | ||
| 202 | #endif | ||
| 203 | |||
| 204 | /* | ||
| 205 | * ratelimited messages with local ratelimit_state, | ||
| 206 | * no local ratelimit_state used in the !PRINTK case | ||
| 207 | */ | ||
| 208 | #ifdef CONFIG_PRINTK | ||
| 209 | #define printk_ratelimited(fmt, ...) ({ \ | ||
| 210 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
| 211 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
| 212 | DEFAULT_RATELIMIT_BURST); \ | ||
| 213 | \ | ||
| 214 | if (__ratelimit(&_rs)) \ | ||
| 215 | printk(fmt, ##__VA_ARGS__); \ | ||
| 216 | }) | ||
| 217 | #else | ||
| 218 | /* No effect, but we still get type checking even in the !PRINTK case: */ | ||
| 219 | #define printk_ratelimited printk | ||
| 220 | #endif | ||
| 221 | |||
| 222 | #define pr_emerg_ratelimited(fmt, ...) \ | ||
| 223 | printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 224 | #define pr_alert_ratelimited(fmt, ...) \ | ||
| 225 | printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 226 | #define pr_crit_ratelimited(fmt, ...) \ | ||
| 227 | printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 228 | #define pr_err_ratelimited(fmt, ...) \ | ||
| 229 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 230 | #define pr_warning_ratelimited(fmt, ...) \ | ||
| 231 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 232 | #define pr_warn_ratelimited pr_warning_ratelimited | ||
| 233 | #define pr_notice_ratelimited(fmt, ...) \ | ||
| 234 | printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 235 | #define pr_info_ratelimited(fmt, ...) \ | ||
| 236 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 237 | /* no pr_cont_ratelimited, don't do that... */ | ||
| 238 | /* If you are writing a driver, please use dev_dbg instead */ | ||
| 239 | #if defined(DEBUG) | ||
| 240 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 241 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 242 | #else | ||
| 243 | #define pr_debug_ratelimited(fmt, ...) \ | ||
| 244 | ({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \ | ||
| 245 | ##__VA_ARGS__); 0; }) | ||
| 246 | #endif | ||
| 247 | |||
| 248 | #endif | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 5ca47e59b727..c21072adbfad 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <asm/unaligned.h> | 22 | #include <asm/unaligned.h> |
| 23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
| 24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
| 25 | #include <linux/smp_lock.h> | ||
| 26 | #include <linux/buffer_head.h> | 25 | #include <linux/buffer_head.h> |
| 27 | #include <linux/reiserfs_fs_i.h> | 26 | #include <linux/reiserfs_fs_i.h> |
| 28 | #include <linux/reiserfs_fs_sb.h> | 27 | #include <linux/reiserfs_fs_sb.h> |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index d42f274418b8..bbad657a3725 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #include <linux/if_link.h> | 6 | #include <linux/if_link.h> |
| 7 | #include <linux/if_addr.h> | 7 | #include <linux/if_addr.h> |
| 8 | #include <linux/neighbour.h> | 8 | #include <linux/neighbour.h> |
| 9 | #include <linux/netdevice.h> | ||
| 10 | 9 | ||
| 11 | /* rtnetlink families. Values up to 127 are reserved for real address | 10 | /* rtnetlink families. Values up to 127 are reserved for real address |
| 12 | * families, values above 128 may be used arbitrarily. | 11 | * families, values above 128 may be used arbitrarily. |
| @@ -606,6 +605,7 @@ struct tcamsg { | |||
| 606 | #ifdef __KERNEL__ | 605 | #ifdef __KERNEL__ |
| 607 | 606 | ||
| 608 | #include <linux/mutex.h> | 607 | #include <linux/mutex.h> |
| 608 | #include <linux/netdevice.h> | ||
| 609 | 609 | ||
| 610 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | 610 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) |
| 611 | { | 611 | { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d0036e52a24a..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 | ||
| @@ -862,6 +862,7 @@ struct sched_group { | |||
| 862 | * single CPU. | 862 | * single CPU. |
| 863 | */ | 863 | */ |
| 864 | unsigned int cpu_power, cpu_power_orig; | 864 | unsigned int cpu_power, cpu_power_orig; |
| 865 | unsigned int group_weight; | ||
| 865 | 866 | ||
| 866 | /* | 867 | /* |
| 867 | * The CPUs this group covers. | 868 | * The CPUs this group covers. |
diff --git a/include/linux/security.h b/include/linux/security.h index b8246a8df7d2..fd4d55fb8845 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -77,7 +77,6 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
| 77 | extern int cap_task_setscheduler(struct task_struct *p); | 77 | extern int cap_task_setscheduler(struct task_struct *p); |
| 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
| 79 | extern int cap_task_setnice(struct task_struct *p, int nice); | 79 | extern int cap_task_setnice(struct task_struct *p, int nice); |
| 80 | extern int cap_syslog(int type, bool from_file); | ||
| 81 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); | 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); |
| 82 | 81 | ||
| 83 | struct msghdr; | 82 | struct msghdr; |
| @@ -1388,7 +1387,7 @@ struct security_operations { | |||
| 1388 | int (*sysctl) (struct ctl_table *table, int op); | 1387 | int (*sysctl) (struct ctl_table *table, int op); |
| 1389 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1388 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
| 1390 | int (*quota_on) (struct dentry *dentry); | 1389 | int (*quota_on) (struct dentry *dentry); |
| 1391 | int (*syslog) (int type, bool from_file); | 1390 | int (*syslog) (int type); |
| 1392 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1391 | int (*settime) (struct timespec *ts, struct timezone *tz); |
| 1393 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); | 1392 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
| 1394 | 1393 | ||
| @@ -1671,7 +1670,7 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap); | |||
| 1671 | int security_sysctl(struct ctl_table *table, int op); | 1670 | int security_sysctl(struct ctl_table *table, int op); |
| 1672 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1671 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
| 1673 | int security_quota_on(struct dentry *dentry); | 1672 | int security_quota_on(struct dentry *dentry); |
| 1674 | int security_syslog(int type, bool from_file); | 1673 | int security_syslog(int type); |
| 1675 | int security_settime(struct timespec *ts, struct timezone *tz); | 1674 | int security_settime(struct timespec *ts, struct timezone *tz); |
| 1676 | int security_vm_enough_memory(long pages); | 1675 | int security_vm_enough_memory(long pages); |
| 1677 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1676 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
| @@ -1901,9 +1900,9 @@ static inline int security_quota_on(struct dentry *dentry) | |||
| 1901 | return 0; | 1900 | return 0; |
| 1902 | } | 1901 | } |
| 1903 | 1902 | ||
| 1904 | static inline int security_syslog(int type, bool from_file) | 1903 | static inline int security_syslog(int type) |
| 1905 | { | 1904 | { |
| 1906 | return cap_syslog(type, from_file); | 1905 | return 0; |
| 1907 | } | 1906 | } |
| 1908 | 1907 | ||
| 1909 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 1908 | static inline int security_settime(struct timespec *ts, struct timezone *tz) |
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index cea0c38e7a63..9a52f72527dc 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
| @@ -19,11 +19,13 @@ struct clk_mapping { | |||
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | struct clk_ops { | 21 | struct clk_ops { |
| 22 | #ifdef CONFIG_SH_CLK_CPG_LEGACY | ||
| 22 | void (*init)(struct clk *clk); | 23 | void (*init)(struct clk *clk); |
| 24 | #endif | ||
| 23 | int (*enable)(struct clk *clk); | 25 | int (*enable)(struct clk *clk); |
| 24 | void (*disable)(struct clk *clk); | 26 | void (*disable)(struct clk *clk); |
| 25 | unsigned long (*recalc)(struct clk *clk); | 27 | unsigned long (*recalc)(struct clk *clk); |
| 26 | int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); | 28 | int (*set_rate)(struct clk *clk, unsigned long rate); |
| 27 | int (*set_parent)(struct clk *clk, struct clk *parent); | 29 | int (*set_parent)(struct clk *clk, struct clk *parent); |
| 28 | long (*round_rate)(struct clk *clk, unsigned long rate); | 30 | long (*round_rate)(struct clk *clk, unsigned long rate); |
| 29 | }; | 31 | }; |
| @@ -67,36 +69,6 @@ int clk_register(struct clk *); | |||
| 67 | void clk_unregister(struct clk *); | 69 | void clk_unregister(struct clk *); |
| 68 | void clk_enable_init_clocks(void); | 70 | void clk_enable_init_clocks(void); |
| 69 | 71 | ||
| 70 | /** | ||
| 71 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter | ||
| 72 | * @clk: clock source | ||
| 73 | * @rate: desired clock rate in Hz | ||
| 74 | * @algo_id: algorithm id to be passed down to ops->set_rate | ||
| 75 | * | ||
| 76 | * Returns success (0) or negative errno. | ||
| 77 | */ | ||
| 78 | int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id); | ||
| 79 | |||
| 80 | enum clk_sh_algo_id { | ||
| 81 | NO_CHANGE = 0, | ||
| 82 | |||
| 83 | IUS_N1_N1, | ||
| 84 | IUS_322, | ||
| 85 | IUS_522, | ||
| 86 | IUS_N11, | ||
| 87 | |||
| 88 | SB_N1, | ||
| 89 | |||
| 90 | SB3_N1, | ||
| 91 | SB3_32, | ||
| 92 | SB3_43, | ||
| 93 | SB3_54, | ||
| 94 | |||
| 95 | BP_N1, | ||
| 96 | |||
| 97 | IP_N1, | ||
| 98 | }; | ||
| 99 | |||
| 100 | struct clk_div_mult_table { | 72 | struct clk_div_mult_table { |
| 101 | unsigned int *divisors; | 73 | unsigned int *divisors; |
| 102 | unsigned int nr_divisors; | 74 | unsigned int nr_divisors; |
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index f656d1a43dc0..5812fefbcedf 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
| @@ -79,7 +79,7 @@ struct intc_hw_desc { | |||
| 79 | unsigned int nr_subgroups; | 79 | unsigned int nr_subgroups; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | #define _INTC_ARRAY(a) a, a == NULL ? 0 : sizeof(a)/sizeof(*a) | 82 | #define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a) |
| 83 | 83 | ||
| 84 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ | 84 | #define INTC_HW_DESC(vectors, groups, mask_regs, \ |
| 85 | prio_regs, sense_regs, ack_regs) \ | 85 | prio_regs, sense_regs, ack_regs) \ |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 291f721144c2..3a1988202731 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | #ifdef CONFIG_LOCK_KERNEL | 4 | #ifdef CONFIG_LOCK_KERNEL |
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | 6 | ||
| 7 | #define kernel_locked() (current->lock_depth >= 0) | ||
| 8 | |||
| 9 | extern int __lockfunc __reacquire_kernel_lock(void); | 7 | extern int __lockfunc __reacquire_kernel_lock(void); |
| 10 | extern void __lockfunc __release_kernel_lock(void); | 8 | extern void __lockfunc __release_kernel_lock(void); |
| 11 | 9 | ||
| @@ -58,7 +56,6 @@ static inline void cycle_kernel_lock(void) | |||
| 58 | #define lock_kernel() | 56 | #define lock_kernel() |
| 59 | #define unlock_kernel() | 57 | #define unlock_kernel() |
| 60 | #define cycle_kernel_lock() do { } while(0) | 58 | #define cycle_kernel_lock() do { } while(0) |
| 61 | #define kernel_locked() 1 | ||
| 62 | #endif /* CONFIG_BKL */ | 59 | #endif /* CONFIG_BKL */ |
| 63 | 60 | ||
| 64 | #define release_kernel_lock(task) do { } while(0) | 61 | #define release_kernel_lock(task) do { } while(0) |
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 c7ea9bc8897c..54e4eaaa0561 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/tty_driver.h> | 13 | #include <linux/tty_driver.h> |
| 14 | #include <linux/tty_ldisc.h> | 14 | #include <linux/tty_ldisc.h> |
| 15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
| 16 | #include <linux/smp_lock.h> | ||
| 17 | 16 | ||
| 18 | #include <asm/system.h> | 17 | #include <asm/system.h> |
| 19 | 18 | ||
| @@ -367,6 +366,7 @@ struct tty_file_private { | |||
| 367 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 366 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
| 368 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ | 367 | #define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ |
| 369 | #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 */ | ||
| 370 | 370 | ||
| 371 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 371 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
| 372 | 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/af_unix.h b/include/net/af_unix.h index 90c9e2872f27..18e5c3f67580 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
| @@ -10,6 +10,7 @@ extern void unix_inflight(struct file *fp); | |||
| 10 | extern void unix_notinflight(struct file *fp); | 10 | extern void unix_notinflight(struct file *fp); |
| 11 | extern void unix_gc(void); | 11 | extern void unix_gc(void); |
| 12 | extern void wait_for_unix_gc(void); | 12 | extern void wait_for_unix_gc(void); |
| 13 | extern struct sock *unix_get_socket(struct file *filp); | ||
| 13 | 14 | ||
| 14 | #define UNIX_HASH_SIZE 256 | 15 | #define UNIX_HASH_SIZE 256 |
| 15 | 16 | ||
| @@ -56,6 +57,7 @@ struct unix_sock { | |||
| 56 | spinlock_t lock; | 57 | spinlock_t lock; |
| 57 | unsigned int gc_candidate : 1; | 58 | unsigned int gc_candidate : 1; |
| 58 | unsigned int gc_maybe_cycle : 1; | 59 | unsigned int gc_maybe_cycle : 1; |
| 60 | unsigned char recursion_level; | ||
| 59 | struct socket_wq peer_wq; | 61 | struct socket_wq peer_wq; |
| 60 | }; | 62 | }; |
| 61 | #define unix_sk(__sk) ((struct unix_sock *)__sk) | 63 | #define unix_sk(__sk) ((struct unix_sock *)__sk) |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2a7936d7851d..97b8b7c9b63c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -1355,7 +1355,7 @@ enum wiphy_flags { | |||
| 1355 | WIPHY_FLAG_4ADDR_AP = BIT(5), | 1355 | WIPHY_FLAG_4ADDR_AP = BIT(5), |
| 1356 | WIPHY_FLAG_4ADDR_STATION = BIT(6), | 1356 | WIPHY_FLAG_4ADDR_STATION = BIT(6), |
| 1357 | WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), | 1357 | WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), |
| 1358 | WIPHY_FLAG_IBSS_RSN = BIT(7), | 1358 | WIPHY_FLAG_IBSS_RSN = BIT(8), |
| 1359 | }; | 1359 | }; |
| 1360 | 1360 | ||
| 1361 | struct mac_address { | 1361 | struct mac_address { |
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/neighbour.h b/include/net/neighbour.h index 55590ab16b3e..6beb1ffc2b7f 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
| @@ -303,7 +303,7 @@ static inline void neigh_confirm(struct neighbour *neigh) | |||
| 303 | 303 | ||
| 304 | static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) | 304 | static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) |
| 305 | { | 305 | { |
| 306 | unsigned long now = ACCESS_ONCE(jiffies); | 306 | unsigned long now = jiffies; |
| 307 | 307 | ||
| 308 | if (neigh->used != now) | 308 | if (neigh->used != now) |
| 309 | neigh->used = now; | 309 | neigh->used = now; |
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/scsi/libfc.h b/include/scsi/libfc.h index f986ab7ffe6f..5c4c1678f7be 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
| @@ -1006,8 +1006,7 @@ void fc_fcp_destroy(struct fc_lport *); | |||
| 1006 | /* | 1006 | /* |
| 1007 | * SCSI INTERACTION LAYER | 1007 | * SCSI INTERACTION LAYER |
| 1008 | *****************************/ | 1008 | *****************************/ |
| 1009 | int fc_queuecommand(struct scsi_cmnd *, | 1009 | int fc_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); |
| 1010 | void (*done)(struct scsi_cmnd *)); | ||
| 1011 | int fc_eh_abort(struct scsi_cmnd *); | 1010 | int fc_eh_abort(struct scsi_cmnd *); |
| 1012 | int fc_eh_device_reset(struct scsi_cmnd *); | 1011 | int fc_eh_device_reset(struct scsi_cmnd *); |
| 1013 | int fc_eh_host_reset(struct scsi_cmnd *); | 1012 | int fc_eh_host_reset(struct scsi_cmnd *); |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ae5196aae1a5..b81d969ddc67 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
| @@ -341,8 +341,7 @@ extern int iscsi_eh_abort(struct scsi_cmnd *sc); | |||
| 341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); | 341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); |
| 342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); | 342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); |
| 343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | 343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); |
| 344 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 344 | extern int iscsi_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *sc); |
| 345 | void (*done)(struct scsi_cmnd *)); | ||
| 346 | 345 | ||
| 347 | /* | 346 | /* |
| 348 | * iSCSI host helpers. | 347 | * iSCSI host helpers. |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 3dec1949f69c..90ce527ecf3d 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
| @@ -621,8 +621,7 @@ int sas_set_phy_speed(struct sas_phy *phy, | |||
| 621 | int sas_phy_enable(struct sas_phy *phy, int enabled); | 621 | int sas_phy_enable(struct sas_phy *phy, int enabled); |
| 622 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 622 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
| 623 | int sas_queue_up(struct sas_task *task); | 623 | int sas_queue_up(struct sas_task *task); |
| 624 | extern int sas_queuecommand(struct scsi_cmnd *, | 624 | extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); |
| 625 | void (*scsi_done)(struct scsi_cmnd *)); | ||
| 626 | extern int sas_target_alloc(struct scsi_target *); | 625 | extern int sas_target_alloc(struct scsi_target *); |
| 627 | extern int sas_slave_alloc(struct scsi_device *); | 626 | extern int sas_slave_alloc(struct scsi_device *); |
| 628 | extern int sas_slave_configure(struct scsi_device *); | 627 | extern int sas_slave_configure(struct scsi_device *); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index d0a6a845f204..e7e385842a38 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -127,8 +127,7 @@ struct scsi_host_template { | |||
| 127 | * | 127 | * |
| 128 | * STATUS: REQUIRED | 128 | * STATUS: REQUIRED |
| 129 | */ | 129 | */ |
| 130 | int (* queuecommand)(struct scsi_cmnd *, | 130 | int (* queuecommand)(struct Scsi_Host *, struct scsi_cmnd *); |
| 131 | void (*done)(struct scsi_cmnd *)); | ||
| 132 | 131 | ||
| 133 | /* | 132 | /* |
| 134 | * The transfer functions are used to queue a scsi command to | 133 | * The transfer functions are used to queue a scsi command to |
| @@ -505,6 +504,25 @@ struct scsi_host_template { | |||
| 505 | }; | 504 | }; |
| 506 | 505 | ||
| 507 | /* | 506 | /* |
| 507 | * Temporary #define for host lock push down. Can be removed when all | ||
| 508 | * drivers have been updated to take advantage of unlocked | ||
| 509 | * queuecommand. | ||
| 510 | * | ||
| 511 | */ | ||
| 512 | #define DEF_SCSI_QCMD(func_name) \ | ||
| 513 | int func_name(struct Scsi_Host *shost, struct scsi_cmnd *cmd) \ | ||
| 514 | { \ | ||
| 515 | unsigned long irq_flags; \ | ||
| 516 | int rc; \ | ||
| 517 | spin_lock_irqsave(shost->host_lock, irq_flags); \ | ||
| 518 | scsi_cmd_get_serial(shost, cmd); \ | ||
| 519 | rc = func_name##_lck (cmd, cmd->scsi_done); \ | ||
| 520 | spin_unlock_irqrestore(shost->host_lock, irq_flags); \ | ||
| 521 | return rc; \ | ||
| 522 | } | ||
| 523 | |||
| 524 | |||
| 525 | /* | ||
| 508 | * shost state: If you alter this, you also need to alter scsi_sysfs.c | 526 | * shost state: If you alter this, you also need to alter scsi_sysfs.c |
| 509 | * (for the ascii descriptions) and the state model enforcer: | 527 | * (for the ascii descriptions) and the state model enforcer: |
| 510 | * scsi_host_set_state() | 528 | * scsi_host_set_state() |
| @@ -752,6 +770,7 @@ extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); | |||
| 752 | extern void scsi_host_put(struct Scsi_Host *t); | 770 | extern void scsi_host_put(struct Scsi_Host *t); |
| 753 | extern struct Scsi_Host *scsi_host_lookup(unsigned short); | 771 | extern struct Scsi_Host *scsi_host_lookup(unsigned short); |
| 754 | extern const char *scsi_host_state_name(enum scsi_host_state); | 772 | extern const char *scsi_host_state_name(enum scsi_host_state); |
| 773 | extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); | ||
| 755 | 774 | ||
| 756 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); | 775 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); |
| 757 | 776 | ||
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index fa60cbda90a4..d79894192ae3 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h | |||
| @@ -85,7 +85,9 @@ | |||
| 85 | * ACK_MD (FSI2) | 85 | * ACK_MD (FSI2) |
| 86 | * CKG1 (FSI) | 86 | * CKG1 (FSI) |
| 87 | * | 87 | * |
| 88 | * err: return value < 0 | 88 | * err : return value < 0 |
| 89 | * no change : return value == 0 | ||
| 90 | * change xMD : return value > 0 | ||
| 89 | * | 91 | * |
| 90 | * 0x-00000AB | 92 | * 0x-00000AB |
| 91 | * | 93 | * |
| @@ -111,7 +113,7 @@ | |||
| 111 | struct sh_fsi_platform_info { | 113 | struct sh_fsi_platform_info { |
| 112 | unsigned long porta_flags; | 114 | unsigned long porta_flags; |
| 113 | unsigned long portb_flags; | 115 | unsigned long portb_flags; |
| 114 | int (*set_rate)(int is_porta, int rate); /* for master mode */ | 116 | int (*set_rate)(struct device *dev, int is_porta, int rate, int enable); |
| 115 | }; | 117 | }; |
| 116 | 118 | ||
| 117 | #endif /* __SOUND_FSI_H */ | 119 | #endif /* __SOUND_FSI_H */ |
diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h index 6316cdabf73f..89d43b3d4cb9 100644 --- a/include/video/da8xx-fb.h +++ b/include/video/da8xx-fb.h | |||
| @@ -99,7 +99,6 @@ struct lcd_sync_arg { | |||
| 99 | #define FBIPUT_COLOR _IOW('F', 6, int) | 99 | #define FBIPUT_COLOR _IOW('F', 6, int) |
| 100 | #define FBIPUT_HSYNC _IOW('F', 9, int) | 100 | #define FBIPUT_HSYNC _IOW('F', 9, int) |
| 101 | #define FBIPUT_VSYNC _IOW('F', 10, int) | 101 | #define FBIPUT_VSYNC _IOW('F', 10, int) |
| 102 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) | ||
| 103 | 102 | ||
| 104 | #endif /* ifndef DA8XX_FB_H */ | 103 | #endif /* ifndef DA8XX_FB_H */ |
| 105 | 104 | ||
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/memory.h b/include/xen/interface/memory.h index d7a6c13bde69..eac3ce153719 100644 --- a/include/xen/interface/memory.h +++ b/include/xen/interface/memory.h | |||
| @@ -141,6 +141,19 @@ struct xen_machphys_mfn_list { | |||
| 141 | DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list); | 141 | DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list); |
| 142 | 142 | ||
| 143 | /* | 143 | /* |
| 144 | * Returns the location in virtual address space of the machine_to_phys | ||
| 145 | * mapping table. Architectures which do not have a m2p table, or which do not | ||
| 146 | * map it by default into guest address space, do not implement this command. | ||
| 147 | * arg == addr of xen_machphys_mapping_t. | ||
| 148 | */ | ||
| 149 | #define XENMEM_machphys_mapping 12 | ||
| 150 | struct xen_machphys_mapping { | ||
| 151 | unsigned long v_start, v_end; /* Start and end virtual addresses. */ | ||
| 152 | unsigned long max_mfn; /* Maximum MFN that can be looked up. */ | ||
| 153 | }; | ||
| 154 | DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mapping_t); | ||
| 155 | |||
| 156 | /* | ||
| 144 | * Sets the GPFN at which a particular page appears in the specified guest's | 157 | * Sets the GPFN at which a particular page appears in the specified guest's |
| 145 | * pseudophysical address space. | 158 | * pseudophysical address space. |
| 146 | * arg == addr of xen_add_to_physmap_t. | 159 | * arg == addr of xen_add_to_physmap_t. |
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 ** |
diff --git a/include/xen/page.h b/include/xen/page.h index eaf85fab1263..0be36b976f4b 100644 --- a/include/xen/page.h +++ b/include/xen/page.h | |||
| @@ -1 +1,8 @@ | |||
| 1 | #ifndef _XEN_PAGE_H | ||
| 2 | #define _XEN_PAGE_H | ||
| 3 | |||
| 1 | #include <asm/xen/page.h> | 4 | #include <asm/xen/page.h> |
| 5 | |||
| 6 | extern phys_addr_t xen_extra_mem_start, xen_extra_mem_size; | ||
| 7 | |||
| 8 | #endif /* _XEN_PAGE_H */ | ||
diff --git a/include/xen/privcmd.h b/include/xen/privcmd.h index b42cdfd92fee..17857fb4d550 100644 --- a/include/xen/privcmd.h +++ b/include/xen/privcmd.h | |||
| @@ -34,13 +34,10 @@ | |||
| 34 | #define __LINUX_PUBLIC_PRIVCMD_H__ | 34 | #define __LINUX_PUBLIC_PRIVCMD_H__ |
| 35 | 35 | ||
| 36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
| 37 | #include <linux/compiler.h> | ||
| 37 | 38 | ||
| 38 | typedef unsigned long xen_pfn_t; | 39 | typedef unsigned long xen_pfn_t; |
| 39 | 40 | ||
| 40 | #ifndef __user | ||
| 41 | #define __user | ||
| 42 | #endif | ||
| 43 | |||
| 44 | struct privcmd_hypercall { | 41 | struct privcmd_hypercall { |
| 45 | __u64 op; | 42 | __u64 op; |
| 46 | __u64 arg[5]; | 43 | __u64 arg[5]; |
