aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi_dma.h5
-rw-r--r--include/linux/audit.h14
-rw-r--r--include/linux/bio.h11
-rw-r--r--include/linux/blk_types.h2
-rw-r--r--include/linux/blkdev.h17
-rw-r--r--include/linux/buffer_head.h4
-rw-r--r--include/linux/compiler-clang.h12
-rw-r--r--include/linux/compiler.h7
-rw-r--r--include/linux/cpufreq.h9
-rw-r--r--include/linux/dmaengine.h14
-rw-r--r--include/linux/dw_dmac.h5
-rw-r--r--include/linux/fdtable.h2
-rw-r--r--include/linux/fs.h97
-rw-r--r--include/linux/ftrace_event.h22
-rw-r--r--include/linux/i2c.h1
-rw-r--r--include/linux/i2c/bfin_twi.h145
-rw-r--r--include/linux/mfd/mc13xxx.h6
-rw-r--r--include/linux/mfd/rtsx_common.h1
-rw-r--r--include/linux/mfd/rtsx_pci.h8
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/mmc/core.h4
-rw-r--r--include/linux/mmc/host.h13
-rw-r--r--include/linux/mmc/sdhci-spear.h8
-rw-r--r--include/linux/mmc/sdhci.h2
-rw-r--r--include/linux/mmc/slot-gpio.h6
-rw-r--r--include/linux/mod_devicetable.h5
-rw-r--r--include/linux/mount.h3
-rw-r--r--include/linux/nbd.h3
-rw-r--r--include/linux/ntb.h19
-rw-r--r--include/linux/nvme.h21
-rw-r--r--include/linux/pipe_fs_i.h19
-rw-r--r--include/linux/platform_data/dma-rcar-audmapp.h34
-rw-r--r--include/linux/platform_data/i2c-s3c2410.h9
-rw-r--r--include/linux/platform_data/leds-s3c24xx.h9
-rw-r--r--include/linux/platform_data/mmc-msm_sdcc.h7
-rw-r--r--include/linux/platform_data/mmc-mvsdio.h6
-rw-r--r--include/linux/sched.h20
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--include/linux/sunrpc/svcsock.h3
-rw-r--r--include/linux/sunrpc/xprt.h13
-rw-r--r--include/linux/syscalls.h8
-rw-r--r--include/linux/tracepoint.h49
-rw-r--r--include/linux/uio.h52
43 files changed, 476 insertions, 222 deletions
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)
103static inline struct dma_chan *acpi_dma_request_slave_chan_by_index( 104static 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}
108static inline struct dma_chan *acpi_dma_request_slave_chan_by_name( 109static 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);
79extern int __init audit_register_class(int class, unsigned *list); 79extern int __init audit_register_class(int class, unsigned *list);
80extern int audit_classify_syscall(int abi, unsigned syscall); 80extern int audit_classify_syscall(int abi, unsigned syscall);
81extern int audit_classify_arch(int arch); 81extern int audit_classify_arch(int arch);
82/* only for compat system calls */
83extern unsigned compat_write_class[];
84extern unsigned compat_read_class[];
85extern unsigned compat_dir_class[];
86extern unsigned compat_chattr_class[];
87extern unsigned compat_signal_class[];
88
89extern 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
95extern void audit_log_session_info(struct audit_buffer *ab); 103extern 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;
388struct rq_map_data; 388struct rq_map_data;
389extern struct bio *bio_map_user_iov(struct request_queue *, 389extern 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);
392extern void bio_unmap_user(struct bio *); 392extern void bio_unmap_user(struct bio *);
393extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, 393extern 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);
414extern struct bio *bio_copy_user(struct request_queue *, struct rq_map_data *, 414extern 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);
416extern struct bio *bio_copy_user_iov(struct request_queue *, 416extern 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);
419extern int bio_uncopy_user(struct bio *); 420extern int bio_uncopy_user(struct bio *);
420void zero_fill_bio(struct bio *bio); 421void 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 *,
824extern int blk_rq_unmap_user(struct bio *); 835extern int blk_rq_unmap_user(struct bio *);
825extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, unsigned int, gfp_t); 836extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, unsigned int, gfp_t);
826extern int blk_rq_map_user_iov(struct request_queue *, struct request *, 837extern 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);
829extern int blk_execute_rq(struct request_queue *, struct gendisk *, 840extern int blk_execute_rq(struct request_queue *, struct gendisk *,
830 struct request *, int); 841 struct request *, int);
831extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, 842extern 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,
210int block_write_full_page_endio(struct page *page, get_block_t *get_block, 210int 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);
212int block_read_full_page(struct page*, get_block_t*); 212int block_read_full_page(struct page*, get_block_t*);
213int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, 213int block_is_partially_uptodate(struct page *page, unsigned long from,
214 unsigned long from); 214 unsigned long count);
215int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, 215int 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);
217int __block_write_begin(struct page *page, loff_t pos, unsigned len, 217int __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
462struct cpufreq_frequency_table { 464struct 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 */
354struct dma_slave_config { 350struct 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 */
50struct dw_dma_platform_data { 47struct 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;
63struct vfsmount; 63struct vfsmount;
64struct dentry; 64struct dentry;
65 65
66extern 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;
48struct swap_info_struct; 48struct swap_info_struct;
49struct seq_file; 49struct seq_file;
50struct workqueue_struct; 50struct workqueue_struct;
51struct iov_iter;
51 52
52extern void __init inode_init(void); 53extern void __init inode_init(void);
53extern void __init inode_init_early(void); 54extern 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;
293struct address_space; 296struct address_space;
294struct writeback_control; 297struct writeback_control;
295 298
296struct iov_iter {
297 const struct iovec *iov;
298 unsigned long nr_segs;
299 size_t iov_offset;
300 size_t count;
301};
302
303size_t iov_iter_copy_from_user_atomic(struct page *page,
304 struct iov_iter *i, unsigned long offset, size_t bytes);
305size_t iov_iter_copy_from_user(struct page *page,
306 struct iov_iter *i, unsigned long offset, size_t bytes);
307void iov_iter_advance(struct iov_iter *i, size_t bytes);
308int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
309size_t iov_iter_single_seg_count(const struct iov_iter *i);
310
311static 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
323static 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
776struct file { 744struct 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
818struct file_handle { 783struct 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
834static 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}
839static inline void file_release_write(struct file *f)
840{
841 f->f_mnt_write_state |= FILE_MNT_WRITE_RELEASED;
842}
843static inline void file_reset_write(struct file *f)
844{
845 f->f_mnt_write_state = 0;
846}
847static 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}
856static 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 */
866static inline void file_take_write(struct file *filp) {}
867static inline void file_release_write(struct file *filp) {}
868static inline void file_reset_write(struct file *filp) {}
869static inline void file_check_state(struct file *filp) {}
870static 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 *);
2481extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); 2403extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
2482extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr, 2404extern 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);
2484extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
2485int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); 2406int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
2486extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); 2407extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
2487extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, 2408extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long);
2488 loff_t *);
2489extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); 2409extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
2490extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, 2410extern 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);
2492extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, 2412extern ssize_t generic_perform_write(struct file *, struct iov_iter *, loff_t);
2493 unsigned long, loff_t, loff_t *, size_t, ssize_t);
2494extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); 2413extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
2495extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); 2414extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
2496extern int generic_segment_checks(const struct iovec *iov, 2415extern 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
2585extern int vfs_readlink(struct dentry *, char __user *, int, const char *); 2504extern int readlink_copy(char __user *, int, const char *);
2586extern int page_readlink(struct dentry *, char __user *, int); 2505extern int page_readlink(struct dentry *, char __user *, int);
2587extern void *page_follow_link_light(struct dentry *, struct nameidata *); 2506extern void *page_follow_link_light(struct dentry *, struct nameidata *);
2588extern void page_put_link(struct dentry *, struct nameidata *, void *); 2507extern 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
11struct trace_array; 12struct trace_array;
12struct trace_buffer; 13struct 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 */
248enum { 251enum {
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
257struct ftrace_event_call { 261struct 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
295static inline const char *
296ftrace_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
286struct trace_array; 304struct trace_array;
287struct ftrace_subsystem_dir; 305struct 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 */
18struct 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
54struct 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
109struct mc13xxx_led_platform_data { 112struct 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;
45struct rtsx_slot { 45struct 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);
943int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); 943int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout);
944int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, 944int 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);
946int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,
947 int num_sg, bool read);
948int rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,
949 int num_sg, bool read);
950int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist,
951 int sg_count, bool read);
946int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); 952int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
947int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); 953int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
948int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); 954int 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);
1204int set_page_dirty(struct page *page); 1204int set_page_dirty(struct page *page);
1205int set_page_dirty_lock(struct page *page); 1205int set_page_dirty_lock(struct page *page);
1206int clear_page_dirty_for_io(struct page *page); 1206int clear_page_dirty_for_io(struct page *page);
1207int 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? */
1209static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) 1210static 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);
153extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); 153extern void mmc_start_bkops(struct mmc_card *card, bool from_exception);
154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, 154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool,
155 bool); 155 bool, bool);
156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); 156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
157extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd); 157extern 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);
388void mmc_detect_change(struct mmc_host *, unsigned long delay); 384void mmc_detect_change(struct mmc_host *, unsigned long delay);
389void mmc_request_done(struct mmc_host *, struct mmc_request *); 385void mmc_request_done(struct mmc_host *, struct mmc_request *);
390 386
391int mmc_cache_ctrl(struct mmc_host *, u8);
392
393static inline void mmc_signal_sdio_irq(struct mmc_host *host) 387static 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
425int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); 419int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *);
426 420
427/* Module parameter */
428extern bool mmc_assume_removable;
429
430static inline int mmc_card_is_removable(struct mmc_host *host) 421static 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
435static inline int mmc_card_keep_power(struct mmc_host *host) 426static 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 */
28struct sdhci_plat_data { 23struct 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);
23void mmc_gpio_free_cd(struct mmc_host *host); 23void mmc_gpio_free_cd(struct mmc_host *host);
24 24
25int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
26 unsigned int idx, bool override_active_level,
27 unsigned int debounce);
28void mmc_gpiod_free_cd(struct mmc_host *host);
29void 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
559struct x86_cpu_id { 564struct 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
55struct vfsmount { 58struct 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;
24struct nbd_device { 24struct 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
51struct ntb_client { 51struct 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
57enum {
58 NTB_LINK_DOWN = 0,
59 NTB_LINK_UP,
55}; 60};
56 61
57int ntb_register_client(struct ntb_client *drvr); 62int ntb_register_client(struct ntb_client *drvr);
@@ -60,11 +65,11 @@ int ntb_register_client_dev(char *device_name);
60void ntb_unregister_client_dev(char *device_name); 65void ntb_unregister_client_dev(char *device_name);
61 66
62struct ntb_queue_handlers { 67struct 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
70unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp); 75unsigned 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) 69extern 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 */
74struct nvme_dev { 75struct 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 */
147void nvme_free_iod(struct nvme_dev *dev, struct nvme_iod *iod); 154void nvme_free_iod(struct nvme_dev *dev, struct nvme_iod *iod);
148 155
149int nvme_setup_prps(struct nvme_dev *dev, struct nvme_common_command *cmd, 156int nvme_setup_prps(struct nvme_dev *, struct nvme_iod *, int , gfp_t);
150 struct nvme_iod *iod, int total_len, gfp_t gfp);
151struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write, 157struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write,
152 unsigned long addr, unsigned length); 158 unsigned long addr, unsigned length);
153void nvme_unmap_user_pages(struct nvme_dev *dev, int write, 159void nvme_unmap_user_pages(struct nvme_dev *dev, int write,
154 struct nvme_iod *iod); 160 struct nvme_iod *iod);
155struct nvme_queue *get_nvmeq(struct nvme_dev *dev); 161int nvme_submit_io_cmd(struct nvme_dev *, struct nvme_command *, u32 *);
156void put_nvmeq(struct nvme_queue *nvmeq);
157int nvme_submit_sync_cmd(struct nvme_queue *nvmeq, struct nvme_command *cmd,
158 u32 *result, unsigned timeout);
159int nvme_submit_flush_data(struct nvme_queue *nvmeq, struct nvme_ns *ns); 162int nvme_submit_flush_data(struct nvme_queue *nvmeq, struct nvme_ns *ns);
160int nvme_submit_admin_cmd(struct nvme_dev *, struct nvme_command *, 163int 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);
150void free_pipe_info(struct pipe_inode_info *); 133void free_pipe_info(struct pipe_inode_info *);
151 134
152/* Generic pipe buffer ops functions */ 135/* Generic pipe buffer ops functions */
153void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
154void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *);
155void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); 136void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
156int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); 137int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
157int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); 138int 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
22struct audmapp_slave_config {
23 int slave_id;
24 dma_addr_t src;
25 dma_addr_t dst;
26 u32 chcr;
27};
28
29struct 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
77extern struct s3c2410_platform_i2c default_i2c_data; 76extern 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
1722static inline int pid_alive(const struct task_struct *p);
1723static 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
1735static inline pid_t task_ppid_nr(const struct task_struct *tsk)
1736{
1737 return task_ppid_nr_ns(tsk, &init_pid_ns);
1738}
1739
1722static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, 1740static 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 */
1761static inline int pid_alive(struct task_struct *p) 1779static 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
132struct rpc_clnt *rpc_create(struct rpc_create_args *args); 132struct rpc_clnt *rpc_create(struct rpc_create_args *args);
133struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
134 struct rpc_xprt *xprt);
133struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, 135struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
134 const struct rpc_program *, u32); 136 const struct rpc_program *, u32);
135void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); 137void 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);
56int svc_send(struct svc_rqst *); 56int svc_send(struct svc_rqst *);
57void svc_drop(struct svc_rqst *); 57void svc_drop(struct svc_rqst *);
58void svc_sock_update_bufs(struct svc_serv *serv); 58void svc_sock_update_bufs(struct svc_serv *serv);
59bool svc_alien_sock(struct net *net, int fd);
59int svc_addsock(struct svc_serv *serv, const int fd, 60int 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);
61void svc_init_xprt_sock(void); 62void 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);
295void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); 295void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task);
296void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); 296void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task);
297void xprt_release(struct rpc_task *task); 297void xprt_release(struct rpc_task *task);
298struct rpc_xprt * xprt_get(struct rpc_xprt *xprt);
299void xprt_put(struct rpc_xprt *xprt); 298void xprt_put(struct rpc_xprt *xprt);
300struct rpc_xprt * xprt_alloc(struct net *net, size_t size, 299struct 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);
303void xprt_free(struct rpc_xprt *); 302void 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 */
309static 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
305static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) 316static 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
22struct module; 22struct module;
23struct tracepoint; 23struct tracepoint;
24struct notifier_block;
24 25
25struct tracepoint_func { 26struct 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 */
42extern 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 */
48extern int 39extern int
49tracepoint_probe_unregister(const char *name, void *probe, void *data); 40tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data);
41extern int
42tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data);
43extern void
44for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv),
45 void *priv);
50 46
51#ifdef CONFIG_MODULES 47#ifdef CONFIG_MODULES
52struct tp_module { 48struct 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
57bool trace_module_has_bad_taint(struct module *mod); 53bool trace_module_has_bad_taint(struct module *mod);
54extern int register_tracepoint_module_notifier(struct notifier_block *nb);
55extern int unregister_tracepoint_module_notifier(struct notifier_block *nb);
58#else 56#else
59static inline bool trace_module_has_bad_taint(struct module *mod) 57static inline bool trace_module_has_bad_taint(struct module *mod)
60{ 58{
61 return false; 59 return false;
62} 60}
61static inline
62int register_tracepoint_module_notifier(struct notifier_block *nb)
63{
64 return 0;
65}
66static inline
67int 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
84extern void syscall_regfunc(void);
85extern 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
15struct page;
14 16
15struct kvec { 17struct 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
22struct 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
46static 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
37unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); 61unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
38 62
63size_t iov_iter_copy_from_user_atomic(struct page *page,
64 struct iov_iter *i, unsigned long offset, size_t bytes);
65size_t iov_iter_copy_from_user(struct page *page,
66 struct iov_iter *i, unsigned long offset, size_t bytes);
67void iov_iter_advance(struct iov_iter *i, size_t bytes);
68int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
69size_t iov_iter_single_seg_count(const struct iov_iter *i);
70size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
71 struct iov_iter *i);
72
73static 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
85static inline size_t iov_iter_count(struct iov_iter *i)
86{
87 return i->count;
88}
89
39int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); 90int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
40int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); 91int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
92
41#endif 93#endif