diff options
Diffstat (limited to 'include')
28 files changed, 249 insertions, 141 deletions
diff --git a/include/asm-generic/mm-arch-hooks.h b/include/asm-generic/mm-arch-hooks.h new file mode 100644 index 000000000000..5ff0e5193f85 --- /dev/null +++ b/include/asm-generic/mm-arch-hooks.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* | ||
| 2 | * Architecture specific mm hooks | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _ASM_GENERIC_MM_ARCH_HOOKS_H | ||
| 6 | #define _ASM_GENERIC_MM_ARCH_HOOKS_H | ||
| 7 | |||
| 8 | /* | ||
| 9 | * This file should be included through arch/../include/asm/Kbuild for | ||
| 10 | * the architecture which doesn't need specific mm hooks. | ||
| 11 | * | ||
| 12 | * In that case, the generic hooks defined in include/linux/mm-arch-hooks.h | ||
| 13 | * are used. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #endif /* _ASM_GENERIC_MM_ARCH_HOOKS_H */ | ||
diff --git a/include/linux/amba/sp810.h b/include/linux/amba/sp810.h index c7df89f99115..58fe9e8b6fd7 100644 --- a/include/linux/amba/sp810.h +++ b/include/linux/amba/sp810.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * ARM PrimeXsys System Controller SP810 header file | 2 | * ARM PrimeXsys System Controller SP810 header file |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009 ST Microelectronics | 4 | * Copyright (C) 2009 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.linux@gmail.com> | 5 | * Viresh Kumar <vireshk@kernel.org> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 58cfab80dd70..1b62d768c7df 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h | |||
| @@ -47,6 +47,7 @@ struct blkcg { | |||
| 47 | 47 | ||
| 48 | struct blkcg_policy_data *pd[BLKCG_MAX_POLS]; | 48 | struct blkcg_policy_data *pd[BLKCG_MAX_POLS]; |
| 49 | 49 | ||
| 50 | struct list_head all_blkcgs_node; | ||
| 50 | #ifdef CONFIG_CGROUP_WRITEBACK | 51 | #ifdef CONFIG_CGROUP_WRITEBACK |
| 51 | struct list_head cgwb_list; | 52 | struct list_head cgwb_list; |
| 52 | #endif | 53 | #endif |
| @@ -88,18 +89,12 @@ struct blkg_policy_data { | |||
| 88 | * Policies that need to keep per-blkcg data which is independent | 89 | * Policies that need to keep per-blkcg data which is independent |
| 89 | * from any request_queue associated to it must specify its size | 90 | * from any request_queue associated to it must specify its size |
| 90 | * with the cpd_size field of the blkcg_policy structure and | 91 | * with the cpd_size field of the blkcg_policy structure and |
| 91 | * embed a blkcg_policy_data in it. blkcg core allocates | 92 | * embed a blkcg_policy_data in it. cpd_init() is invoked to let |
| 92 | * policy-specific per-blkcg structures lazily the first time | 93 | * each policy handle per-blkcg data. |
| 93 | * they are actually needed, so it handles them together with | ||
| 94 | * blkgs. cpd_init() is invoked to let each policy handle | ||
| 95 | * per-blkcg data. | ||
| 96 | */ | 94 | */ |
| 97 | struct blkcg_policy_data { | 95 | struct blkcg_policy_data { |
| 98 | /* the policy id this per-policy data belongs to */ | 96 | /* the policy id this per-policy data belongs to */ |
| 99 | int plid; | 97 | int plid; |
| 100 | |||
| 101 | /* used during policy activation */ | ||
| 102 | struct list_head alloc_node; | ||
| 103 | }; | 98 | }; |
| 104 | 99 | ||
| 105 | /* association between a blk cgroup and a request queue */ | 100 | /* association between a blk cgroup and a request queue */ |
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h index a240b18e86fa..08bffcc466de 100644 --- a/include/linux/clkdev.h +++ b/include/linux/clkdev.h | |||
| @@ -33,18 +33,19 @@ struct clk_lookup { | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | 35 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, |
| 36 | const char *dev_fmt, ...); | 36 | const char *dev_fmt, ...) __printf(3, 4); |
| 37 | 37 | ||
| 38 | void clkdev_add(struct clk_lookup *cl); | 38 | void clkdev_add(struct clk_lookup *cl); |
| 39 | void clkdev_drop(struct clk_lookup *cl); | 39 | void clkdev_drop(struct clk_lookup *cl); |
| 40 | 40 | ||
| 41 | struct clk_lookup *clkdev_create(struct clk *clk, const char *con_id, | 41 | struct clk_lookup *clkdev_create(struct clk *clk, const char *con_id, |
| 42 | const char *dev_fmt, ...); | 42 | const char *dev_fmt, ...) __printf(3, 4); |
| 43 | 43 | ||
| 44 | void clkdev_add_table(struct clk_lookup *, size_t); | 44 | void clkdev_add_table(struct clk_lookup *, size_t); |
| 45 | int clk_add_alias(const char *, const char *, const char *, struct device *); | 45 | int clk_add_alias(const char *, const char *, const char *, struct device *); |
| 46 | 46 | ||
| 47 | int clk_register_clkdev(struct clk *, const char *, const char *, ...); | 47 | int clk_register_clkdev(struct clk *, const char *, const char *, ...) |
| 48 | __printf(3, 4); | ||
| 48 | int clk_register_clkdevs(struct clk *, struct clk_lookup *, size_t); | 49 | int clk_register_clkdevs(struct clk *, struct clk_lookup *, size_t); |
| 49 | 50 | ||
| 50 | #ifdef CONFIG_COMMON_CLK | 51 | #ifdef CONFIG_COMMON_CLK |
diff --git a/include/linux/compat.h b/include/linux/compat.h index ab25814690bc..a76c9172b2eb 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -424,7 +424,7 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, | |||
| 424 | 424 | ||
| 425 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); | 425 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); |
| 426 | 426 | ||
| 427 | extern int compat_printk(const char *fmt, ...); | 427 | extern __printf(1, 2) int compat_printk(const char *fmt, ...); |
| 428 | extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat); | 428 | extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat); |
| 429 | extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set); | 429 | extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set); |
| 430 | 430 | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index c9e5c57e4edf..63a36e89d0eb 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
| @@ -64,7 +64,8 @@ struct config_item { | |||
| 64 | struct dentry *ci_dentry; | 64 | struct dentry *ci_dentry; |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | extern int config_item_set_name(struct config_item *, const char *, ...); | 67 | extern __printf(2, 3) |
| 68 | int config_item_set_name(struct config_item *, const char *, ...); | ||
| 68 | 69 | ||
| 69 | static inline char *config_item_name(struct config_item * item) | 70 | static inline char *config_item_name(struct config_item * item) |
| 70 | { | 71 | { |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index c0fb6b1b4712..23c30bdcca86 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -40,9 +40,10 @@ extern void cpu_remove_dev_attr(struct device_attribute *attr); | |||
| 40 | extern int cpu_add_dev_attr_group(struct attribute_group *attrs); | 40 | extern int cpu_add_dev_attr_group(struct attribute_group *attrs); |
| 41 | extern void cpu_remove_dev_attr_group(struct attribute_group *attrs); | 41 | extern void cpu_remove_dev_attr_group(struct attribute_group *attrs); |
| 42 | 42 | ||
| 43 | extern struct device *cpu_device_create(struct device *parent, void *drvdata, | 43 | extern __printf(4, 5) |
| 44 | const struct attribute_group **groups, | 44 | struct device *cpu_device_create(struct device *parent, void *drvdata, |
| 45 | const char *fmt, ...); | 45 | const struct attribute_group **groups, |
| 46 | const char *fmt, ...); | ||
| 46 | #ifdef CONFIG_HOTPLUG_CPU | 47 | #ifdef CONFIG_HOTPLUG_CPU |
| 47 | extern void unregister_cpu(struct cpu *cpu); | 48 | extern void unregister_cpu(struct cpu *cpu); |
| 48 | extern ssize_t arch_cpu_probe(const char *, size_t); | 49 | extern ssize_t arch_cpu_probe(const char *, size_t); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index d2d50249b7b2..d67ae119cf4e 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -327,7 +327,8 @@ static inline unsigned d_count(const struct dentry *dentry) | |||
| 327 | /* | 327 | /* |
| 328 | * helper function for dentry_operations.d_dname() members | 328 | * helper function for dentry_operations.d_dname() members |
| 329 | */ | 329 | */ |
| 330 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 330 | extern __printf(4, 5) |
| 331 | char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | ||
| 331 | extern char *simple_dname(struct dentry *, char *, int); | 332 | extern char *simple_dname(struct dentry *, char *, int); |
| 332 | 333 | ||
| 333 | extern char *__d_path(const struct path *, const struct path *, char *, int); | 334 | extern char *__d_path(const struct path *, const struct path *, char *, int); |
diff --git a/include/linux/device.h b/include/linux/device.h index 5a31bf3a4024..a2b4ea70a946 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -637,8 +637,9 @@ extern int devres_release_group(struct device *dev, void *id); | |||
| 637 | 637 | ||
| 638 | /* managed devm_k.alloc/kfree for device drivers */ | 638 | /* managed devm_k.alloc/kfree for device drivers */ |
| 639 | extern void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp); | 639 | extern void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp); |
| 640 | extern char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt, | 640 | extern __printf(3, 0) |
| 641 | va_list ap); | 641 | char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt, |
| 642 | va_list ap); | ||
| 642 | extern __printf(3, 4) | 643 | extern __printf(3, 4) |
| 643 | char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...); | 644 | char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...); |
| 644 | static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) | 645 | static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) |
| @@ -1011,12 +1012,10 @@ extern int __must_check device_reprobe(struct device *dev); | |||
| 1011 | /* | 1012 | /* |
| 1012 | * Easy functions for dynamically creating devices on the fly | 1013 | * Easy functions for dynamically creating devices on the fly |
| 1013 | */ | 1014 | */ |
| 1014 | extern struct device *device_create_vargs(struct class *cls, | 1015 | extern __printf(5, 0) |
| 1015 | struct device *parent, | 1016 | struct device *device_create_vargs(struct class *cls, struct device *parent, |
| 1016 | dev_t devt, | 1017 | dev_t devt, void *drvdata, |
| 1017 | void *drvdata, | 1018 | const char *fmt, va_list vargs); |
| 1018 | const char *fmt, | ||
| 1019 | va_list vargs); | ||
| 1020 | extern __printf(5, 6) | 1019 | extern __printf(5, 6) |
| 1021 | struct device *device_create(struct class *cls, struct device *parent, | 1020 | struct device *device_create(struct class *cls, struct device *parent, |
| 1022 | dev_t devt, void *drvdata, | 1021 | dev_t devt, void *drvdata, |
diff --git a/include/linux/fs.h b/include/linux/fs.h index a0653e560c26..cc008c338f5a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1046,12 +1046,12 @@ extern void locks_remove_file(struct file *); | |||
| 1046 | extern void locks_release_private(struct file_lock *); | 1046 | extern void locks_release_private(struct file_lock *); |
| 1047 | extern void posix_test_lock(struct file *, struct file_lock *); | 1047 | extern void posix_test_lock(struct file *, struct file_lock *); |
| 1048 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); | 1048 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); |
| 1049 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 1049 | extern int posix_lock_inode_wait(struct inode *, struct file_lock *); |
| 1050 | extern int posix_unblock_lock(struct file_lock *); | 1050 | extern int posix_unblock_lock(struct file_lock *); |
| 1051 | extern int vfs_test_lock(struct file *, struct file_lock *); | 1051 | extern int vfs_test_lock(struct file *, struct file_lock *); |
| 1052 | extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); | 1052 | extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); |
| 1053 | extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); | 1053 | extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); |
| 1054 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); | 1054 | extern int flock_lock_inode_wait(struct inode *inode, struct file_lock *fl); |
| 1055 | extern int __break_lease(struct inode *inode, unsigned int flags, unsigned int type); | 1055 | extern int __break_lease(struct inode *inode, unsigned int flags, unsigned int type); |
| 1056 | extern void lease_get_mtime(struct inode *, struct timespec *time); | 1056 | extern void lease_get_mtime(struct inode *, struct timespec *time); |
| 1057 | extern int generic_setlease(struct file *, long, struct file_lock **, void **priv); | 1057 | extern int generic_setlease(struct file *, long, struct file_lock **, void **priv); |
| @@ -1137,7 +1137,8 @@ static inline int posix_lock_file(struct file *filp, struct file_lock *fl, | |||
| 1137 | return -ENOLCK; | 1137 | return -ENOLCK; |
| 1138 | } | 1138 | } |
| 1139 | 1139 | ||
| 1140 | static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl) | 1140 | static inline int posix_lock_inode_wait(struct inode *inode, |
| 1141 | struct file_lock *fl) | ||
| 1141 | { | 1142 | { |
| 1142 | return -ENOLCK; | 1143 | return -ENOLCK; |
| 1143 | } | 1144 | } |
| @@ -1163,8 +1164,8 @@ static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl) | |||
| 1163 | return 0; | 1164 | return 0; |
| 1164 | } | 1165 | } |
| 1165 | 1166 | ||
| 1166 | static inline int flock_lock_file_wait(struct file *filp, | 1167 | static inline int flock_lock_inode_wait(struct inode *inode, |
| 1167 | struct file_lock *request) | 1168 | struct file_lock *request) |
| 1168 | { | 1169 | { |
| 1169 | return -ENOLCK; | 1170 | return -ENOLCK; |
| 1170 | } | 1171 | } |
| @@ -1202,6 +1203,20 @@ static inline void show_fd_locks(struct seq_file *f, | |||
| 1202 | struct file *filp, struct files_struct *files) {} | 1203 | struct file *filp, struct files_struct *files) {} |
| 1203 | #endif /* !CONFIG_FILE_LOCKING */ | 1204 | #endif /* !CONFIG_FILE_LOCKING */ |
| 1204 | 1205 | ||
| 1206 | static inline struct inode *file_inode(const struct file *f) | ||
| 1207 | { | ||
| 1208 | return f->f_inode; | ||
| 1209 | } | ||
| 1210 | |||
| 1211 | static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl) | ||
| 1212 | { | ||
| 1213 | return posix_lock_inode_wait(file_inode(filp), fl); | ||
| 1214 | } | ||
| 1215 | |||
| 1216 | static inline int flock_lock_file_wait(struct file *filp, struct file_lock *fl) | ||
| 1217 | { | ||
| 1218 | return flock_lock_inode_wait(file_inode(filp), fl); | ||
| 1219 | } | ||
| 1205 | 1220 | ||
| 1206 | struct fasync_struct { | 1221 | struct fasync_struct { |
| 1207 | spinlock_t fa_lock; | 1222 | spinlock_t fa_lock; |
| @@ -2011,11 +2026,6 @@ extern void ihold(struct inode * inode); | |||
| 2011 | extern void iput(struct inode *); | 2026 | extern void iput(struct inode *); |
| 2012 | extern int generic_update_time(struct inode *, struct timespec *, int); | 2027 | extern int generic_update_time(struct inode *, struct timespec *, int); |
| 2013 | 2028 | ||
| 2014 | static inline struct inode *file_inode(const struct file *f) | ||
| 2015 | { | ||
| 2016 | return f->f_inode; | ||
| 2017 | } | ||
| 2018 | |||
| 2019 | /* /sys/fs */ | 2029 | /* /sys/fs */ |
| 2020 | extern struct kobject *fs_kobj; | 2030 | extern struct kobject *fs_kobj; |
| 2021 | 2031 | ||
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index cc7ec129b329..c8393cd4d44f 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
| @@ -45,7 +45,7 @@ struct seq_file; | |||
| 45 | * @base: identifies the first GPIO number handled by this chip; | 45 | * @base: identifies the first GPIO number handled by this chip; |
| 46 | * or, if negative during registration, requests dynamic ID allocation. | 46 | * or, if negative during registration, requests dynamic ID allocation. |
| 47 | * DEPRECATION: providing anything non-negative and nailing the base | 47 | * DEPRECATION: providing anything non-negative and nailing the base |
| 48 | * base offset of GPIO chips is deprecated. Please pass -1 as base to | 48 | * offset of GPIO chips is deprecated. Please pass -1 as base to |
| 49 | * let gpiolib select the chip base in all possible cases. We want to | 49 | * let gpiolib select the chip base in all possible cases. We want to |
| 50 | * get rid of the static GPIO number space in the long run. | 50 | * get rid of the static GPIO number space in the long run. |
| 51 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO | 51 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO |
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index 0042bf330b99..c02b5ce6c5cd 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h | |||
| @@ -230,6 +230,7 @@ struct hid_sensor_common { | |||
| 230 | struct platform_device *pdev; | 230 | struct platform_device *pdev; |
| 231 | unsigned usage_id; | 231 | unsigned usage_id; |
| 232 | atomic_t data_ready; | 232 | atomic_t data_ready; |
| 233 | atomic_t user_requested_state; | ||
| 233 | struct iio_trigger *trigger; | 234 | struct iio_trigger *trigger; |
| 234 | struct hid_sensor_hub_attribute_info poll; | 235 | struct hid_sensor_hub_attribute_info poll; |
| 235 | struct hid_sensor_hub_attribute_info report_state; | 236 | struct hid_sensor_hub_attribute_info report_state; |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 205026175c42..d891f949466a 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -460,15 +460,14 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h, | |||
| 460 | return &mm->page_table_lock; | 460 | return &mm->page_table_lock; |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | static inline bool hugepages_supported(void) | 463 | #ifndef hugepages_supported |
| 464 | { | 464 | /* |
| 465 | /* | 465 | * Some platform decide whether they support huge pages at boot |
| 466 | * Some platform decide whether they support huge pages at boot | 466 | * time. Some of them, such as powerpc, set HPAGE_SHIFT to 0 |
| 467 | * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when | 467 | * when there is no such support |
| 468 | * there is no such support | 468 | */ |
| 469 | */ | 469 | #define hugepages_supported() (HPAGE_SHIFT != 0) |
| 470 | return HPAGE_SHIFT != 0; | 470 | #endif |
| 471 | } | ||
| 472 | 471 | ||
| 473 | #else /* CONFIG_HUGETLB_PAGE */ | 472 | #else /* CONFIG_HUGETLB_PAGE */ |
| 474 | struct hstate {}; | 473 | struct hstate {}; |
diff --git a/include/linux/init.h b/include/linux/init.h index 7c68c36d3fd8..b449f378f995 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -282,68 +282,8 @@ void __init parse_early_param(void); | |||
| 282 | void __init parse_early_options(char *cmdline); | 282 | void __init parse_early_options(char *cmdline); |
| 283 | #endif /* __ASSEMBLY__ */ | 283 | #endif /* __ASSEMBLY__ */ |
| 284 | 284 | ||
| 285 | /** | ||
| 286 | * module_init() - driver initialization entry point | ||
| 287 | * @x: function to be run at kernel boot time or module insertion | ||
| 288 | * | ||
| 289 | * module_init() will either be called during do_initcalls() (if | ||
| 290 | * builtin) or at module insertion time (if a module). There can only | ||
| 291 | * be one per module. | ||
| 292 | */ | ||
| 293 | #define module_init(x) __initcall(x); | ||
| 294 | |||
| 295 | /** | ||
| 296 | * module_exit() - driver exit entry point | ||
| 297 | * @x: function to be run when driver is removed | ||
| 298 | * | ||
| 299 | * module_exit() will wrap the driver clean-up code | ||
| 300 | * with cleanup_module() when used with rmmod when | ||
| 301 | * the driver is a module. If the driver is statically | ||
| 302 | * compiled into the kernel, module_exit() has no effect. | ||
| 303 | * There can only be one per module. | ||
| 304 | */ | ||
| 305 | #define module_exit(x) __exitcall(x); | ||
| 306 | |||
| 307 | #else /* MODULE */ | 285 | #else /* MODULE */ |
| 308 | 286 | ||
| 309 | /* | ||
| 310 | * In most cases loadable modules do not need custom | ||
| 311 | * initcall levels. There are still some valid cases where | ||
| 312 | * a driver may be needed early if built in, and does not | ||
| 313 | * matter when built as a loadable module. Like bus | ||
| 314 | * snooping debug drivers. | ||
| 315 | */ | ||
| 316 | #define early_initcall(fn) module_init(fn) | ||
| 317 | #define core_initcall(fn) module_init(fn) | ||
| 318 | #define core_initcall_sync(fn) module_init(fn) | ||
| 319 | #define postcore_initcall(fn) module_init(fn) | ||
| 320 | #define postcore_initcall_sync(fn) module_init(fn) | ||
| 321 | #define arch_initcall(fn) module_init(fn) | ||
| 322 | #define subsys_initcall(fn) module_init(fn) | ||
| 323 | #define subsys_initcall_sync(fn) module_init(fn) | ||
| 324 | #define fs_initcall(fn) module_init(fn) | ||
| 325 | #define fs_initcall_sync(fn) module_init(fn) | ||
| 326 | #define rootfs_initcall(fn) module_init(fn) | ||
| 327 | #define device_initcall(fn) module_init(fn) | ||
| 328 | #define device_initcall_sync(fn) module_init(fn) | ||
| 329 | #define late_initcall(fn) module_init(fn) | ||
| 330 | #define late_initcall_sync(fn) module_init(fn) | ||
| 331 | |||
| 332 | #define console_initcall(fn) module_init(fn) | ||
| 333 | #define security_initcall(fn) module_init(fn) | ||
| 334 | |||
| 335 | /* Each module must use one module_init(). */ | ||
| 336 | #define module_init(initfn) \ | ||
| 337 | static inline initcall_t __inittest(void) \ | ||
| 338 | { return initfn; } \ | ||
| 339 | int init_module(void) __attribute__((alias(#initfn))); | ||
| 340 | |||
| 341 | /* This is only required if you want to be unloadable. */ | ||
| 342 | #define module_exit(exitfn) \ | ||
| 343 | static inline exitcall_t __exittest(void) \ | ||
| 344 | { return exitfn; } \ | ||
| 345 | void cleanup_module(void) __attribute__((alias(#exitfn))); | ||
| 346 | |||
| 347 | #define __setup_param(str, unique_id, fn) /* nothing */ | 287 | #define __setup_param(str, unique_id, fn) /* nothing */ |
| 348 | #define __setup(str, func) /* nothing */ | 288 | #define __setup(str, func) /* nothing */ |
| 349 | #endif | 289 | #endif |
| @@ -351,24 +291,6 @@ void __init parse_early_options(char *cmdline); | |||
| 351 | /* Data marked not to be saved by software suspend */ | 291 | /* Data marked not to be saved by software suspend */ |
| 352 | #define __nosavedata __section(.data..nosave) | 292 | #define __nosavedata __section(.data..nosave) |
| 353 | 293 | ||
| 354 | /* This means "can be init if no module support, otherwise module load | ||
| 355 | may call it." */ | ||
| 356 | #ifdef CONFIG_MODULES | ||
| 357 | #define __init_or_module | ||
| 358 | #define __initdata_or_module | ||
| 359 | #define __initconst_or_module | ||
| 360 | #define __INIT_OR_MODULE .text | ||
| 361 | #define __INITDATA_OR_MODULE .data | ||
| 362 | #define __INITRODATA_OR_MODULE .section ".rodata","a",%progbits | ||
| 363 | #else | ||
| 364 | #define __init_or_module __init | ||
| 365 | #define __initdata_or_module __initdata | ||
| 366 | #define __initconst_or_module __initconst | ||
| 367 | #define __INIT_OR_MODULE __INIT | ||
| 368 | #define __INITDATA_OR_MODULE __INITDATA | ||
| 369 | #define __INITRODATA_OR_MODULE __INITRODATA | ||
| 370 | #endif /*CONFIG_MODULES*/ | ||
| 371 | |||
| 372 | #ifdef MODULE | 294 | #ifdef MODULE |
| 373 | #define __exit_p(x) x | 295 | #define __exit_p(x) x |
| 374 | #else | 296 | #else |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index dc767f7c3704..f9c1b6d0f2e4 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -258,7 +258,7 @@ extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr, | |||
| 258 | void *data); | 258 | void *data); |
| 259 | struct device *iommu_device_create(struct device *parent, void *drvdata, | 259 | struct device *iommu_device_create(struct device *parent, void *drvdata, |
| 260 | const struct attribute_group **groups, | 260 | const struct attribute_group **groups, |
| 261 | const char *fmt, ...); | 261 | const char *fmt, ...) __printf(4, 5); |
| 262 | void iommu_device_destroy(struct device *dev); | 262 | void iommu_device_destroy(struct device *dev); |
| 263 | int iommu_device_link(struct device *dev, struct device *link); | 263 | int iommu_device_link(struct device *dev, struct device *link); |
| 264 | void iommu_device_unlink(struct device *dev, struct device *link); | 264 | void iommu_device_unlink(struct device *dev, struct device *link); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5f0be58640ea..5582410727cb 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -411,7 +411,8 @@ extern __printf(3, 0) | |||
| 411 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); | 411 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); |
| 412 | extern __printf(2, 3) | 412 | extern __printf(2, 3) |
| 413 | char *kasprintf(gfp_t gfp, const char *fmt, ...); | 413 | char *kasprintf(gfp_t gfp, const char *fmt, ...); |
| 414 | extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); | 414 | extern __printf(2, 0) |
| 415 | char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); | ||
| 415 | 416 | ||
| 416 | extern __scanf(2, 3) | 417 | extern __scanf(2, 3) |
| 417 | int sscanf(const char *, const char *, ...); | 418 | int sscanf(const char *, const char *, ...); |
| @@ -679,10 +680,10 @@ do { \ | |||
| 679 | __ftrace_vprintk(_THIS_IP_, fmt, vargs); \ | 680 | __ftrace_vprintk(_THIS_IP_, fmt, vargs); \ |
| 680 | } while (0) | 681 | } while (0) |
| 681 | 682 | ||
| 682 | extern int | 683 | extern __printf(2, 0) int |
| 683 | __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); | 684 | __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); |
| 684 | 685 | ||
| 685 | extern int | 686 | extern __printf(2, 0) int |
| 686 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | 687 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); |
| 687 | 688 | ||
| 688 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); | 689 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
| @@ -702,7 +703,7 @@ int trace_printk(const char *fmt, ...) | |||
| 702 | { | 703 | { |
| 703 | return 0; | 704 | return 0; |
| 704 | } | 705 | } |
| 705 | static inline int | 706 | static __printf(1, 0) inline int |
| 706 | ftrace_vprintk(const char *fmt, va_list ap) | 707 | ftrace_vprintk(const char *fmt, va_list ap) |
| 707 | { | 708 | { |
| 708 | return 0; | 709 | return 0; |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 2d61b909f414..637f67002c5a 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -80,8 +80,9 @@ struct kobject { | |||
| 80 | 80 | ||
| 81 | extern __printf(2, 3) | 81 | extern __printf(2, 3) |
| 82 | int kobject_set_name(struct kobject *kobj, const char *name, ...); | 82 | int kobject_set_name(struct kobject *kobj, const char *name, ...); |
| 83 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | 83 | extern __printf(2, 0) |
| 84 | va_list vargs); | 84 | int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, |
| 85 | va_list vargs); | ||
| 85 | 86 | ||
| 86 | static inline const char *kobject_name(const struct kobject *kobj) | 87 | static inline const char *kobject_name(const struct kobject *kobj) |
| 87 | { | 88 | { |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9564fd78c547..05e99b8ef465 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -734,6 +734,24 @@ static inline bool kvm_arch_has_noncoherent_dma(struct kvm *kvm) | |||
| 734 | return false; | 734 | return false; |
| 735 | } | 735 | } |
| 736 | #endif | 736 | #endif |
| 737 | #ifdef __KVM_HAVE_ARCH_ASSIGNED_DEVICE | ||
| 738 | void kvm_arch_start_assignment(struct kvm *kvm); | ||
| 739 | void kvm_arch_end_assignment(struct kvm *kvm); | ||
| 740 | bool kvm_arch_has_assigned_device(struct kvm *kvm); | ||
| 741 | #else | ||
| 742 | static inline void kvm_arch_start_assignment(struct kvm *kvm) | ||
| 743 | { | ||
| 744 | } | ||
| 745 | |||
| 746 | static inline void kvm_arch_end_assignment(struct kvm *kvm) | ||
| 747 | { | ||
| 748 | } | ||
| 749 | |||
| 750 | static inline bool kvm_arch_has_assigned_device(struct kvm *kvm) | ||
| 751 | { | ||
| 752 | return false; | ||
| 753 | } | ||
| 754 | #endif | ||
| 737 | 755 | ||
| 738 | static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu) | 756 | static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu) |
| 739 | { | 757 | { |
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index c5d52780d6a0..3ba327af055c 100644 --- a/include/linux/mmiotrace.h +++ b/include/linux/mmiotrace.h | |||
| @@ -106,6 +106,6 @@ extern void enable_mmiotrace(void); | |||
| 106 | extern void disable_mmiotrace(void); | 106 | extern void disable_mmiotrace(void); |
| 107 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); | 107 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); |
| 108 | extern void mmio_trace_mapping(struct mmiotrace_map *map); | 108 | extern void mmio_trace_mapping(struct mmiotrace_map *map); |
| 109 | extern int mmio_trace_printk(const char *fmt, va_list args); | 109 | extern __printf(1, 0) int mmio_trace_printk(const char *fmt, va_list args); |
| 110 | 110 | ||
| 111 | #endif /* _LINUX_MMIOTRACE_H */ | 111 | #endif /* _LINUX_MMIOTRACE_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index d67b1932cc59..3a19c79918e0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
| 12 | #include <linux/cache.h> | 12 | #include <linux/cache.h> |
| 13 | #include <linux/kmod.h> | 13 | #include <linux/kmod.h> |
| 14 | #include <linux/init.h> | ||
| 14 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
| 15 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
| 16 | #include <linux/kobject.h> | 17 | #include <linux/kobject.h> |
| @@ -71,6 +72,89 @@ extern struct module_attribute module_uevent; | |||
| 71 | extern int init_module(void); | 72 | extern int init_module(void); |
| 72 | extern void cleanup_module(void); | 73 | extern void cleanup_module(void); |
| 73 | 74 | ||
| 75 | #ifndef MODULE | ||
| 76 | /** | ||
| 77 | * module_init() - driver initialization entry point | ||
| 78 | * @x: function to be run at kernel boot time or module insertion | ||
| 79 | * | ||
| 80 | * module_init() will either be called during do_initcalls() (if | ||
| 81 | * builtin) or at module insertion time (if a module). There can only | ||
| 82 | * be one per module. | ||
| 83 | */ | ||
| 84 | #define module_init(x) __initcall(x); | ||
| 85 | |||
| 86 | /** | ||
| 87 | * module_exit() - driver exit entry point | ||
| 88 | * @x: function to be run when driver is removed | ||
| 89 | * | ||
| 90 | * module_exit() will wrap the driver clean-up code | ||
| 91 | * with cleanup_module() when used with rmmod when | ||
| 92 | * the driver is a module. If the driver is statically | ||
| 93 | * compiled into the kernel, module_exit() has no effect. | ||
| 94 | * There can only be one per module. | ||
| 95 | */ | ||
| 96 | #define module_exit(x) __exitcall(x); | ||
| 97 | |||
| 98 | #else /* MODULE */ | ||
| 99 | |||
| 100 | /* | ||
| 101 | * In most cases loadable modules do not need custom | ||
| 102 | * initcall levels. There are still some valid cases where | ||
| 103 | * a driver may be needed early if built in, and does not | ||
| 104 | * matter when built as a loadable module. Like bus | ||
| 105 | * snooping debug drivers. | ||
| 106 | */ | ||
| 107 | #define early_initcall(fn) module_init(fn) | ||
| 108 | #define core_initcall(fn) module_init(fn) | ||
| 109 | #define core_initcall_sync(fn) module_init(fn) | ||
| 110 | #define postcore_initcall(fn) module_init(fn) | ||
| 111 | #define postcore_initcall_sync(fn) module_init(fn) | ||
| 112 | #define arch_initcall(fn) module_init(fn) | ||
| 113 | #define subsys_initcall(fn) module_init(fn) | ||
| 114 | #define subsys_initcall_sync(fn) module_init(fn) | ||
| 115 | #define fs_initcall(fn) module_init(fn) | ||
| 116 | #define fs_initcall_sync(fn) module_init(fn) | ||
| 117 | #define rootfs_initcall(fn) module_init(fn) | ||
| 118 | #define device_initcall(fn) module_init(fn) | ||
| 119 | #define device_initcall_sync(fn) module_init(fn) | ||
| 120 | #define late_initcall(fn) module_init(fn) | ||
| 121 | #define late_initcall_sync(fn) module_init(fn) | ||
| 122 | |||
| 123 | #define console_initcall(fn) module_init(fn) | ||
| 124 | #define security_initcall(fn) module_init(fn) | ||
| 125 | |||
| 126 | /* Each module must use one module_init(). */ | ||
| 127 | #define module_init(initfn) \ | ||
| 128 | static inline initcall_t __inittest(void) \ | ||
| 129 | { return initfn; } \ | ||
| 130 | int init_module(void) __attribute__((alias(#initfn))); | ||
| 131 | |||
| 132 | /* This is only required if you want to be unloadable. */ | ||
| 133 | #define module_exit(exitfn) \ | ||
| 134 | static inline exitcall_t __exittest(void) \ | ||
| 135 | { return exitfn; } \ | ||
| 136 | void cleanup_module(void) __attribute__((alias(#exitfn))); | ||
| 137 | |||
| 138 | #endif | ||
| 139 | |||
| 140 | /* This means "can be init if no module support, otherwise module load | ||
| 141 | may call it." */ | ||
| 142 | #ifdef CONFIG_MODULES | ||
| 143 | #define __init_or_module | ||
| 144 | #define __initdata_or_module | ||
| 145 | #define __initconst_or_module | ||
| 146 | #define __INIT_OR_MODULE .text | ||
| 147 | #define __INITDATA_OR_MODULE .data | ||
| 148 | #define __INITRODATA_OR_MODULE .section ".rodata","a",%progbits | ||
| 149 | #else | ||
| 150 | #define __init_or_module __init | ||
| 151 | #define __initdata_or_module __initdata | ||
| 152 | #define __initconst_or_module __initconst | ||
| 153 | #define __INIT_OR_MODULE __INIT | ||
| 154 | #define __INITDATA_OR_MODULE __INITDATA | ||
| 155 | #define __INITRODATA_OR_MODULE __INITRODATA | ||
| 156 | #endif /*CONFIG_MODULES*/ | ||
| 157 | |||
| 74 | /* Archs provide a method of finding the correct exception table. */ | 158 | /* Archs provide a method of finding the correct exception table. */ |
| 75 | struct exception_table_entry; | 159 | struct exception_table_entry; |
| 76 | 160 | ||
diff --git a/include/linux/page_owner.h b/include/linux/page_owner.h index b48c3471c254..cacaabea8a09 100644 --- a/include/linux/page_owner.h +++ b/include/linux/page_owner.h | |||
| @@ -8,6 +8,7 @@ extern struct page_ext_operations page_owner_ops; | |||
| 8 | extern void __reset_page_owner(struct page *page, unsigned int order); | 8 | extern void __reset_page_owner(struct page *page, unsigned int order); |
| 9 | extern void __set_page_owner(struct page *page, | 9 | extern void __set_page_owner(struct page *page, |
| 10 | unsigned int order, gfp_t gfp_mask); | 10 | unsigned int order, gfp_t gfp_mask); |
| 11 | extern gfp_t __get_page_owner_gfp(struct page *page); | ||
| 11 | 12 | ||
| 12 | static inline void reset_page_owner(struct page *page, unsigned int order) | 13 | static inline void reset_page_owner(struct page *page, unsigned int order) |
| 13 | { | 14 | { |
| @@ -25,6 +26,14 @@ static inline void set_page_owner(struct page *page, | |||
| 25 | 26 | ||
| 26 | __set_page_owner(page, order, gfp_mask); | 27 | __set_page_owner(page, order, gfp_mask); |
| 27 | } | 28 | } |
| 29 | |||
| 30 | static inline gfp_t get_page_owner_gfp(struct page *page) | ||
| 31 | { | ||
| 32 | if (likely(!page_owner_inited)) | ||
| 33 | return 0; | ||
| 34 | |||
| 35 | return __get_page_owner_gfp(page); | ||
| 36 | } | ||
| 28 | #else | 37 | #else |
| 29 | static inline void reset_page_owner(struct page *page, unsigned int order) | 38 | static inline void reset_page_owner(struct page *page, unsigned int order) |
| 30 | { | 39 | { |
| @@ -33,6 +42,10 @@ static inline void set_page_owner(struct page *page, | |||
| 33 | unsigned int order, gfp_t gfp_mask) | 42 | unsigned int order, gfp_t gfp_mask) |
| 34 | { | 43 | { |
| 35 | } | 44 | } |
| 45 | static inline gfp_t get_page_owner_gfp(struct page *page) | ||
| 46 | { | ||
| 47 | return 0; | ||
| 48 | } | ||
| 36 | 49 | ||
| 37 | #endif /* CONFIG_PAGE_OWNER */ | 50 | #endif /* CONFIG_PAGE_OWNER */ |
| 38 | #endif /* __LINUX_PAGE_OWNER_H */ | 51 | #endif /* __LINUX_PAGE_OWNER_H */ |
diff --git a/include/linux/pata_arasan_cf_data.h b/include/linux/pata_arasan_cf_data.h index 3cc21c9cc1e8..9fade5dd2e86 100644 --- a/include/linux/pata_arasan_cf_data.h +++ b/include/linux/pata_arasan_cf_data.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Arasan Compact Flash host controller platform data header file | 4 | * Arasan Compact Flash host controller platform data header file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2011 ST Microelectronics | 6 | * Copyright (C) 2011 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.linux@gmail.com> | 7 | * Viresh Kumar <vireshk@kernel.org> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 58b1fec40d37..a6298b27ac99 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -122,7 +122,7 @@ static inline __printf(1, 2) __cold | |||
| 122 | void early_printk(const char *s, ...) { } | 122 | void early_printk(const char *s, ...) { } |
| 123 | #endif | 123 | #endif |
| 124 | 124 | ||
| 125 | typedef int(*printk_func_t)(const char *fmt, va_list args); | 125 | typedef __printf(1, 0) int (*printk_func_t)(const char *fmt, va_list args); |
| 126 | 126 | ||
| 127 | #ifdef CONFIG_PRINTK | 127 | #ifdef CONFIG_PRINTK |
| 128 | asmlinkage __printf(5, 0) | 128 | asmlinkage __printf(5, 0) |
| @@ -166,7 +166,7 @@ char *log_buf_addr_get(void); | |||
| 166 | u32 log_buf_len_get(void); | 166 | u32 log_buf_len_get(void); |
| 167 | void log_buf_kexec_setup(void); | 167 | void log_buf_kexec_setup(void); |
| 168 | void __init setup_log_buf(int early); | 168 | void __init setup_log_buf(int early); |
| 169 | void dump_stack_set_arch_desc(const char *fmt, ...); | 169 | __printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...); |
| 170 | void dump_stack_print_info(const char *log_lvl); | 170 | void dump_stack_print_info(const char *log_lvl); |
| 171 | void show_regs_print_info(const char *log_lvl); | 171 | void show_regs_print_info(const char *log_lvl); |
| 172 | #else | 172 | #else |
| @@ -217,7 +217,7 @@ static inline void setup_log_buf(int early) | |||
| 217 | { | 217 | { |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | static inline void dump_stack_set_arch_desc(const char *fmt, ...) | 220 | static inline __printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...) |
| 221 | { | 221 | { |
| 222 | } | 222 | } |
| 223 | 223 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index ae21f1591615..04b5ada460b4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1522,8 +1522,6 @@ struct task_struct { | |||
| 1522 | /* hung task detection */ | 1522 | /* hung task detection */ |
| 1523 | unsigned long last_switch_count; | 1523 | unsigned long last_switch_count; |
| 1524 | #endif | 1524 | #endif |
| 1525 | /* CPU-specific state of this task */ | ||
| 1526 | struct thread_struct thread; | ||
| 1527 | /* filesystem information */ | 1525 | /* filesystem information */ |
| 1528 | struct fs_struct *fs; | 1526 | struct fs_struct *fs; |
| 1529 | /* open file information */ | 1527 | /* open file information */ |
| @@ -1778,8 +1776,22 @@ struct task_struct { | |||
| 1778 | unsigned long task_state_change; | 1776 | unsigned long task_state_change; |
| 1779 | #endif | 1777 | #endif |
| 1780 | int pagefault_disabled; | 1778 | int pagefault_disabled; |
| 1779 | /* CPU-specific state of this task */ | ||
| 1780 | struct thread_struct thread; | ||
| 1781 | /* | ||
| 1782 | * WARNING: on x86, 'thread_struct' contains a variable-sized | ||
| 1783 | * structure. It *MUST* be at the end of 'task_struct'. | ||
| 1784 | * | ||
| 1785 | * Do not put anything below here! | ||
| 1786 | */ | ||
| 1781 | }; | 1787 | }; |
| 1782 | 1788 | ||
| 1789 | #ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT | ||
| 1790 | extern int arch_task_struct_size __read_mostly; | ||
| 1791 | #else | ||
| 1792 | # define arch_task_struct_size (sizeof(struct task_struct)) | ||
| 1793 | #endif | ||
| 1794 | |||
| 1783 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | 1795 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ |
| 1784 | #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) | 1796 | #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) |
| 1785 | 1797 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a741678f24a2..883fe1e7c5a1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -4868,6 +4868,23 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy, | |||
| 4868 | struct cfg80211_chan_def *chandef, | 4868 | struct cfg80211_chan_def *chandef, |
| 4869 | enum nl80211_iftype iftype); | 4869 | enum nl80211_iftype iftype); |
| 4870 | 4870 | ||
| 4871 | /** | ||
| 4872 | * cfg80211_reg_can_beacon_relax - check if beaconing is allowed with relaxation | ||
| 4873 | * @wiphy: the wiphy | ||
| 4874 | * @chandef: the channel definition | ||
| 4875 | * @iftype: interface type | ||
| 4876 | * | ||
| 4877 | * Return: %true if there is no secondary channel or the secondary channel(s) | ||
| 4878 | * can be used for beaconing (i.e. is not a radar channel etc.). This version | ||
| 4879 | * also checks if IR-relaxation conditions apply, to allow beaconing under | ||
| 4880 | * more permissive conditions. | ||
| 4881 | * | ||
| 4882 | * Requires the RTNL to be held. | ||
| 4883 | */ | ||
| 4884 | bool cfg80211_reg_can_beacon_relax(struct wiphy *wiphy, | ||
| 4885 | struct cfg80211_chan_def *chandef, | ||
| 4886 | enum nl80211_iftype iftype); | ||
| 4887 | |||
| 4871 | /* | 4888 | /* |
| 4872 | * cfg80211_ch_switch_notify - update wdev channel and notify userspace | 4889 | * cfg80211_ch_switch_notify - update wdev channel and notify userspace |
| 4873 | * @dev: the device which switched channels | 4890 | * @dev: the device which switched channels |
diff --git a/include/net/ip.h b/include/net/ip.h index 0750a186ea63..d5fe9f2ab699 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -161,6 +161,7 @@ static inline __u8 get_rtconn_flags(struct ipcm_cookie* ipc, struct sock* sk) | |||
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | /* datagram.c */ | 163 | /* datagram.c */ |
| 164 | int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); | ||
| 164 | int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); | 165 | int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
| 165 | 166 | ||
| 166 | void ip4_datagram_release_cb(struct sock *sk); | 167 | void ip4_datagram_release_cb(struct sock *sk); |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 986fddb08579..b0f898e3b2e7 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -1745,6 +1745,7 @@ struct ib_device { | |||
| 1745 | char node_desc[64]; | 1745 | char node_desc[64]; |
| 1746 | __be64 node_guid; | 1746 | __be64 node_guid; |
| 1747 | u32 local_dma_lkey; | 1747 | u32 local_dma_lkey; |
| 1748 | u16 is_switch:1; | ||
| 1748 | u8 node_type; | 1749 | u8 node_type; |
| 1749 | u8 phys_port_cnt; | 1750 | u8 phys_port_cnt; |
| 1750 | 1751 | ||
| @@ -1824,6 +1825,20 @@ enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, | |||
| 1824 | u8 port_num); | 1825 | u8 port_num); |
| 1825 | 1826 | ||
| 1826 | /** | 1827 | /** |
| 1828 | * rdma_cap_ib_switch - Check if the device is IB switch | ||
| 1829 | * @device: Device to check | ||
| 1830 | * | ||
| 1831 | * Device driver is responsible for setting is_switch bit on | ||
| 1832 | * in ib_device structure at init time. | ||
| 1833 | * | ||
| 1834 | * Return: true if the device is IB switch. | ||
| 1835 | */ | ||
| 1836 | static inline bool rdma_cap_ib_switch(const struct ib_device *device) | ||
| 1837 | { | ||
| 1838 | return device->is_switch; | ||
| 1839 | } | ||
| 1840 | |||
| 1841 | /** | ||
| 1827 | * rdma_start_port - Return the first valid port number for the device | 1842 | * rdma_start_port - Return the first valid port number for the device |
| 1828 | * specified | 1843 | * specified |
| 1829 | * | 1844 | * |
| @@ -1833,7 +1848,7 @@ enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, | |||
| 1833 | */ | 1848 | */ |
| 1834 | static inline u8 rdma_start_port(const struct ib_device *device) | 1849 | static inline u8 rdma_start_port(const struct ib_device *device) |
| 1835 | { | 1850 | { |
| 1836 | return (device->node_type == RDMA_NODE_IB_SWITCH) ? 0 : 1; | 1851 | return rdma_cap_ib_switch(device) ? 0 : 1; |
| 1837 | } | 1852 | } |
| 1838 | 1853 | ||
| 1839 | /** | 1854 | /** |
| @@ -1846,8 +1861,7 @@ static inline u8 rdma_start_port(const struct ib_device *device) | |||
| 1846 | */ | 1861 | */ |
| 1847 | static inline u8 rdma_end_port(const struct ib_device *device) | 1862 | static inline u8 rdma_end_port(const struct ib_device *device) |
| 1848 | { | 1863 | { |
| 1849 | return (device->node_type == RDMA_NODE_IB_SWITCH) ? | 1864 | return rdma_cap_ib_switch(device) ? 0 : device->phys_port_cnt; |
| 1850 | 0 : device->phys_port_cnt; | ||
| 1851 | } | 1865 | } |
| 1852 | 1866 | ||
| 1853 | static inline bool rdma_protocol_ib(const struct ib_device *device, u8 port_num) | 1867 | static inline bool rdma_protocol_ib(const struct ib_device *device, u8 port_num) |
diff --git a/include/scsi/scsi_transport_srp.h b/include/scsi/scsi_transport_srp.h index cdb05dd1d440..d40d3ef25707 100644 --- a/include/scsi/scsi_transport_srp.h +++ b/include/scsi/scsi_transport_srp.h | |||
| @@ -119,6 +119,7 @@ extern struct srp_rport *srp_rport_add(struct Scsi_Host *, | |||
| 119 | extern void srp_rport_del(struct srp_rport *); | 119 | extern void srp_rport_del(struct srp_rport *); |
| 120 | extern int srp_tmo_valid(int reconnect_delay, int fast_io_fail_tmo, | 120 | extern int srp_tmo_valid(int reconnect_delay, int fast_io_fail_tmo, |
| 121 | int dev_loss_tmo); | 121 | int dev_loss_tmo); |
| 122 | int srp_parse_tmo(int *tmo, const char *buf); | ||
| 122 | extern int srp_reconnect_rport(struct srp_rport *rport); | 123 | extern int srp_reconnect_rport(struct srp_rport *rport); |
| 123 | extern void srp_start_tl_fail_timers(struct srp_rport *rport); | 124 | extern void srp_start_tl_fail_timers(struct srp_rport *rport); |
| 124 | extern void srp_remove_host(struct Scsi_Host *); | 125 | extern void srp_remove_host(struct Scsi_Host *); |
