diff options
Diffstat (limited to 'include/linux')
54 files changed, 468 insertions, 200 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index aa865a9a4c4f..ec1464df4c60 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -43,6 +43,7 @@ struct mq_attr; | |||
| 43 | struct mqstat; | 43 | struct mqstat; |
| 44 | struct audit_watch; | 44 | struct audit_watch; |
| 45 | struct audit_tree; | 45 | struct audit_tree; |
| 46 | struct sk_buff; | ||
| 46 | 47 | ||
| 47 | struct audit_krule { | 48 | struct audit_krule { |
| 48 | int vers_ops; | 49 | int vers_ops; |
| @@ -463,7 +464,7 @@ extern int audit_filter_user(int type); | |||
| 463 | extern int audit_filter_type(int type); | 464 | extern int audit_filter_type(int type); |
| 464 | extern int audit_rule_change(int type, __u32 portid, int seq, | 465 | extern int audit_rule_change(int type, __u32 portid, int seq, |
| 465 | void *data, size_t datasz); | 466 | void *data, size_t datasz); |
| 466 | extern int audit_list_rules_send(__u32 portid, int seq); | 467 | extern int audit_list_rules_send(struct sk_buff *request_skb, int seq); |
| 467 | 468 | ||
| 468 | extern u32 audit_enabled; | 469 | extern u32 audit_enabled; |
| 469 | #else /* CONFIG_AUDIT */ | 470 | #else /* CONFIG_AUDIT */ |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index fd8bf3219ef7..b4a745d7d9a9 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -115,7 +115,6 @@ extern int copy_strings_kernel(int argc, const char *const *argv, | |||
| 115 | extern int prepare_bprm_creds(struct linux_binprm *bprm); | 115 | extern int prepare_bprm_creds(struct linux_binprm *bprm); |
| 116 | extern void install_exec_creds(struct linux_binprm *bprm); | 116 | extern void install_exec_creds(struct linux_binprm *bprm); |
| 117 | extern void set_binfmt(struct linux_binfmt *new); | 117 | extern void set_binfmt(struct linux_binfmt *new); |
| 118 | extern void free_bprm(struct linux_binprm *); | ||
| 119 | extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t); | 118 | extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t); |
| 120 | 119 | ||
| 121 | #endif /* _LINUX_BINFMTS_H */ | 120 | #endif /* _LINUX_BINFMTS_H */ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 70654521dab6..5a4d39b4686b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -250,6 +250,17 @@ static inline unsigned bio_segments(struct bio *bio) | |||
| 250 | struct bio_vec bv; | 250 | struct bio_vec bv; |
| 251 | struct bvec_iter iter; | 251 | struct bvec_iter iter; |
| 252 | 252 | ||
| 253 | /* | ||
| 254 | * We special case discard/write same, because they interpret bi_size | ||
| 255 | * differently: | ||
| 256 | */ | ||
| 257 | |||
| 258 | if (bio->bi_rw & REQ_DISCARD) | ||
| 259 | return 1; | ||
| 260 | |||
| 261 | if (bio->bi_rw & REQ_WRITE_SAME) | ||
| 262 | return 1; | ||
| 263 | |||
| 253 | bio_for_each_segment(bv, bio, iter) | 264 | bio_for_each_segment(bv, bio, iter) |
| 254 | segs++; | 265 | segs++; |
| 255 | 266 | ||
| @@ -332,6 +343,7 @@ extern struct bio *bio_clone_fast(struct bio *, gfp_t, struct bio_set *); | |||
| 332 | extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs); | 343 | extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs); |
| 333 | 344 | ||
| 334 | extern struct bio_set *fs_bio_set; | 345 | extern struct bio_set *fs_bio_set; |
| 346 | unsigned int bio_integrity_tag_size(struct bio *bio); | ||
| 335 | 347 | ||
| 336 | static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs) | 348 | static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs) |
| 337 | { | 349 | { |
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 161b23105b1e..2ff2e8d982be 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -83,6 +83,8 @@ struct blk_mq_ops { | |||
| 83 | */ | 83 | */ |
| 84 | rq_timed_out_fn *timeout; | 84 | rq_timed_out_fn *timeout; |
| 85 | 85 | ||
| 86 | softirq_done_fn *complete; | ||
| 87 | |||
| 86 | /* | 88 | /* |
| 87 | * Override for hctx allocations (should probably go) | 89 | * Override for hctx allocations (should probably go) |
| 88 | */ | 90 | */ |
| @@ -119,11 +121,11 @@ void blk_mq_init_commands(struct request_queue *, void (*init)(void *data, struc | |||
| 119 | 121 | ||
| 120 | void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); | 122 | void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule); |
| 121 | 123 | ||
| 122 | void blk_mq_insert_request(struct request_queue *, struct request *, bool); | 124 | void blk_mq_insert_request(struct request *, bool, bool, bool); |
| 123 | void blk_mq_run_queues(struct request_queue *q, bool async); | 125 | void blk_mq_run_queues(struct request_queue *q, bool async); |
| 124 | void blk_mq_free_request(struct request *rq); | 126 | void blk_mq_free_request(struct request *rq); |
| 125 | bool blk_mq_can_queue(struct blk_mq_hw_ctx *); | 127 | bool blk_mq_can_queue(struct blk_mq_hw_ctx *); |
| 126 | struct request *blk_mq_alloc_request(struct request_queue *q, int rw, gfp_t gfp, bool reserved); | 128 | struct request *blk_mq_alloc_request(struct request_queue *q, int rw, gfp_t gfp); |
| 127 | struct request *blk_mq_alloc_reserved_request(struct request_queue *q, int rw, gfp_t gfp); | 129 | struct request *blk_mq_alloc_reserved_request(struct request_queue *q, int rw, gfp_t gfp); |
| 128 | struct request *blk_mq_rq_from_tag(struct request_queue *q, unsigned int tag); | 130 | struct request *blk_mq_rq_from_tag(struct request_queue *q, unsigned int tag); |
| 129 | 131 | ||
| @@ -131,7 +133,15 @@ struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_ind | |||
| 131 | struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_reg *, unsigned int); | 133 | struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_reg *, unsigned int); |
| 132 | void blk_mq_free_single_hw_queue(struct blk_mq_hw_ctx *, unsigned int); | 134 | void blk_mq_free_single_hw_queue(struct blk_mq_hw_ctx *, unsigned int); |
| 133 | 135 | ||
| 134 | void blk_mq_end_io(struct request *rq, int error); | 136 | bool blk_mq_end_io_partial(struct request *rq, int error, |
| 137 | unsigned int nr_bytes); | ||
| 138 | static inline void blk_mq_end_io(struct request *rq, int error) | ||
| 139 | { | ||
| 140 | bool done = !blk_mq_end_io_partial(rq, error, blk_rq_bytes(rq)); | ||
| 141 | BUG_ON(!done); | ||
| 142 | } | ||
| 143 | |||
| 144 | void blk_mq_complete_request(struct request *rq); | ||
| 135 | 145 | ||
| 136 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx); | 146 | void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx); |
| 137 | void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx); | 147 | void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8678c4322b44..4afa4f8f6090 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -98,7 +98,7 @@ struct request { | |||
| 98 | struct list_head queuelist; | 98 | struct list_head queuelist; |
| 99 | union { | 99 | union { |
| 100 | struct call_single_data csd; | 100 | struct call_single_data csd; |
| 101 | struct work_struct mq_flush_data; | 101 | struct work_struct mq_flush_work; |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | struct request_queue *q; | 104 | struct request_queue *q; |
| @@ -448,13 +448,8 @@ struct request_queue { | |||
| 448 | unsigned long flush_pending_since; | 448 | unsigned long flush_pending_since; |
| 449 | struct list_head flush_queue[2]; | 449 | struct list_head flush_queue[2]; |
| 450 | struct list_head flush_data_in_flight; | 450 | struct list_head flush_data_in_flight; |
| 451 | union { | 451 | struct request *flush_rq; |
| 452 | struct request flush_rq; | 452 | spinlock_t mq_flush_lock; |
| 453 | struct { | ||
| 454 | spinlock_t mq_flush_lock; | ||
| 455 | struct work_struct mq_flush_work; | ||
| 456 | }; | ||
| 457 | }; | ||
| 458 | 453 | ||
| 459 | struct mutex sysfs_lock; | 454 | struct mutex sysfs_lock; |
| 460 | 455 | ||
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h index 2f0543f7510c..f9bbbb472663 100644 --- a/include/linux/can/skb.h +++ b/include/linux/can/skb.h | |||
| @@ -11,7 +11,9 @@ | |||
| 11 | #define CAN_SKB_H | 11 | #define CAN_SKB_H |
| 12 | 12 | ||
| 13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 14 | #include <linux/skbuff.h> | ||
| 14 | #include <linux/can.h> | 15 | #include <linux/can.h> |
| 16 | #include <net/sock.h> | ||
| 15 | 17 | ||
| 16 | /* | 18 | /* |
| 17 | * The struct can_skb_priv is used to transport additional information along | 19 | * The struct can_skb_priv is used to transport additional information along |
| @@ -42,4 +44,40 @@ static inline void can_skb_reserve(struct sk_buff *skb) | |||
| 42 | skb_reserve(skb, sizeof(struct can_skb_priv)); | 44 | skb_reserve(skb, sizeof(struct can_skb_priv)); |
| 43 | } | 45 | } |
| 44 | 46 | ||
| 47 | static inline void can_skb_destructor(struct sk_buff *skb) | ||
| 48 | { | ||
| 49 | sock_put(skb->sk); | ||
| 50 | } | ||
| 51 | |||
| 52 | static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) | ||
| 53 | { | ||
| 54 | if (sk) { | ||
| 55 | sock_hold(sk); | ||
| 56 | skb->destructor = can_skb_destructor; | ||
| 57 | skb->sk = sk; | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | /* | ||
| 62 | * returns an unshared skb owned by the original sock to be echo'ed back | ||
| 63 | */ | ||
| 64 | static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb) | ||
| 65 | { | ||
| 66 | if (skb_shared(skb)) { | ||
| 67 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); | ||
| 68 | |||
| 69 | if (likely(nskb)) { | ||
| 70 | can_skb_set_owner(nskb, skb->sk); | ||
| 71 | consume_skb(skb); | ||
| 72 | return nskb; | ||
| 73 | } else { | ||
| 74 | kfree_skb(skb); | ||
| 75 | return NULL; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 | /* we can assume to have an unshared skb with proper owner */ | ||
| 80 | return skb; | ||
| 81 | } | ||
| 82 | |||
| 45 | #endif /* CAN_SKB_H */ | 83 | #endif /* CAN_SKB_H */ |
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index 2623cffc73a1..25bfb0eff772 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
| @@ -373,8 +373,9 @@ extern const char *ceph_mds_op_name(int op); | |||
| 373 | /* | 373 | /* |
| 374 | * Ceph setxattr request flags. | 374 | * Ceph setxattr request flags. |
| 375 | */ | 375 | */ |
| 376 | #define CEPH_XATTR_CREATE 1 | 376 | #define CEPH_XATTR_CREATE (1 << 0) |
| 377 | #define CEPH_XATTR_REPLACE 2 | 377 | #define CEPH_XATTR_REPLACE (1 << 1) |
| 378 | #define CEPH_XATTR_REMOVE (1 << 31) | ||
| 378 | 379 | ||
| 379 | union ceph_mds_request_args { | 380 | union ceph_mds_request_args { |
| 380 | struct { | 381 | struct { |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 5c097596104b..9450f025fe0c 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -166,6 +166,8 @@ struct cgroup { | |||
| 166 | * | 166 | * |
| 167 | * The ID of the root cgroup is always 0, and a new cgroup | 167 | * The ID of the root cgroup is always 0, and a new cgroup |
| 168 | * will be assigned with a smallest available ID. | 168 | * will be assigned with a smallest available ID. |
| 169 | * | ||
| 170 | * Allocating/Removing ID must be protected by cgroup_mutex. | ||
| 169 | */ | 171 | */ |
| 170 | int id; | 172 | int id; |
| 171 | 173 | ||
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 092b64168d7f..4a21a872dbbd 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h | |||
| @@ -245,6 +245,10 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, | |||
| 245 | void omap2_init_clk_clkdm(struct clk_hw *clk); | 245 | void omap2_init_clk_clkdm(struct clk_hw *clk); |
| 246 | unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, | 246 | unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, |
| 247 | unsigned long parent_rate); | 247 | unsigned long parent_rate); |
| 248 | int omap3_clkoutx2_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 249 | unsigned long parent_rate); | ||
| 250 | long omap3_clkoutx2_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 251 | unsigned long *prate); | ||
| 248 | int omap2_clkops_enable_clkdm(struct clk_hw *hw); | 252 | int omap2_clkops_enable_clkdm(struct clk_hw *hw); |
| 249 | void omap2_clkops_disable_clkdm(struct clk_hw *hw); | 253 | void omap2_clkops_disable_clkdm(struct clk_hw *hw); |
| 250 | int omap2_clk_disable_autoidle_all(void); | 254 | int omap2_clk_disable_autoidle_all(void); |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index ded429966c1f..2507fd2a1eb4 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -75,11 +75,7 @@ | |||
| 75 | * | 75 | * |
| 76 | * (asm goto is automatically volatile - the naming reflects this.) | 76 | * (asm goto is automatically volatile - the naming reflects this.) |
| 77 | */ | 77 | */ |
| 78 | #if GCC_VERSION <= 40801 | 78 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) |
| 79 | # define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
| 80 | #else | ||
| 81 | # define asm_volatile_goto(x...) do { asm goto(x); } while (0) | ||
| 82 | #endif | ||
| 83 | 79 | ||
| 84 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | 80 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP |
| 85 | #if GCC_VERSION >= 40400 | 81 | #if GCC_VERSION >= 40400 |
diff --git a/include/linux/device.h b/include/linux/device.h index 952b01033c32..ec1b6e21f0ef 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -626,6 +626,7 @@ static inline void *devm_kcalloc(struct device *dev, | |||
| 626 | return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO); | 626 | return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO); |
| 627 | } | 627 | } |
| 628 | extern void devm_kfree(struct device *dev, void *p); | 628 | extern void devm_kfree(struct device *dev, void *p); |
| 629 | extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp); | ||
| 629 | 630 | ||
| 630 | void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); | 631 | void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); |
| 631 | void __iomem *devm_request_and_ioremap(struct device *dev, | 632 | void __iomem *devm_request_and_ioremap(struct device *dev, |
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index dfac5ed31120..f886985a28b2 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
| @@ -171,7 +171,7 @@ struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, | |||
| 171 | size_t size, int flags, const char *); | 171 | size_t size, int flags, const char *); |
| 172 | 172 | ||
| 173 | #define dma_buf_export(priv, ops, size, flags) \ | 173 | #define dma_buf_export(priv, ops, size, flags) \ |
| 174 | dma_buf_export_named(priv, ops, size, flags, __FILE__) | 174 | dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME) |
| 175 | 175 | ||
| 176 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); | 176 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); |
| 177 | struct dma_buf *dma_buf_get(int fd); | 177 | struct dma_buf *dma_buf_get(int fd); |
diff --git a/include/linux/file.h b/include/linux/file.h index cbacf4faf447..4d69123377a2 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
| @@ -28,33 +28,36 @@ static inline void fput_light(struct file *file, int fput_needed) | |||
| 28 | 28 | ||
| 29 | struct fd { | 29 | struct fd { |
| 30 | struct file *file; | 30 | struct file *file; |
| 31 | int need_put; | 31 | unsigned int flags; |
| 32 | }; | 32 | }; |
| 33 | #define FDPUT_FPUT 1 | ||
| 34 | #define FDPUT_POS_UNLOCK 2 | ||
| 33 | 35 | ||
| 34 | static inline void fdput(struct fd fd) | 36 | static inline void fdput(struct fd fd) |
| 35 | { | 37 | { |
| 36 | if (fd.need_put) | 38 | if (fd.flags & FDPUT_FPUT) |
| 37 | fput(fd.file); | 39 | fput(fd.file); |
| 38 | } | 40 | } |
| 39 | 41 | ||
| 40 | extern struct file *fget(unsigned int fd); | 42 | extern struct file *fget(unsigned int fd); |
| 41 | extern struct file *fget_light(unsigned int fd, int *fput_needed); | 43 | extern struct file *fget_raw(unsigned int fd); |
| 44 | extern unsigned long __fdget(unsigned int fd); | ||
| 45 | extern unsigned long __fdget_raw(unsigned int fd); | ||
| 46 | extern unsigned long __fdget_pos(unsigned int fd); | ||
| 42 | 47 | ||
| 43 | static inline struct fd fdget(unsigned int fd) | 48 | static inline struct fd __to_fd(unsigned long v) |
| 44 | { | 49 | { |
| 45 | int b; | 50 | return (struct fd){(struct file *)(v & ~3),v & 3}; |
| 46 | struct file *f = fget_light(fd, &b); | ||
| 47 | return (struct fd){f,b}; | ||
| 48 | } | 51 | } |
| 49 | 52 | ||
| 50 | extern struct file *fget_raw(unsigned int fd); | 53 | static inline struct fd fdget(unsigned int fd) |
| 51 | extern struct file *fget_raw_light(unsigned int fd, int *fput_needed); | 54 | { |
| 55 | return __to_fd(__fdget(fd)); | ||
| 56 | } | ||
| 52 | 57 | ||
| 53 | static inline struct fd fdget_raw(unsigned int fd) | 58 | static inline struct fd fdget_raw(unsigned int fd) |
| 54 | { | 59 | { |
| 55 | int b; | 60 | return __to_fd(__fdget_raw(fd)); |
| 56 | struct file *f = fget_raw_light(fd, &b); | ||
| 57 | return (struct fd){f,b}; | ||
| 58 | } | 61 | } |
| 59 | 62 | ||
| 60 | extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); | 63 | extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 5d7782e42b8f..c3683bdf28fe 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -200,6 +200,7 @@ struct fw_device { | |||
| 200 | unsigned irmc:1; | 200 | unsigned irmc:1; |
| 201 | unsigned bc_implemented:2; | 201 | unsigned bc_implemented:2; |
| 202 | 202 | ||
| 203 | work_func_t workfn; | ||
| 203 | struct delayed_work work; | 204 | struct delayed_work work; |
| 204 | struct fw_attribute_group attribute_group; | 205 | struct fw_attribute_group attribute_group; |
| 205 | }; | 206 | }; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 09f553c59813..23b2a35d712e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -123,6 +123,9 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
| 123 | /* File is opened with O_PATH; almost nothing can be done with it */ | 123 | /* File is opened with O_PATH; almost nothing can be done with it */ |
| 124 | #define FMODE_PATH ((__force fmode_t)0x4000) | 124 | #define FMODE_PATH ((__force fmode_t)0x4000) |
| 125 | 125 | ||
| 126 | /* File needs atomic accesses to f_pos */ | ||
| 127 | #define FMODE_ATOMIC_POS ((__force fmode_t)0x8000) | ||
| 128 | |||
| 126 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 129 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
| 127 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 130 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
| 128 | 131 | ||
| @@ -780,13 +783,14 @@ struct file { | |||
| 780 | const struct file_operations *f_op; | 783 | const struct file_operations *f_op; |
| 781 | 784 | ||
| 782 | /* | 785 | /* |
| 783 | * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR. | 786 | * Protects f_ep_links, f_flags. |
| 784 | * Must not be taken from IRQ context. | 787 | * Must not be taken from IRQ context. |
| 785 | */ | 788 | */ |
| 786 | spinlock_t f_lock; | 789 | spinlock_t f_lock; |
| 787 | atomic_long_t f_count; | 790 | atomic_long_t f_count; |
| 788 | unsigned int f_flags; | 791 | unsigned int f_flags; |
| 789 | fmode_t f_mode; | 792 | fmode_t f_mode; |
| 793 | struct mutex f_pos_lock; | ||
| 790 | loff_t f_pos; | 794 | loff_t f_pos; |
| 791 | struct fown_struct f_owner; | 795 | struct fown_struct f_owner; |
| 792 | const struct cred *f_cred; | 796 | const struct cred *f_cred; |
| @@ -808,7 +812,7 @@ struct file { | |||
| 808 | #ifdef CONFIG_DEBUG_WRITECOUNT | 812 | #ifdef CONFIG_DEBUG_WRITECOUNT |
| 809 | unsigned long f_mnt_write_state; | 813 | unsigned long f_mnt_write_state; |
| 810 | #endif | 814 | #endif |
| 811 | }; | 815 | } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ |
| 812 | 816 | ||
| 813 | struct file_handle { | 817 | struct file_handle { |
| 814 | __u32 handle_bytes; | 818 | __u32 handle_bytes; |
| @@ -2079,6 +2083,7 @@ extern struct file * dentry_open(const struct path *, int, const struct cred *); | |||
| 2079 | extern int filp_close(struct file *, fl_owner_t id); | 2083 | extern int filp_close(struct file *, fl_owner_t id); |
| 2080 | 2084 | ||
| 2081 | extern struct filename *getname(const char __user *); | 2085 | extern struct filename *getname(const char __user *); |
| 2086 | extern struct filename *getname_kernel(const char *); | ||
| 2082 | 2087 | ||
| 2083 | enum { | 2088 | enum { |
| 2084 | FILE_CREATED = 1, | 2089 | FILE_CREATED = 1, |
| @@ -2273,7 +2278,13 @@ extern int filemap_fdatawrite_range(struct address_space *mapping, | |||
| 2273 | extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, | 2278 | extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, |
| 2274 | int datasync); | 2279 | int datasync); |
| 2275 | extern int vfs_fsync(struct file *file, int datasync); | 2280 | extern int vfs_fsync(struct file *file, int datasync); |
| 2276 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); | 2281 | static inline int generic_write_sync(struct file *file, loff_t pos, loff_t count) |
| 2282 | { | ||
| 2283 | if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host)) | ||
| 2284 | return 0; | ||
| 2285 | return vfs_fsync_range(file, pos, pos + count - 1, | ||
| 2286 | (file->f_flags & __O_SYNC) ? 0 : 1); | ||
| 2287 | } | ||
| 2277 | extern void emergency_sync(void); | 2288 | extern void emergency_sync(void); |
| 2278 | extern void emergency_remount(void); | 2289 | extern void emergency_remount(void); |
| 2279 | #ifdef CONFIG_BLOCK | 2290 | #ifdef CONFIG_BLOCK |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 3d286ff49ab0..64cf3ef50696 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -99,7 +99,7 @@ struct fsnotify_ops { | |||
| 99 | struct fsnotify_mark *inode_mark, | 99 | struct fsnotify_mark *inode_mark, |
| 100 | struct fsnotify_mark *vfsmount_mark, | 100 | struct fsnotify_mark *vfsmount_mark, |
| 101 | u32 mask, void *data, int data_type, | 101 | u32 mask, void *data, int data_type, |
| 102 | const unsigned char *file_name); | 102 | const unsigned char *file_name, u32 cookie); |
| 103 | void (*free_group_priv)(struct fsnotify_group *group); | 103 | void (*free_group_priv)(struct fsnotify_group *group); |
| 104 | void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group); | 104 | void (*freeing_mark)(struct fsnotify_mark *mark, struct fsnotify_group *group); |
| 105 | void (*free_event)(struct fsnotify_event *event); | 105 | void (*free_event)(struct fsnotify_event *event); |
| @@ -160,7 +160,7 @@ struct fsnotify_group { | |||
| 160 | 160 | ||
| 161 | struct fasync_struct *fsn_fa; /* async notification */ | 161 | struct fasync_struct *fsn_fa; /* async notification */ |
| 162 | 162 | ||
| 163 | struct fsnotify_event overflow_event; /* Event we queue when the | 163 | struct fsnotify_event *overflow_event; /* Event we queue when the |
| 164 | * notification list is too | 164 | * notification list is too |
| 165 | * full */ | 165 | * full */ |
| 166 | 166 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 4e4cc28623ad..4cdb3a17bcb5 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -495,10 +495,6 @@ enum { | |||
| 495 | FILTER_TRACE_FN, | 495 | FILTER_TRACE_FN, |
| 496 | }; | 496 | }; |
| 497 | 497 | ||
| 498 | #define EVENT_STORAGE_SIZE 128 | ||
| 499 | extern struct mutex event_storage_mutex; | ||
| 500 | extern char event_storage[EVENT_STORAGE_SIZE]; | ||
| 501 | |||
| 502 | extern int trace_event_raw_init(struct ftrace_event_call *call); | 498 | extern int trace_event_raw_init(struct ftrace_event_call *call); |
| 503 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, | 499 | extern int trace_define_field(struct ftrace_event_call *call, const char *type, |
| 504 | const char *name, int offset, int size, | 500 | const char *name, int offset, int size, |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 0437439bc047..39b81dc7d01a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -123,6 +123,10 @@ struct vm_area_struct; | |||
| 123 | __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ | 123 | __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ |
| 124 | __GFP_NO_KSWAPD) | 124 | __GFP_NO_KSWAPD) |
| 125 | 125 | ||
| 126 | /* | ||
| 127 | * GFP_THISNODE does not perform any reclaim, you most likely want to | ||
| 128 | * use __GFP_THISNODE to allocate from a given node without fallback! | ||
| 129 | */ | ||
| 126 | #ifdef CONFIG_NUMA | 130 | #ifdef CONFIG_NUMA |
| 127 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 131 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
| 128 | #else | 132 | #else |
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 4d34dbbbad4d..7a8144fef406 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
| @@ -4,8 +4,6 @@ | |||
| 4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
| 5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_GPIOLIB | ||
| 8 | |||
| 9 | struct device; | 7 | struct device; |
| 10 | struct gpio_chip; | 8 | struct gpio_chip; |
| 11 | 9 | ||
| @@ -18,6 +16,8 @@ struct gpio_chip; | |||
| 18 | */ | 16 | */ |
| 19 | struct gpio_desc; | 17 | struct gpio_desc; |
| 20 | 18 | ||
| 19 | #ifdef CONFIG_GPIOLIB | ||
| 20 | |||
| 21 | /* Acquire and dispose GPIOs */ | 21 | /* Acquire and dispose GPIOs */ |
| 22 | struct gpio_desc *__must_check gpiod_get(struct device *dev, | 22 | struct gpio_desc *__must_check gpiod_get(struct device *dev, |
| 23 | const char *con_id); | 23 | const char *con_id); |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index db512014e061..b826239bdce0 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
| @@ -157,46 +157,6 @@ static inline int hpage_nr_pages(struct page *page) | |||
| 157 | return HPAGE_PMD_NR; | 157 | return HPAGE_PMD_NR; |
| 158 | return 1; | 158 | return 1; |
| 159 | } | 159 | } |
| 160 | /* | ||
| 161 | * compound_trans_head() should be used instead of compound_head(), | ||
| 162 | * whenever the "page" passed as parameter could be the tail of a | ||
| 163 | * transparent hugepage that could be undergoing a | ||
| 164 | * __split_huge_page_refcount(). The page structure layout often | ||
| 165 | * changes across releases and it makes extensive use of unions. So if | ||
| 166 | * the page structure layout will change in a way that | ||
| 167 | * page->first_page gets clobbered by __split_huge_page_refcount, the | ||
| 168 | * implementation making use of smp_rmb() will be required. | ||
| 169 | * | ||
| 170 | * Currently we define compound_trans_head as compound_head, because | ||
| 171 | * page->private is in the same union with page->first_page, and | ||
| 172 | * page->private isn't clobbered. However this also means we're | ||
| 173 | * currently leaving dirt into the page->private field of anonymous | ||
| 174 | * pages resulting from a THP split, instead of setting page->private | ||
| 175 | * to zero like for every other page that has PG_private not set. But | ||
| 176 | * anonymous pages don't use page->private so this is not a problem. | ||
| 177 | */ | ||
| 178 | #if 0 | ||
| 179 | /* This will be needed if page->private will be clobbered in split_huge_page */ | ||
| 180 | static inline struct page *compound_trans_head(struct page *page) | ||
| 181 | { | ||
| 182 | if (PageTail(page)) { | ||
| 183 | struct page *head; | ||
| 184 | head = page->first_page; | ||
| 185 | smp_rmb(); | ||
| 186 | /* | ||
| 187 | * head may be a dangling pointer. | ||
| 188 | * __split_huge_page_refcount clears PageTail before | ||
| 189 | * overwriting first_page, so if PageTail is still | ||
| 190 | * there it means the head pointer isn't dangling. | ||
| 191 | */ | ||
| 192 | if (PageTail(page)) | ||
| 193 | return head; | ||
| 194 | } | ||
| 195 | return page; | ||
| 196 | } | ||
| 197 | #else | ||
| 198 | #define compound_trans_head(page) compound_head(page) | ||
| 199 | #endif | ||
| 200 | 160 | ||
| 201 | extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, | 161 | extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, |
| 202 | unsigned long addr, pmd_t pmd, pmd_t *pmdp); | 162 | unsigned long addr, pmd_t pmd, pmd_t *pmdp); |
| @@ -226,7 +186,6 @@ static inline int split_huge_page(struct page *page) | |||
| 226 | do { } while (0) | 186 | do { } while (0) |
| 227 | #define split_huge_page_pmd_mm(__mm, __address, __pmd) \ | 187 | #define split_huge_page_pmd_mm(__mm, __address, __pmd) \ |
| 228 | do { } while (0) | 188 | do { } while (0) |
| 229 | #define compound_trans_head(page) compound_head(page) | ||
| 230 | static inline int hugepage_madvise(struct vm_area_struct *vma, | 189 | static inline int hugepage_madvise(struct vm_area_struct *vma, |
| 231 | unsigned long *vm_flags, int advice) | 190 | unsigned long *vm_flags, int advice) |
| 232 | { | 191 | { |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 15da677478dd..344883dce584 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -875,7 +875,7 @@ struct vmbus_channel_relid_released { | |||
| 875 | struct vmbus_channel_initiate_contact { | 875 | struct vmbus_channel_initiate_contact { |
| 876 | struct vmbus_channel_message_header header; | 876 | struct vmbus_channel_message_header header; |
| 877 | u32 vmbus_version_requested; | 877 | u32 vmbus_version_requested; |
| 878 | u32 padding2; | 878 | u32 target_vcpu; /* The VCPU the host should respond to */ |
| 879 | u64 interrupt_page; | 879 | u64 interrupt_page; |
| 880 | u64 monitor_page1; | 880 | u64 monitor_page1; |
| 881 | u64 monitor_page2; | 881 | u64 monitor_page2; |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 0053adde0ed9..a2678d35b5a2 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -158,6 +158,11 @@ devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, | |||
| 158 | devname, dev_id); | 158 | devname, dev_id); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | extern int __must_check | ||
| 162 | devm_request_any_context_irq(struct device *dev, unsigned int irq, | ||
| 163 | irq_handler_t handler, unsigned long irqflags, | ||
| 164 | const char *devname, void *dev_id); | ||
| 165 | |||
| 161 | extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); | 166 | extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); |
| 162 | 167 | ||
| 163 | /* | 168 | /* |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index e7831d203737..35e7eca4e33b 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -118,9 +118,7 @@ extern int mq_init_ns(struct ipc_namespace *ns); | |||
| 118 | * the new maximum will handle anyone else. I may have to revisit this | 118 | * the new maximum will handle anyone else. I may have to revisit this |
| 119 | * in the future. | 119 | * in the future. |
| 120 | */ | 120 | */ |
| 121 | #define MIN_QUEUESMAX 1 | ||
| 122 | #define DFLT_QUEUESMAX 256 | 121 | #define DFLT_QUEUESMAX 256 |
| 123 | #define HARD_QUEUESMAX 1024 | ||
| 124 | #define MIN_MSGMAX 1 | 122 | #define MIN_MSGMAX 1 |
| 125 | #define DFLT_MSG 10U | 123 | #define DFLT_MSG 10U |
| 126 | #define DFLT_MSGMAX 10 | 124 | #define DFLT_MSGMAX 10 |
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 5be9f0228a3b..d267623c28cf 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
| @@ -249,7 +249,8 @@ void kernfs_notify(struct kernfs_node *kn); | |||
| 249 | 249 | ||
| 250 | const void *kernfs_super_ns(struct super_block *sb); | 250 | const void *kernfs_super_ns(struct super_block *sb); |
| 251 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 251 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
| 252 | struct kernfs_root *root, const void *ns); | 252 | struct kernfs_root *root, bool *new_sb_created, |
| 253 | const void *ns); | ||
| 253 | void kernfs_kill_sb(struct super_block *sb); | 254 | void kernfs_kill_sb(struct super_block *sb); |
| 254 | 255 | ||
| 255 | void kernfs_init(void); | 256 | void kernfs_init(void); |
| @@ -317,7 +318,7 @@ static inline const void *kernfs_super_ns(struct super_block *sb) | |||
| 317 | 318 | ||
| 318 | static inline struct dentry * | 319 | static inline struct dentry * |
| 319 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 320 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
| 320 | struct kernfs_root *root, const void *ns) | 321 | struct kernfs_root *root, bool *new_sb_created, const void *ns) |
| 321 | { return ERR_PTR(-ENOSYS); } | 322 | { return ERR_PTR(-ENOSYS); } |
| 322 | 323 | ||
| 323 | static inline void kernfs_kill_sb(struct super_block *sb) { } | 324 | static inline void kernfs_kill_sb(struct super_block *sb) { } |
| @@ -368,9 +369,9 @@ static inline int kernfs_remove_by_name(struct kernfs_node *parent, | |||
| 368 | 369 | ||
| 369 | static inline struct dentry * | 370 | static inline struct dentry * |
| 370 | kernfs_mount(struct file_system_type *fs_type, int flags, | 371 | kernfs_mount(struct file_system_type *fs_type, int flags, |
| 371 | struct kernfs_root *root) | 372 | struct kernfs_root *root, bool *new_sb_created) |
| 372 | { | 373 | { |
| 373 | return kernfs_mount_ns(fs_type, flags, root, NULL); | 374 | return kernfs_mount_ns(fs_type, flags, root, new_sb_created, NULL); |
| 374 | } | 375 | } |
| 375 | 376 | ||
| 376 | #endif /* __LINUX_KERNFS_H */ | 377 | #endif /* __LINUX_KERNFS_H */ |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index ad1ae7f345ad..78c76cd4d37b 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
| @@ -387,7 +387,7 @@ struct max8997_dev { | |||
| 387 | struct i2c_client *muic; /* slave addr 0x4a */ | 387 | struct i2c_client *muic; /* slave addr 0x4a */ |
| 388 | struct mutex iolock; | 388 | struct mutex iolock; |
| 389 | 389 | ||
| 390 | int type; | 390 | unsigned long type; |
| 391 | struct platform_device *battery; /* battery control (not fuel gauge) */ | 391 | struct platform_device *battery; /* battery control (not fuel gauge) */ |
| 392 | 392 | ||
| 393 | int irq; | 393 | int irq; |
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index 4ecb24b4b863..d68ada502ff3 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
| @@ -163,7 +163,7 @@ struct max8998_dev { | |||
| 163 | int ono; | 163 | int ono; |
| 164 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; | 164 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; |
| 165 | u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS]; | 165 | u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS]; |
| 166 | int type; | 166 | unsigned long type; |
| 167 | bool wakeup; | 167 | bool wakeup; |
| 168 | }; | 168 | }; |
| 169 | 169 | ||
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index a5a7f0130e96..54b5458ec084 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
| @@ -252,7 +252,7 @@ struct tps65217_board { | |||
| 252 | struct tps65217 { | 252 | struct tps65217 { |
| 253 | struct device *dev; | 253 | struct device *dev; |
| 254 | struct tps65217_board *pdata; | 254 | struct tps65217_board *pdata; |
| 255 | unsigned int id; | 255 | unsigned long id; |
| 256 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; | 256 | struct regulator_desc desc[TPS65217_NUM_REGULATOR]; |
| 257 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; | 257 | struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; |
| 258 | struct regmap *regmap; | 258 | struct regmap *regmap; |
| @@ -263,7 +263,7 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev) | |||
| 263 | return dev_get_drvdata(dev); | 263 | return dev_get_drvdata(dev); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | static inline int tps65217_chip_id(struct tps65217 *tps65217) | 266 | static inline unsigned long tps65217_chip_id(struct tps65217 *tps65217) |
| 267 | { | 267 | { |
| 268 | return tps65217->id; | 268 | return tps65217->id; |
| 269 | } | 269 | } |
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 554548cd3dd4..130bc8d77fa5 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
| @@ -38,8 +38,10 @@ | |||
| 38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
| 39 | #include <linux/spinlock_types.h> | 39 | #include <linux/spinlock_types.h> |
| 40 | #include <linux/semaphore.h> | 40 | #include <linux/semaphore.h> |
| 41 | #include <linux/slab.h> | ||
| 41 | #include <linux/vmalloc.h> | 42 | #include <linux/vmalloc.h> |
| 42 | #include <linux/radix-tree.h> | 43 | #include <linux/radix-tree.h> |
| 44 | |||
| 43 | #include <linux/mlx5/device.h> | 45 | #include <linux/mlx5/device.h> |
| 44 | #include <linux/mlx5/doorbell.h> | 46 | #include <linux/mlx5/doorbell.h> |
| 45 | 47 | ||
| @@ -227,6 +229,7 @@ struct mlx5_uuar_info { | |||
| 227 | * protect uuar allocation data structs | 229 | * protect uuar allocation data structs |
| 228 | */ | 230 | */ |
| 229 | struct mutex lock; | 231 | struct mutex lock; |
| 232 | u32 ver; | ||
| 230 | }; | 233 | }; |
| 231 | 234 | ||
| 232 | struct mlx5_bf { | 235 | struct mlx5_bf { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index f28f46eade6a..c1b7414c7bef 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -175,7 +175,7 @@ extern unsigned int kobjsize(const void *objp); | |||
| 175 | * Special vmas that are non-mergable, non-mlock()able. | 175 | * Special vmas that are non-mergable, non-mlock()able. |
| 176 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. | 176 | * Note: mm/huge_memory.c VM_NO_THP depends on this definition. |
| 177 | */ | 177 | */ |
| 178 | #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP) | 178 | #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP | VM_MIXEDMAP) |
| 179 | 179 | ||
| 180 | /* | 180 | /* |
| 181 | * mapping from the currently active vm_flags protection bits (the | 181 | * mapping from the currently active vm_flags protection bits (the |
| @@ -399,8 +399,18 @@ static inline void compound_unlock_irqrestore(struct page *page, | |||
| 399 | 399 | ||
| 400 | static inline struct page *compound_head(struct page *page) | 400 | static inline struct page *compound_head(struct page *page) |
| 401 | { | 401 | { |
| 402 | if (unlikely(PageTail(page))) | 402 | if (unlikely(PageTail(page))) { |
| 403 | return page->first_page; | 403 | struct page *head = page->first_page; |
| 404 | |||
| 405 | /* | ||
| 406 | * page->first_page may be a dangling pointer to an old | ||
| 407 | * compound page, so recheck that it is still a tail | ||
| 408 | * page before returning. | ||
| 409 | */ | ||
| 410 | smp_rmb(); | ||
| 411 | if (likely(PageTail(page))) | ||
| 412 | return head; | ||
| 413 | } | ||
| 404 | return page; | 414 | return page; |
| 405 | } | 415 | } |
| 406 | 416 | ||
| @@ -757,7 +767,7 @@ static inline bool __cpupid_match_pid(pid_t task_pid, int cpupid) | |||
| 757 | #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS | 767 | #ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS |
| 758 | static inline int page_cpupid_xchg_last(struct page *page, int cpupid) | 768 | static inline int page_cpupid_xchg_last(struct page *page, int cpupid) |
| 759 | { | 769 | { |
| 760 | return xchg(&page->_last_cpupid, cpupid); | 770 | return xchg(&page->_last_cpupid, cpupid & LAST_CPUPID_MASK); |
| 761 | } | 771 | } |
| 762 | 772 | ||
| 763 | static inline int page_cpupid_last(struct page *page) | 773 | static inline int page_cpupid_last(struct page *page) |
| @@ -766,7 +776,7 @@ static inline int page_cpupid_last(struct page *page) | |||
| 766 | } | 776 | } |
| 767 | static inline void page_cpupid_reset_last(struct page *page) | 777 | static inline void page_cpupid_reset_last(struct page *page) |
| 768 | { | 778 | { |
| 769 | page->_last_cpupid = -1; | 779 | page->_last_cpupid = -1 & LAST_CPUPID_MASK; |
| 770 | } | 780 | } |
| 771 | #else | 781 | #else |
| 772 | static inline int page_cpupid_last(struct page *page) | 782 | static inline int page_cpupid_last(struct page *page) |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 5f2052c83154..9b61b9bf81ac 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -590,10 +590,10 @@ static inline bool zone_is_empty(struct zone *zone) | |||
| 590 | 590 | ||
| 591 | /* | 591 | /* |
| 592 | * The NUMA zonelists are doubled because we need zonelists that restrict the | 592 | * The NUMA zonelists are doubled because we need zonelists that restrict the |
| 593 | * allocations to a single node for GFP_THISNODE. | 593 | * allocations to a single node for __GFP_THISNODE. |
| 594 | * | 594 | * |
| 595 | * [0] : Zonelist with fallback | 595 | * [0] : Zonelist with fallback |
| 596 | * [1] : No fallback (GFP_THISNODE) | 596 | * [1] : No fallback (__GFP_THISNODE) |
| 597 | */ | 597 | */ |
| 598 | #define MAX_ZONELISTS 2 | 598 | #define MAX_ZONELISTS 2 |
| 599 | 599 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 440a02ee6f92..e8eeebd49a98 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -752,6 +752,9 @@ struct netdev_phys_port_id { | |||
| 752 | unsigned char id_len; | 752 | unsigned char id_len; |
| 753 | }; | 753 | }; |
| 754 | 754 | ||
| 755 | typedef u16 (*select_queue_fallback_t)(struct net_device *dev, | ||
| 756 | struct sk_buff *skb); | ||
| 757 | |||
| 755 | /* | 758 | /* |
| 756 | * This structure defines the management hooks for network devices. | 759 | * This structure defines the management hooks for network devices. |
| 757 | * The following hooks can be defined; unless noted otherwise, they are | 760 | * The following hooks can be defined; unless noted otherwise, they are |
| @@ -783,7 +786,7 @@ struct netdev_phys_port_id { | |||
| 783 | * Required can not be NULL. | 786 | * Required can not be NULL. |
| 784 | * | 787 | * |
| 785 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, | 788 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, |
| 786 | * void *accel_priv); | 789 | * void *accel_priv, select_queue_fallback_t fallback); |
| 787 | * Called to decide which queue to when device supports multiple | 790 | * Called to decide which queue to when device supports multiple |
| 788 | * transmit queues. | 791 | * transmit queues. |
| 789 | * | 792 | * |
| @@ -1005,7 +1008,8 @@ struct net_device_ops { | |||
| 1005 | struct net_device *dev); | 1008 | struct net_device *dev); |
| 1006 | u16 (*ndo_select_queue)(struct net_device *dev, | 1009 | u16 (*ndo_select_queue)(struct net_device *dev, |
| 1007 | struct sk_buff *skb, | 1010 | struct sk_buff *skb, |
| 1008 | void *accel_priv); | 1011 | void *accel_priv, |
| 1012 | select_queue_fallback_t fallback); | ||
| 1009 | void (*ndo_change_rx_flags)(struct net_device *dev, | 1013 | void (*ndo_change_rx_flags)(struct net_device *dev, |
| 1010 | int flags); | 1014 | int flags); |
| 1011 | void (*ndo_set_rx_mode)(struct net_device *dev); | 1015 | void (*ndo_set_rx_mode)(struct net_device *dev); |
| @@ -1551,7 +1555,6 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, | |||
| 1551 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, | 1555 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, |
| 1552 | struct sk_buff *skb, | 1556 | struct sk_buff *skb, |
| 1553 | void *accel_priv); | 1557 | void *accel_priv); |
| 1554 | u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb); | ||
| 1555 | 1558 | ||
| 1556 | /* | 1559 | /* |
| 1557 | * Net namespace inlines | 1560 | * Net namespace inlines |
| @@ -2276,6 +2279,26 @@ static inline void netdev_reset_queue(struct net_device *dev_queue) | |||
| 2276 | } | 2279 | } |
| 2277 | 2280 | ||
| 2278 | /** | 2281 | /** |
| 2282 | * netdev_cap_txqueue - check if selected tx queue exceeds device queues | ||
| 2283 | * @dev: network device | ||
| 2284 | * @queue_index: given tx queue index | ||
| 2285 | * | ||
| 2286 | * Returns 0 if given tx queue index >= number of device tx queues, | ||
| 2287 | * otherwise returns the originally passed tx queue index. | ||
| 2288 | */ | ||
| 2289 | static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index) | ||
| 2290 | { | ||
| 2291 | if (unlikely(queue_index >= dev->real_num_tx_queues)) { | ||
| 2292 | net_warn_ratelimited("%s selects TX queue %d, but real number of TX queues is %d\n", | ||
| 2293 | dev->name, queue_index, | ||
| 2294 | dev->real_num_tx_queues); | ||
| 2295 | return 0; | ||
| 2296 | } | ||
| 2297 | |||
| 2298 | return queue_index; | ||
| 2299 | } | ||
| 2300 | |||
| 2301 | /** | ||
| 2279 | * netif_running - test if up | 2302 | * netif_running - test if up |
| 2280 | * @dev: network device | 2303 | * @dev: network device |
| 2281 | * | 2304 | * |
| @@ -3068,7 +3091,12 @@ void netdev_change_features(struct net_device *dev); | |||
| 3068 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 3091 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
| 3069 | struct net_device *dev); | 3092 | struct net_device *dev); |
| 3070 | 3093 | ||
| 3071 | netdev_features_t netif_skb_features(struct sk_buff *skb); | 3094 | netdev_features_t netif_skb_dev_features(struct sk_buff *skb, |
| 3095 | const struct net_device *dev); | ||
| 3096 | static inline netdev_features_t netif_skb_features(struct sk_buff *skb) | ||
| 3097 | { | ||
| 3098 | return netif_skb_dev_features(skb, skb->dev); | ||
| 3099 | } | ||
| 3072 | 3100 | ||
| 3073 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) | 3101 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) |
| 3074 | { | 3102 | { |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 3ccfcecf8999..5624e4e2763c 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -379,12 +379,14 @@ struct nfs_openres { | |||
| 379 | * Arguments to the open_confirm call. | 379 | * Arguments to the open_confirm call. |
| 380 | */ | 380 | */ |
| 381 | struct nfs_open_confirmargs { | 381 | struct nfs_open_confirmargs { |
| 382 | struct nfs4_sequence_args seq_args; | ||
| 382 | const struct nfs_fh * fh; | 383 | const struct nfs_fh * fh; |
| 383 | nfs4_stateid * stateid; | 384 | nfs4_stateid * stateid; |
| 384 | struct nfs_seqid * seqid; | 385 | struct nfs_seqid * seqid; |
| 385 | }; | 386 | }; |
| 386 | 387 | ||
| 387 | struct nfs_open_confirmres { | 388 | struct nfs_open_confirmres { |
| 389 | struct nfs4_sequence_res seq_res; | ||
| 388 | nfs4_stateid stateid; | 390 | nfs4_stateid stateid; |
| 389 | struct nfs_seqid * seqid; | 391 | struct nfs_seqid * seqid; |
| 390 | }; | 392 | }; |
| @@ -465,9 +467,14 @@ struct nfs_lockt_res { | |||
| 465 | }; | 467 | }; |
| 466 | 468 | ||
| 467 | struct nfs_release_lockowner_args { | 469 | struct nfs_release_lockowner_args { |
| 470 | struct nfs4_sequence_args seq_args; | ||
| 468 | struct nfs_lowner lock_owner; | 471 | struct nfs_lowner lock_owner; |
| 469 | }; | 472 | }; |
| 470 | 473 | ||
| 474 | struct nfs_release_lockowner_res { | ||
| 475 | struct nfs4_sequence_res seq_res; | ||
| 476 | }; | ||
| 477 | |||
| 471 | struct nfs4_delegreturnargs { | 478 | struct nfs4_delegreturnargs { |
| 472 | struct nfs4_sequence_args seq_args; | 479 | struct nfs4_sequence_args seq_args; |
| 473 | const struct nfs_fh *fhandle; | 480 | const struct nfs_fh *fhandle; |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 26ebcf41c213..69ae03f6eb15 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -80,13 +80,14 @@ struct nvme_dev { | |||
| 80 | struct dma_pool *prp_small_pool; | 80 | struct dma_pool *prp_small_pool; |
| 81 | int instance; | 81 | int instance; |
| 82 | int queue_count; | 82 | int queue_count; |
| 83 | int db_stride; | 83 | u32 db_stride; |
| 84 | u32 ctrl_config; | 84 | u32 ctrl_config; |
| 85 | struct msix_entry *entry; | 85 | struct msix_entry *entry; |
| 86 | struct nvme_bar __iomem *bar; | 86 | struct nvme_bar __iomem *bar; |
| 87 | struct list_head namespaces; | 87 | struct list_head namespaces; |
| 88 | struct kref kref; | 88 | struct kref kref; |
| 89 | struct miscdevice miscdev; | 89 | struct miscdevice miscdev; |
| 90 | struct work_struct reset_work; | ||
| 90 | char name[12]; | 91 | char name[12]; |
| 91 | char serial[20]; | 92 | char serial[20]; |
| 92 | char model[40]; | 93 | char model[40]; |
| @@ -94,6 +95,8 @@ struct nvme_dev { | |||
| 94 | u32 max_hw_sectors; | 95 | u32 max_hw_sectors; |
| 95 | u32 stripe_size; | 96 | u32 stripe_size; |
| 96 | u16 oncs; | 97 | u16 oncs; |
| 98 | u16 abort_limit; | ||
| 99 | u8 initialized; | ||
| 97 | }; | 100 | }; |
| 98 | 101 | ||
| 99 | /* | 102 | /* |
| @@ -165,6 +168,7 @@ int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11, | |||
| 165 | struct sg_io_hdr; | 168 | struct sg_io_hdr; |
| 166 | 169 | ||
| 167 | int nvme_sg_io(struct nvme_ns *ns, struct sg_io_hdr __user *u_hdr); | 170 | int nvme_sg_io(struct nvme_ns *ns, struct sg_io_hdr __user *u_hdr); |
| 171 | int nvme_sg_io32(struct nvme_ns *ns, unsigned long arg); | ||
| 168 | int nvme_sg_get_version_num(int __user *ip); | 172 | int nvme_sg_get_version_num(int __user *ip); |
| 169 | 173 | ||
| 170 | #endif /* _LINUX_NVME_H */ | 174 | #endif /* _LINUX_NVME_H */ |
diff --git a/include/linux/of.h b/include/linux/of.h index 70c64ba17fa5..83d1ac80c91e 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -169,35 +169,15 @@ static inline const char *of_node_full_name(const struct device_node *np) | |||
| 169 | 169 | ||
| 170 | extern struct device_node *of_find_node_by_name(struct device_node *from, | 170 | extern struct device_node *of_find_node_by_name(struct device_node *from, |
| 171 | const char *name); | 171 | const char *name); |
| 172 | #define for_each_node_by_name(dn, name) \ | ||
| 173 | for (dn = of_find_node_by_name(NULL, name); dn; \ | ||
| 174 | dn = of_find_node_by_name(dn, name)) | ||
| 175 | extern struct device_node *of_find_node_by_type(struct device_node *from, | 172 | extern struct device_node *of_find_node_by_type(struct device_node *from, |
| 176 | const char *type); | 173 | const char *type); |
| 177 | #define for_each_node_by_type(dn, type) \ | ||
| 178 | for (dn = of_find_node_by_type(NULL, type); dn; \ | ||
| 179 | dn = of_find_node_by_type(dn, type)) | ||
| 180 | extern struct device_node *of_find_compatible_node(struct device_node *from, | 174 | extern struct device_node *of_find_compatible_node(struct device_node *from, |
| 181 | const char *type, const char *compat); | 175 | const char *type, const char *compat); |
| 182 | #define for_each_compatible_node(dn, type, compatible) \ | ||
| 183 | for (dn = of_find_compatible_node(NULL, type, compatible); dn; \ | ||
| 184 | dn = of_find_compatible_node(dn, type, compatible)) | ||
| 185 | extern struct device_node *of_find_matching_node_and_match( | 176 | extern struct device_node *of_find_matching_node_and_match( |
| 186 | struct device_node *from, | 177 | struct device_node *from, |
| 187 | const struct of_device_id *matches, | 178 | const struct of_device_id *matches, |
| 188 | const struct of_device_id **match); | 179 | const struct of_device_id **match); |
| 189 | static inline struct device_node *of_find_matching_node( | 180 | |
| 190 | struct device_node *from, | ||
| 191 | const struct of_device_id *matches) | ||
| 192 | { | ||
| 193 | return of_find_matching_node_and_match(from, matches, NULL); | ||
| 194 | } | ||
| 195 | #define for_each_matching_node(dn, matches) \ | ||
| 196 | for (dn = of_find_matching_node(NULL, matches); dn; \ | ||
| 197 | dn = of_find_matching_node(dn, matches)) | ||
| 198 | #define for_each_matching_node_and_match(dn, matches, match) \ | ||
| 199 | for (dn = of_find_matching_node_and_match(NULL, matches, match); \ | ||
| 200 | dn; dn = of_find_matching_node_and_match(dn, matches, match)) | ||
| 201 | extern struct device_node *of_find_node_by_path(const char *path); | 181 | extern struct device_node *of_find_node_by_path(const char *path); |
| 202 | extern struct device_node *of_find_node_by_phandle(phandle handle); | 182 | extern struct device_node *of_find_node_by_phandle(phandle handle); |
| 203 | extern struct device_node *of_get_parent(const struct device_node *node); | 183 | extern struct device_node *of_get_parent(const struct device_node *node); |
| @@ -209,47 +189,17 @@ extern struct device_node *of_get_next_available_child( | |||
| 209 | 189 | ||
| 210 | extern struct device_node *of_get_child_by_name(const struct device_node *node, | 190 | extern struct device_node *of_get_child_by_name(const struct device_node *node, |
| 211 | const char *name); | 191 | const char *name); |
| 212 | #define for_each_child_of_node(parent, child) \ | ||
| 213 | for (child = of_get_next_child(parent, NULL); child != NULL; \ | ||
| 214 | child = of_get_next_child(parent, child)) | ||
| 215 | |||
| 216 | #define for_each_available_child_of_node(parent, child) \ | ||
| 217 | for (child = of_get_next_available_child(parent, NULL); child != NULL; \ | ||
| 218 | child = of_get_next_available_child(parent, child)) | ||
| 219 | |||
| 220 | static inline int of_get_child_count(const struct device_node *np) | ||
| 221 | { | ||
| 222 | struct device_node *child; | ||
| 223 | int num = 0; | ||
| 224 | |||
| 225 | for_each_child_of_node(np, child) | ||
| 226 | num++; | ||
| 227 | |||
| 228 | return num; | ||
| 229 | } | ||
| 230 | |||
| 231 | static inline int of_get_available_child_count(const struct device_node *np) | ||
| 232 | { | ||
| 233 | struct device_node *child; | ||
| 234 | int num = 0; | ||
| 235 | |||
| 236 | for_each_available_child_of_node(np, child) | ||
| 237 | num++; | ||
| 238 | |||
| 239 | return num; | ||
| 240 | } | ||
| 241 | 192 | ||
| 242 | /* cache lookup */ | 193 | /* cache lookup */ |
| 243 | extern struct device_node *of_find_next_cache_node(const struct device_node *); | 194 | extern struct device_node *of_find_next_cache_node(const struct device_node *); |
| 244 | extern struct device_node *of_find_node_with_property( | 195 | extern struct device_node *of_find_node_with_property( |
| 245 | struct device_node *from, const char *prop_name); | 196 | struct device_node *from, const char *prop_name); |
| 246 | #define for_each_node_with_property(dn, prop_name) \ | ||
| 247 | for (dn = of_find_node_with_property(NULL, prop_name); dn; \ | ||
| 248 | dn = of_find_node_with_property(dn, prop_name)) | ||
| 249 | 197 | ||
| 250 | extern struct property *of_find_property(const struct device_node *np, | 198 | extern struct property *of_find_property(const struct device_node *np, |
| 251 | const char *name, | 199 | const char *name, |
| 252 | int *lenp); | 200 | int *lenp); |
| 201 | extern int of_property_count_elems_of_size(const struct device_node *np, | ||
| 202 | const char *propname, int elem_size); | ||
| 253 | extern int of_property_read_u32_index(const struct device_node *np, | 203 | extern int of_property_read_u32_index(const struct device_node *np, |
| 254 | const char *propname, | 204 | const char *propname, |
| 255 | u32 index, u32 *out_value); | 205 | u32 index, u32 *out_value); |
| @@ -367,42 +317,53 @@ static inline struct device_node *of_find_node_by_name(struct device_node *from, | |||
| 367 | return NULL; | 317 | return NULL; |
| 368 | } | 318 | } |
| 369 | 319 | ||
| 370 | static inline struct device_node *of_get_parent(const struct device_node *node) | 320 | static inline struct device_node *of_find_node_by_type(struct device_node *from, |
| 321 | const char *type) | ||
| 371 | { | 322 | { |
| 372 | return NULL; | 323 | return NULL; |
| 373 | } | 324 | } |
| 374 | 325 | ||
| 375 | static inline bool of_have_populated_dt(void) | 326 | static inline struct device_node *of_find_matching_node_and_match( |
| 327 | struct device_node *from, | ||
| 328 | const struct of_device_id *matches, | ||
| 329 | const struct of_device_id **match) | ||
| 376 | { | 330 | { |
| 377 | return false; | 331 | return NULL; |
| 378 | } | 332 | } |
| 379 | 333 | ||
| 380 | /* Kill an unused variable warning on a device_node pointer */ | 334 | static inline struct device_node *of_get_parent(const struct device_node *node) |
| 381 | static inline void __of_use_dn(const struct device_node *np) | ||
| 382 | { | 335 | { |
| 336 | return NULL; | ||
| 383 | } | 337 | } |
| 384 | 338 | ||
| 385 | #define for_each_child_of_node(parent, child) \ | 339 | static inline struct device_node *of_get_next_child( |
| 386 | while (__of_use_dn(parent), __of_use_dn(child), 0) | 340 | const struct device_node *node, struct device_node *prev) |
| 341 | { | ||
| 342 | return NULL; | ||
| 343 | } | ||
| 387 | 344 | ||
| 388 | #define for_each_available_child_of_node(parent, child) \ | 345 | static inline struct device_node *of_get_next_available_child( |
| 389 | while (0) | 346 | const struct device_node *node, struct device_node *prev) |
| 347 | { | ||
| 348 | return NULL; | ||
| 349 | } | ||
| 390 | 350 | ||
| 391 | static inline struct device_node *of_get_child_by_name( | 351 | static inline struct device_node *of_find_node_with_property( |
| 392 | const struct device_node *node, | 352 | struct device_node *from, const char *prop_name) |
| 393 | const char *name) | ||
| 394 | { | 353 | { |
| 395 | return NULL; | 354 | return NULL; |
| 396 | } | 355 | } |
| 397 | 356 | ||
| 398 | static inline int of_get_child_count(const struct device_node *np) | 357 | static inline bool of_have_populated_dt(void) |
| 399 | { | 358 | { |
| 400 | return 0; | 359 | return false; |
| 401 | } | 360 | } |
| 402 | 361 | ||
| 403 | static inline int of_get_available_child_count(const struct device_node *np) | 362 | static inline struct device_node *of_get_child_by_name( |
| 363 | const struct device_node *node, | ||
| 364 | const char *name) | ||
| 404 | { | 365 | { |
| 405 | return 0; | 366 | return NULL; |
| 406 | } | 367 | } |
| 407 | 368 | ||
| 408 | static inline int of_device_is_compatible(const struct device_node *device, | 369 | static inline int of_device_is_compatible(const struct device_node *device, |
| @@ -431,6 +392,12 @@ static inline struct device_node *of_find_compatible_node( | |||
| 431 | return NULL; | 392 | return NULL; |
| 432 | } | 393 | } |
| 433 | 394 | ||
| 395 | static inline int of_property_count_elems_of_size(const struct device_node *np, | ||
| 396 | const char *propname, int elem_size) | ||
| 397 | { | ||
| 398 | return -ENOSYS; | ||
| 399 | } | ||
| 400 | |||
| 434 | static inline int of_property_read_u32_index(const struct device_node *np, | 401 | static inline int of_property_read_u32_index(const struct device_node *np, |
| 435 | const char *propname, u32 index, u32 *out_value) | 402 | const char *propname, u32 index, u32 *out_value) |
| 436 | { | 403 | { |
| @@ -569,6 +536,81 @@ extern int of_node_to_nid(struct device_node *np); | |||
| 569 | static inline int of_node_to_nid(struct device_node *device) { return 0; } | 536 | static inline int of_node_to_nid(struct device_node *device) { return 0; } |
| 570 | #endif | 537 | #endif |
| 571 | 538 | ||
| 539 | static inline struct device_node *of_find_matching_node( | ||
| 540 | struct device_node *from, | ||
| 541 | const struct of_device_id *matches) | ||
| 542 | { | ||
| 543 | return of_find_matching_node_and_match(from, matches, NULL); | ||
| 544 | } | ||
| 545 | |||
| 546 | /** | ||
| 547 | * of_property_count_u8_elems - Count the number of u8 elements in a property | ||
| 548 | * | ||
| 549 | * @np: device node from which the property value is to be read. | ||
| 550 | * @propname: name of the property to be searched. | ||
| 551 | * | ||
| 552 | * Search for a property in a device node and count the number of u8 elements | ||
| 553 | * in it. Returns number of elements on sucess, -EINVAL if the property does | ||
| 554 | * not exist or its length does not match a multiple of u8 and -ENODATA if the | ||
| 555 | * property does not have a value. | ||
| 556 | */ | ||
| 557 | static inline int of_property_count_u8_elems(const struct device_node *np, | ||
| 558 | const char *propname) | ||
| 559 | { | ||
| 560 | return of_property_count_elems_of_size(np, propname, sizeof(u8)); | ||
| 561 | } | ||
| 562 | |||
| 563 | /** | ||
| 564 | * of_property_count_u16_elems - Count the number of u16 elements in a property | ||
| 565 | * | ||
| 566 | * @np: device node from which the property value is to be read. | ||
| 567 | * @propname: name of the property to be searched. | ||
| 568 | * | ||
| 569 | * Search for a property in a device node and count the number of u16 elements | ||
| 570 | * in it. Returns number of elements on sucess, -EINVAL if the property does | ||
| 571 | * not exist or its length does not match a multiple of u16 and -ENODATA if the | ||
| 572 | * property does not have a value. | ||
| 573 | */ | ||
| 574 | static inline int of_property_count_u16_elems(const struct device_node *np, | ||
| 575 | const char *propname) | ||
| 576 | { | ||
| 577 | return of_property_count_elems_of_size(np, propname, sizeof(u16)); | ||
| 578 | } | ||
| 579 | |||
| 580 | /** | ||
| 581 | * of_property_count_u32_elems - Count the number of u32 elements in a property | ||
| 582 | * | ||
| 583 | * @np: device node from which the property value is to be read. | ||
| 584 | * @propname: name of the property to be searched. | ||
| 585 | * | ||
| 586 | * Search for a property in a device node and count the number of u32 elements | ||
| 587 | * in it. Returns number of elements on sucess, -EINVAL if the property does | ||
| 588 | * not exist or its length does not match a multiple of u32 and -ENODATA if the | ||
| 589 | * property does not have a value. | ||
| 590 | */ | ||
| 591 | static inline int of_property_count_u32_elems(const struct device_node *np, | ||
| 592 | const char *propname) | ||
| 593 | { | ||
| 594 | return of_property_count_elems_of_size(np, propname, sizeof(u32)); | ||
| 595 | } | ||
| 596 | |||
| 597 | /** | ||
| 598 | * of_property_count_u64_elems - Count the number of u64 elements in a property | ||
| 599 | * | ||
| 600 | * @np: device node from which the property value is to be read. | ||
| 601 | * @propname: name of the property to be searched. | ||
| 602 | * | ||
| 603 | * Search for a property in a device node and count the number of u64 elements | ||
| 604 | * in it. Returns number of elements on sucess, -EINVAL if the property does | ||
| 605 | * not exist or its length does not match a multiple of u64 and -ENODATA if the | ||
| 606 | * property does not have a value. | ||
| 607 | */ | ||
| 608 | static inline int of_property_count_u64_elems(const struct device_node *np, | ||
| 609 | const char *propname) | ||
| 610 | { | ||
| 611 | return of_property_count_elems_of_size(np, propname, sizeof(u64)); | ||
| 612 | } | ||
| 613 | |||
| 572 | /** | 614 | /** |
| 573 | * of_property_read_bool - Findfrom a property | 615 | * of_property_read_bool - Findfrom a property |
| 574 | * @np: device node from which the property value is to be read. | 616 | * @np: device node from which the property value is to be read. |
| @@ -618,6 +660,55 @@ static inline int of_property_read_u32(const struct device_node *np, | |||
| 618 | s; \ | 660 | s; \ |
| 619 | s = of_prop_next_string(prop, s)) | 661 | s = of_prop_next_string(prop, s)) |
| 620 | 662 | ||
| 663 | #define for_each_node_by_name(dn, name) \ | ||
| 664 | for (dn = of_find_node_by_name(NULL, name); dn; \ | ||
| 665 | dn = of_find_node_by_name(dn, name)) | ||
| 666 | #define for_each_node_by_type(dn, type) \ | ||
| 667 | for (dn = of_find_node_by_type(NULL, type); dn; \ | ||
| 668 | dn = of_find_node_by_type(dn, type)) | ||
| 669 | #define for_each_compatible_node(dn, type, compatible) \ | ||
| 670 | for (dn = of_find_compatible_node(NULL, type, compatible); dn; \ | ||
| 671 | dn = of_find_compatible_node(dn, type, compatible)) | ||
| 672 | #define for_each_matching_node(dn, matches) \ | ||
| 673 | for (dn = of_find_matching_node(NULL, matches); dn; \ | ||
| 674 | dn = of_find_matching_node(dn, matches)) | ||
| 675 | #define for_each_matching_node_and_match(dn, matches, match) \ | ||
| 676 | for (dn = of_find_matching_node_and_match(NULL, matches, match); \ | ||
| 677 | dn; dn = of_find_matching_node_and_match(dn, matches, match)) | ||
| 678 | |||
| 679 | #define for_each_child_of_node(parent, child) \ | ||
| 680 | for (child = of_get_next_child(parent, NULL); child != NULL; \ | ||
| 681 | child = of_get_next_child(parent, child)) | ||
| 682 | #define for_each_available_child_of_node(parent, child) \ | ||
| 683 | for (child = of_get_next_available_child(parent, NULL); child != NULL; \ | ||
| 684 | child = of_get_next_available_child(parent, child)) | ||
| 685 | |||
| 686 | #define for_each_node_with_property(dn, prop_name) \ | ||
| 687 | for (dn = of_find_node_with_property(NULL, prop_name); dn; \ | ||
| 688 | dn = of_find_node_with_property(dn, prop_name)) | ||
| 689 | |||
| 690 | static inline int of_get_child_count(const struct device_node *np) | ||
| 691 | { | ||
| 692 | struct device_node *child; | ||
| 693 | int num = 0; | ||
| 694 | |||
| 695 | for_each_child_of_node(np, child) | ||
| 696 | num++; | ||
| 697 | |||
| 698 | return num; | ||
| 699 | } | ||
| 700 | |||
| 701 | static inline int of_get_available_child_count(const struct device_node *np) | ||
| 702 | { | ||
| 703 | struct device_node *child; | ||
| 704 | int num = 0; | ||
| 705 | |||
| 706 | for_each_available_child_of_node(np, child) | ||
| 707 | num++; | ||
| 708 | |||
| 709 | return num; | ||
| 710 | } | ||
| 711 | |||
| 621 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_PROC_DEVICETREE) | 712 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_PROC_DEVICETREE) |
| 622 | extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *); | 713 | extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *); |
| 623 | extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop); | 714 | extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop); |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 8d7dd6768cb7..ef370210ffb2 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
| @@ -78,11 +78,13 @@ static inline int of_device_uevent_modalias(struct device *dev, | |||
| 78 | 78 | ||
| 79 | static inline void of_device_node_put(struct device *dev) { } | 79 | static inline void of_device_node_put(struct device *dev) { } |
| 80 | 80 | ||
| 81 | static inline const struct of_device_id *of_match_device( | 81 | static inline const struct of_device_id *__of_match_device( |
| 82 | const struct of_device_id *matches, const struct device *dev) | 82 | const struct of_device_id *matches, const struct device *dev) |
| 83 | { | 83 | { |
| 84 | return NULL; | 84 | return NULL; |
| 85 | } | 85 | } |
| 86 | #define of_match_device(matches, dev) \ | ||
| 87 | __of_match_device(of_match_ptr(matches), (dev)) | ||
| 86 | 88 | ||
| 87 | static inline struct device_node *of_cpu_device_node_get(int cpu) | 89 | static inline struct device_node *of_cpu_device_node_get(int cpu) |
| 88 | { | 90 | { |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index e464b4e987e8..d1fe1a761047 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -228,9 +228,9 @@ PAGEFLAG(OwnerPriv1, owner_priv_1) TESTCLEARFLAG(OwnerPriv1, owner_priv_1) | |||
| 228 | TESTPAGEFLAG(Writeback, writeback) TESTSCFLAG(Writeback, writeback) | 228 | TESTPAGEFLAG(Writeback, writeback) TESTSCFLAG(Writeback, writeback) |
| 229 | PAGEFLAG(MappedToDisk, mappedtodisk) | 229 | PAGEFLAG(MappedToDisk, mappedtodisk) |
| 230 | 230 | ||
| 231 | /* PG_readahead is only used for file reads; PG_reclaim is only for writes */ | 231 | /* PG_readahead is only used for reads; PG_reclaim is only for writes */ |
| 232 | PAGEFLAG(Reclaim, reclaim) TESTCLEARFLAG(Reclaim, reclaim) | 232 | PAGEFLAG(Reclaim, reclaim) TESTCLEARFLAG(Reclaim, reclaim) |
| 233 | PAGEFLAG(Readahead, reclaim) /* Reminder to do async read-ahead */ | 233 | PAGEFLAG(Readahead, reclaim) TESTCLEARFLAG(Readahead, reclaim) |
| 234 | 234 | ||
| 235 | #ifdef CONFIG_HIGHMEM | 235 | #ifdef CONFIG_HIGHMEM |
| 236 | /* | 236 | /* |
diff --git a/include/linux/pci.h b/include/linux/pci.h index fb57c892b214..33aa2caf0f0c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1169,8 +1169,23 @@ void msi_remove_pci_irq_vectors(struct pci_dev *dev); | |||
| 1169 | void pci_restore_msi_state(struct pci_dev *dev); | 1169 | void pci_restore_msi_state(struct pci_dev *dev); |
| 1170 | int pci_msi_enabled(void); | 1170 | int pci_msi_enabled(void); |
| 1171 | int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec); | 1171 | int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec); |
| 1172 | static inline int pci_enable_msi_exact(struct pci_dev *dev, int nvec) | ||
| 1173 | { | ||
| 1174 | int rc = pci_enable_msi_range(dev, nvec, nvec); | ||
| 1175 | if (rc < 0) | ||
| 1176 | return rc; | ||
| 1177 | return 0; | ||
| 1178 | } | ||
| 1172 | int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, | 1179 | int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, |
| 1173 | int minvec, int maxvec); | 1180 | int minvec, int maxvec); |
| 1181 | static inline int pci_enable_msix_exact(struct pci_dev *dev, | ||
| 1182 | struct msix_entry *entries, int nvec) | ||
| 1183 | { | ||
| 1184 | int rc = pci_enable_msix_range(dev, entries, nvec, nvec); | ||
| 1185 | if (rc < 0) | ||
| 1186 | return rc; | ||
| 1187 | return 0; | ||
| 1188 | } | ||
| 1174 | #else | 1189 | #else |
| 1175 | static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; } | 1190 | static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; } |
| 1176 | static inline int pci_enable_msi_block(struct pci_dev *dev, int nvec) | 1191 | static inline int pci_enable_msi_block(struct pci_dev *dev, int nvec) |
| @@ -1189,9 +1204,14 @@ static inline int pci_msi_enabled(void) { return 0; } | |||
| 1189 | static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec, | 1204 | static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec, |
| 1190 | int maxvec) | 1205 | int maxvec) |
| 1191 | { return -ENOSYS; } | 1206 | { return -ENOSYS; } |
| 1207 | static inline int pci_enable_msi_exact(struct pci_dev *dev, int nvec) | ||
| 1208 | { return -ENOSYS; } | ||
| 1192 | static inline int pci_enable_msix_range(struct pci_dev *dev, | 1209 | static inline int pci_enable_msix_range(struct pci_dev *dev, |
| 1193 | struct msix_entry *entries, int minvec, int maxvec) | 1210 | struct msix_entry *entries, int minvec, int maxvec) |
| 1194 | { return -ENOSYS; } | 1211 | { return -ENOSYS; } |
| 1212 | static inline int pci_enable_msix_exact(struct pci_dev *dev, | ||
| 1213 | struct msix_entry *entries, int nvec) | ||
| 1214 | { return -ENOSYS; } | ||
| 1195 | #endif | 1215 | #endif |
| 1196 | 1216 | ||
| 1197 | #ifdef CONFIG_PCIEPORTBUS | 1217 | #ifdef CONFIG_PCIEPORTBUS |
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index e273e5ac19c9..3f83459dbb20 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h | |||
| @@ -146,7 +146,9 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width) | |||
| 146 | phy->attrs.bus_width = bus_width; | 146 | phy->attrs.bus_width = bus_width; |
| 147 | } | 147 | } |
| 148 | struct phy *phy_get(struct device *dev, const char *string); | 148 | struct phy *phy_get(struct device *dev, const char *string); |
| 149 | struct phy *phy_optional_get(struct device *dev, const char *string); | ||
| 149 | struct phy *devm_phy_get(struct device *dev, const char *string); | 150 | struct phy *devm_phy_get(struct device *dev, const char *string); |
| 151 | struct phy *devm_phy_optional_get(struct device *dev, const char *string); | ||
| 150 | void phy_put(struct phy *phy); | 152 | void phy_put(struct phy *phy); |
| 151 | void devm_phy_put(struct device *dev, struct phy *phy); | 153 | void devm_phy_put(struct device *dev, struct phy *phy); |
| 152 | struct phy *of_phy_simple_xlate(struct device *dev, | 154 | struct phy *of_phy_simple_xlate(struct device *dev, |
| @@ -232,11 +234,23 @@ static inline struct phy *phy_get(struct device *dev, const char *string) | |||
| 232 | return ERR_PTR(-ENOSYS); | 234 | return ERR_PTR(-ENOSYS); |
| 233 | } | 235 | } |
| 234 | 236 | ||
| 237 | static inline struct phy *phy_optional_get(struct device *dev, | ||
| 238 | const char *string) | ||
| 239 | { | ||
| 240 | return ERR_PTR(-ENOSYS); | ||
| 241 | } | ||
| 242 | |||
| 235 | static inline struct phy *devm_phy_get(struct device *dev, const char *string) | 243 | static inline struct phy *devm_phy_get(struct device *dev, const char *string) |
| 236 | { | 244 | { |
| 237 | return ERR_PTR(-ENOSYS); | 245 | return ERR_PTR(-ENOSYS); |
| 238 | } | 246 | } |
| 239 | 247 | ||
| 248 | static inline struct phy *devm_phy_optional_get(struct device *dev, | ||
| 249 | const char *string) | ||
| 250 | { | ||
| 251 | return ERR_PTR(-ENOSYS); | ||
| 252 | } | ||
| 253 | |||
| 240 | static inline void phy_put(struct phy *phy) | 254 | static inline void phy_put(struct phy *phy) |
| 241 | { | 255 | { |
| 242 | } | 256 | } |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 9370e65348a4..bbe03a1924c0 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -228,10 +228,14 @@ enum regulator_type { | |||
| 228 | * output when using regulator_set_voltage_sel_regmap | 228 | * output when using regulator_set_voltage_sel_regmap |
| 229 | * @enable_reg: Register for control when using regmap enable/disable ops | 229 | * @enable_reg: Register for control when using regmap enable/disable ops |
| 230 | * @enable_mask: Mask for control when using regmap enable/disable ops | 230 | * @enable_mask: Mask for control when using regmap enable/disable ops |
| 231 | * @enable_val: Enabling value for control when using regmap enable/disable ops | ||
| 232 | * @disable_val: Disabling value for control when using regmap enable/disable ops | ||
| 231 | * @enable_is_inverted: A flag to indicate set enable_mask bits to disable | 233 | * @enable_is_inverted: A flag to indicate set enable_mask bits to disable |
| 232 | * when using regulator_enable_regmap and friends APIs. | 234 | * when using regulator_enable_regmap and friends APIs. |
| 233 | * @bypass_reg: Register for control when using regmap set_bypass | 235 | * @bypass_reg: Register for control when using regmap set_bypass |
| 234 | * @bypass_mask: Mask for control when using regmap set_bypass | 236 | * @bypass_mask: Mask for control when using regmap set_bypass |
| 237 | * @bypass_val_on: Enabling value for control when using regmap set_bypass | ||
| 238 | * @bypass_val_off: Disabling value for control when using regmap set_bypass | ||
| 235 | * | 239 | * |
| 236 | * @enable_time: Time taken for initial enable of regulator (in uS). | 240 | * @enable_time: Time taken for initial enable of regulator (in uS). |
| 237 | */ | 241 | */ |
| @@ -263,9 +267,13 @@ struct regulator_desc { | |||
| 263 | unsigned int apply_bit; | 267 | unsigned int apply_bit; |
| 264 | unsigned int enable_reg; | 268 | unsigned int enable_reg; |
| 265 | unsigned int enable_mask; | 269 | unsigned int enable_mask; |
| 270 | unsigned int enable_val; | ||
| 271 | unsigned int disable_val; | ||
| 266 | bool enable_is_inverted; | 272 | bool enable_is_inverted; |
| 267 | unsigned int bypass_reg; | 273 | unsigned int bypass_reg; |
| 268 | unsigned int bypass_mask; | 274 | unsigned int bypass_mask; |
| 275 | unsigned int bypass_val_on; | ||
| 276 | unsigned int bypass_val_off; | ||
| 269 | 277 | ||
| 270 | unsigned int enable_time; | 278 | unsigned int enable_time; |
| 271 | }; | 279 | }; |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 1da693d51255..b66c2110cb1f 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
| @@ -250,8 +250,7 @@ struct rmap_walk_control { | |||
| 250 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, | 250 | int (*rmap_one)(struct page *page, struct vm_area_struct *vma, |
| 251 | unsigned long addr, void *arg); | 251 | unsigned long addr, void *arg); |
| 252 | int (*done)(struct page *page); | 252 | int (*done)(struct page *page); |
| 253 | int (*file_nonlinear)(struct page *, struct address_space *, | 253 | int (*file_nonlinear)(struct page *, struct address_space *, void *arg); |
| 254 | struct vm_area_struct *vma); | ||
| 255 | struct anon_vma *(*anon_lock)(struct page *page); | 254 | struct anon_vma *(*anon_lock)(struct page *page); |
| 256 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); | 255 | bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); |
| 257 | }; | 256 | }; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 68a0e84463a0..a781dec1cd0b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -128,6 +128,7 @@ struct bio_list; | |||
| 128 | struct fs_struct; | 128 | struct fs_struct; |
| 129 | struct perf_event_context; | 129 | struct perf_event_context; |
| 130 | struct blk_plug; | 130 | struct blk_plug; |
| 131 | struct filename; | ||
| 131 | 132 | ||
| 132 | /* | 133 | /* |
| 133 | * List of flags we want to share for kernel threads, | 134 | * List of flags we want to share for kernel threads, |
| @@ -2311,7 +2312,7 @@ extern void do_group_exit(int); | |||
| 2311 | extern int allow_signal(int); | 2312 | extern int allow_signal(int); |
| 2312 | extern int disallow_signal(int); | 2313 | extern int disallow_signal(int); |
| 2313 | 2314 | ||
| 2314 | extern int do_execve(const char *, | 2315 | extern int do_execve(struct filename *, |
| 2315 | const char __user * const __user *, | 2316 | const char __user * const __user *, |
| 2316 | const char __user * const __user *); | 2317 | const char __user * const __user *); |
| 2317 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); | 2318 | extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); |
diff --git a/include/linux/security.h b/include/linux/security.h index 5623a7f965b7..2fc42d191f79 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1040,6 +1040,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1040 | * Allocate a security structure to the xp->security field; the security | 1040 | * Allocate a security structure to the xp->security field; the security |
| 1041 | * field is initialized to NULL when the xfrm_policy is allocated. | 1041 | * field is initialized to NULL when the xfrm_policy is allocated. |
| 1042 | * Return 0 if operation was successful (memory to allocate, legal context) | 1042 | * Return 0 if operation was successful (memory to allocate, legal context) |
| 1043 | * @gfp is to specify the context for the allocation | ||
| 1043 | * @xfrm_policy_clone_security: | 1044 | * @xfrm_policy_clone_security: |
| 1044 | * @old_ctx contains an existing xfrm_sec_ctx. | 1045 | * @old_ctx contains an existing xfrm_sec_ctx. |
| 1045 | * @new_ctxp contains a new xfrm_sec_ctx being cloned from old. | 1046 | * @new_ctxp contains a new xfrm_sec_ctx being cloned from old. |
| @@ -1683,7 +1684,7 @@ struct security_operations { | |||
| 1683 | 1684 | ||
| 1684 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1685 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
| 1685 | int (*xfrm_policy_alloc_security) (struct xfrm_sec_ctx **ctxp, | 1686 | int (*xfrm_policy_alloc_security) (struct xfrm_sec_ctx **ctxp, |
| 1686 | struct xfrm_user_sec_ctx *sec_ctx); | 1687 | struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp); |
| 1687 | int (*xfrm_policy_clone_security) (struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctx); | 1688 | int (*xfrm_policy_clone_security) (struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctx); |
| 1688 | void (*xfrm_policy_free_security) (struct xfrm_sec_ctx *ctx); | 1689 | void (*xfrm_policy_free_security) (struct xfrm_sec_ctx *ctx); |
| 1689 | int (*xfrm_policy_delete_security) (struct xfrm_sec_ctx *ctx); | 1690 | int (*xfrm_policy_delete_security) (struct xfrm_sec_ctx *ctx); |
| @@ -2859,7 +2860,8 @@ static inline void security_skb_owned_by(struct sk_buff *skb, struct sock *sk) | |||
| 2859 | 2860 | ||
| 2860 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 2861 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
| 2861 | 2862 | ||
| 2862 | int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx); | 2863 | int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, |
| 2864 | struct xfrm_user_sec_ctx *sec_ctx, gfp_t gfp); | ||
| 2863 | int security_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctxp); | 2865 | int security_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, struct xfrm_sec_ctx **new_ctxp); |
| 2864 | void security_xfrm_policy_free(struct xfrm_sec_ctx *ctx); | 2866 | void security_xfrm_policy_free(struct xfrm_sec_ctx *ctx); |
| 2865 | int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx); | 2867 | int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx); |
| @@ -2877,7 +2879,9 @@ void security_skb_classify_flow(struct sk_buff *skb, struct flowi *fl); | |||
| 2877 | 2879 | ||
| 2878 | #else /* CONFIG_SECURITY_NETWORK_XFRM */ | 2880 | #else /* CONFIG_SECURITY_NETWORK_XFRM */ |
| 2879 | 2881 | ||
| 2880 | static inline int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx) | 2882 | static inline int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, |
| 2883 | struct xfrm_user_sec_ctx *sec_ctx, | ||
| 2884 | gfp_t gfp) | ||
| 2881 | { | 2885 | { |
| 2882 | return 0; | 2886 | return 0; |
| 2883 | } | 2887 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f589c9af8cbf..5e1e6f2d98c2 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -2725,7 +2725,7 @@ static inline void nf_reset(struct sk_buff *skb) | |||
| 2725 | 2725 | ||
| 2726 | static inline void nf_reset_trace(struct sk_buff *skb) | 2726 | static inline void nf_reset_trace(struct sk_buff *skb) |
| 2727 | { | 2727 | { |
| 2728 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) | 2728 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) |
| 2729 | skb->nf_trace = 0; | 2729 | skb->nf_trace = 0; |
| 2730 | #endif | 2730 | #endif |
| 2731 | } | 2731 | } |
| @@ -2742,6 +2742,9 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | |||
| 2742 | dst->nf_bridge = src->nf_bridge; | 2742 | dst->nf_bridge = src->nf_bridge; |
| 2743 | nf_bridge_get(src->nf_bridge); | 2743 | nf_bridge_get(src->nf_bridge); |
| 2744 | #endif | 2744 | #endif |
| 2745 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) | ||
| 2746 | dst->nf_trace = src->nf_trace; | ||
| 2747 | #endif | ||
| 2745 | } | 2748 | } |
| 2746 | 2749 | ||
| 2747 | static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) | 2750 | static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) |
| @@ -2916,5 +2919,22 @@ static inline bool skb_head_is_locked(const struct sk_buff *skb) | |||
| 2916 | { | 2919 | { |
| 2917 | return !skb->head_frag || skb_cloned(skb); | 2920 | return !skb->head_frag || skb_cloned(skb); |
| 2918 | } | 2921 | } |
| 2922 | |||
| 2923 | /** | ||
| 2924 | * skb_gso_network_seglen - Return length of individual segments of a gso packet | ||
| 2925 | * | ||
| 2926 | * @skb: GSO skb | ||
| 2927 | * | ||
| 2928 | * skb_gso_network_seglen is used to determine the real size of the | ||
| 2929 | * individual segments, including Layer3 (IP, IPv6) and L4 headers (TCP/UDP). | ||
| 2930 | * | ||
| 2931 | * The MAC/L2 header is not accounted for. | ||
| 2932 | */ | ||
| 2933 | static inline unsigned int skb_gso_network_seglen(const struct sk_buff *skb) | ||
| 2934 | { | ||
| 2935 | unsigned int hdr_len = skb_transport_header(skb) - | ||
| 2936 | skb_network_header(skb); | ||
| 2937 | return hdr_len + skb_gso_transport_seglen(skb); | ||
| 2938 | } | ||
| 2919 | #endif /* __KERNEL__ */ | 2939 | #endif /* __KERNEL__ */ |
| 2920 | #endif /* _LINUX_SKBUFF_H */ | 2940 | #endif /* _LINUX_SKBUFF_H */ |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 9260abdd67df..b5b2df60299e 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -410,7 +410,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
| 410 | * | 410 | * |
| 411 | * %GFP_NOWAIT - Allocation will not sleep. | 411 | * %GFP_NOWAIT - Allocation will not sleep. |
| 412 | * | 412 | * |
| 413 | * %GFP_THISNODE - Allocate node-local memory only. | 413 | * %__GFP_THISNODE - Allocate node-local memory only. |
| 414 | * | 414 | * |
| 415 | * %GFP_DMA - Allocation suitable for DMA. | 415 | * %GFP_DMA - Allocation suitable for DMA. |
| 416 | * Should only be used for kmalloc() caches. Otherwise, use a | 416 | * Should only be used for kmalloc() caches. Otherwise, use a |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 3834f43f9993..6ae004e437ea 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -188,6 +188,9 @@ static inline void kick_all_cpus_sync(void) { } | |||
| 188 | */ | 188 | */ |
| 189 | extern void arch_disable_smp_support(void); | 189 | extern void arch_disable_smp_support(void); |
| 190 | 190 | ||
| 191 | extern void arch_enable_nonboot_cpus_begin(void); | ||
| 192 | extern void arch_enable_nonboot_cpus_end(void); | ||
| 193 | |||
| 191 | void smp_setup_processor_id(void); | 194 | void smp_setup_processor_id(void); |
| 192 | 195 | ||
| 193 | #endif /* __LINUX_SMP_H */ | 196 | #endif /* __LINUX_SMP_H */ |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a1d4ca290862..4203c66d8803 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -273,7 +273,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 273 | * message while queuing transfers that arrive in the meantime. When the | 273 | * message while queuing transfers that arrive in the meantime. When the |
| 274 | * driver is finished with this message, it must call | 274 | * driver is finished with this message, it must call |
| 275 | * spi_finalize_current_message() so the subsystem can issue the next | 275 | * spi_finalize_current_message() so the subsystem can issue the next |
| 276 | * transfer | 276 | * message |
| 277 | * @unprepare_transfer_hardware: there are currently no more messages on the | 277 | * @unprepare_transfer_hardware: there are currently no more messages on the |
| 278 | * queue so the subsystem notifies the driver that it may relax the | 278 | * queue so the subsystem notifies the driver that it may relax the |
| 279 | * hardware by issuing this call | 279 | * hardware by issuing this call |
| @@ -287,7 +287,10 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 287 | * - return 1 if the transfer is still in progress. When | 287 | * - return 1 if the transfer is still in progress. When |
| 288 | * the driver is finished with this transfer it must | 288 | * the driver is finished with this transfer it must |
| 289 | * call spi_finalize_current_transfer() so the subsystem | 289 | * call spi_finalize_current_transfer() so the subsystem |
| 290 | * can issue the next transfer | 290 | * can issue the next transfer. Note: transfer_one and |
| 291 | * transfer_one_message are mutually exclusive; when both | ||
| 292 | * are set, the generic subsystem does not call your | ||
| 293 | * transfer_one callback. | ||
| 291 | * @unprepare_message: undo any work done by prepare_message(). | 294 | * @unprepare_message: undo any work done by prepare_message(). |
| 292 | * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS | 295 | * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS |
| 293 | * number. Any individual value may be -ENOENT for CS lines that | 296 | * number. Any individual value may be -ENOENT for CS lines that |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 40ed9e9a77e5..a747a77ea584 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -281,13 +281,15 @@ asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, | |||
| 281 | asmlinkage long sys_sched_setparam(pid_t pid, | 281 | asmlinkage long sys_sched_setparam(pid_t pid, |
| 282 | struct sched_param __user *param); | 282 | struct sched_param __user *param); |
| 283 | asmlinkage long sys_sched_setattr(pid_t pid, | 283 | asmlinkage long sys_sched_setattr(pid_t pid, |
| 284 | struct sched_attr __user *attr); | 284 | struct sched_attr __user *attr, |
| 285 | unsigned int flags); | ||
| 285 | asmlinkage long sys_sched_getscheduler(pid_t pid); | 286 | asmlinkage long sys_sched_getscheduler(pid_t pid); |
| 286 | asmlinkage long sys_sched_getparam(pid_t pid, | 287 | asmlinkage long sys_sched_getparam(pid_t pid, |
| 287 | struct sched_param __user *param); | 288 | struct sched_param __user *param); |
| 288 | asmlinkage long sys_sched_getattr(pid_t pid, | 289 | asmlinkage long sys_sched_getattr(pid_t pid, |
| 289 | struct sched_attr __user *attr, | 290 | struct sched_attr __user *attr, |
| 290 | unsigned int size); | 291 | unsigned int size, |
| 292 | unsigned int flags); | ||
| 291 | asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, | 293 | asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, |
| 292 | unsigned long __user *user_mask_ptr); | 294 | unsigned long __user *user_mask_ptr); |
| 293 | asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | 295 | asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index accc497f8d72..7159a0a933df 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -60,6 +60,12 @@ struct tp_module { | |||
| 60 | unsigned int num_tracepoints; | 60 | unsigned int num_tracepoints; |
| 61 | struct tracepoint * const *tracepoints_ptrs; | 61 | struct tracepoint * const *tracepoints_ptrs; |
| 62 | }; | 62 | }; |
| 63 | bool trace_module_has_bad_taint(struct module *mod); | ||
| 64 | #else | ||
| 65 | static inline bool trace_module_has_bad_taint(struct module *mod) | ||
| 66 | { | ||
| 67 | return false; | ||
| 68 | } | ||
| 63 | #endif /* CONFIG_MODULES */ | 69 | #endif /* CONFIG_MODULES */ |
| 64 | 70 | ||
| 65 | struct tracepoint_iter { | 71 | struct tracepoint_iter { |
diff --git a/include/linux/usb.h b/include/linux/usb.h index c716da18c668..7f6eb859873e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -1265,8 +1265,6 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1265 | * @sg: scatter gather buffer list, the buffer size of each element in | 1265 | * @sg: scatter gather buffer list, the buffer size of each element in |
| 1266 | * the list (except the last) must be divisible by the endpoint's | 1266 | * the list (except the last) must be divisible by the endpoint's |
| 1267 | * max packet size if no_sg_constraint isn't set in 'struct usb_bus' | 1267 | * max packet size if no_sg_constraint isn't set in 'struct usb_bus' |
| 1268 | * (FIXME: scatter-gather under xHCI is broken for periodic transfers. | ||
| 1269 | * Do not use urb->sg for interrupt endpoints for now, only bulk.) | ||
| 1270 | * @num_mapped_sgs: (internal) number of mapped sg entries | 1268 | * @num_mapped_sgs: (internal) number of mapped sg entries |
| 1271 | * @num_sgs: number of entries in the sg list | 1269 | * @num_sgs: number of entries in the sg list |
| 1272 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may | 1270 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may |
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index c3fa80745996..2c14d9cdd57a 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
| @@ -88,6 +88,7 @@ | |||
| 88 | #define cdc_ncm_data_intf_is_mbim(x) ((x)->desc.bInterfaceProtocol == USB_CDC_MBIM_PROTO_NTB) | 88 | #define cdc_ncm_data_intf_is_mbim(x) ((x)->desc.bInterfaceProtocol == USB_CDC_MBIM_PROTO_NTB) |
| 89 | 89 | ||
| 90 | struct cdc_ncm_ctx { | 90 | struct cdc_ncm_ctx { |
| 91 | struct usb_cdc_ncm_ntb_parameters ncm_parm; | ||
| 91 | struct hrtimer tx_timer; | 92 | struct hrtimer tx_timer; |
| 92 | struct tasklet_struct bh; | 93 | struct tasklet_struct bh; |
| 93 | 94 | ||
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index c557c6d096de..3a712e2e7d76 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h | |||
| @@ -71,12 +71,14 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
| 71 | THP_ZERO_PAGE_ALLOC, | 71 | THP_ZERO_PAGE_ALLOC, |
| 72 | THP_ZERO_PAGE_ALLOC_FAILED, | 72 | THP_ZERO_PAGE_ALLOC_FAILED, |
| 73 | #endif | 73 | #endif |
| 74 | #ifdef CONFIG_DEBUG_TLBFLUSH | ||
| 74 | #ifdef CONFIG_SMP | 75 | #ifdef CONFIG_SMP |
| 75 | NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */ | 76 | NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */ |
| 76 | NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */ | 77 | NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */ |
| 77 | #endif | 78 | #endif /* CONFIG_SMP */ |
| 78 | NR_TLB_LOCAL_FLUSH_ALL, | 79 | NR_TLB_LOCAL_FLUSH_ALL, |
| 79 | NR_TLB_LOCAL_FLUSH_ONE, | 80 | NR_TLB_LOCAL_FLUSH_ONE, |
| 81 | #endif /* CONFIG_DEBUG_TLBFLUSH */ | ||
| 80 | NR_VM_EVENT_ITEMS | 82 | NR_VM_EVENT_ITEMS |
| 81 | }; | 83 | }; |
| 82 | 84 | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index a67b38415768..67ce70c8279b 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -83,6 +83,14 @@ static inline void vm_events_fold_cpu(int cpu) | |||
| 83 | #define count_vm_numa_events(x, y) do { (void)(y); } while (0) | 83 | #define count_vm_numa_events(x, y) do { (void)(y); } while (0) |
| 84 | #endif /* CONFIG_NUMA_BALANCING */ | 84 | #endif /* CONFIG_NUMA_BALANCING */ |
| 85 | 85 | ||
| 86 | #ifdef CONFIG_DEBUG_TLBFLUSH | ||
| 87 | #define count_vm_tlb_event(x) count_vm_event(x) | ||
| 88 | #define count_vm_tlb_events(x, y) count_vm_events(x, y) | ||
| 89 | #else | ||
| 90 | #define count_vm_tlb_event(x) do {} while (0) | ||
| 91 | #define count_vm_tlb_events(x, y) do { (void)(y); } while (0) | ||
| 92 | #endif | ||
| 93 | |||
| 86 | #define __count_zone_vm_events(item, zone, delta) \ | 94 | #define __count_zone_vm_events(item, zone, delta) \ |
| 87 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ | 95 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ |
| 88 | zone_idx(zone), delta) | 96 | zone_idx(zone), delta) |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 594521ba0d43..704f4f652d0a 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -419,10 +419,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
| 419 | static struct lock_class_key __key; \ | 419 | static struct lock_class_key __key; \ |
| 420 | const char *__lock_name; \ | 420 | const char *__lock_name; \ |
| 421 | \ | 421 | \ |
| 422 | if (__builtin_constant_p(fmt)) \ | 422 | __lock_name = #fmt#args; \ |
| 423 | __lock_name = (fmt); \ | ||
| 424 | else \ | ||
| 425 | __lock_name = #fmt; \ | ||
| 426 | \ | 423 | \ |
| 427 | __alloc_workqueue_key((fmt), (flags), (max_active), \ | 424 | __alloc_workqueue_key((fmt), (flags), (max_active), \ |
| 428 | &__key, __lock_name, ##args); \ | 425 | &__key, __lock_name, ##args); \ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index fc0e4320aa6d..021b8a319b9e 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -97,7 +97,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | |||
| 97 | int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason); | 97 | int try_to_writeback_inodes_sb(struct super_block *, enum wb_reason reason); |
| 98 | int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, | 98 | int try_to_writeback_inodes_sb_nr(struct super_block *, unsigned long nr, |
| 99 | enum wb_reason reason); | 99 | enum wb_reason reason); |
| 100 | void sync_inodes_sb(struct super_block *sb, unsigned long older_than_this); | 100 | void sync_inodes_sb(struct super_block *); |
| 101 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); | 101 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); |
| 102 | void inode_wait_for_writeback(struct inode *inode); | 102 | void inode_wait_for_writeback(struct inode *inode); |
| 103 | 103 | ||
