diff options
Diffstat (limited to 'include')
64 files changed, 935 insertions, 259 deletions
diff --git a/include/asm-generic/cmpxchg-local.h b/include/asm-generic/cmpxchg-local.h index d8d4c898c1bb..70bef78912b7 100644 --- a/include/asm-generic/cmpxchg-local.h +++ b/include/asm-generic/cmpxchg-local.h | |||
@@ -4,7 +4,8 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/irqflags.h> | 5 | #include <linux/irqflags.h> |
6 | 6 | ||
7 | extern unsigned long wrong_size_cmpxchg(volatile void *ptr); | 7 | extern unsigned long wrong_size_cmpxchg(volatile void *ptr) |
8 | __noreturn; | ||
8 | 9 | ||
9 | /* | 10 | /* |
10 | * Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned | 11 | * Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned |
diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h index 5b09392db673..d401e5463fb0 100644 --- a/include/asm-generic/syscall.h +++ b/include/asm-generic/syscall.h | |||
@@ -144,8 +144,6 @@ void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, | |||
144 | 144 | ||
145 | /** | 145 | /** |
146 | * syscall_get_arch - return the AUDIT_ARCH for the current system call | 146 | * syscall_get_arch - return the AUDIT_ARCH for the current system call |
147 | * @task: task of interest, must be in system call entry tracing | ||
148 | * @regs: task_pt_regs() of @task | ||
149 | * | 147 | * |
150 | * Returns the AUDIT_ARCH_* based on the system call convention in use. | 148 | * Returns the AUDIT_ARCH_* based on the system call convention in use. |
151 | * | 149 | * |
@@ -155,5 +153,5 @@ void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, | |||
155 | * Architectures which permit CONFIG_HAVE_ARCH_SECCOMP_FILTER must | 153 | * Architectures which permit CONFIG_HAVE_ARCH_SECCOMP_FILTER must |
156 | * provide an implementation of this. | 154 | * provide an implementation of this. |
157 | */ | 155 | */ |
158 | int syscall_get_arch(struct task_struct *task, struct pt_regs *regs); | 156 | int syscall_get_arch(void); |
159 | #endif /* _ASM_SYSCALL_H */ | 157 | #endif /* _ASM_SYSCALL_H */ |
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 97d5497debc1..595f85c392ac 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -56,6 +56,12 @@ extern bool i915_gpu_turbo_disable(void); | |||
56 | 56 | ||
57 | #define I830_GMCH_CTRL 0x52 | 57 | #define I830_GMCH_CTRL 0x52 |
58 | 58 | ||
59 | #define I830_GMCH_GMS_MASK 0x70 | ||
60 | #define I830_GMCH_GMS_LOCAL 0x10 | ||
61 | #define I830_GMCH_GMS_STOLEN_512 0x20 | ||
62 | #define I830_GMCH_GMS_STOLEN_1024 0x30 | ||
63 | #define I830_GMCH_GMS_STOLEN_8192 0x40 | ||
64 | |||
59 | #define I855_GMCH_GMS_MASK 0xF0 | 65 | #define I855_GMCH_GMS_MASK 0xF0 |
60 | #define I855_GMCH_GMS_STOLEN_0M 0x0 | 66 | #define I855_GMCH_GMS_STOLEN_0M 0x0 |
61 | #define I855_GMCH_GMS_STOLEN_1M (0x1 << 4) | 67 | #define I855_GMCH_GMS_STOLEN_1M (0x1 << 4) |
@@ -72,4 +78,18 @@ extern bool i915_gpu_turbo_disable(void); | |||
72 | #define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) | 78 | #define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) |
73 | #define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) | 79 | #define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) |
74 | 80 | ||
81 | #define I830_DRB3 0x63 | ||
82 | #define I85X_DRB3 0x43 | ||
83 | #define I865_TOUD 0xc4 | ||
84 | |||
85 | #define I830_ESMRAMC 0x91 | ||
86 | #define I845_ESMRAMC 0x9e | ||
87 | #define I85X_ESMRAMC 0x61 | ||
88 | #define TSEG_ENABLE (1 << 0) | ||
89 | #define I830_TSEG_SIZE_512K (0 << 1) | ||
90 | #define I830_TSEG_SIZE_1M (1 << 1) | ||
91 | #define I845_TSEG_SIZE_MASK (3 << 1) | ||
92 | #define I845_TSEG_SIZE_512K (2 << 1) | ||
93 | #define I845_TSEG_SIZE_1M (3 << 1) | ||
94 | |||
75 | #endif /* _I915_DRM_H_ */ | 95 | #endif /* _I915_DRM_H_ */ |
diff --git a/include/linux/acpi_dma.h b/include/linux/acpi_dma.h index fb0298082916..329436d38e66 100644 --- a/include/linux/acpi_dma.h +++ b/include/linux/acpi_dma.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/err.h> | ||
19 | #include <linux/dmaengine.h> | 20 | #include <linux/dmaengine.h> |
20 | 21 | ||
21 | /** | 22 | /** |
@@ -103,12 +104,12 @@ static inline void devm_acpi_dma_controller_free(struct device *dev) | |||
103 | static inline struct dma_chan *acpi_dma_request_slave_chan_by_index( | 104 | static inline struct dma_chan *acpi_dma_request_slave_chan_by_index( |
104 | struct device *dev, size_t index) | 105 | struct device *dev, size_t index) |
105 | { | 106 | { |
106 | return NULL; | 107 | return ERR_PTR(-ENODEV); |
107 | } | 108 | } |
108 | static inline struct dma_chan *acpi_dma_request_slave_chan_by_name( | 109 | static inline struct dma_chan *acpi_dma_request_slave_chan_by_name( |
109 | struct device *dev, const char *name) | 110 | struct device *dev, const char *name) |
110 | { | 111 | { |
111 | return NULL; | 112 | return ERR_PTR(-ENODEV); |
112 | } | 113 | } |
113 | 114 | ||
114 | #define acpi_dma_simple_xlate NULL | 115 | #define acpi_dma_simple_xlate NULL |
diff --git a/include/linux/audit.h b/include/linux/audit.h index ec1464df4c60..22cfddb75566 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -79,6 +79,14 @@ extern int is_audit_feature_set(int which); | |||
79 | extern int __init audit_register_class(int class, unsigned *list); | 79 | extern int __init audit_register_class(int class, unsigned *list); |
80 | extern int audit_classify_syscall(int abi, unsigned syscall); | 80 | extern int audit_classify_syscall(int abi, unsigned syscall); |
81 | extern int audit_classify_arch(int arch); | 81 | extern int audit_classify_arch(int arch); |
82 | /* only for compat system calls */ | ||
83 | extern unsigned compat_write_class[]; | ||
84 | extern unsigned compat_read_class[]; | ||
85 | extern unsigned compat_dir_class[]; | ||
86 | extern unsigned compat_chattr_class[]; | ||
87 | extern unsigned compat_signal_class[]; | ||
88 | |||
89 | extern int __weak audit_classify_compat_syscall(int abi, unsigned syscall); | ||
82 | 90 | ||
83 | /* audit_names->type values */ | 91 | /* audit_names->type values */ |
84 | #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ | 92 | #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ |
@@ -94,6 +102,12 @@ struct filename; | |||
94 | 102 | ||
95 | extern void audit_log_session_info(struct audit_buffer *ab); | 103 | extern void audit_log_session_info(struct audit_buffer *ab); |
96 | 104 | ||
105 | #ifdef CONFIG_AUDIT_COMPAT_GENERIC | ||
106 | #define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT)) | ||
107 | #else | ||
108 | #define audit_is_compat(arch) false | ||
109 | #endif | ||
110 | |||
97 | #ifdef CONFIG_AUDITSYSCALL | 111 | #ifdef CONFIG_AUDITSYSCALL |
98 | /* These are defined in auditsc.c */ | 112 | /* These are defined in auditsc.c */ |
99 | /* Public API */ | 113 | /* Public API */ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5a4d39b4686b..bba550826921 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -216,9 +216,9 @@ static inline void bvec_iter_advance(struct bio_vec *bv, struct bvec_iter *iter, | |||
216 | } | 216 | } |
217 | 217 | ||
218 | #define for_each_bvec(bvl, bio_vec, iter, start) \ | 218 | #define for_each_bvec(bvl, bio_vec, iter, start) \ |
219 | for ((iter) = start; \ | 219 | for (iter = (start); \ |
220 | (bvl) = bvec_iter_bvec((bio_vec), (iter)), \ | 220 | (iter).bi_size && \ |
221 | (iter).bi_size; \ | 221 | ((bvl = bvec_iter_bvec((bio_vec), (iter))), 1); \ |
222 | bvec_iter_advance((bio_vec), &(iter), (bvl).bv_len)) | 222 | bvec_iter_advance((bio_vec), &(iter), (bvl).bv_len)) |
223 | 223 | ||
224 | 224 | ||
@@ -388,7 +388,7 @@ struct sg_iovec; | |||
388 | struct rq_map_data; | 388 | struct rq_map_data; |
389 | extern struct bio *bio_map_user_iov(struct request_queue *, | 389 | extern struct bio *bio_map_user_iov(struct request_queue *, |
390 | struct block_device *, | 390 | struct block_device *, |
391 | struct sg_iovec *, int, int, gfp_t); | 391 | const struct sg_iovec *, int, int, gfp_t); |
392 | extern void bio_unmap_user(struct bio *); | 392 | extern void bio_unmap_user(struct bio *); |
393 | extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, | 393 | extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, |
394 | gfp_t); | 394 | gfp_t); |
@@ -414,7 +414,8 @@ extern int bio_alloc_pages(struct bio *bio, gfp_t gfp); | |||
414 | extern struct bio *bio_copy_user(struct request_queue *, struct rq_map_data *, | 414 | extern struct bio *bio_copy_user(struct request_queue *, struct rq_map_data *, |
415 | unsigned long, unsigned int, int, gfp_t); | 415 | unsigned long, unsigned int, int, gfp_t); |
416 | extern struct bio *bio_copy_user_iov(struct request_queue *, | 416 | extern struct bio *bio_copy_user_iov(struct request_queue *, |
417 | struct rq_map_data *, struct sg_iovec *, | 417 | struct rq_map_data *, |
418 | const struct sg_iovec *, | ||
418 | int, int, gfp_t); | 419 | int, int, gfp_t); |
419 | extern int bio_uncopy_user(struct bio *); | 420 | extern int bio_uncopy_user(struct bio *); |
420 | void zero_fill_bio(struct bio *bio); | 421 | void zero_fill_bio(struct bio *bio); |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index bbc3a6c88fce..aa0eaa2d0bd8 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
@@ -189,6 +189,7 @@ enum rq_flag_bits { | |||
189 | __REQ_KERNEL, /* direct IO to kernel pages */ | 189 | __REQ_KERNEL, /* direct IO to kernel pages */ |
190 | __REQ_PM, /* runtime pm request */ | 190 | __REQ_PM, /* runtime pm request */ |
191 | __REQ_END, /* last of chain of requests */ | 191 | __REQ_END, /* last of chain of requests */ |
192 | __REQ_HASHED, /* on IO scheduler merge hash */ | ||
192 | __REQ_NR_BITS, /* stops here */ | 193 | __REQ_NR_BITS, /* stops here */ |
193 | }; | 194 | }; |
194 | 195 | ||
@@ -241,5 +242,6 @@ enum rq_flag_bits { | |||
241 | #define REQ_KERNEL (1ULL << __REQ_KERNEL) | 242 | #define REQ_KERNEL (1ULL << __REQ_KERNEL) |
242 | #define REQ_PM (1ULL << __REQ_PM) | 243 | #define REQ_PM (1ULL << __REQ_PM) |
243 | #define REQ_END (1ULL << __REQ_END) | 244 | #define REQ_END (1ULL << __REQ_END) |
245 | #define REQ_HASHED (1ULL << __REQ_HASHED) | ||
244 | 246 | ||
245 | #endif /* __LINUX_BLK_TYPES_H */ | 247 | #endif /* __LINUX_BLK_TYPES_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1e1fa3f93d5f..0d84981ee03f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -118,7 +118,18 @@ struct request { | |||
118 | struct bio *bio; | 118 | struct bio *bio; |
119 | struct bio *biotail; | 119 | struct bio *biotail; |
120 | 120 | ||
121 | struct hlist_node hash; /* merge hash */ | 121 | /* |
122 | * The hash is used inside the scheduler, and killed once the | ||
123 | * request reaches the dispatch list. The ipi_list is only used | ||
124 | * to queue the request for softirq completion, which is long | ||
125 | * after the request has been unhashed (and even removed from | ||
126 | * the dispatch list). | ||
127 | */ | ||
128 | union { | ||
129 | struct hlist_node hash; /* merge hash */ | ||
130 | struct list_head ipi_list; | ||
131 | }; | ||
132 | |||
122 | /* | 133 | /* |
123 | * The rb_node is only used inside the io scheduler, requests | 134 | * The rb_node is only used inside the io scheduler, requests |
124 | * are pruned when moved to the dispatch queue. So let the | 135 | * are pruned when moved to the dispatch queue. So let the |
@@ -824,8 +835,8 @@ extern int blk_rq_map_user(struct request_queue *, struct request *, | |||
824 | extern int blk_rq_unmap_user(struct bio *); | 835 | extern int blk_rq_unmap_user(struct bio *); |
825 | extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, unsigned int, gfp_t); | 836 | extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, unsigned int, gfp_t); |
826 | extern int blk_rq_map_user_iov(struct request_queue *, struct request *, | 837 | extern int blk_rq_map_user_iov(struct request_queue *, struct request *, |
827 | struct rq_map_data *, struct sg_iovec *, int, | 838 | struct rq_map_data *, const struct sg_iovec *, |
828 | unsigned int, gfp_t); | 839 | int, unsigned int, gfp_t); |
829 | extern int blk_execute_rq(struct request_queue *, struct gendisk *, | 840 | extern int blk_execute_rq(struct request_queue *, struct gendisk *, |
830 | struct request *, int); | 841 | struct request *, int); |
831 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, | 842 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index d77797a52b7b..c40302f909ce 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -210,8 +210,8 @@ int block_write_full_page(struct page *page, get_block_t *get_block, | |||
210 | int block_write_full_page_endio(struct page *page, get_block_t *get_block, | 210 | int block_write_full_page_endio(struct page *page, get_block_t *get_block, |
211 | struct writeback_control *wbc, bh_end_io_t *handler); | 211 | struct writeback_control *wbc, bh_end_io_t *handler); |
212 | int block_read_full_page(struct page*, get_block_t*); | 212 | int block_read_full_page(struct page*, get_block_t*); |
213 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, | 213 | int block_is_partially_uptodate(struct page *page, unsigned long from, |
214 | unsigned long from); | 214 | unsigned long count); |
215 | int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, | 215 | int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, |
216 | unsigned flags, struct page **pagep, get_block_t *get_block); | 216 | unsigned flags, struct page **pagep, get_block_t *get_block); |
217 | int __block_write_begin(struct page *page, loff_t pos, unsigned len, | 217 | int __block_write_begin(struct page *page, loff_t pos, unsigned len, |
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h new file mode 100644 index 000000000000..d1e49d52b640 --- /dev/null +++ b/include/linux/compiler-clang.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __LINUX_COMPILER_H | ||
2 | #error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead." | ||
3 | #endif | ||
4 | |||
5 | /* Some compiler specific definitions are overwritten here | ||
6 | * for Clang compiler | ||
7 | */ | ||
8 | |||
9 | #ifdef uninitialized_var | ||
10 | #undef uninitialized_var | ||
11 | #define uninitialized_var(x) x = *(&(x)) | ||
12 | #endif | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 2472740d7ab2..ee7239ea1583 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -63,6 +63,13 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
63 | # include <linux/compiler-intel.h> | 63 | # include <linux/compiler-intel.h> |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | /* Clang compiler defines __GNUC__. So we will overwrite implementations | ||
67 | * coming from above header files here | ||
68 | */ | ||
69 | #ifdef __clang__ | ||
70 | #include <linux/compiler-clang.h> | ||
71 | #endif | ||
72 | |||
66 | /* | 73 | /* |
67 | * Generic compiler-dependent macros required for kernel | 74 | * Generic compiler-dependent macros required for kernel |
68 | * build go below this comment. Actual compiler/compiler version | 75 | * build go below this comment. Actual compiler/compiler version |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c48e595f623e..5ae5100c1f24 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -455,11 +455,14 @@ extern struct cpufreq_governor cpufreq_gov_conservative; | |||
455 | * FREQUENCY TABLE HELPERS * | 455 | * FREQUENCY TABLE HELPERS * |
456 | *********************************************************************/ | 456 | *********************************************************************/ |
457 | 457 | ||
458 | #define CPUFREQ_ENTRY_INVALID ~0 | 458 | /* Special Values of .frequency field */ |
459 | #define CPUFREQ_TABLE_END ~1 | 459 | #define CPUFREQ_ENTRY_INVALID ~0 |
460 | #define CPUFREQ_BOOST_FREQ ~2 | 460 | #define CPUFREQ_TABLE_END ~1 |
461 | /* Special Values of .flags field */ | ||
462 | #define CPUFREQ_BOOST_FREQ (1 << 0) | ||
461 | 463 | ||
462 | struct cpufreq_frequency_table { | 464 | struct cpufreq_frequency_table { |
465 | unsigned int flags; | ||
463 | unsigned int driver_data; /* driver specific data, not used by core */ | 466 | unsigned int driver_data; /* driver specific data, not used by core */ |
464 | unsigned int frequency; /* kHz - doesn't need to be in ascending | 467 | unsigned int frequency; /* kHz - doesn't need to be in ascending |
465 | * order */ | 468 | * order */ |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index c5c92d59e531..8300fb87b84a 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -341,15 +341,11 @@ enum dma_slave_buswidth { | |||
341 | * and this struct will then be passed in as an argument to the | 341 | * and this struct will then be passed in as an argument to the |
342 | * DMA engine device_control() function. | 342 | * DMA engine device_control() function. |
343 | * | 343 | * |
344 | * The rationale for adding configuration information to this struct | 344 | * The rationale for adding configuration information to this struct is as |
345 | * is as follows: if it is likely that most DMA slave controllers in | 345 | * follows: if it is likely that more than one DMA slave controllers in |
346 | * the world will support the configuration option, then make it | 346 | * the world will support the configuration option, then make it generic. |
347 | * generic. If not: if it is fixed so that it be sent in static from | 347 | * If not: if it is fixed so that it be sent in static from the platform |
348 | * the platform data, then prefer to do that. Else, if it is neither | 348 | * data, then prefer to do that. |
349 | * fixed at runtime, nor generic enough (such as bus mastership on | ||
350 | * some CPU family and whatnot) then create a custom slave config | ||
351 | * struct and pass that, then make this config a member of that | ||
352 | * struct, if applicable. | ||
353 | */ | 349 | */ |
354 | struct dma_slave_config { | 350 | struct dma_slave_config { |
355 | enum dma_transfer_direction direction; | 351 | enum dma_transfer_direction direction; |
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h index 481ab2345d6b..68b4024184de 100644 --- a/include/linux/dw_dmac.h +++ b/include/linux/dw_dmac.h | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Driver for the Synopsys DesignWare DMA Controller (aka DMACA on | 2 | * Driver for the Synopsys DesignWare DMA Controller |
3 | * AVR32 systems.) | ||
4 | * | 3 | * |
5 | * Copyright (C) 2007 Atmel Corporation | 4 | * Copyright (C) 2007 Atmel Corporation |
6 | * Copyright (C) 2010-2011 ST Microelectronics | 5 | * Copyright (C) 2010-2011 ST Microelectronics |
@@ -44,8 +43,6 @@ struct dw_dma_slave { | |||
44 | * @nr_masters: Number of AHB masters supported by the controller | 43 | * @nr_masters: Number of AHB masters supported by the controller |
45 | * @data_width: Maximum data width supported by hardware per AHB master | 44 | * @data_width: Maximum data width supported by hardware per AHB master |
46 | * (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) | 45 | * (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) |
47 | * @sd: slave specific data. Used for configuring channels | ||
48 | * @sd_count: count of slave data structures passed. | ||
49 | */ | 46 | */ |
50 | struct dw_dma_platform_data { | 47 | struct dw_dma_platform_data { |
51 | unsigned int nr_channels; | 48 | unsigned int nr_channels; |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index 70e8e21c0a30..230f87bdf5ad 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h | |||
@@ -63,8 +63,6 @@ struct file_operations; | |||
63 | struct vfsmount; | 63 | struct vfsmount; |
64 | struct dentry; | 64 | struct dentry; |
65 | 65 | ||
66 | extern void __init files_defer_init(void); | ||
67 | |||
68 | #define rcu_dereference_check_fdtable(files, fdtfd) \ | 66 | #define rcu_dereference_check_fdtable(files, fdtfd) \ |
69 | rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock)) | 67 | rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock)) |
70 | 68 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 81048f9bc783..7a9c5bca2b76 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -48,6 +48,7 @@ struct cred; | |||
48 | struct swap_info_struct; | 48 | struct swap_info_struct; |
49 | struct seq_file; | 49 | struct seq_file; |
50 | struct workqueue_struct; | 50 | struct workqueue_struct; |
51 | struct iov_iter; | ||
51 | 52 | ||
52 | extern void __init inode_init(void); | 53 | extern void __init inode_init(void); |
53 | extern void __init inode_init_early(void); | 54 | extern void __init inode_init_early(void); |
@@ -125,6 +126,8 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
125 | 126 | ||
126 | /* File needs atomic accesses to f_pos */ | 127 | /* File needs atomic accesses to f_pos */ |
127 | #define FMODE_ATOMIC_POS ((__force fmode_t)0x8000) | 128 | #define FMODE_ATOMIC_POS ((__force fmode_t)0x8000) |
129 | /* Write access to underlying fs */ | ||
130 | #define FMODE_WRITER ((__force fmode_t)0x10000) | ||
128 | 131 | ||
129 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 132 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
130 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 133 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
@@ -293,38 +296,6 @@ struct page; | |||
293 | struct address_space; | 296 | struct address_space; |
294 | struct writeback_control; | 297 | struct writeback_control; |
295 | 298 | ||
296 | struct iov_iter { | ||
297 | const struct iovec *iov; | ||
298 | unsigned long nr_segs; | ||
299 | size_t iov_offset; | ||
300 | size_t count; | ||
301 | }; | ||
302 | |||
303 | size_t iov_iter_copy_from_user_atomic(struct page *page, | ||
304 | struct iov_iter *i, unsigned long offset, size_t bytes); | ||
305 | size_t iov_iter_copy_from_user(struct page *page, | ||
306 | struct iov_iter *i, unsigned long offset, size_t bytes); | ||
307 | void iov_iter_advance(struct iov_iter *i, size_t bytes); | ||
308 | int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); | ||
309 | size_t iov_iter_single_seg_count(const struct iov_iter *i); | ||
310 | |||
311 | static inline void iov_iter_init(struct iov_iter *i, | ||
312 | const struct iovec *iov, unsigned long nr_segs, | ||
313 | size_t count, size_t written) | ||
314 | { | ||
315 | i->iov = iov; | ||
316 | i->nr_segs = nr_segs; | ||
317 | i->iov_offset = 0; | ||
318 | i->count = count + written; | ||
319 | |||
320 | iov_iter_advance(i, written); | ||
321 | } | ||
322 | |||
323 | static inline size_t iov_iter_count(struct iov_iter *i) | ||
324 | { | ||
325 | return i->count; | ||
326 | } | ||
327 | |||
328 | /* | 299 | /* |
329 | * "descriptor" for what we're up to with a read. | 300 | * "descriptor" for what we're up to with a read. |
330 | * This allows us to use the same read code yet | 301 | * This allows us to use the same read code yet |
@@ -383,7 +354,7 @@ struct address_space_operations { | |||
383 | int (*migratepage) (struct address_space *, | 354 | int (*migratepage) (struct address_space *, |
384 | struct page *, struct page *, enum migrate_mode); | 355 | struct page *, struct page *, enum migrate_mode); |
385 | int (*launder_page) (struct page *); | 356 | int (*launder_page) (struct page *); |
386 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | 357 | int (*is_partially_uptodate) (struct page *, unsigned long, |
387 | unsigned long); | 358 | unsigned long); |
388 | void (*is_dirty_writeback) (struct page *, bool *, bool *); | 359 | void (*is_dirty_writeback) (struct page *, bool *, bool *); |
389 | int (*error_remove_page)(struct address_space *, struct page *); | 360 | int (*error_remove_page)(struct address_space *, struct page *); |
@@ -770,9 +741,6 @@ static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index) | |||
770 | index < ra->start + ra->size); | 741 | index < ra->start + ra->size); |
771 | } | 742 | } |
772 | 743 | ||
773 | #define FILE_MNT_WRITE_TAKEN 1 | ||
774 | #define FILE_MNT_WRITE_RELEASED 2 | ||
775 | |||
776 | struct file { | 744 | struct file { |
777 | union { | 745 | union { |
778 | struct llist_node fu_llist; | 746 | struct llist_node fu_llist; |
@@ -810,9 +778,6 @@ struct file { | |||
810 | struct list_head f_tfile_llink; | 778 | struct list_head f_tfile_llink; |
811 | #endif /* #ifdef CONFIG_EPOLL */ | 779 | #endif /* #ifdef CONFIG_EPOLL */ |
812 | struct address_space *f_mapping; | 780 | struct address_space *f_mapping; |
813 | #ifdef CONFIG_DEBUG_WRITECOUNT | ||
814 | unsigned long f_mnt_write_state; | ||
815 | #endif | ||
816 | } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ | 781 | } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ |
817 | 782 | ||
818 | struct file_handle { | 783 | struct file_handle { |
@@ -830,49 +795,6 @@ static inline struct file *get_file(struct file *f) | |||
830 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 795 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
831 | #define file_count(x) atomic_long_read(&(x)->f_count) | 796 | #define file_count(x) atomic_long_read(&(x)->f_count) |
832 | 797 | ||
833 | #ifdef CONFIG_DEBUG_WRITECOUNT | ||
834 | static inline void file_take_write(struct file *f) | ||
835 | { | ||
836 | WARN_ON(f->f_mnt_write_state != 0); | ||
837 | f->f_mnt_write_state = FILE_MNT_WRITE_TAKEN; | ||
838 | } | ||
839 | static inline void file_release_write(struct file *f) | ||
840 | { | ||
841 | f->f_mnt_write_state |= FILE_MNT_WRITE_RELEASED; | ||
842 | } | ||
843 | static inline void file_reset_write(struct file *f) | ||
844 | { | ||
845 | f->f_mnt_write_state = 0; | ||
846 | } | ||
847 | static inline void file_check_state(struct file *f) | ||
848 | { | ||
849 | /* | ||
850 | * At this point, either both or neither of these bits | ||
851 | * should be set. | ||
852 | */ | ||
853 | WARN_ON(f->f_mnt_write_state == FILE_MNT_WRITE_TAKEN); | ||
854 | WARN_ON(f->f_mnt_write_state == FILE_MNT_WRITE_RELEASED); | ||
855 | } | ||
856 | static inline int file_check_writeable(struct file *f) | ||
857 | { | ||
858 | if (f->f_mnt_write_state == FILE_MNT_WRITE_TAKEN) | ||
859 | return 0; | ||
860 | printk(KERN_WARNING "writeable file with no " | ||
861 | "mnt_want_write()\n"); | ||
862 | WARN_ON(1); | ||
863 | return -EINVAL; | ||
864 | } | ||
865 | #else /* !CONFIG_DEBUG_WRITECOUNT */ | ||
866 | static inline void file_take_write(struct file *filp) {} | ||
867 | static inline void file_release_write(struct file *filp) {} | ||
868 | static inline void file_reset_write(struct file *filp) {} | ||
869 | static inline void file_check_state(struct file *filp) {} | ||
870 | static inline int file_check_writeable(struct file *filp) | ||
871 | { | ||
872 | return 0; | ||
873 | } | ||
874 | #endif /* CONFIG_DEBUG_WRITECOUNT */ | ||
875 | |||
876 | #define MAX_NON_LFS ((1UL<<31) - 1) | 798 | #define MAX_NON_LFS ((1UL<<31) - 1) |
877 | 799 | ||
878 | /* Page cache limit. The filesystems should put that into their s_maxbytes | 800 | /* Page cache limit. The filesystems should put that into their s_maxbytes |
@@ -2481,16 +2403,13 @@ extern int generic_file_mmap(struct file *, struct vm_area_struct *); | |||
2481 | extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); | 2403 | extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); |
2482 | extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr, | 2404 | extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr, |
2483 | unsigned long size, pgoff_t pgoff); | 2405 | unsigned long size, pgoff_t pgoff); |
2484 | extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); | ||
2485 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); | 2406 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); |
2486 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); | 2407 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
2487 | extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, | 2408 | extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long); |
2488 | loff_t *); | ||
2489 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); | 2409 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
2490 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, | 2410 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, |
2491 | unsigned long *, loff_t, loff_t *, size_t, size_t); | 2411 | unsigned long *, loff_t, size_t, size_t); |
2492 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | 2412 | extern ssize_t generic_perform_write(struct file *, struct iov_iter *, loff_t); |
2493 | unsigned long, loff_t, loff_t *, size_t, ssize_t); | ||
2494 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); | 2413 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); |
2495 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 2414 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
2496 | extern int generic_segment_checks(const struct iovec *iov, | 2415 | extern int generic_segment_checks(const struct iovec *iov, |
@@ -2582,7 +2501,7 @@ extern const struct file_operations generic_ro_fops; | |||
2582 | 2501 | ||
2583 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) | 2502 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) |
2584 | 2503 | ||
2585 | extern int vfs_readlink(struct dentry *, char __user *, int, const char *); | 2504 | extern int readlink_copy(char __user *, int, const char *); |
2586 | extern int page_readlink(struct dentry *, char __user *, int); | 2505 | extern int page_readlink(struct dentry *, char __user *, int); |
2587 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); | 2506 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); |
2588 | extern void page_put_link(struct dentry *, struct nameidata *, void *); | 2507 | extern void page_put_link(struct dentry *, struct nameidata *, void *); |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index cdc30111d2f8..d16da3e53bc7 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/percpu.h> | 7 | #include <linux/percpu.h> |
8 | #include <linux/hardirq.h> | 8 | #include <linux/hardirq.h> |
9 | #include <linux/perf_event.h> | 9 | #include <linux/perf_event.h> |
10 | #include <linux/tracepoint.h> | ||
10 | 11 | ||
11 | struct trace_array; | 12 | struct trace_array; |
12 | struct trace_buffer; | 13 | struct trace_buffer; |
@@ -232,6 +233,7 @@ enum { | |||
232 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, | 233 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, |
233 | TRACE_EVENT_FL_WAS_ENABLED_BIT, | 234 | TRACE_EVENT_FL_WAS_ENABLED_BIT, |
234 | TRACE_EVENT_FL_USE_CALL_FILTER_BIT, | 235 | TRACE_EVENT_FL_USE_CALL_FILTER_BIT, |
236 | TRACE_EVENT_FL_TRACEPOINT_BIT, | ||
235 | }; | 237 | }; |
236 | 238 | ||
237 | /* | 239 | /* |
@@ -244,6 +246,7 @@ enum { | |||
244 | * (used for module unloading, if a module event is enabled, | 246 | * (used for module unloading, if a module event is enabled, |
245 | * it is best to clear the buffers that used it). | 247 | * it is best to clear the buffers that used it). |
246 | * USE_CALL_FILTER - For ftrace internal events, don't use file filter | 248 | * USE_CALL_FILTER - For ftrace internal events, don't use file filter |
249 | * TRACEPOINT - Event is a tracepoint | ||
247 | */ | 250 | */ |
248 | enum { | 251 | enum { |
249 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), | 252 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), |
@@ -252,12 +255,17 @@ enum { | |||
252 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), | 255 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), |
253 | TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT), | 256 | TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT), |
254 | TRACE_EVENT_FL_USE_CALL_FILTER = (1 << TRACE_EVENT_FL_USE_CALL_FILTER_BIT), | 257 | TRACE_EVENT_FL_USE_CALL_FILTER = (1 << TRACE_EVENT_FL_USE_CALL_FILTER_BIT), |
258 | TRACE_EVENT_FL_TRACEPOINT = (1 << TRACE_EVENT_FL_TRACEPOINT_BIT), | ||
255 | }; | 259 | }; |
256 | 260 | ||
257 | struct ftrace_event_call { | 261 | struct ftrace_event_call { |
258 | struct list_head list; | 262 | struct list_head list; |
259 | struct ftrace_event_class *class; | 263 | struct ftrace_event_class *class; |
260 | char *name; | 264 | union { |
265 | char *name; | ||
266 | /* Set TRACE_EVENT_FL_TRACEPOINT flag when using "tp" */ | ||
267 | struct tracepoint *tp; | ||
268 | }; | ||
261 | struct trace_event event; | 269 | struct trace_event event; |
262 | const char *print_fmt; | 270 | const char *print_fmt; |
263 | struct event_filter *filter; | 271 | struct event_filter *filter; |
@@ -271,6 +279,7 @@ struct ftrace_event_call { | |||
271 | * bit 3: ftrace internal event (do not enable) | 279 | * bit 3: ftrace internal event (do not enable) |
272 | * bit 4: Event was enabled by module | 280 | * bit 4: Event was enabled by module |
273 | * bit 5: use call filter rather than file filter | 281 | * bit 5: use call filter rather than file filter |
282 | * bit 6: Event is a tracepoint | ||
274 | */ | 283 | */ |
275 | int flags; /* static flags of different events */ | 284 | int flags; /* static flags of different events */ |
276 | 285 | ||
@@ -283,6 +292,15 @@ struct ftrace_event_call { | |||
283 | #endif | 292 | #endif |
284 | }; | 293 | }; |
285 | 294 | ||
295 | static inline const char * | ||
296 | ftrace_event_name(struct ftrace_event_call *call) | ||
297 | { | ||
298 | if (call->flags & TRACE_EVENT_FL_TRACEPOINT) | ||
299 | return call->tp ? call->tp->name : NULL; | ||
300 | else | ||
301 | return call->name; | ||
302 | } | ||
303 | |||
286 | struct trace_array; | 304 | struct trace_array; |
287 | struct ftrace_subsystem_dir; | 305 | struct ftrace_subsystem_dir; |
288 | 306 | ||
@@ -353,7 +371,7 @@ struct ftrace_event_file { | |||
353 | #define __TRACE_EVENT_FLAGS(name, value) \ | 371 | #define __TRACE_EVENT_FLAGS(name, value) \ |
354 | static int __init trace_init_flags_##name(void) \ | 372 | static int __init trace_init_flags_##name(void) \ |
355 | { \ | 373 | { \ |
356 | event_##name.flags = value; \ | 374 | event_##name.flags |= value; \ |
357 | return 0; \ | 375 | return 0; \ |
358 | } \ | 376 | } \ |
359 | early_initcall(trace_init_flags_##name); | 377 | early_initcall(trace_init_flags_##name); |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index deddeb8c337c..b556e0ab946f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -487,6 +487,7 @@ void i2c_unlock_adapter(struct i2c_adapter *); | |||
487 | #define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ | 487 | #define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ |
488 | #define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ | 488 | #define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ |
489 | #define I2C_CLASS_SPD (1<<7) /* Memory modules */ | 489 | #define I2C_CLASS_SPD (1<<7) /* Memory modules */ |
490 | #define I2C_CLASS_DEPRECATED (1<<8) /* Warn users that adapter will stop using classes */ | ||
490 | 491 | ||
491 | /* Internal numbers to terminate lists */ | 492 | /* Internal numbers to terminate lists */ |
492 | #define I2C_CLIENT_END 0xfffeU | 493 | #define I2C_CLIENT_END 0xfffeU |
diff --git a/include/linux/i2c/bfin_twi.h b/include/linux/i2c/bfin_twi.h new file mode 100644 index 000000000000..135a4e0876ae --- /dev/null +++ b/include/linux/i2c/bfin_twi.h | |||
@@ -0,0 +1,145 @@ | |||
1 | /* | ||
2 | * i2c-bfin-twi.h - interface to ADI TWI controller | ||
3 | * | ||
4 | * Copyright 2005-2014 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __I2C_BFIN_TWI_H__ | ||
10 | #define __I2C_BFIN_TWI_H__ | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | #include <linux/i2c.h> | ||
14 | |||
15 | /* | ||
16 | * ADI twi registers layout | ||
17 | */ | ||
18 | struct bfin_twi_regs { | ||
19 | u16 clkdiv; | ||
20 | u16 dummy1; | ||
21 | u16 control; | ||
22 | u16 dummy2; | ||
23 | u16 slave_ctl; | ||
24 | u16 dummy3; | ||
25 | u16 slave_stat; | ||
26 | u16 dummy4; | ||
27 | u16 slave_addr; | ||
28 | u16 dummy5; | ||
29 | u16 master_ctl; | ||
30 | u16 dummy6; | ||
31 | u16 master_stat; | ||
32 | u16 dummy7; | ||
33 | u16 master_addr; | ||
34 | u16 dummy8; | ||
35 | u16 int_stat; | ||
36 | u16 dummy9; | ||
37 | u16 int_mask; | ||
38 | u16 dummy10; | ||
39 | u16 fifo_ctl; | ||
40 | u16 dummy11; | ||
41 | u16 fifo_stat; | ||
42 | u16 dummy12; | ||
43 | u32 __pad[20]; | ||
44 | u16 xmt_data8; | ||
45 | u16 dummy13; | ||
46 | u16 xmt_data16; | ||
47 | u16 dummy14; | ||
48 | u16 rcv_data8; | ||
49 | u16 dummy15; | ||
50 | u16 rcv_data16; | ||
51 | u16 dummy16; | ||
52 | }; | ||
53 | |||
54 | struct bfin_twi_iface { | ||
55 | int irq; | ||
56 | spinlock_t lock; | ||
57 | char read_write; | ||
58 | u8 command; | ||
59 | u8 *transPtr; | ||
60 | int readNum; | ||
61 | int writeNum; | ||
62 | int cur_mode; | ||
63 | int manual_stop; | ||
64 | int result; | ||
65 | struct i2c_adapter adap; | ||
66 | struct completion complete; | ||
67 | struct i2c_msg *pmsg; | ||
68 | int msg_num; | ||
69 | int cur_msg; | ||
70 | u16 saved_clkdiv; | ||
71 | u16 saved_control; | ||
72 | struct bfin_twi_regs __iomem *regs_base; | ||
73 | }; | ||
74 | |||
75 | /* ******************** TWO-WIRE INTERFACE (TWI) MASKS ********************/ | ||
76 | /* TWI_CLKDIV Macros (Use: *pTWI_CLKDIV = CLKLOW(x)|CLKHI(y); ) */ | ||
77 | #define CLKLOW(x) ((x) & 0xFF) /* Periods Clock Is Held Low */ | ||
78 | #define CLKHI(y) (((y)&0xFF)<<0x8) /* Periods Before New Clock Low */ | ||
79 | |||
80 | /* TWI_PRESCALE Masks */ | ||
81 | #define PRESCALE 0x007F /* SCLKs Per Internal Time Reference (10MHz) */ | ||
82 | #define TWI_ENA 0x0080 /* TWI Enable */ | ||
83 | #define SCCB 0x0200 /* SCCB Compatibility Enable */ | ||
84 | |||
85 | /* TWI_SLAVE_CTL Masks */ | ||
86 | #define SEN 0x0001 /* Slave Enable */ | ||
87 | #define SADD_LEN 0x0002 /* Slave Address Length */ | ||
88 | #define STDVAL 0x0004 /* Slave Transmit Data Valid */ | ||
89 | #define NAK 0x0008 /* NAK Generated At Conclusion Of Transfer */ | ||
90 | #define GEN 0x0010 /* General Call Address Matching Enabled */ | ||
91 | |||
92 | /* TWI_SLAVE_STAT Masks */ | ||
93 | #define SDIR 0x0001 /* Slave Transfer Direction (RX/TX*) */ | ||
94 | #define GCALL 0x0002 /* General Call Indicator */ | ||
95 | |||
96 | /* TWI_MASTER_CTL Masks */ | ||
97 | #define MEN 0x0001 /* Master Mode Enable */ | ||
98 | #define MADD_LEN 0x0002 /* Master Address Length */ | ||
99 | #define MDIR 0x0004 /* Master Transmit Direction (RX/TX*) */ | ||
100 | #define FAST 0x0008 /* Use Fast Mode Timing Specs */ | ||
101 | #define STOP 0x0010 /* Issue Stop Condition */ | ||
102 | #define RSTART 0x0020 /* Repeat Start or Stop* At End Of Transfer */ | ||
103 | #define DCNT 0x3FC0 /* Data Bytes To Transfer */ | ||
104 | #define SDAOVR 0x4000 /* Serial Data Override */ | ||
105 | #define SCLOVR 0x8000 /* Serial Clock Override */ | ||
106 | |||
107 | /* TWI_MASTER_STAT Masks */ | ||
108 | #define MPROG 0x0001 /* Master Transfer In Progress */ | ||
109 | #define LOSTARB 0x0002 /* Lost Arbitration Indicator (Xfer Aborted) */ | ||
110 | #define ANAK 0x0004 /* Address Not Acknowledged */ | ||
111 | #define DNAK 0x0008 /* Data Not Acknowledged */ | ||
112 | #define BUFRDERR 0x0010 /* Buffer Read Error */ | ||
113 | #define BUFWRERR 0x0020 /* Buffer Write Error */ | ||
114 | #define SDASEN 0x0040 /* Serial Data Sense */ | ||
115 | #define SCLSEN 0x0080 /* Serial Clock Sense */ | ||
116 | #define BUSBUSY 0x0100 /* Bus Busy Indicator */ | ||
117 | |||
118 | /* TWI_INT_SRC and TWI_INT_ENABLE Masks */ | ||
119 | #define SINIT 0x0001 /* Slave Transfer Initiated */ | ||
120 | #define SCOMP 0x0002 /* Slave Transfer Complete */ | ||
121 | #define SERR 0x0004 /* Slave Transfer Error */ | ||
122 | #define SOVF 0x0008 /* Slave Overflow */ | ||
123 | #define MCOMP 0x0010 /* Master Transfer Complete */ | ||
124 | #define MERR 0x0020 /* Master Transfer Error */ | ||
125 | #define XMTSERV 0x0040 /* Transmit FIFO Service */ | ||
126 | #define RCVSERV 0x0080 /* Receive FIFO Service */ | ||
127 | |||
128 | /* TWI_FIFO_CTRL Masks */ | ||
129 | #define XMTFLUSH 0x0001 /* Transmit Buffer Flush */ | ||
130 | #define RCVFLUSH 0x0002 /* Receive Buffer Flush */ | ||
131 | #define XMTINTLEN 0x0004 /* Transmit Buffer Interrupt Length */ | ||
132 | #define RCVINTLEN 0x0008 /* Receive Buffer Interrupt Length */ | ||
133 | |||
134 | /* TWI_FIFO_STAT Masks */ | ||
135 | #define XMTSTAT 0x0003 /* Transmit FIFO Status */ | ||
136 | #define XMT_EMPTY 0x0000 /* Transmit FIFO Empty */ | ||
137 | #define XMT_HALF 0x0001 /* Transmit FIFO Has 1 Byte To Write */ | ||
138 | #define XMT_FULL 0x0003 /* Transmit FIFO Full (2 Bytes To Write) */ | ||
139 | |||
140 | #define RCVSTAT 0x000C /* Receive FIFO Status */ | ||
141 | #define RCV_EMPTY 0x0000 /* Receive FIFO Empty */ | ||
142 | #define RCV_HALF 0x0004 /* Receive FIFO Has 1 Byte To Read */ | ||
143 | #define RCV_FULL 0x000C /* Receive FIFO Full (2 Bytes To Read) */ | ||
144 | |||
145 | #endif | ||
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index ac39d910e70b..a326c850f046 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
@@ -104,6 +104,9 @@ enum { | |||
104 | MC13892_LED_R, | 104 | MC13892_LED_R, |
105 | MC13892_LED_G, | 105 | MC13892_LED_G, |
106 | MC13892_LED_B, | 106 | MC13892_LED_B, |
107 | /* MC34708 LED IDs */ | ||
108 | MC34708_LED_R, | ||
109 | MC34708_LED_G, | ||
107 | }; | 110 | }; |
108 | 111 | ||
109 | struct mc13xxx_led_platform_data { | 112 | struct mc13xxx_led_platform_data { |
@@ -163,6 +166,9 @@ struct mc13xxx_leds_platform_data { | |||
163 | #define MC13892_LED_C2_CURRENT_G(x) (((x) & 0x7) << 21) | 166 | #define MC13892_LED_C2_CURRENT_G(x) (((x) & 0x7) << 21) |
164 | /* MC13892 LED Control 3 */ | 167 | /* MC13892 LED Control 3 */ |
165 | #define MC13892_LED_C3_CURRENT_B(x) (((x) & 0x7) << 9) | 168 | #define MC13892_LED_C3_CURRENT_B(x) (((x) & 0x7) << 9) |
169 | /* MC34708 LED Control 0 */ | ||
170 | #define MC34708_LED_C0_CURRENT_R(x) (((x) & 0x3) << 9) | ||
171 | #define MC34708_LED_C0_CURRENT_G(x) (((x) & 0x3) << 21) | ||
166 | u32 led_control[MAX_LED_CONTROL_REGS]; | 172 | u32 led_control[MAX_LED_CONTROL_REGS]; |
167 | }; | 173 | }; |
168 | 174 | ||
diff --git a/include/linux/mfd/rtsx_common.h b/include/linux/mfd/rtsx_common.h index 443176ee1ab0..7c36cc55d2c7 100644 --- a/include/linux/mfd/rtsx_common.h +++ b/include/linux/mfd/rtsx_common.h | |||
@@ -45,6 +45,7 @@ struct platform_device; | |||
45 | struct rtsx_slot { | 45 | struct rtsx_slot { |
46 | struct platform_device *p_dev; | 46 | struct platform_device *p_dev; |
47 | void (*card_event)(struct platform_device *p_dev); | 47 | void (*card_event)(struct platform_device *p_dev); |
48 | void (*done_transfer)(struct platform_device *p_dev); | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | #endif | 51 | #endif |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 0ce772105508..8d6bbd609ad9 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
@@ -144,7 +144,7 @@ | |||
144 | #define HOST_TO_DEVICE 0 | 144 | #define HOST_TO_DEVICE 0 |
145 | #define DEVICE_TO_HOST 1 | 145 | #define DEVICE_TO_HOST 1 |
146 | 146 | ||
147 | #define MAX_PHASE 31 | 147 | #define RTSX_PHASE_MAX 32 |
148 | #define RX_TUNING_CNT 3 | 148 | #define RX_TUNING_CNT 3 |
149 | 149 | ||
150 | /* SG descriptor */ | 150 | /* SG descriptor */ |
@@ -943,6 +943,12 @@ void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr); | |||
943 | int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); | 943 | int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); |
944 | int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, | 944 | int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, |
945 | int num_sg, bool read, int timeout); | 945 | int num_sg, bool read, int timeout); |
946 | int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
947 | int num_sg, bool read); | ||
948 | int rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
949 | int num_sg, bool read); | ||
950 | int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
951 | int sg_count, bool read); | ||
946 | int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); | 952 | int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); |
947 | int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); | 953 | int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); |
948 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); | 954 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index abc848412e3c..bf9811e1321a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1204,6 +1204,7 @@ void account_page_writeback(struct page *page); | |||
1204 | int set_page_dirty(struct page *page); | 1204 | int set_page_dirty(struct page *page); |
1205 | int set_page_dirty_lock(struct page *page); | 1205 | int set_page_dirty_lock(struct page *page); |
1206 | int clear_page_dirty_for_io(struct page *page); | 1206 | int clear_page_dirty_for_io(struct page *page); |
1207 | int get_cmdline(struct task_struct *task, char *buffer, int buflen); | ||
1207 | 1208 | ||
1208 | /* Is the vma a continuation of the stack vma above it? */ | 1209 | /* Is the vma a continuation of the stack vma above it? */ |
1209 | static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) | 1210 | static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 87079fc38011..f206e29f94d7 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -95,7 +95,7 @@ struct mmc_command { | |||
95 | * actively failing requests | 95 | * actively failing requests |
96 | */ | 96 | */ |
97 | 97 | ||
98 | unsigned int cmd_timeout_ms; /* in milliseconds */ | 98 | unsigned int busy_timeout; /* busy detect timeout in ms */ |
99 | /* Set this flag only for blocking sanitize request */ | 99 | /* Set this flag only for blocking sanitize request */ |
100 | bool sanitize_busy; | 100 | bool sanitize_busy; |
101 | 101 | ||
@@ -152,7 +152,7 @@ extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, | |||
152 | struct mmc_command *, int); | 152 | struct mmc_command *, int); |
153 | extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); | 153 | extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); |
154 | extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, | 154 | extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, |
155 | bool); | 155 | bool, bool); |
156 | extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); | 156 | extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); |
157 | extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd); | 157 | extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd); |
158 | 158 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 99f5709ac343..cb61ea4d6945 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -264,15 +264,12 @@ struct mmc_host { | |||
264 | u32 caps2; /* More host capabilities */ | 264 | u32 caps2; /* More host capabilities */ |
265 | 265 | ||
266 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ | 266 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ |
267 | #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ | ||
268 | #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */ | 267 | #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */ |
269 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ | 268 | #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ |
270 | #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ | ||
271 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ | 269 | #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */ |
272 | #define MMC_CAP2_HS200_1_2V_SDR (1 << 6) /* can support */ | 270 | #define MMC_CAP2_HS200_1_2V_SDR (1 << 6) /* can support */ |
273 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ | 271 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ |
274 | MMC_CAP2_HS200_1_2V_SDR) | 272 | MMC_CAP2_HS200_1_2V_SDR) |
275 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ | ||
276 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ | 273 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ |
277 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ | 274 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ |
278 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ | 275 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ |
@@ -281,7 +278,6 @@ struct mmc_host { | |||
281 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ | 278 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ |
282 | MMC_CAP2_PACKED_WR) | 279 | MMC_CAP2_PACKED_WR) |
283 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ | 280 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ |
284 | #define MMC_CAP2_SANITIZE (1 << 15) /* Support Sanitize */ | ||
285 | 281 | ||
286 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 282 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
287 | 283 | ||
@@ -304,7 +300,7 @@ struct mmc_host { | |||
304 | unsigned int max_req_size; /* maximum number of bytes in one req */ | 300 | unsigned int max_req_size; /* maximum number of bytes in one req */ |
305 | unsigned int max_blk_size; /* maximum size of one mmc block */ | 301 | unsigned int max_blk_size; /* maximum size of one mmc block */ |
306 | unsigned int max_blk_count; /* maximum number of blocks in one req */ | 302 | unsigned int max_blk_count; /* maximum number of blocks in one req */ |
307 | unsigned int max_discard_to; /* max. discard timeout in ms */ | 303 | unsigned int max_busy_timeout; /* max busy timeout in ms */ |
308 | 304 | ||
309 | /* private data */ | 305 | /* private data */ |
310 | spinlock_t lock; /* lock for claim and bus ops */ | 306 | spinlock_t lock; /* lock for claim and bus ops */ |
@@ -388,8 +384,6 @@ int mmc_power_restore_host(struct mmc_host *host); | |||
388 | void mmc_detect_change(struct mmc_host *, unsigned long delay); | 384 | void mmc_detect_change(struct mmc_host *, unsigned long delay); |
389 | void mmc_request_done(struct mmc_host *, struct mmc_request *); | 385 | void mmc_request_done(struct mmc_host *, struct mmc_request *); |
390 | 386 | ||
391 | int mmc_cache_ctrl(struct mmc_host *, u8); | ||
392 | |||
393 | static inline void mmc_signal_sdio_irq(struct mmc_host *host) | 387 | static inline void mmc_signal_sdio_irq(struct mmc_host *host) |
394 | { | 388 | { |
395 | host->ops->enable_sdio_irq(host, 0); | 389 | host->ops->enable_sdio_irq(host, 0); |
@@ -424,12 +418,9 @@ static inline int mmc_regulator_get_supply(struct mmc_host *mmc) | |||
424 | 418 | ||
425 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); | 419 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); |
426 | 420 | ||
427 | /* Module parameter */ | ||
428 | extern bool mmc_assume_removable; | ||
429 | |||
430 | static inline int mmc_card_is_removable(struct mmc_host *host) | 421 | static inline int mmc_card_is_removable(struct mmc_host *host) |
431 | { | 422 | { |
432 | return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable; | 423 | return !(host->caps & MMC_CAP_NONREMOVABLE); |
433 | } | 424 | } |
434 | 425 | ||
435 | static inline int mmc_card_keep_power(struct mmc_host *host) | 426 | static inline int mmc_card_keep_power(struct mmc_host *host) |
diff --git a/include/linux/mmc/sdhci-spear.h b/include/linux/mmc/sdhci-spear.h index e78c0e236e9d..8cc095a76cf8 100644 --- a/include/linux/mmc/sdhci-spear.h +++ b/include/linux/mmc/sdhci-spear.h | |||
@@ -18,17 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * struct sdhci_plat_data: spear sdhci platform data structure | 19 | * struct sdhci_plat_data: spear sdhci platform data structure |
20 | * | 20 | * |
21 | * @card_power_gpio: gpio pin for enabling/disabling power to sdhci socket | ||
22 | * @power_active_high: if set, enable power to sdhci socket by setting | ||
23 | * card_power_gpio | ||
24 | * @power_always_enb: If set, then enable power on probe, otherwise enable only | ||
25 | * on card insertion and disable on card removal. | ||
26 | * card_int_gpio: gpio pin used for card detection | 21 | * card_int_gpio: gpio pin used for card detection |
27 | */ | 22 | */ |
28 | struct sdhci_plat_data { | 23 | struct sdhci_plat_data { |
29 | int card_power_gpio; | ||
30 | int power_active_high; | ||
31 | int power_always_enb; | ||
32 | int card_int_gpio; | 24 | int card_int_gpio; |
33 | }; | 25 | }; |
34 | 26 | ||
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 362927c48f97..7be12b883485 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
@@ -100,6 +100,8 @@ struct sdhci_host { | |||
100 | #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL (1<<5) | 100 | #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL (1<<5) |
101 | /* Controller does not support HS200 */ | 101 | /* Controller does not support HS200 */ |
102 | #define SDHCI_QUIRK2_BROKEN_HS200 (1<<6) | 102 | #define SDHCI_QUIRK2_BROKEN_HS200 (1<<6) |
103 | /* Controller does not support DDR50 */ | ||
104 | #define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7) | ||
103 | 105 | ||
104 | int irq; /* Device IRQ */ | 106 | int irq; /* Device IRQ */ |
105 | void __iomem *ioaddr; /* Mapped address */ | 107 | void __iomem *ioaddr; /* Mapped address */ |
diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h index b0c73e4cacea..d2433381e828 100644 --- a/include/linux/mmc/slot-gpio.h +++ b/include/linux/mmc/slot-gpio.h | |||
@@ -22,4 +22,10 @@ int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio, | |||
22 | unsigned int debounce); | 22 | unsigned int debounce); |
23 | void mmc_gpio_free_cd(struct mmc_host *host); | 23 | void mmc_gpio_free_cd(struct mmc_host *host); |
24 | 24 | ||
25 | int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, | ||
26 | unsigned int idx, bool override_active_level, | ||
27 | unsigned int debounce); | ||
28 | void mmc_gpiod_free_cd(struct mmc_host *host); | ||
29 | void mmc_gpiod_request_cd_irq(struct mmc_host *host); | ||
30 | |||
25 | #endif | 31 | #endif |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 9a165a213d93..44eeef0da186 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -556,6 +556,11 @@ struct amba_id { | |||
556 | * See documentation of "x86_match_cpu" for details. | 556 | * See documentation of "x86_match_cpu" for details. |
557 | */ | 557 | */ |
558 | 558 | ||
559 | /* | ||
560 | * MODULE_DEVICE_TABLE expects this struct to be called x86cpu_device_id. | ||
561 | * Although gcc seems to ignore this error, clang fails without this define. | ||
562 | */ | ||
563 | #define x86cpu_device_id x86_cpu_id | ||
559 | struct x86_cpu_id { | 564 | struct x86_cpu_id { |
560 | __u16 vendor; | 565 | __u16 vendor; |
561 | __u16 family; | 566 | __u16 family; |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 371d346fa270..839bac270904 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -44,6 +44,8 @@ struct mnt_namespace; | |||
44 | #define MNT_SHARED_MASK (MNT_UNBINDABLE) | 44 | #define MNT_SHARED_MASK (MNT_UNBINDABLE) |
45 | #define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) | 45 | #define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) |
46 | 46 | ||
47 | #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \ | ||
48 | MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED) | ||
47 | 49 | ||
48 | #define MNT_INTERNAL 0x4000 | 50 | #define MNT_INTERNAL 0x4000 |
49 | 51 | ||
@@ -51,6 +53,7 @@ struct mnt_namespace; | |||
51 | #define MNT_LOCKED 0x800000 | 53 | #define MNT_LOCKED 0x800000 |
52 | #define MNT_DOOMED 0x1000000 | 54 | #define MNT_DOOMED 0x1000000 |
53 | #define MNT_SYNC_UMOUNT 0x2000000 | 55 | #define MNT_SYNC_UMOUNT 0x2000000 |
56 | #define MNT_MARKED 0x4000000 | ||
54 | 57 | ||
55 | struct vfsmount { | 58 | struct vfsmount { |
56 | struct dentry *mnt_root; /* root of the mounted tree */ | 59 | struct dentry *mnt_root; /* root of the mounted tree */ |
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index ae4981ebd18e..f62f78aef4ac 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h | |||
@@ -24,8 +24,7 @@ struct request; | |||
24 | struct nbd_device { | 24 | struct nbd_device { |
25 | int flags; | 25 | int flags; |
26 | int harderror; /* Code of hard error */ | 26 | int harderror; /* Code of hard error */ |
27 | struct socket * sock; | 27 | struct socket * sock; /* If == NULL, device is not ready, yet */ |
28 | struct file * file; /* If == NULL, device is not ready, yet */ | ||
29 | int magic; | 28 | int magic; |
30 | 29 | ||
31 | spinlock_t queue_lock; | 30 | spinlock_t queue_lock; |
diff --git a/include/linux/ntb.h b/include/linux/ntb.h index f6a15205853b..9ac1a62fc6f5 100644 --- a/include/linux/ntb.h +++ b/include/linux/ntb.h | |||
@@ -50,8 +50,13 @@ struct ntb_transport_qp; | |||
50 | 50 | ||
51 | struct ntb_client { | 51 | struct ntb_client { |
52 | struct device_driver driver; | 52 | struct device_driver driver; |
53 | int (*probe) (struct pci_dev *pdev); | 53 | int (*probe)(struct pci_dev *pdev); |
54 | void (*remove) (struct pci_dev *pdev); | 54 | void (*remove)(struct pci_dev *pdev); |
55 | }; | ||
56 | |||
57 | enum { | ||
58 | NTB_LINK_DOWN = 0, | ||
59 | NTB_LINK_UP, | ||
55 | }; | 60 | }; |
56 | 61 | ||
57 | int ntb_register_client(struct ntb_client *drvr); | 62 | int ntb_register_client(struct ntb_client *drvr); |
@@ -60,11 +65,11 @@ int ntb_register_client_dev(char *device_name); | |||
60 | void ntb_unregister_client_dev(char *device_name); | 65 | void ntb_unregister_client_dev(char *device_name); |
61 | 66 | ||
62 | struct ntb_queue_handlers { | 67 | struct ntb_queue_handlers { |
63 | void (*rx_handler) (struct ntb_transport_qp *qp, void *qp_data, | 68 | void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, |
64 | void *data, int len); | 69 | void *data, int len); |
65 | void (*tx_handler) (struct ntb_transport_qp *qp, void *qp_data, | 70 | void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data, |
66 | void *data, int len); | 71 | void *data, int len); |
67 | void (*event_handler) (void *data, int status); | 72 | void (*event_handler)(void *data, int status); |
68 | }; | 73 | }; |
69 | 74 | ||
70 | unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp); | 75 | unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp); |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 6b9aafed225f..a50173ca1d72 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
@@ -66,20 +66,25 @@ enum { | |||
66 | 66 | ||
67 | #define NVME_VS(major, minor) (major << 16 | minor) | 67 | #define NVME_VS(major, minor) (major << 16 | minor) |
68 | 68 | ||
69 | #define NVME_IO_TIMEOUT (5 * HZ) | 69 | extern unsigned char io_timeout; |
70 | #define NVME_IO_TIMEOUT (io_timeout * HZ) | ||
70 | 71 | ||
71 | /* | 72 | /* |
72 | * Represents an NVM Express device. Each nvme_dev is a PCI function. | 73 | * Represents an NVM Express device. Each nvme_dev is a PCI function. |
73 | */ | 74 | */ |
74 | struct nvme_dev { | 75 | struct nvme_dev { |
75 | struct list_head node; | 76 | struct list_head node; |
76 | struct nvme_queue **queues; | 77 | struct nvme_queue __rcu **queues; |
78 | unsigned short __percpu *io_queue; | ||
77 | u32 __iomem *dbs; | 79 | u32 __iomem *dbs; |
78 | struct pci_dev *pci_dev; | 80 | struct pci_dev *pci_dev; |
79 | struct dma_pool *prp_page_pool; | 81 | struct dma_pool *prp_page_pool; |
80 | struct dma_pool *prp_small_pool; | 82 | struct dma_pool *prp_small_pool; |
81 | int instance; | 83 | int instance; |
82 | int queue_count; | 84 | unsigned queue_count; |
85 | unsigned online_queues; | ||
86 | unsigned max_qid; | ||
87 | int q_depth; | ||
83 | u32 db_stride; | 88 | u32 db_stride; |
84 | u32 ctrl_config; | 89 | u32 ctrl_config; |
85 | struct msix_entry *entry; | 90 | struct msix_entry *entry; |
@@ -89,6 +94,7 @@ struct nvme_dev { | |||
89 | struct miscdevice miscdev; | 94 | struct miscdevice miscdev; |
90 | work_func_t reset_workfn; | 95 | work_func_t reset_workfn; |
91 | struct work_struct reset_work; | 96 | struct work_struct reset_work; |
97 | struct notifier_block nb; | ||
92 | char name[12]; | 98 | char name[12]; |
93 | char serial[20]; | 99 | char serial[20]; |
94 | char model[40]; | 100 | char model[40]; |
@@ -131,6 +137,7 @@ struct nvme_iod { | |||
131 | int length; /* Of data, in bytes */ | 137 | int length; /* Of data, in bytes */ |
132 | unsigned long start_time; | 138 | unsigned long start_time; |
133 | dma_addr_t first_dma; | 139 | dma_addr_t first_dma; |
140 | struct list_head node; | ||
134 | struct scatterlist sg[0]; | 141 | struct scatterlist sg[0]; |
135 | }; | 142 | }; |
136 | 143 | ||
@@ -146,16 +153,12 @@ static inline u64 nvme_block_nr(struct nvme_ns *ns, sector_t sector) | |||
146 | */ | 153 | */ |
147 | void nvme_free_iod(struct nvme_dev *dev, struct nvme_iod *iod); | 154 | void nvme_free_iod(struct nvme_dev *dev, struct nvme_iod *iod); |
148 | 155 | ||
149 | int nvme_setup_prps(struct nvme_dev *dev, struct nvme_common_command *cmd, | 156 | int nvme_setup_prps(struct nvme_dev *, struct nvme_iod *, int , gfp_t); |
150 | struct nvme_iod *iod, int total_len, gfp_t gfp); | ||
151 | struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write, | 157 | struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write, |
152 | unsigned long addr, unsigned length); | 158 | unsigned long addr, unsigned length); |
153 | void nvme_unmap_user_pages(struct nvme_dev *dev, int write, | 159 | void nvme_unmap_user_pages(struct nvme_dev *dev, int write, |
154 | struct nvme_iod *iod); | 160 | struct nvme_iod *iod); |
155 | struct nvme_queue *get_nvmeq(struct nvme_dev *dev); | 161 | int nvme_submit_io_cmd(struct nvme_dev *, struct nvme_command *, u32 *); |
156 | void put_nvmeq(struct nvme_queue *nvmeq); | ||
157 | int nvme_submit_sync_cmd(struct nvme_queue *nvmeq, struct nvme_command *cmd, | ||
158 | u32 *result, unsigned timeout); | ||
159 | int nvme_submit_flush_data(struct nvme_queue *nvmeq, struct nvme_ns *ns); | 162 | int nvme_submit_flush_data(struct nvme_queue *nvmeq, struct nvme_ns *ns); |
160 | int nvme_submit_admin_cmd(struct nvme_dev *, struct nvme_command *, | 163 | int nvme_submit_admin_cmd(struct nvme_dev *, struct nvme_command *, |
161 | u32 *result); | 164 | u32 *result); |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 4d9389c79e61..eb8b8ac6df3c 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -83,23 +83,6 @@ struct pipe_buf_operations { | |||
83 | int can_merge; | 83 | int can_merge; |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * ->map() returns a virtual address mapping of the pipe buffer. | ||
87 | * The last integer flag reflects whether this should be an atomic | ||
88 | * mapping or not. The atomic map is faster, however you can't take | ||
89 | * page faults before calling ->unmap() again. So if you need to eg | ||
90 | * access user data through copy_to/from_user(), then you must get | ||
91 | * a non-atomic map. ->map() uses the kmap_atomic slot for | ||
92 | * atomic maps, you have to be careful if mapping another page as | ||
93 | * source or destination for a copy. | ||
94 | */ | ||
95 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); | ||
96 | |||
97 | /* | ||
98 | * Undoes ->map(), finishes the virtual mapping of the pipe buffer. | ||
99 | */ | ||
100 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); | ||
101 | |||
102 | /* | ||
103 | * ->confirm() verifies that the data in the pipe buffer is there | 86 | * ->confirm() verifies that the data in the pipe buffer is there |
104 | * and that the contents are good. If the pages in the pipe belong | 87 | * and that the contents are good. If the pages in the pipe belong |
105 | * to a file system, we may need to wait for IO completion in this | 88 | * to a file system, we may need to wait for IO completion in this |
@@ -150,8 +133,6 @@ struct pipe_inode_info *alloc_pipe_info(void); | |||
150 | void free_pipe_info(struct pipe_inode_info *); | 133 | void free_pipe_info(struct pipe_inode_info *); |
151 | 134 | ||
152 | /* Generic pipe buffer ops functions */ | 135 | /* Generic pipe buffer ops functions */ |
153 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); | ||
154 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); | ||
155 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); | 136 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); |
156 | int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); | 137 | int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); |
157 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); | 138 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); |
diff --git a/include/linux/platform_data/dma-rcar-audmapp.h b/include/linux/platform_data/dma-rcar-audmapp.h new file mode 100644 index 000000000000..471fffebbeb4 --- /dev/null +++ b/include/linux/platform_data/dma-rcar-audmapp.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * This is for Renesas R-Car Audio-DMAC-peri-peri. | ||
3 | * | ||
4 | * Copyright (C) 2014 Renesas Electronics Corporation | ||
5 | * Copyright (C) 2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | ||
6 | * | ||
7 | * This file is based on the include/linux/sh_dma.h | ||
8 | * | ||
9 | * Header for the new SH dmaengine driver | ||
10 | * | ||
11 | * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | */ | ||
17 | #ifndef SH_AUDMAPP_H | ||
18 | #define SH_AUDMAPP_H | ||
19 | |||
20 | #include <linux/dmaengine.h> | ||
21 | |||
22 | struct audmapp_slave_config { | ||
23 | int slave_id; | ||
24 | dma_addr_t src; | ||
25 | dma_addr_t dst; | ||
26 | u32 chcr; | ||
27 | }; | ||
28 | |||
29 | struct audmapp_pdata { | ||
30 | struct audmapp_slave_config *slave; | ||
31 | int slave_num; | ||
32 | }; | ||
33 | |||
34 | #endif /* SH_AUDMAPP_H */ | ||
diff --git a/include/linux/platform_data/i2c-s3c2410.h b/include/linux/platform_data/i2c-s3c2410.h index 2a50048c1c44..05af66b840b9 100644 --- a/include/linux/platform_data/i2c-s3c2410.h +++ b/include/linux/platform_data/i2c-s3c2410.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* arch/arm/plat-s3c/include/plat/iic.h | 1 | /* |
2 | * | ||
3 | * Copyright 2004-2009 Simtec Electronics | 2 | * Copyright 2004-2009 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 3 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 4 | * |
@@ -10,8 +9,8 @@ | |||
10 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
11 | */ | 10 | */ |
12 | 11 | ||
13 | #ifndef __ASM_ARCH_IIC_H | 12 | #ifndef __I2C_S3C2410_H |
14 | #define __ASM_ARCH_IIC_H __FILE__ | 13 | #define __I2C_S3C2410_H __FILE__ |
15 | 14 | ||
16 | #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ | 15 | #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ |
17 | 16 | ||
@@ -76,4 +75,4 @@ extern void s3c_i2c7_cfg_gpio(struct platform_device *dev); | |||
76 | 75 | ||
77 | extern struct s3c2410_platform_i2c default_i2c_data; | 76 | extern struct s3c2410_platform_i2c default_i2c_data; |
78 | 77 | ||
79 | #endif /* __ASM_ARCH_IIC_H */ | 78 | #endif /* __I2C_S3C2410_H */ |
diff --git a/include/linux/platform_data/leds-s3c24xx.h b/include/linux/platform_data/leds-s3c24xx.h index d8a7672519b6..441a6f290649 100644 --- a/include/linux/platform_data/leds-s3c24xx.h +++ b/include/linux/platform_data/leds-s3c24xx.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/leds-gpio.h | 1 | /* |
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | 2 | * Copyright (c) 2006 Simtec Electronics |
4 | * http://armlinux.simtec.co.uk/ | 3 | * http://armlinux.simtec.co.uk/ |
5 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
@@ -11,8 +10,8 @@ | |||
11 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
12 | */ | 11 | */ |
13 | 12 | ||
14 | #ifndef __ASM_ARCH_LEDSGPIO_H | 13 | #ifndef __LEDS_S3C24XX_H |
15 | #define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h" | 14 | #define __LEDS_S3C24XX_H |
16 | 15 | ||
17 | #define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */ | 16 | #define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */ |
18 | #define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */ | 17 | #define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */ |
@@ -25,4 +24,4 @@ struct s3c24xx_led_platdata { | |||
25 | char *def_trigger; | 24 | char *def_trigger; |
26 | }; | 25 | }; |
27 | 26 | ||
28 | #endif /* __ASM_ARCH_LEDSGPIO_H */ | 27 | #endif /* __LEDS_S3C24XX_H */ |
diff --git a/include/linux/platform_data/mmc-msm_sdcc.h b/include/linux/platform_data/mmc-msm_sdcc.h index ffcd9e3a6a7e..55aa873c9396 100644 --- a/include/linux/platform_data/mmc-msm_sdcc.h +++ b/include/linux/platform_data/mmc-msm_sdcc.h | |||
@@ -1,8 +1,5 @@ | |||
1 | /* | 1 | #ifndef __MMC_MSM_SDCC_H |
2 | * arch/arm/include/asm/mach/mmc.h | 2 | #define __MMC_MSM_SDCC_H |
3 | */ | ||
4 | #ifndef ASMARM_MACH_MMC_H | ||
5 | #define ASMARM_MACH_MMC_H | ||
6 | 3 | ||
7 | #include <linux/mmc/host.h> | 4 | #include <linux/mmc/host.h> |
8 | #include <linux/mmc/card.h> | 5 | #include <linux/mmc/card.h> |
diff --git a/include/linux/platform_data/mmc-mvsdio.h b/include/linux/platform_data/mmc-mvsdio.h index 1190efedcb94..d02704cd3695 100644 --- a/include/linux/platform_data/mmc-mvsdio.h +++ b/include/linux/platform_data/mmc-mvsdio.h | |||
@@ -1,13 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-orion/include/plat/mvsdio.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | 2 | * This file is licensed under the terms of the GNU General Public |
5 | * License version 2. This program is licensed "as is" without any | 3 | * License version 2. This program is licensed "as is" without any |
6 | * warranty of any kind, whether express or implied. | 4 | * warranty of any kind, whether express or implied. |
7 | */ | 5 | */ |
8 | 6 | ||
9 | #ifndef __MACH_MVSDIO_H | 7 | #ifndef __MMC_MVSDIO_H |
10 | #define __MACH_MVSDIO_H | 8 | #define __MMC_MVSDIO_H |
11 | 9 | ||
12 | #include <linux/mbus.h> | 10 | #include <linux/mbus.h> |
13 | 11 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 075b3056c0c0..25f54c79f757 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1719,6 +1719,24 @@ static inline pid_t task_tgid_vnr(struct task_struct *tsk) | |||
1719 | } | 1719 | } |
1720 | 1720 | ||
1721 | 1721 | ||
1722 | static inline int pid_alive(const struct task_struct *p); | ||
1723 | static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) | ||
1724 | { | ||
1725 | pid_t pid = 0; | ||
1726 | |||
1727 | rcu_read_lock(); | ||
1728 | if (pid_alive(tsk)) | ||
1729 | pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns); | ||
1730 | rcu_read_unlock(); | ||
1731 | |||
1732 | return pid; | ||
1733 | } | ||
1734 | |||
1735 | static inline pid_t task_ppid_nr(const struct task_struct *tsk) | ||
1736 | { | ||
1737 | return task_ppid_nr_ns(tsk, &init_pid_ns); | ||
1738 | } | ||
1739 | |||
1722 | static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, | 1740 | static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, |
1723 | struct pid_namespace *ns) | 1741 | struct pid_namespace *ns) |
1724 | { | 1742 | { |
@@ -1758,7 +1776,7 @@ static inline pid_t task_pgrp_nr(struct task_struct *tsk) | |||
1758 | * | 1776 | * |
1759 | * Return: 1 if the process is alive. 0 otherwise. | 1777 | * Return: 1 if the process is alive. 0 otherwise. |
1760 | */ | 1778 | */ |
1761 | static inline int pid_alive(struct task_struct *p) | 1779 | static inline int pid_alive(const struct task_struct *p) |
1762 | { | 1780 | { |
1763 | return p->pids[PIDTYPE_PID].pid != NULL; | 1781 | return p->pids[PIDTYPE_PID].pid != NULL; |
1764 | } | 1782 | } |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 8af2804bab16..70736b98c721 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -130,6 +130,8 @@ struct rpc_create_args { | |||
130 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) | 130 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
131 | 131 | ||
132 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 132 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
133 | struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | ||
134 | struct rpc_xprt *xprt); | ||
133 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 135 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
134 | const struct rpc_program *, u32); | 136 | const struct rpc_program *, u32); |
135 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); | 137 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 62fd1b756e99..2e780134f449 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -22,7 +22,7 @@ struct svc_sock { | |||
22 | 22 | ||
23 | /* We keep the old state_change and data_ready CB's here */ | 23 | /* We keep the old state_change and data_ready CB's here */ |
24 | void (*sk_ostate)(struct sock *); | 24 | void (*sk_ostate)(struct sock *); |
25 | void (*sk_odata)(struct sock *, int bytes); | 25 | void (*sk_odata)(struct sock *); |
26 | void (*sk_owspace)(struct sock *); | 26 | void (*sk_owspace)(struct sock *); |
27 | 27 | ||
28 | /* private TCP part */ | 28 | /* private TCP part */ |
@@ -56,6 +56,7 @@ int svc_recv(struct svc_rqst *, long); | |||
56 | int svc_send(struct svc_rqst *); | 56 | int svc_send(struct svc_rqst *); |
57 | void svc_drop(struct svc_rqst *); | 57 | void svc_drop(struct svc_rqst *); |
58 | void svc_sock_update_bufs(struct svc_serv *serv); | 58 | void svc_sock_update_bufs(struct svc_serv *serv); |
59 | bool svc_alien_sock(struct net *net, int fd); | ||
59 | int svc_addsock(struct svc_serv *serv, const int fd, | 60 | int svc_addsock(struct svc_serv *serv, const int fd, |
60 | char *name_return, const size_t len); | 61 | char *name_return, const size_t len); |
61 | void svc_init_xprt_sock(void); | 62 | void svc_init_xprt_sock(void); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 8097b9df6773..3e5efb2b236e 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -295,13 +295,24 @@ int xprt_adjust_timeout(struct rpc_rqst *req); | |||
295 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 295 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
296 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 296 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
297 | void xprt_release(struct rpc_task *task); | 297 | void xprt_release(struct rpc_task *task); |
298 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | ||
299 | void xprt_put(struct rpc_xprt *xprt); | 298 | void xprt_put(struct rpc_xprt *xprt); |
300 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, | 299 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, |
301 | unsigned int num_prealloc, | 300 | unsigned int num_prealloc, |
302 | unsigned int max_req); | 301 | unsigned int max_req); |
303 | void xprt_free(struct rpc_xprt *); | 302 | void xprt_free(struct rpc_xprt *); |
304 | 303 | ||
304 | /** | ||
305 | * xprt_get - return a reference to an RPC transport. | ||
306 | * @xprt: pointer to the transport | ||
307 | * | ||
308 | */ | ||
309 | static inline struct rpc_xprt *xprt_get(struct rpc_xprt *xprt) | ||
310 | { | ||
311 | if (atomic_inc_not_zero(&xprt->count)) | ||
312 | return xprt; | ||
313 | return NULL; | ||
314 | } | ||
315 | |||
305 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) | 316 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
306 | { | 317 | { |
307 | return p + xprt->tsh_size; | 318 | return p + xprt->tsh_size; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 697ceb70a9a9..a4a0588c5397 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -119,8 +119,10 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
119 | static struct syscall_metadata __syscall_meta_##sname; \ | 119 | static struct syscall_metadata __syscall_meta_##sname; \ |
120 | static struct ftrace_event_call __used \ | 120 | static struct ftrace_event_call __used \ |
121 | event_enter_##sname = { \ | 121 | event_enter_##sname = { \ |
122 | .name = "sys_enter"#sname, \ | ||
123 | .class = &event_class_syscall_enter, \ | 122 | .class = &event_class_syscall_enter, \ |
123 | { \ | ||
124 | .name = "sys_enter"#sname, \ | ||
125 | }, \ | ||
124 | .event.funcs = &enter_syscall_print_funcs, \ | 126 | .event.funcs = &enter_syscall_print_funcs, \ |
125 | .data = (void *)&__syscall_meta_##sname,\ | 127 | .data = (void *)&__syscall_meta_##sname,\ |
126 | .flags = TRACE_EVENT_FL_CAP_ANY, \ | 128 | .flags = TRACE_EVENT_FL_CAP_ANY, \ |
@@ -133,8 +135,10 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
133 | static struct syscall_metadata __syscall_meta_##sname; \ | 135 | static struct syscall_metadata __syscall_meta_##sname; \ |
134 | static struct ftrace_event_call __used \ | 136 | static struct ftrace_event_call __used \ |
135 | event_exit_##sname = { \ | 137 | event_exit_##sname = { \ |
136 | .name = "sys_exit"#sname, \ | ||
137 | .class = &event_class_syscall_exit, \ | 138 | .class = &event_class_syscall_exit, \ |
139 | { \ | ||
140 | .name = "sys_exit"#sname, \ | ||
141 | }, \ | ||
138 | .event.funcs = &exit_syscall_print_funcs, \ | 142 | .event.funcs = &exit_syscall_print_funcs, \ |
139 | .data = (void *)&__syscall_meta_##sname,\ | 143 | .data = (void *)&__syscall_meta_##sname,\ |
140 | .flags = TRACE_EVENT_FL_CAP_ANY, \ | 144 | .flags = TRACE_EVENT_FL_CAP_ANY, \ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 812b2553dfd8..9d30ee469c2a 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * See Documentation/trace/tracepoints.txt. | 7 | * See Documentation/trace/tracepoints.txt. |
8 | * | 8 | * |
9 | * (C) Copyright 2008 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 9 | * Copyright (C) 2008-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
10 | * | 10 | * |
11 | * Heavily inspired from the Linux Kernel Markers. | 11 | * Heavily inspired from the Linux Kernel Markers. |
12 | * | 12 | * |
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | struct module; | 22 | struct module; |
23 | struct tracepoint; | 23 | struct tracepoint; |
24 | struct notifier_block; | ||
24 | 25 | ||
25 | struct tracepoint_func { | 26 | struct tracepoint_func { |
26 | void *func; | 27 | void *func; |
@@ -35,31 +36,38 @@ struct tracepoint { | |||
35 | struct tracepoint_func __rcu *funcs; | 36 | struct tracepoint_func __rcu *funcs; |
36 | }; | 37 | }; |
37 | 38 | ||
38 | /* | ||
39 | * Connect a probe to a tracepoint. | ||
40 | * Internal API, should not be used directly. | ||
41 | */ | ||
42 | extern int tracepoint_probe_register(const char *name, void *probe, void *data); | ||
43 | |||
44 | /* | ||
45 | * Disconnect a probe from a tracepoint. | ||
46 | * Internal API, should not be used directly. | ||
47 | */ | ||
48 | extern int | 39 | extern int |
49 | tracepoint_probe_unregister(const char *name, void *probe, void *data); | 40 | tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data); |
41 | extern int | ||
42 | tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data); | ||
43 | extern void | ||
44 | for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv), | ||
45 | void *priv); | ||
50 | 46 | ||
51 | #ifdef CONFIG_MODULES | 47 | #ifdef CONFIG_MODULES |
52 | struct tp_module { | 48 | struct tp_module { |
53 | struct list_head list; | 49 | struct list_head list; |
54 | unsigned int num_tracepoints; | 50 | struct module *mod; |
55 | struct tracepoint * const *tracepoints_ptrs; | ||
56 | }; | 51 | }; |
52 | |||
57 | bool trace_module_has_bad_taint(struct module *mod); | 53 | bool trace_module_has_bad_taint(struct module *mod); |
54 | extern int register_tracepoint_module_notifier(struct notifier_block *nb); | ||
55 | extern int unregister_tracepoint_module_notifier(struct notifier_block *nb); | ||
58 | #else | 56 | #else |
59 | static inline bool trace_module_has_bad_taint(struct module *mod) | 57 | static inline bool trace_module_has_bad_taint(struct module *mod) |
60 | { | 58 | { |
61 | return false; | 59 | return false; |
62 | } | 60 | } |
61 | static inline | ||
62 | int register_tracepoint_module_notifier(struct notifier_block *nb) | ||
63 | { | ||
64 | return 0; | ||
65 | } | ||
66 | static inline | ||
67 | int unregister_tracepoint_module_notifier(struct notifier_block *nb) | ||
68 | { | ||
69 | return 0; | ||
70 | } | ||
63 | #endif /* CONFIG_MODULES */ | 71 | #endif /* CONFIG_MODULES */ |
64 | 72 | ||
65 | /* | 73 | /* |
@@ -72,6 +80,11 @@ static inline void tracepoint_synchronize_unregister(void) | |||
72 | synchronize_sched(); | 80 | synchronize_sched(); |
73 | } | 81 | } |
74 | 82 | ||
83 | #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS | ||
84 | extern void syscall_regfunc(void); | ||
85 | extern void syscall_unregfunc(void); | ||
86 | #endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */ | ||
87 | |||
75 | #define PARAMS(args...) args | 88 | #define PARAMS(args...) args |
76 | 89 | ||
77 | #endif /* _LINUX_TRACEPOINT_H */ | 90 | #endif /* _LINUX_TRACEPOINT_H */ |
@@ -160,14 +173,14 @@ static inline void tracepoint_synchronize_unregister(void) | |||
160 | static inline int \ | 173 | static inline int \ |
161 | register_trace_##name(void (*probe)(data_proto), void *data) \ | 174 | register_trace_##name(void (*probe)(data_proto), void *data) \ |
162 | { \ | 175 | { \ |
163 | return tracepoint_probe_register(#name, (void *)probe, \ | 176 | return tracepoint_probe_register(&__tracepoint_##name, \ |
164 | data); \ | 177 | (void *)probe, data); \ |
165 | } \ | 178 | } \ |
166 | static inline int \ | 179 | static inline int \ |
167 | unregister_trace_##name(void (*probe)(data_proto), void *data) \ | 180 | unregister_trace_##name(void (*probe)(data_proto), void *data) \ |
168 | { \ | 181 | { \ |
169 | return tracepoint_probe_unregister(#name, (void *)probe, \ | 182 | return tracepoint_probe_unregister(&__tracepoint_##name,\ |
170 | data); \ | 183 | (void *)probe, data); \ |
171 | } \ | 184 | } \ |
172 | static inline void \ | 185 | static inline void \ |
173 | check_trace_callback_type_##name(void (*cb)(data_proto)) \ | 186 | check_trace_callback_type_##name(void (*cb)(data_proto)) \ |
diff --git a/include/linux/uio.h b/include/linux/uio.h index c55ce243cc09..199bcc34241b 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -9,14 +9,23 @@ | |||
9 | #ifndef __LINUX_UIO_H | 9 | #ifndef __LINUX_UIO_H |
10 | #define __LINUX_UIO_H | 10 | #define __LINUX_UIO_H |
11 | 11 | ||
12 | #include <linux/kernel.h> | ||
12 | #include <uapi/linux/uio.h> | 13 | #include <uapi/linux/uio.h> |
13 | 14 | ||
15 | struct page; | ||
14 | 16 | ||
15 | struct kvec { | 17 | struct kvec { |
16 | void *iov_base; /* and that should *never* hold a userland pointer */ | 18 | void *iov_base; /* and that should *never* hold a userland pointer */ |
17 | size_t iov_len; | 19 | size_t iov_len; |
18 | }; | 20 | }; |
19 | 21 | ||
22 | struct iov_iter { | ||
23 | const struct iovec *iov; | ||
24 | unsigned long nr_segs; | ||
25 | size_t iov_offset; | ||
26 | size_t count; | ||
27 | }; | ||
28 | |||
20 | /* | 29 | /* |
21 | * Total number of bytes covered by an iovec. | 30 | * Total number of bytes covered by an iovec. |
22 | * | 31 | * |
@@ -34,8 +43,51 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) | |||
34 | return ret; | 43 | return ret; |
35 | } | 44 | } |
36 | 45 | ||
46 | static inline struct iovec iov_iter_iovec(const struct iov_iter *iter) | ||
47 | { | ||
48 | return (struct iovec) { | ||
49 | .iov_base = iter->iov->iov_base + iter->iov_offset, | ||
50 | .iov_len = min(iter->count, | ||
51 | iter->iov->iov_len - iter->iov_offset), | ||
52 | }; | ||
53 | } | ||
54 | |||
55 | #define iov_for_each(iov, iter, start) \ | ||
56 | for (iter = (start); \ | ||
57 | (iter).count && \ | ||
58 | ((iov = iov_iter_iovec(&(iter))), 1); \ | ||
59 | iov_iter_advance(&(iter), (iov).iov_len)) | ||
60 | |||
37 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); | 61 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); |
38 | 62 | ||
63 | size_t iov_iter_copy_from_user_atomic(struct page *page, | ||
64 | struct iov_iter *i, unsigned long offset, size_t bytes); | ||
65 | size_t iov_iter_copy_from_user(struct page *page, | ||
66 | struct iov_iter *i, unsigned long offset, size_t bytes); | ||
67 | void iov_iter_advance(struct iov_iter *i, size_t bytes); | ||
68 | int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); | ||
69 | size_t iov_iter_single_seg_count(const struct iov_iter *i); | ||
70 | size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, | ||
71 | struct iov_iter *i); | ||
72 | |||
73 | static inline void iov_iter_init(struct iov_iter *i, | ||
74 | const struct iovec *iov, unsigned long nr_segs, | ||
75 | size_t count, size_t written) | ||
76 | { | ||
77 | i->iov = iov; | ||
78 | i->nr_segs = nr_segs; | ||
79 | i->iov_offset = 0; | ||
80 | i->count = count + written; | ||
81 | |||
82 | iov_iter_advance(i, written); | ||
83 | } | ||
84 | |||
85 | static inline size_t iov_iter_count(struct iov_iter *i) | ||
86 | { | ||
87 | return i->count; | ||
88 | } | ||
89 | |||
39 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 90 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
40 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); | 91 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); |
92 | |||
41 | #endif | 93 | #endif |
diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 0b9f890ce431..fde142e5f25a 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h | |||
@@ -60,6 +60,7 @@ enum rc_filter_type { | |||
60 | /** | 60 | /** |
61 | * struct rc_dev - represents a remote control device | 61 | * struct rc_dev - represents a remote control device |
62 | * @dev: driver model's view of this device | 62 | * @dev: driver model's view of this device |
63 | * @sysfs_groups: sysfs attribute groups | ||
63 | * @input_name: name of the input child device | 64 | * @input_name: name of the input child device |
64 | * @input_phys: physical path to the input child device | 65 | * @input_phys: physical path to the input child device |
65 | * @input_id: id of the input child device (struct input_id) | 66 | * @input_id: id of the input child device (struct input_id) |
@@ -112,10 +113,12 @@ enum rc_filter_type { | |||
112 | * device doesn't interrupt host until it sees IR pulses | 113 | * device doesn't interrupt host until it sees IR pulses |
113 | * @s_learning_mode: enable wide band receiver used for learning | 114 | * @s_learning_mode: enable wide band receiver used for learning |
114 | * @s_carrier_report: enable carrier reports | 115 | * @s_carrier_report: enable carrier reports |
115 | * @s_filter: set the scancode filter of a given type | 116 | * @s_filter: set the scancode filter |
117 | * @s_wakeup_filter: set the wakeup scancode filter | ||
116 | */ | 118 | */ |
117 | struct rc_dev { | 119 | struct rc_dev { |
118 | struct device dev; | 120 | struct device dev; |
121 | const struct attribute_group *sysfs_groups[5]; | ||
119 | const char *input_name; | 122 | const char *input_name; |
120 | const char *input_phys; | 123 | const char *input_phys; |
121 | struct input_id input_id; | 124 | struct input_id input_id; |
@@ -159,8 +162,9 @@ struct rc_dev { | |||
159 | int (*s_learning_mode)(struct rc_dev *dev, int enable); | 162 | int (*s_learning_mode)(struct rc_dev *dev, int enable); |
160 | int (*s_carrier_report) (struct rc_dev *dev, int enable); | 163 | int (*s_carrier_report) (struct rc_dev *dev, int enable); |
161 | int (*s_filter)(struct rc_dev *dev, | 164 | int (*s_filter)(struct rc_dev *dev, |
162 | enum rc_filter_type type, | ||
163 | struct rc_scancode_filter *filter); | 165 | struct rc_scancode_filter *filter); |
166 | int (*s_wakeup_filter)(struct rc_dev *dev, | ||
167 | struct rc_scancode_filter *filter); | ||
164 | }; | 168 | }; |
165 | 169 | ||
166 | #define to_rc_dev(d) container_of(d, struct rc_dev, dev) | 170 | #define to_rc_dev(d) container_of(d, struct rc_dev, dev) |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index c38a005bd0cf..6fab66c5c5af 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -67,7 +67,6 @@ enum p9_trans_status { | |||
67 | * @REQ_STATUS_ALLOC: request has been allocated but not sent | 67 | * @REQ_STATUS_ALLOC: request has been allocated but not sent |
68 | * @REQ_STATUS_UNSENT: request waiting to be sent | 68 | * @REQ_STATUS_UNSENT: request waiting to be sent |
69 | * @REQ_STATUS_SENT: request sent to server | 69 | * @REQ_STATUS_SENT: request sent to server |
70 | * @REQ_STATUS_FLSH: a flush has been sent for this request | ||
71 | * @REQ_STATUS_RCVD: response received from server | 70 | * @REQ_STATUS_RCVD: response received from server |
72 | * @REQ_STATUS_FLSHD: request has been flushed | 71 | * @REQ_STATUS_FLSHD: request has been flushed |
73 | * @REQ_STATUS_ERROR: request encountered an error on the client side | 72 | * @REQ_STATUS_ERROR: request encountered an error on the client side |
@@ -83,7 +82,6 @@ enum p9_req_status_t { | |||
83 | REQ_STATUS_ALLOC, | 82 | REQ_STATUS_ALLOC, |
84 | REQ_STATUS_UNSENT, | 83 | REQ_STATUS_UNSENT, |
85 | REQ_STATUS_SENT, | 84 | REQ_STATUS_SENT, |
86 | REQ_STATUS_FLSH, | ||
87 | REQ_STATUS_RCVD, | 85 | REQ_STATUS_RCVD, |
88 | REQ_STATUS_FLSHD, | 86 | REQ_STATUS_FLSHD, |
89 | REQ_STATUS_ERROR, | 87 | REQ_STATUS_ERROR, |
@@ -130,7 +128,6 @@ struct p9_req_t { | |||
130 | * @proto_version: 9P protocol version to use | 128 | * @proto_version: 9P protocol version to use |
131 | * @trans_mod: module API instantiated with this client | 129 | * @trans_mod: module API instantiated with this client |
132 | * @trans: tranport instance state and API | 130 | * @trans: tranport instance state and API |
133 | * @conn: connection state information used by trans_fd | ||
134 | * @fidpool: fid handle accounting for session | 131 | * @fidpool: fid handle accounting for session |
135 | * @fidlist: List of active fid handles | 132 | * @fidlist: List of active fid handles |
136 | * @tagpool - transaction id accounting for session | 133 | * @tagpool - transaction id accounting for session |
@@ -159,7 +156,6 @@ struct p9_client { | |||
159 | struct p9_trans_module *trans_mod; | 156 | struct p9_trans_module *trans_mod; |
160 | enum p9_trans_status status; | 157 | enum p9_trans_status status; |
161 | void *trans; | 158 | void *trans; |
162 | struct p9_conn *conn; | ||
163 | 159 | ||
164 | struct p9_idpool *fidpool; | 160 | struct p9_idpool *fidpool; |
165 | struct list_head fidlist; | 161 | struct list_head fidlist; |
@@ -261,7 +257,7 @@ int p9_client_mkdir_dotl(struct p9_fid *fid, char *name, int mode, | |||
261 | int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status); | 257 | int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status); |
262 | int p9_client_getlock_dotl(struct p9_fid *fid, struct p9_getlock *fl); | 258 | int p9_client_getlock_dotl(struct p9_fid *fid, struct p9_getlock *fl); |
263 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); | 259 | struct p9_req_t *p9_tag_lookup(struct p9_client *, u16); |
264 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req); | 260 | void p9_client_cb(struct p9_client *c, struct p9_req_t *req, int status); |
265 | 261 | ||
266 | int p9_parse_header(struct p9_fcall *, int32_t *, int8_t *, int16_t *, int); | 262 | int p9_parse_header(struct p9_fcall *, int32_t *, int8_t *, int16_t *, int); |
267 | int p9stat_read(struct p9_client *, char *, int, struct p9_wstat *); | 263 | int p9stat_read(struct p9_client *, char *, int, struct p9_wstat *); |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 9a36d9297114..d9fa68f26c41 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -40,6 +40,8 @@ | |||
40 | * @close: member function to discard a connection on this transport | 40 | * @close: member function to discard a connection on this transport |
41 | * @request: member function to issue a request to the transport | 41 | * @request: member function to issue a request to the transport |
42 | * @cancel: member function to cancel a request (if it hasn't been sent) | 42 | * @cancel: member function to cancel a request (if it hasn't been sent) |
43 | * @cancelled: member function to notify that a cancelled request will not | ||
44 | * not receive a reply | ||
43 | * | 45 | * |
44 | * This is the basic API for a transport module which is registered by the | 46 | * This is the basic API for a transport module which is registered by the |
45 | * transport module with the 9P core network module and used by the client | 47 | * transport module with the 9P core network module and used by the client |
@@ -58,6 +60,7 @@ struct p9_trans_module { | |||
58 | void (*close) (struct p9_client *); | 60 | void (*close) (struct p9_client *); |
59 | int (*request) (struct p9_client *, struct p9_req_t *req); | 61 | int (*request) (struct p9_client *, struct p9_req_t *req); |
60 | int (*cancel) (struct p9_client *, struct p9_req_t *req); | 62 | int (*cancel) (struct p9_client *, struct p9_req_t *req); |
63 | int (*cancelled)(struct p9_client *, struct p9_req_t *req); | ||
61 | int (*zc_request)(struct p9_client *, struct p9_req_t *, | 64 | int (*zc_request)(struct p9_client *, struct p9_req_t *, |
62 | char *, char *, int , int, int, int); | 65 | char *, char *, int , int, int, int); |
63 | }; | 66 | }; |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index a3353f45ef94..8e4de46c052e 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -101,7 +101,7 @@ void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int); | |||
101 | int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | 101 | int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); |
102 | int sctp_inet_listen(struct socket *sock, int backlog); | 102 | int sctp_inet_listen(struct socket *sock, int backlog); |
103 | void sctp_write_space(struct sock *sk); | 103 | void sctp_write_space(struct sock *sk); |
104 | void sctp_data_ready(struct sock *sk, int len); | 104 | void sctp_data_ready(struct sock *sk); |
105 | unsigned int sctp_poll(struct file *file, struct socket *sock, | 105 | unsigned int sctp_poll(struct file *file, struct socket *sock, |
106 | poll_table *wait); | 106 | poll_table *wait); |
107 | void sctp_sock_rfree(struct sk_buff *skb); | 107 | void sctp_sock_rfree(struct sk_buff *skb); |
diff --git a/include/net/sock.h b/include/net/sock.h index 06a5668f05c9..8338a14e4805 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -418,7 +418,7 @@ struct sock { | |||
418 | u32 sk_classid; | 418 | u32 sk_classid; |
419 | struct cg_proto *sk_cgrp; | 419 | struct cg_proto *sk_cgrp; |
420 | void (*sk_state_change)(struct sock *sk); | 420 | void (*sk_state_change)(struct sock *sk); |
421 | void (*sk_data_ready)(struct sock *sk, int bytes); | 421 | void (*sk_data_ready)(struct sock *sk); |
422 | void (*sk_write_space)(struct sock *sk); | 422 | void (*sk_write_space)(struct sock *sk); |
423 | void (*sk_error_report)(struct sock *sk); | 423 | void (*sk_error_report)(struct sock *sk); |
424 | int (*sk_backlog_rcv)(struct sock *sk, | 424 | int (*sk_backlog_rcv)(struct sock *sk, |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 4e845b80efd3..5853c913d2b0 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -423,11 +423,11 @@ extern int scsi_is_target_device(const struct device *); | |||
423 | extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, | 423 | extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, |
424 | int data_direction, void *buffer, unsigned bufflen, | 424 | int data_direction, void *buffer, unsigned bufflen, |
425 | unsigned char *sense, int timeout, int retries, | 425 | unsigned char *sense, int timeout, int retries, |
426 | int flag, int *resid); | 426 | u64 flags, int *resid); |
427 | extern int scsi_execute_req_flags(struct scsi_device *sdev, | 427 | extern int scsi_execute_req_flags(struct scsi_device *sdev, |
428 | const unsigned char *cmd, int data_direction, void *buffer, | 428 | const unsigned char *cmd, int data_direction, void *buffer, |
429 | unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, | 429 | unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, |
430 | int retries, int *resid, int flags); | 430 | int retries, int *resid, u64 flags); |
431 | static inline int scsi_execute_req(struct scsi_device *sdev, | 431 | static inline int scsi_execute_req(struct scsi_device *sdev, |
432 | const unsigned char *cmd, int data_direction, void *buffer, | 432 | const unsigned char *cmd, int data_direction, void *buffer, |
433 | unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, | 433 | unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, |
diff --git a/include/sound/cs8427.h b/include/sound/cs8427.h index f862cfff5f6a..0b6a1876639b 100644 --- a/include/sound/cs8427.h +++ b/include/sound/cs8427.h | |||
@@ -188,6 +188,7 @@ | |||
188 | 188 | ||
189 | struct snd_pcm_substream; | 189 | struct snd_pcm_substream; |
190 | 190 | ||
191 | int snd_cs8427_init(struct snd_i2c_bus *bus, struct snd_i2c_device *device); | ||
191 | int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr, | 192 | int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr, |
192 | unsigned int reset_timeout, struct snd_i2c_device **r_cs8427); | 193 | unsigned int reset_timeout, struct snd_i2c_device **r_cs8427); |
193 | int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, | 194 | int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, |
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 4483fadfa68d..33b487b5da92 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h | |||
@@ -21,6 +21,8 @@ struct iscsit_transport { | |||
21 | int (*iscsit_get_dataout)(struct iscsi_conn *, struct iscsi_cmd *, bool); | 21 | int (*iscsit_get_dataout)(struct iscsi_conn *, struct iscsi_cmd *, bool); |
22 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); | 22 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); |
23 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); | 23 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); |
24 | void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); | ||
25 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); | ||
24 | }; | 26 | }; |
25 | 27 | ||
26 | static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd) | 28 | static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd) |
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 7020e33e742e..3a1c1eea1fff 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -73,10 +73,12 @@ sense_reason_t sbc_execute_unmap(struct se_cmd *cmd, | |||
73 | sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, | 73 | sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, |
74 | sector_t lba, sector_t nolb), | 74 | sector_t lba, sector_t nolb), |
75 | void *priv); | 75 | void *priv); |
76 | void sbc_dif_generate(struct se_cmd *); | ||
76 | sense_reason_t sbc_dif_verify_write(struct se_cmd *, sector_t, unsigned int, | 77 | sense_reason_t sbc_dif_verify_write(struct se_cmd *, sector_t, unsigned int, |
77 | unsigned int, struct scatterlist *, int); | 78 | unsigned int, struct scatterlist *, int); |
78 | sense_reason_t sbc_dif_verify_read(struct se_cmd *, sector_t, unsigned int, | 79 | sense_reason_t sbc_dif_verify_read(struct se_cmd *, sector_t, unsigned int, |
79 | unsigned int, struct scatterlist *, int); | 80 | unsigned int, struct scatterlist *, int); |
81 | sense_reason_t sbc_dif_read_strip(struct se_cmd *); | ||
80 | 82 | ||
81 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); | 83 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); |
82 | int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); | 84 | int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 1772fadcff62..9ec9864ecf38 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -162,7 +162,7 @@ enum se_cmd_flags_table { | |||
162 | SCF_SENT_CHECK_CONDITION = 0x00000800, | 162 | SCF_SENT_CHECK_CONDITION = 0x00000800, |
163 | SCF_OVERFLOW_BIT = 0x00001000, | 163 | SCF_OVERFLOW_BIT = 0x00001000, |
164 | SCF_UNDERFLOW_BIT = 0x00002000, | 164 | SCF_UNDERFLOW_BIT = 0x00002000, |
165 | SCF_SENT_DELAYED_TAS = 0x00004000, | 165 | SCF_SEND_DELAYED_TAS = 0x00004000, |
166 | SCF_ALUA_NON_OPTIMIZED = 0x00008000, | 166 | SCF_ALUA_NON_OPTIMIZED = 0x00008000, |
167 | SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00020000, | 167 | SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00020000, |
168 | SCF_ACK_KREF = 0x00040000, | 168 | SCF_ACK_KREF = 0x00040000, |
@@ -442,19 +442,18 @@ struct se_tmr_req { | |||
442 | }; | 442 | }; |
443 | 443 | ||
444 | enum target_prot_op { | 444 | enum target_prot_op { |
445 | TARGET_PROT_NORMAL = 0, | 445 | TARGET_PROT_NORMAL = 0, |
446 | TARGET_PROT_DIN_INSERT, | 446 | TARGET_PROT_DIN_INSERT = (1 << 0), |
447 | TARGET_PROT_DOUT_INSERT, | 447 | TARGET_PROT_DOUT_INSERT = (1 << 1), |
448 | TARGET_PROT_DIN_STRIP, | 448 | TARGET_PROT_DIN_STRIP = (1 << 2), |
449 | TARGET_PROT_DOUT_STRIP, | 449 | TARGET_PROT_DOUT_STRIP = (1 << 3), |
450 | TARGET_PROT_DIN_PASS, | 450 | TARGET_PROT_DIN_PASS = (1 << 4), |
451 | TARGET_PROT_DOUT_PASS, | 451 | TARGET_PROT_DOUT_PASS = (1 << 5), |
452 | }; | 452 | }; |
453 | 453 | ||
454 | enum target_prot_ho { | 454 | #define TARGET_PROT_ALL TARGET_PROT_DIN_INSERT | TARGET_PROT_DOUT_INSERT | \ |
455 | PROT_SEPERATED, | 455 | TARGET_PROT_DIN_STRIP | TARGET_PROT_DOUT_STRIP | \ |
456 | PROT_INTERLEAVED, | 456 | TARGET_PROT_DIN_PASS | TARGET_PROT_DOUT_PASS |
457 | }; | ||
458 | 457 | ||
459 | enum target_prot_type { | 458 | enum target_prot_type { |
460 | TARGET_DIF_TYPE0_PROT, | 459 | TARGET_DIF_TYPE0_PROT, |
@@ -463,6 +462,12 @@ enum target_prot_type { | |||
463 | TARGET_DIF_TYPE3_PROT, | 462 | TARGET_DIF_TYPE3_PROT, |
464 | }; | 463 | }; |
465 | 464 | ||
465 | enum target_core_dif_check { | ||
466 | TARGET_DIF_CHECK_GUARD = 0x1 << 0, | ||
467 | TARGET_DIF_CHECK_APPTAG = 0x1 << 1, | ||
468 | TARGET_DIF_CHECK_REFTAG = 0x1 << 2, | ||
469 | }; | ||
470 | |||
466 | struct se_dif_v1_tuple { | 471 | struct se_dif_v1_tuple { |
467 | __be16 guard_tag; | 472 | __be16 guard_tag; |
468 | __be16 app_tag; | 473 | __be16 app_tag; |
@@ -556,13 +561,14 @@ struct se_cmd { | |||
556 | /* DIF related members */ | 561 | /* DIF related members */ |
557 | enum target_prot_op prot_op; | 562 | enum target_prot_op prot_op; |
558 | enum target_prot_type prot_type; | 563 | enum target_prot_type prot_type; |
564 | u8 prot_checks; | ||
559 | u32 prot_length; | 565 | u32 prot_length; |
560 | u32 reftag_seed; | 566 | u32 reftag_seed; |
561 | struct scatterlist *t_prot_sg; | 567 | struct scatterlist *t_prot_sg; |
562 | unsigned int t_prot_nents; | 568 | unsigned int t_prot_nents; |
563 | enum target_prot_ho prot_handover; | ||
564 | sense_reason_t pi_err; | 569 | sense_reason_t pi_err; |
565 | sector_t bad_sector; | 570 | sector_t bad_sector; |
571 | bool prot_pto; | ||
566 | }; | 572 | }; |
567 | 573 | ||
568 | struct se_ua { | 574 | struct se_ua { |
@@ -603,6 +609,7 @@ struct se_node_acl { | |||
603 | struct se_session { | 609 | struct se_session { |
604 | unsigned sess_tearing_down:1; | 610 | unsigned sess_tearing_down:1; |
605 | u64 sess_bin_isid; | 611 | u64 sess_bin_isid; |
612 | enum target_prot_op sup_prot_ops; | ||
606 | struct se_node_acl *se_node_acl; | 613 | struct se_node_acl *se_node_acl; |
607 | struct se_portal_group *se_tpg; | 614 | struct se_portal_group *se_tpg; |
608 | void *fabric_sess_ptr; | 615 | void *fabric_sess_ptr; |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 0218d689b3d7..22a4e98eec80 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -62,6 +62,7 @@ struct target_core_fabric_ops { | |||
62 | int (*queue_data_in)(struct se_cmd *); | 62 | int (*queue_data_in)(struct se_cmd *); |
63 | int (*queue_status)(struct se_cmd *); | 63 | int (*queue_status)(struct se_cmd *); |
64 | void (*queue_tm_rsp)(struct se_cmd *); | 64 | void (*queue_tm_rsp)(struct se_cmd *); |
65 | void (*aborted_task)(struct se_cmd *); | ||
65 | /* | 66 | /* |
66 | * fabric module calls for target_core_fabric_configfs.c | 67 | * fabric module calls for target_core_fabric_configfs.c |
67 | */ | 68 | */ |
@@ -83,10 +84,11 @@ struct target_core_fabric_ops { | |||
83 | void (*fabric_drop_nodeacl)(struct se_node_acl *); | 84 | void (*fabric_drop_nodeacl)(struct se_node_acl *); |
84 | }; | 85 | }; |
85 | 86 | ||
86 | struct se_session *transport_init_session(void); | 87 | struct se_session *transport_init_session(enum target_prot_op); |
87 | int transport_alloc_session_tags(struct se_session *, unsigned int, | 88 | int transport_alloc_session_tags(struct se_session *, unsigned int, |
88 | unsigned int); | 89 | unsigned int); |
89 | struct se_session *transport_init_session_tags(unsigned int, unsigned int); | 90 | struct se_session *transport_init_session_tags(unsigned int, unsigned int, |
91 | enum target_prot_op); | ||
90 | void __transport_register_session(struct se_portal_group *, | 92 | void __transport_register_session(struct se_portal_group *, |
91 | struct se_node_acl *, struct se_session *, void *); | 93 | struct se_node_acl *, struct se_session *, void *); |
92 | void transport_register_session(struct se_portal_group *, | 94 | void transport_register_session(struct se_portal_group *, |
diff --git a/include/trace/events/i2c.h b/include/trace/events/i2c.h new file mode 100644 index 000000000000..fe17187df65d --- /dev/null +++ b/include/trace/events/i2c.h | |||
@@ -0,0 +1,372 @@ | |||
1 | /* I2C and SMBUS message transfer tracepoints | ||
2 | * | ||
3 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #undef TRACE_SYSTEM | ||
12 | #define TRACE_SYSTEM i2c | ||
13 | |||
14 | #if !defined(_TRACE_I2C_H) || defined(TRACE_HEADER_MULTI_READ) | ||
15 | #define _TRACE_I2C_H | ||
16 | |||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/tracepoint.h> | ||
19 | |||
20 | /* | ||
21 | * drivers/i2c/i2c-core.c | ||
22 | */ | ||
23 | extern void i2c_transfer_trace_reg(void); | ||
24 | extern void i2c_transfer_trace_unreg(void); | ||
25 | |||
26 | /* | ||
27 | * __i2c_transfer() write request | ||
28 | */ | ||
29 | TRACE_EVENT_FN(i2c_write, | ||
30 | TP_PROTO(const struct i2c_adapter *adap, const struct i2c_msg *msg, | ||
31 | int num), | ||
32 | TP_ARGS(adap, msg, num), | ||
33 | TP_STRUCT__entry( | ||
34 | __field(int, adapter_nr ) | ||
35 | __field(__u16, msg_nr ) | ||
36 | __field(__u16, addr ) | ||
37 | __field(__u16, flags ) | ||
38 | __field(__u16, len ) | ||
39 | __dynamic_array(__u8, buf, msg->len) ), | ||
40 | TP_fast_assign( | ||
41 | __entry->adapter_nr = adap->nr; | ||
42 | __entry->msg_nr = num; | ||
43 | __entry->addr = msg->addr; | ||
44 | __entry->flags = msg->flags; | ||
45 | __entry->len = msg->len; | ||
46 | memcpy(__get_dynamic_array(buf), msg->buf, msg->len); | ||
47 | ), | ||
48 | TP_printk("i2c-%d #%u a=%03x f=%04x l=%u [%*phD]", | ||
49 | __entry->adapter_nr, | ||
50 | __entry->msg_nr, | ||
51 | __entry->addr, | ||
52 | __entry->flags, | ||
53 | __entry->len, | ||
54 | __entry->len, __get_dynamic_array(buf) | ||
55 | ), | ||
56 | i2c_transfer_trace_reg, | ||
57 | i2c_transfer_trace_unreg); | ||
58 | |||
59 | /* | ||
60 | * __i2c_transfer() read request | ||
61 | */ | ||
62 | TRACE_EVENT_FN(i2c_read, | ||
63 | TP_PROTO(const struct i2c_adapter *adap, const struct i2c_msg *msg, | ||
64 | int num), | ||
65 | TP_ARGS(adap, msg, num), | ||
66 | TP_STRUCT__entry( | ||
67 | __field(int, adapter_nr ) | ||
68 | __field(__u16, msg_nr ) | ||
69 | __field(__u16, addr ) | ||
70 | __field(__u16, flags ) | ||
71 | __field(__u16, len ) | ||
72 | ), | ||
73 | TP_fast_assign( | ||
74 | __entry->adapter_nr = adap->nr; | ||
75 | __entry->msg_nr = num; | ||
76 | __entry->addr = msg->addr; | ||
77 | __entry->flags = msg->flags; | ||
78 | __entry->len = msg->len; | ||
79 | ), | ||
80 | TP_printk("i2c-%d #%u a=%03x f=%04x l=%u", | ||
81 | __entry->adapter_nr, | ||
82 | __entry->msg_nr, | ||
83 | __entry->addr, | ||
84 | __entry->flags, | ||
85 | __entry->len | ||
86 | ), | ||
87 | i2c_transfer_trace_reg, | ||
88 | i2c_transfer_trace_unreg); | ||
89 | |||
90 | /* | ||
91 | * __i2c_transfer() read reply | ||
92 | */ | ||
93 | TRACE_EVENT_FN(i2c_reply, | ||
94 | TP_PROTO(const struct i2c_adapter *adap, const struct i2c_msg *msg, | ||
95 | int num), | ||
96 | TP_ARGS(adap, msg, num), | ||
97 | TP_STRUCT__entry( | ||
98 | __field(int, adapter_nr ) | ||
99 | __field(__u16, msg_nr ) | ||
100 | __field(__u16, addr ) | ||
101 | __field(__u16, flags ) | ||
102 | __field(__u16, len ) | ||
103 | __dynamic_array(__u8, buf, msg->len) ), | ||
104 | TP_fast_assign( | ||
105 | __entry->adapter_nr = adap->nr; | ||
106 | __entry->msg_nr = num; | ||
107 | __entry->addr = msg->addr; | ||
108 | __entry->flags = msg->flags; | ||
109 | __entry->len = msg->len; | ||
110 | memcpy(__get_dynamic_array(buf), msg->buf, msg->len); | ||
111 | ), | ||
112 | TP_printk("i2c-%d #%u a=%03x f=%04x l=%u [%*phD]", | ||
113 | __entry->adapter_nr, | ||
114 | __entry->msg_nr, | ||
115 | __entry->addr, | ||
116 | __entry->flags, | ||
117 | __entry->len, | ||
118 | __entry->len, __get_dynamic_array(buf) | ||
119 | ), | ||
120 | i2c_transfer_trace_reg, | ||
121 | i2c_transfer_trace_unreg); | ||
122 | |||
123 | /* | ||
124 | * __i2c_transfer() result | ||
125 | */ | ||
126 | TRACE_EVENT_FN(i2c_result, | ||
127 | TP_PROTO(const struct i2c_adapter *adap, int num, int ret), | ||
128 | TP_ARGS(adap, num, ret), | ||
129 | TP_STRUCT__entry( | ||
130 | __field(int, adapter_nr ) | ||
131 | __field(__u16, nr_msgs ) | ||
132 | __field(__s16, ret ) | ||
133 | ), | ||
134 | TP_fast_assign( | ||
135 | __entry->adapter_nr = adap->nr; | ||
136 | __entry->nr_msgs = num; | ||
137 | __entry->ret = ret; | ||
138 | ), | ||
139 | TP_printk("i2c-%d n=%u ret=%d", | ||
140 | __entry->adapter_nr, | ||
141 | __entry->nr_msgs, | ||
142 | __entry->ret | ||
143 | ), | ||
144 | i2c_transfer_trace_reg, | ||
145 | i2c_transfer_trace_unreg); | ||
146 | |||
147 | /* | ||
148 | * i2c_smbus_xfer() write data or procedure call request | ||
149 | */ | ||
150 | TRACE_EVENT_CONDITION(smbus_write, | ||
151 | TP_PROTO(const struct i2c_adapter *adap, | ||
152 | u16 addr, unsigned short flags, | ||
153 | char read_write, u8 command, int protocol, | ||
154 | const union i2c_smbus_data *data), | ||
155 | TP_ARGS(adap, addr, flags, read_write, command, protocol, data), | ||
156 | TP_CONDITION(read_write == I2C_SMBUS_WRITE || | ||
157 | protocol == I2C_SMBUS_PROC_CALL || | ||
158 | protocol == I2C_SMBUS_BLOCK_PROC_CALL), | ||
159 | TP_STRUCT__entry( | ||
160 | __field(int, adapter_nr ) | ||
161 | __field(__u16, addr ) | ||
162 | __field(__u16, flags ) | ||
163 | __field(__u8, command ) | ||
164 | __field(__u8, len ) | ||
165 | __field(__u32, protocol ) | ||
166 | __array(__u8, buf, I2C_SMBUS_BLOCK_MAX + 2) ), | ||
167 | TP_fast_assign( | ||
168 | __entry->adapter_nr = adap->nr; | ||
169 | __entry->addr = addr; | ||
170 | __entry->flags = flags; | ||
171 | __entry->command = command; | ||
172 | __entry->protocol = protocol; | ||
173 | |||
174 | switch (protocol) { | ||
175 | case I2C_SMBUS_BYTE_DATA: | ||
176 | __entry->len = 1; | ||
177 | goto copy; | ||
178 | case I2C_SMBUS_WORD_DATA: | ||
179 | case I2C_SMBUS_PROC_CALL: | ||
180 | __entry->len = 2; | ||
181 | goto copy; | ||
182 | case I2C_SMBUS_BLOCK_DATA: | ||
183 | case I2C_SMBUS_BLOCK_PROC_CALL: | ||
184 | case I2C_SMBUS_I2C_BLOCK_DATA: | ||
185 | __entry->len = data->block[0] + 1; | ||
186 | copy: | ||
187 | memcpy(__entry->buf, data->block, __entry->len); | ||
188 | break; | ||
189 | case I2C_SMBUS_QUICK: | ||
190 | case I2C_SMBUS_BYTE: | ||
191 | case I2C_SMBUS_I2C_BLOCK_BROKEN: | ||
192 | default: | ||
193 | __entry->len = 0; | ||
194 | } | ||
195 | ), | ||
196 | TP_printk("i2c-%d a=%03x f=%04x c=%x %s l=%u [%*phD]", | ||
197 | __entry->adapter_nr, | ||
198 | __entry->addr, | ||
199 | __entry->flags, | ||
200 | __entry->command, | ||
201 | __print_symbolic(__entry->protocol, | ||
202 | { I2C_SMBUS_QUICK, "QUICK" }, | ||
203 | { I2C_SMBUS_BYTE, "BYTE" }, | ||
204 | { I2C_SMBUS_BYTE_DATA, "BYTE_DATA" }, | ||
205 | { I2C_SMBUS_WORD_DATA, "WORD_DATA" }, | ||
206 | { I2C_SMBUS_PROC_CALL, "PROC_CALL" }, | ||
207 | { I2C_SMBUS_BLOCK_DATA, "BLOCK_DATA" }, | ||
208 | { I2C_SMBUS_I2C_BLOCK_BROKEN, "I2C_BLOCK_BROKEN" }, | ||
209 | { I2C_SMBUS_BLOCK_PROC_CALL, "BLOCK_PROC_CALL" }, | ||
210 | { I2C_SMBUS_I2C_BLOCK_DATA, "I2C_BLOCK_DATA" }), | ||
211 | __entry->len, | ||
212 | __entry->len, __entry->buf | ||
213 | )); | ||
214 | |||
215 | /* | ||
216 | * i2c_smbus_xfer() read data request | ||
217 | */ | ||
218 | TRACE_EVENT_CONDITION(smbus_read, | ||
219 | TP_PROTO(const struct i2c_adapter *adap, | ||
220 | u16 addr, unsigned short flags, | ||
221 | char read_write, u8 command, int protocol), | ||
222 | TP_ARGS(adap, addr, flags, read_write, command, protocol), | ||
223 | TP_CONDITION(!(read_write == I2C_SMBUS_WRITE || | ||
224 | protocol == I2C_SMBUS_PROC_CALL || | ||
225 | protocol == I2C_SMBUS_BLOCK_PROC_CALL)), | ||
226 | TP_STRUCT__entry( | ||
227 | __field(int, adapter_nr ) | ||
228 | __field(__u16, flags ) | ||
229 | __field(__u16, addr ) | ||
230 | __field(__u8, command ) | ||
231 | __field(__u32, protocol ) | ||
232 | __array(__u8, buf, I2C_SMBUS_BLOCK_MAX + 2) ), | ||
233 | TP_fast_assign( | ||
234 | __entry->adapter_nr = adap->nr; | ||
235 | __entry->addr = addr; | ||
236 | __entry->flags = flags; | ||
237 | __entry->command = command; | ||
238 | __entry->protocol = protocol; | ||
239 | ), | ||
240 | TP_printk("i2c-%d a=%03x f=%04x c=%x %s", | ||
241 | __entry->adapter_nr, | ||
242 | __entry->addr, | ||
243 | __entry->flags, | ||
244 | __entry->command, | ||
245 | __print_symbolic(__entry->protocol, | ||
246 | { I2C_SMBUS_QUICK, "QUICK" }, | ||
247 | { I2C_SMBUS_BYTE, "BYTE" }, | ||
248 | { I2C_SMBUS_BYTE_DATA, "BYTE_DATA" }, | ||
249 | { I2C_SMBUS_WORD_DATA, "WORD_DATA" }, | ||
250 | { I2C_SMBUS_PROC_CALL, "PROC_CALL" }, | ||
251 | { I2C_SMBUS_BLOCK_DATA, "BLOCK_DATA" }, | ||
252 | { I2C_SMBUS_I2C_BLOCK_BROKEN, "I2C_BLOCK_BROKEN" }, | ||
253 | { I2C_SMBUS_BLOCK_PROC_CALL, "BLOCK_PROC_CALL" }, | ||
254 | { I2C_SMBUS_I2C_BLOCK_DATA, "I2C_BLOCK_DATA" }) | ||
255 | )); | ||
256 | |||
257 | /* | ||
258 | * i2c_smbus_xfer() read data or procedure call reply | ||
259 | */ | ||
260 | TRACE_EVENT_CONDITION(smbus_reply, | ||
261 | TP_PROTO(const struct i2c_adapter *adap, | ||
262 | u16 addr, unsigned short flags, | ||
263 | char read_write, u8 command, int protocol, | ||
264 | const union i2c_smbus_data *data), | ||
265 | TP_ARGS(adap, addr, flags, read_write, command, protocol, data), | ||
266 | TP_CONDITION(read_write == I2C_SMBUS_READ), | ||
267 | TP_STRUCT__entry( | ||
268 | __field(int, adapter_nr ) | ||
269 | __field(__u16, addr ) | ||
270 | __field(__u16, flags ) | ||
271 | __field(__u8, command ) | ||
272 | __field(__u8, len ) | ||
273 | __field(__u32, protocol ) | ||
274 | __array(__u8, buf, I2C_SMBUS_BLOCK_MAX + 2) ), | ||
275 | TP_fast_assign( | ||
276 | __entry->adapter_nr = adap->nr; | ||
277 | __entry->addr = addr; | ||
278 | __entry->flags = flags; | ||
279 | __entry->command = command; | ||
280 | __entry->protocol = protocol; | ||
281 | |||
282 | switch (protocol) { | ||
283 | case I2C_SMBUS_BYTE: | ||
284 | case I2C_SMBUS_BYTE_DATA: | ||
285 | __entry->len = 1; | ||
286 | goto copy; | ||
287 | case I2C_SMBUS_WORD_DATA: | ||
288 | case I2C_SMBUS_PROC_CALL: | ||
289 | __entry->len = 2; | ||
290 | goto copy; | ||
291 | case I2C_SMBUS_BLOCK_DATA: | ||
292 | case I2C_SMBUS_BLOCK_PROC_CALL: | ||
293 | case I2C_SMBUS_I2C_BLOCK_DATA: | ||
294 | __entry->len = data->block[0] + 1; | ||
295 | copy: | ||
296 | memcpy(__entry->buf, data->block, __entry->len); | ||
297 | break; | ||
298 | case I2C_SMBUS_QUICK: | ||
299 | case I2C_SMBUS_I2C_BLOCK_BROKEN: | ||
300 | default: | ||
301 | __entry->len = 0; | ||
302 | } | ||
303 | ), | ||
304 | TP_printk("i2c-%d a=%03x f=%04x c=%x %s l=%u [%*phD]", | ||
305 | __entry->adapter_nr, | ||
306 | __entry->addr, | ||
307 | __entry->flags, | ||
308 | __entry->command, | ||
309 | __print_symbolic(__entry->protocol, | ||
310 | { I2C_SMBUS_QUICK, "QUICK" }, | ||
311 | { I2C_SMBUS_BYTE, "BYTE" }, | ||
312 | { I2C_SMBUS_BYTE_DATA, "BYTE_DATA" }, | ||
313 | { I2C_SMBUS_WORD_DATA, "WORD_DATA" }, | ||
314 | { I2C_SMBUS_PROC_CALL, "PROC_CALL" }, | ||
315 | { I2C_SMBUS_BLOCK_DATA, "BLOCK_DATA" }, | ||
316 | { I2C_SMBUS_I2C_BLOCK_BROKEN, "I2C_BLOCK_BROKEN" }, | ||
317 | { I2C_SMBUS_BLOCK_PROC_CALL, "BLOCK_PROC_CALL" }, | ||
318 | { I2C_SMBUS_I2C_BLOCK_DATA, "I2C_BLOCK_DATA" }), | ||
319 | __entry->len, | ||
320 | __entry->len, __entry->buf | ||
321 | )); | ||
322 | |||
323 | /* | ||
324 | * i2c_smbus_xfer() result | ||
325 | */ | ||
326 | TRACE_EVENT(smbus_result, | ||
327 | TP_PROTO(const struct i2c_adapter *adap, | ||
328 | u16 addr, unsigned short flags, | ||
329 | char read_write, u8 command, int protocol, | ||
330 | int res), | ||
331 | TP_ARGS(adap, addr, flags, read_write, command, protocol, res), | ||
332 | TP_STRUCT__entry( | ||
333 | __field(int, adapter_nr ) | ||
334 | __field(__u16, addr ) | ||
335 | __field(__u16, flags ) | ||
336 | __field(__u8, read_write ) | ||
337 | __field(__u8, command ) | ||
338 | __field(__s16, res ) | ||
339 | __field(__u32, protocol ) | ||
340 | ), | ||
341 | TP_fast_assign( | ||
342 | __entry->adapter_nr = adap->nr; | ||
343 | __entry->addr = addr; | ||
344 | __entry->flags = flags; | ||
345 | __entry->read_write = read_write; | ||
346 | __entry->command = command; | ||
347 | __entry->protocol = protocol; | ||
348 | __entry->res = res; | ||
349 | ), | ||
350 | TP_printk("i2c-%d a=%03x f=%04x c=%x %s %s res=%d", | ||
351 | __entry->adapter_nr, | ||
352 | __entry->addr, | ||
353 | __entry->flags, | ||
354 | __entry->command, | ||
355 | __print_symbolic(__entry->protocol, | ||
356 | { I2C_SMBUS_QUICK, "QUICK" }, | ||
357 | { I2C_SMBUS_BYTE, "BYTE" }, | ||
358 | { I2C_SMBUS_BYTE_DATA, "BYTE_DATA" }, | ||
359 | { I2C_SMBUS_WORD_DATA, "WORD_DATA" }, | ||
360 | { I2C_SMBUS_PROC_CALL, "PROC_CALL" }, | ||
361 | { I2C_SMBUS_BLOCK_DATA, "BLOCK_DATA" }, | ||
362 | { I2C_SMBUS_I2C_BLOCK_BROKEN, "I2C_BLOCK_BROKEN" }, | ||
363 | { I2C_SMBUS_BLOCK_PROC_CALL, "BLOCK_PROC_CALL" }, | ||
364 | { I2C_SMBUS_I2C_BLOCK_DATA, "I2C_BLOCK_DATA" }), | ||
365 | __entry->read_write == I2C_SMBUS_WRITE ? "wr" : "rd", | ||
366 | __entry->res | ||
367 | )); | ||
368 | |||
369 | #endif /* _TRACE_I2C_H */ | ||
370 | |||
371 | /* This part must be outside protection */ | ||
372 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h index 5a4c04a75b3d..14e49c798135 100644 --- a/include/trace/events/syscalls.h +++ b/include/trace/events/syscalls.h | |||
@@ -13,9 +13,6 @@ | |||
13 | 13 | ||
14 | #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS | 14 | #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS |
15 | 15 | ||
16 | extern void syscall_regfunc(void); | ||
17 | extern void syscall_unregfunc(void); | ||
18 | |||
19 | TRACE_EVENT_FN(sys_enter, | 16 | TRACE_EVENT_FN(sys_enter, |
20 | 17 | ||
21 | TP_PROTO(struct pt_regs *regs, long id), | 18 | TP_PROTO(struct pt_regs *regs, long id), |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 8765126b328c..0a1a4f7caf09 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -470,10 +470,13 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
470 | * }; | 470 | * }; |
471 | * | 471 | * |
472 | * static struct ftrace_event_call event_<call> = { | 472 | * static struct ftrace_event_call event_<call> = { |
473 | * .name = "<call>", | ||
474 | * .class = event_class_<template>, | 473 | * .class = event_class_<template>, |
474 | * { | ||
475 | * .tp = &__tracepoint_<call>, | ||
476 | * }, | ||
475 | * .event = &ftrace_event_type_<call>, | 477 | * .event = &ftrace_event_type_<call>, |
476 | * .print_fmt = print_fmt_<call>, | 478 | * .print_fmt = print_fmt_<call>, |
479 | * .flags = TRACE_EVENT_FL_TRACEPOINT, | ||
477 | * }; | 480 | * }; |
478 | * // its only safe to use pointers when doing linker tricks to | 481 | * // its only safe to use pointers when doing linker tricks to |
479 | * // create an array. | 482 | * // create an array. |
@@ -605,10 +608,13 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \ | |||
605 | #define DEFINE_EVENT(template, call, proto, args) \ | 608 | #define DEFINE_EVENT(template, call, proto, args) \ |
606 | \ | 609 | \ |
607 | static struct ftrace_event_call __used event_##call = { \ | 610 | static struct ftrace_event_call __used event_##call = { \ |
608 | .name = #call, \ | ||
609 | .class = &event_class_##template, \ | 611 | .class = &event_class_##template, \ |
612 | { \ | ||
613 | .tp = &__tracepoint_##call, \ | ||
614 | }, \ | ||
610 | .event.funcs = &ftrace_event_type_funcs_##template, \ | 615 | .event.funcs = &ftrace_event_type_funcs_##template, \ |
611 | .print_fmt = print_fmt_##template, \ | 616 | .print_fmt = print_fmt_##template, \ |
617 | .flags = TRACE_EVENT_FL_TRACEPOINT, \ | ||
612 | }; \ | 618 | }; \ |
613 | static struct ftrace_event_call __used \ | 619 | static struct ftrace_event_call __used \ |
614 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | 620 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call |
@@ -619,10 +625,13 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | |||
619 | static const char print_fmt_##call[] = print; \ | 625 | static const char print_fmt_##call[] = print; \ |
620 | \ | 626 | \ |
621 | static struct ftrace_event_call __used event_##call = { \ | 627 | static struct ftrace_event_call __used event_##call = { \ |
622 | .name = #call, \ | ||
623 | .class = &event_class_##template, \ | 628 | .class = &event_class_##template, \ |
629 | { \ | ||
630 | .tp = &__tracepoint_##call, \ | ||
631 | }, \ | ||
624 | .event.funcs = &ftrace_event_type_funcs_##call, \ | 632 | .event.funcs = &ftrace_event_type_funcs_##call, \ |
625 | .print_fmt = print_fmt_##call, \ | 633 | .print_fmt = print_fmt_##call, \ |
634 | .flags = TRACE_EVENT_FL_TRACEPOINT, \ | ||
626 | }; \ | 635 | }; \ |
627 | static struct ftrace_event_call __used \ | 636 | static struct ftrace_event_call __used \ |
628 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call | 637 | __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 2d48fe1274ca..11917f747cb4 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
@@ -70,7 +70,6 @@ | |||
70 | #define AUDIT_TTY_SET 1017 /* Set TTY auditing status */ | 70 | #define AUDIT_TTY_SET 1017 /* Set TTY auditing status */ |
71 | #define AUDIT_SET_FEATURE 1018 /* Turn an audit feature on or off */ | 71 | #define AUDIT_SET_FEATURE 1018 /* Turn an audit feature on or off */ |
72 | #define AUDIT_GET_FEATURE 1019 /* Get which features are enabled */ | 72 | #define AUDIT_GET_FEATURE 1019 /* Get which features are enabled */ |
73 | #define AUDIT_FEATURE_CHANGE 1020 /* audit log listing feature changes */ | ||
74 | 73 | ||
75 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ | 74 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
76 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 75 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
@@ -109,6 +108,8 @@ | |||
109 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ | 108 | #define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */ |
110 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ | 109 | #define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */ |
111 | #define AUDIT_SECCOMP 1326 /* Secure Computing event */ | 110 | #define AUDIT_SECCOMP 1326 /* Secure Computing event */ |
111 | #define AUDIT_PROCTITLE 1327 /* Proctitle emit event */ | ||
112 | #define AUDIT_FEATURE_CHANGE 1328 /* audit log listing feature changes */ | ||
112 | 113 | ||
113 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 114 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
114 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 115 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
diff --git a/include/uapi/linux/capability.h b/include/uapi/linux/capability.h index ba478fa3012e..154dd6d3c8fe 100644 --- a/include/uapi/linux/capability.h +++ b/include/uapi/linux/capability.h | |||
@@ -308,8 +308,12 @@ struct vfs_cap_data { | |||
308 | 308 | ||
309 | #define CAP_LEASE 28 | 309 | #define CAP_LEASE 28 |
310 | 310 | ||
311 | /* Allow writing the audit log via unicast netlink socket */ | ||
312 | |||
311 | #define CAP_AUDIT_WRITE 29 | 313 | #define CAP_AUDIT_WRITE 29 |
312 | 314 | ||
315 | /* Allow configuration of audit via unicast netlink socket */ | ||
316 | |||
313 | #define CAP_AUDIT_CONTROL 30 | 317 | #define CAP_AUDIT_CONTROL 30 |
314 | 318 | ||
315 | #define CAP_SETFCAP 31 | 319 | #define CAP_SETFCAP 31 |
diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h index e5ab62201119..096fe1c6f83d 100644 --- a/include/uapi/linux/nvme.h +++ b/include/uapi/linux/nvme.h | |||
@@ -434,6 +434,7 @@ enum { | |||
434 | NVME_SC_REFTAG_CHECK = 0x284, | 434 | NVME_SC_REFTAG_CHECK = 0x284, |
435 | NVME_SC_COMPARE_FAILED = 0x285, | 435 | NVME_SC_COMPARE_FAILED = 0x285, |
436 | NVME_SC_ACCESS_DENIED = 0x286, | 436 | NVME_SC_ACCESS_DENIED = 0x286, |
437 | NVME_SC_DNR = 0x4000, | ||
437 | }; | 438 | }; |
438 | 439 | ||
439 | struct nvme_completion { | 440 | struct nvme_completion { |
diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 270db8914c01..9bf508ad0957 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #ifndef __V4L2_COMMON__ | 29 | #ifndef __V4L2_COMMON__ |
30 | #define __V4L2_COMMON__ | 30 | #define __V4L2_COMMON__ |
31 | 31 | ||
32 | #include <linux/types.h> | ||
33 | |||
32 | /* | 34 | /* |
33 | * | 35 | * |
34 | * Selection interface definitions | 36 | * Selection interface definitions |