Conflicts: net/bridge/br_mdb.c br_mdb.c conflict was a function call being removed to fix a bug in 'net' but whose signature was changed in 'net-next'.
Showing the changes to include/linux (23 of 544 files). Show all
Unified · Split
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | * ARM PrimeXsys System Controller SP810 header file |
| 3 | 3 | * |
| 4 | 4 | * Copyright (C) 2009 ST Microelectronics |
| 5 | − * Viresh Kumar <viresh.linux@gmail.com> | |
| 5 | + * Viresh Kumar <vireshk@kernel.org> | |
| 6 | 6 | * |
| 7 | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | 8 | * License version 2. This program is licensed "as is" without any |
| @@ -47,6 +47,7 @@ struct blkcg { · 46 unmodified lines | ||
| 47 | 47 | |
| 48 | 48 | struct blkcg_policy_data *pd[BLKCG_MAX_POLS]; |
| 49 | 49 | |
| 50 | + struct list_head all_blkcgs_node; | |
| 50 | 51 | #ifdef CONFIG_CGROUP_WRITEBACK |
| 51 | 52 | struct list_head cgwb_list; |
| 52 | 53 | #endif |
| @@ -88,18 +89,12 @@ struct blkg_policy_data { · 35 unmodified lines | ||
| 88 | 89 | * Policies that need to keep per-blkcg data which is independent |
| 89 | 90 | * from any request_queue associated to it must specify its size |
| 90 | 91 | * with the cpd_size field of the blkcg_policy structure and |
| 91 | − * embed a blkcg_policy_data in it. blkcg core allocates | |
| 92 | − * policy-specific per-blkcg structures lazily the first time | |
| 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. | |
| 92 | + * embed a blkcg_policy_data in it. cpd_init() is invoked to let | |
| 93 | + * each policy handle per-blkcg data. | |
| 96 | 94 | */ |
| 97 | 95 | struct blkcg_policy_data { |
| 98 | 96 | /* the policy id this per-policy data belongs to */ |
| 99 | 97 | int plid; |
| 100 | − | |
| 101 | − /* used during policy activation */ | |
| 102 | − struct list_head alloc_node; | |
| 103 | 98 | }; |
| 104 | 99 | |
| 105 | 100 | /* association between a blk cgroup and a request queue */ |
| @@ -33,18 +33,19 @@ struct clk_lookup { · 32 unmodified lines | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 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 | 38 | void clkdev_add(struct clk_lookup *cl); |
| 39 | 39 | void clkdev_drop(struct clk_lookup *cl); |
| 40 | 40 | |
| 41 | 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 | 44 | void clkdev_add_table(struct clk_lookup *, size_t); |
| 45 | 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 | 49 | int clk_register_clkdevs(struct clk *, struct clk_lookup *, size_t); |
| 49 | 50 | |
| 50 | 51 | #ifdef CONFIG_COMMON_CLK |
| @@ -424,7 +424,7 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, · 423 unmodified lines | ||
| 424 | 424 | |
| 425 | 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 | 428 | extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat); |
| 429 | 429 | extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set); |
| 430 | 430 | |
| @@ -64,7 +64,8 @@ struct config_item { · 63 unmodified lines | ||
| 64 | 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 | 70 | static inline char *config_item_name(struct config_item * item) |
| 70 | 71 | { |
| @@ -40,9 +40,10 @@ extern void cpu_remove_dev_attr(struct device_attribute *attr); · 39 unmodified lines | ||
| 40 | 40 | extern int cpu_add_dev_attr_group(struct attribute_group *attrs); |
| 41 | 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, | |
| 44 | − const struct attribute_group **groups, | |
| 45 | − const char *fmt, ...); | |
| 43 | +extern __printf(4, 5) | |
| 44 | +struct device *cpu_device_create(struct device *parent, void *drvdata, | |
| 45 | + const struct attribute_group **groups, | |
| 46 | + const char *fmt, ...); | |
| 46 | 47 | #ifdef CONFIG_HOTPLUG_CPU |
| 47 | 48 | extern void unregister_cpu(struct cpu *cpu); |
| 48 | 49 | extern ssize_t arch_cpu_probe(const char *, size_t); |
| @@ -327,7 +327,8 @@ static inline unsigned d_count(const struct dentry *dentry) · 326 unmodified lines | ||
| 327 | 327 | /* |
| 328 | 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 | 332 | extern char *simple_dname(struct dentry *, char *, int); |
| 332 | 333 | |
| 333 | 334 | extern char *__d_path(const struct path *, const struct path *, char *, int); |
| @@ -637,8 +637,9 @@ extern int devres_release_group(struct device *dev, void *id); · 636 unmodified lines | ||
| 637 | 637 | |
| 638 | 638 | /* managed devm_k.alloc/kfree for device drivers */ |
| 639 | 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, | |
| 641 | − va_list ap); | |
| 640 | +extern __printf(3, 0) | |
| 641 | +char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt, | |
| 642 | + va_list ap); | |
| 642 | 643 | extern __printf(3, 4) |
| 643 | 644 | char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...); |
| 644 | 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); · 366 unmodified lines | ||
| 1011 | 1012 | /* |
| 1012 | 1013 | * Easy functions for dynamically creating devices on the fly |
| 1013 | 1014 | */ |
| 1014 | −extern struct device *device_create_vargs(struct class *cls, | |
| 1015 | − struct device *parent, | |
| 1016 | − dev_t devt, | |
| 1017 | − void *drvdata, | |
| 1018 | − const char *fmt, | |
| 1019 | − va_list vargs); | |
| 1015 | +extern __printf(5, 0) | |
| 1016 | +struct device *device_create_vargs(struct class *cls, struct device *parent, | |
| 1017 | + dev_t devt, void *drvdata, | |
| 1018 | + const char *fmt, va_list vargs); | |
| 1020 | 1019 | extern __printf(5, 6) |
| 1021 | 1020 | struct device *device_create(struct class *cls, struct device *parent, |
| 1022 | 1021 | dev_t devt, void *drvdata, |
| @@ -1046,12 +1046,12 @@ extern void locks_remove_file(struct file *); · 1045 unmodified lines | ||
| 1046 | 1046 | extern void locks_release_private(struct file_lock *); |
| 1047 | 1047 | extern void posix_test_lock(struct file *, struct file_lock *); |
| 1048 | 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 | 1050 | extern int posix_unblock_lock(struct file_lock *); |
| 1051 | 1051 | extern int vfs_test_lock(struct file *, struct file_lock *); |
| 1052 | 1052 | extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); |
| 1053 | 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 | 1055 | extern int __break_lease(struct inode *inode, unsigned int flags, unsigned int type); |
| 1056 | 1056 | extern void lease_get_mtime(struct inode *, struct timespec *time); |
| 1057 | 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, · 79 unmodified lines | ||
| 1137 | 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 | 1143 | return -ENOLCK; |
| 1143 | 1144 | } |
| @@ -1163,8 +1164,8 @@ static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl) · 19 unmodified lines | ||
| 1163 | 1164 | return 0; |
| 1164 | 1165 | } |
| 1165 | 1166 | |
| 1166 | −static inline int flock_lock_file_wait(struct file *filp, | |
| 1167 | − struct file_lock *request) | |
| 1167 | +static inline int flock_lock_inode_wait(struct inode *inode, | |
| 1168 | + struct file_lock *request) | |
| 1168 | 1169 | { |
| 1169 | 1170 | return -ENOLCK; |
| 1170 | 1171 | } |
| @@ -1202,6 +1203,20 @@ static inline void show_fd_locks(struct seq_file *f, · 31 unmodified lines | ||
| 1202 | 1203 | struct file *filp, struct files_struct *files) {} |
| 1203 | 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 | 1221 | struct fasync_struct { |
| 1207 | 1222 | spinlock_t fa_lock; |
| @@ -2011,11 +2026,6 @@ extern void ihold(struct inode * inode); · 803 unmodified lines | ||
| 2011 | 2026 | extern void iput(struct inode *); |
| 2012 | 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 | 2029 | /* /sys/fs */ |
| 2020 | 2030 | extern struct kobject *fs_kobj; |
| 2021 | 2031 | |
| @@ -45,7 +45,7 @@ struct seq_file; · 44 unmodified lines | ||
| 45 | 45 | * @base: identifies the first GPIO number handled by this chip; |
| 46 | 46 | * or, if negative during registration, requests dynamic ID allocation. |
| 47 | 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 | 49 | * let gpiolib select the chip base in all possible cases. We want to |
| 50 | 50 | * get rid of the static GPIO number space in the long run. |
| 51 | 51 | * @ngpio: the number of GPIOs handled by this controller; the last GPIO |
| @@ -230,6 +230,7 @@ struct hid_sensor_common { · 229 unmodified lines | ||
| 230 | 230 | struct platform_device *pdev; |
| 231 | 231 | unsigned usage_id; |
| 232 | 232 | atomic_t data_ready; |
| 233 | + atomic_t user_requested_state; | |
| 233 | 234 | struct iio_trigger *trigger; |
| 234 | 235 | struct hid_sensor_hub_attribute_info poll; |
| 235 | 236 | struct hid_sensor_hub_attribute_info report_state; |
| @@ -460,15 +460,14 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h, · 459 unmodified lines | ||
| 460 | 460 | return &mm->page_table_lock; |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | −static inline bool hugepages_supported(void) | |
| 464 | −{ | |
| 465 | − /* | |
| 466 | − * Some platform decide whether they support huge pages at boot | |
| 467 | − * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when | |
| 468 | − * there is no such support | |
| 469 | − */ | |
| 470 | − return HPAGE_SHIFT != 0; | |
| 471 | −} | |
| 463 | +#ifndef hugepages_supported | |
| 464 | +/* | |
| 465 | + * Some platform decide whether they support huge pages at boot | |
| 466 | + * time. Some of them, such as powerpc, set HPAGE_SHIFT to 0 | |
| 467 | + * when there is no such support | |
| 468 | + */ | |
| 469 | +#define hugepages_supported() (HPAGE_SHIFT != 0) | |
| 470 | +#endif | |
| 472 | 471 | |
| 473 | 472 | #else /* CONFIG_HUGETLB_PAGE */ |
| 474 | 473 | struct hstate {}; |
| @@ -282,68 +282,8 @@ void __init parse_early_param(void); · 281 unmodified lines | ||
| 282 | 282 | void __init parse_early_options(char *cmdline); |
| 283 | 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 | 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 | 287 | #define __setup_param(str, unique_id, fn) /* nothing */ |
| 348 | 288 | #define __setup(str, func) /* nothing */ |
| 349 | 289 | #endif |
| @@ -351,24 +291,6 @@ void __init parse_early_options(char *cmdline); · 1 unmodified line | ||
| 351 | 291 | /* Data marked not to be saved by software suspend */ |
| 352 | 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 | 294 | #ifdef MODULE |
| 373 | 295 | #define __exit_p(x) x |
| 374 | 296 | #else |
| @@ -258,7 +258,7 @@ extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr, · 257 unmodified lines | ||
| 258 | 258 | void *data); |
| 259 | 259 | struct device *iommu_device_create(struct device *parent, void *drvdata, |
| 260 | 260 | const struct attribute_group **groups, |
| 261 | − const char *fmt, ...); | |
| 261 | + const char *fmt, ...) __printf(4, 5); | |
| 262 | 262 | void iommu_device_destroy(struct device *dev); |
| 263 | 263 | int iommu_device_link(struct device *dev, struct device *link); |
| 264 | 264 | void iommu_device_unlink(struct device *dev, struct device *link); |
| @@ -411,7 +411,8 @@ extern __printf(3, 0) · 410 unmodified lines | ||
| 411 | 411 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); |
| 412 | 412 | extern __printf(2, 3) |
| 413 | 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 | 417 | extern __scanf(2, 3) |
| 417 | 418 | int sscanf(const char *, const char *, ...); |
| @@ -679,10 +680,10 @@ do { \ · 261 unmodified lines | ||
| 679 | 680 | __ftrace_vprintk(_THIS_IP_, fmt, vargs); \ |
| 680 | 681 | } while (0) |
| 681 | 682 | |
| 682 | −extern int | |
| 683 | +extern __printf(2, 0) int | |
| 683 | 684 | __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); |
| 684 | 685 | |
| 685 | −extern int | |
| 686 | +extern __printf(2, 0) int | |
| 686 | 687 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); |
| 687 | 688 | |
| 688 | 689 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
| @@ -702,7 +703,7 @@ int trace_printk(const char *fmt, ...) · 13 unmodified lines | ||
| 702 | 703 | { |
| 703 | 704 | return 0; |
| 704 | 705 | } |
| 705 | −static inline int | |
| 706 | +static __printf(1, 0) inline int | |
| 706 | 707 | ftrace_vprintk(const char *fmt, va_list ap) |
| 707 | 708 | { |
| 708 | 709 | return 0; |
| @@ -80,8 +80,9 @@ struct kobject { · 79 unmodified lines | ||
| 80 | 80 | |
| 81 | 81 | extern __printf(2, 3) |
| 82 | 82 | int kobject_set_name(struct kobject *kobj, const char *name, ...); |
| 83 | −extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | |
| 84 | − va_list vargs); | |
| 83 | +extern __printf(2, 0) | |
| 84 | +int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | |
| 85 | + va_list vargs); | |
| 85 | 86 | |
| 86 | 87 | static inline const char *kobject_name(const struct kobject *kobj) |
| 87 | 88 | { |
| @@ -734,6 +734,24 @@ static inline bool kvm_arch_has_noncoherent_dma(struct kvm *kvm) · 733 unmodified lines | ||
| 734 | 734 | return false; |
| 735 | 735 | } |
| 736 | 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 | 756 | static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu) |
| 739 | 757 | { |
| @@ -106,6 +106,6 @@ extern void enable_mmiotrace(void); · 105 unmodified lines | ||
| 106 | 106 | extern void disable_mmiotrace(void); |
| 107 | 107 | extern void mmio_trace_rw(struct mmiotrace_rw *rw); |
| 108 | 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 | 111 | #endif /* _LINUX_MMIOTRACE_H */ |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | #include <linux/compiler.h> |
| 12 | 12 | #include <linux/cache.h> |
| 13 | 13 | #include <linux/kmod.h> |
| 14 | +#include <linux/init.h> | |
| 14 | 15 | #include <linux/elf.h> |
| 15 | 16 | #include <linux/stringify.h> |
| 16 | 17 | #include <linux/kobject.h> |
| @@ -71,6 +72,89 @@ extern struct module_attribute module_uevent; · 54 unmodified lines | ||
| 71 | 72 | extern int init_module(void); |
| 72 | 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 | 158 | /* Archs provide a method of finding the correct exception table. */ |
| 75 | 159 | struct exception_table_entry; |
| 76 | 160 | |
| @@ -8,6 +8,7 @@ extern struct page_ext_operations page_owner_ops; · 7 unmodified lines | ||
| 8 | 8 | extern void __reset_page_owner(struct page *page, unsigned int order); |
| 9 | 9 | extern void __set_page_owner(struct page *page, |
| 10 | 10 | unsigned int order, gfp_t gfp_mask); |
| 11 | +extern gfp_t __get_page_owner_gfp(struct page *page); | |
| 11 | 12 | |
| 12 | 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, · 11 unmodified lines | ||
| 25 | 26 | |
| 26 | 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 | 37 | #else |
| 29 | 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, · 2 unmodified lines | ||
| 33 | 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 | 50 | #endif /* CONFIG_PAGE_OWNER */ |
| 38 | 51 | #endif /* __LINUX_PAGE_OWNER_H */ |
| @@ -4,7 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | * Arasan Compact Flash host controller platform data header file |
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2011 ST Microelectronics |
| 7 | − * Viresh Kumar <viresh.linux@gmail.com> | |
| 7 | + * Viresh Kumar <vireshk@kernel.org> | |
| 8 | 8 | * |
| 9 | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | 10 | * License version 2. This program is licensed "as is" without any |
| @@ -122,7 +122,7 @@ static inline __printf(1, 2) __cold · 121 unmodified lines | ||
| 122 | 122 | void early_printk(const char *s, ...) { } |
| 123 | 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 | 127 | #ifdef CONFIG_PRINTK |
| 128 | 128 | asmlinkage __printf(5, 0) |
| @@ -166,7 +166,7 @@ char *log_buf_addr_get(void); · 37 unmodified lines | ||
| 166 | 166 | u32 log_buf_len_get(void); |
| 167 | 167 | void log_buf_kexec_setup(void); |
| 168 | 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 | 170 | void dump_stack_print_info(const char *log_lvl); |
| 171 | 171 | void show_regs_print_info(const char *log_lvl); |
| 172 | 172 | #else |
| @@ -217,7 +217,7 @@ static inline void setup_log_buf(int early) · 44 unmodified lines | ||
| 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 | |
| @@ -1522,8 +1522,6 @@ struct task_struct { · 1521 unmodified lines | ||
| 1522 | 1522 | /* hung task detection */ |
| 1523 | 1523 | unsigned long last_switch_count; |
| 1524 | 1524 | #endif |
| 1525 | −/* CPU-specific state of this task */ | |
| 1526 | − struct thread_struct thread; | |
| 1527 | 1525 | /* filesystem information */ |
| 1528 | 1526 | struct fs_struct *fs; |
| 1529 | 1527 | /* open file information */ |
| @@ -1778,8 +1776,22 @@ struct task_struct { · 248 unmodified lines | ||
| 1778 | 1776 | unsigned long task_state_change; |
| 1779 | 1777 | #endif |
| 1780 | 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 | 1795 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ |
| 1784 | 1796 | #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) |
| 1785 | 1797 | |