diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-07-29 18:13:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-07-29 18:13:24 -0400 |
commit | 4b979e4c611ce750d32b51737f837b485f43c69b (patch) | |
tree | 3bc56f2a22d2cf29bc183b67e74e1e8c0733efc0 /include/linux | |
parent | 1559f3b8d0527e24219149c95b3de5e7b2924828 (diff) | |
parent | cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff) |
Merge branch 'linus' into irq/core
Pull in upstream fixes before applying conflicting changes
Diffstat (limited to 'include/linux')
39 files changed, 272 insertions, 161 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index c471dfc93b71..d2445fa9999f 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -58,6 +58,19 @@ static inline acpi_handle acpi_device_handle(struct acpi_device *adev) | |||
58 | acpi_fwnode_handle(adev) : NULL) | 58 | acpi_fwnode_handle(adev) : NULL) |
59 | #define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev)) | 59 | #define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev)) |
60 | 60 | ||
61 | /** | ||
62 | * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with | ||
63 | * the PCI-defined class-code information | ||
64 | * | ||
65 | * @_cls : the class, subclass, prog-if triple for this device | ||
66 | * @_msk : the class mask for this device | ||
67 | * | ||
68 | * This macro is used to create a struct acpi_device_id that matches a | ||
69 | * specific PCI class. The .id and .driver_data fields will be left | ||
70 | * initialized with the default value. | ||
71 | */ | ||
72 | #define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (_cls), .cls_msk = (_msk), | ||
73 | |||
61 | static inline bool has_acpi_companion(struct device *dev) | 74 | static inline bool has_acpi_companion(struct device *dev) |
62 | { | 75 | { |
63 | return is_acpi_node(dev->fwnode); | 76 | return is_acpi_node(dev->fwnode); |
@@ -309,9 +322,6 @@ int acpi_check_region(resource_size_t start, resource_size_t n, | |||
309 | 322 | ||
310 | int acpi_resources_are_enforced(void); | 323 | int acpi_resources_are_enforced(void); |
311 | 324 | ||
312 | int acpi_reserve_region(u64 start, unsigned int length, u8 space_id, | ||
313 | unsigned long flags, char *desc); | ||
314 | |||
315 | #ifdef CONFIG_HIBERNATION | 325 | #ifdef CONFIG_HIBERNATION |
316 | void __init acpi_no_s4_hw_signature(void); | 326 | void __init acpi_no_s4_hw_signature(void); |
317 | #endif | 327 | #endif |
@@ -446,6 +456,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *); | |||
446 | #define ACPI_COMPANION(dev) (NULL) | 456 | #define ACPI_COMPANION(dev) (NULL) |
447 | #define ACPI_COMPANION_SET(dev, adev) do { } while (0) | 457 | #define ACPI_COMPANION_SET(dev, adev) do { } while (0) |
448 | #define ACPI_HANDLE(dev) (NULL) | 458 | #define ACPI_HANDLE(dev) (NULL) |
459 | #define ACPI_DEVICE_CLASS(_cls, _msk) .cls = (0), .cls_msk = (0), | ||
449 | 460 | ||
450 | struct fwnode_handle; | 461 | struct fwnode_handle; |
451 | 462 | ||
@@ -507,13 +518,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n, | |||
507 | return 0; | 518 | return 0; |
508 | } | 519 | } |
509 | 520 | ||
510 | static inline int acpi_reserve_region(u64 start, unsigned int length, | ||
511 | u8 space_id, unsigned long flags, | ||
512 | char *desc) | ||
513 | { | ||
514 | return -ENXIO; | ||
515 | } | ||
516 | |||
517 | struct acpi_table_header; | 521 | struct acpi_table_header; |
518 | static inline int acpi_table_parse(char *id, | 522 | static inline int acpi_table_parse(char *id, |
519 | int (*handler)(struct acpi_table_header *)) | 523 | int (*handler)(struct acpi_table_header *)) |
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/ata.h b/include/linux/ata.h index fed36418dd1c..6c78956aa470 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -45,6 +45,7 @@ enum { | |||
45 | ATA_SECT_SIZE = 512, | 45 | ATA_SECT_SIZE = 512, |
46 | ATA_MAX_SECTORS_128 = 128, | 46 | ATA_MAX_SECTORS_128 = 128, |
47 | ATA_MAX_SECTORS = 256, | 47 | ATA_MAX_SECTORS = 256, |
48 | ATA_MAX_SECTORS_1024 = 1024, | ||
48 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | 49 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ |
49 | ATA_MAX_SECTORS_TAPE = 65535, | 50 | ATA_MAX_SECTORS_TAPE = 65535, |
50 | 51 | ||
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/can/skb.h b/include/linux/can/skb.h index b6a52a4b457a..51bb6532785c 100644 --- a/include/linux/can/skb.h +++ b/include/linux/can/skb.h | |||
@@ -27,10 +27,12 @@ | |||
27 | /** | 27 | /** |
28 | * struct can_skb_priv - private additional data inside CAN sk_buffs | 28 | * struct can_skb_priv - private additional data inside CAN sk_buffs |
29 | * @ifindex: ifindex of the first interface the CAN frame appeared on | 29 | * @ifindex: ifindex of the first interface the CAN frame appeared on |
30 | * @skbcnt: atomic counter to have an unique id together with skb pointer | ||
30 | * @cf: align to the following CAN frame at skb->data | 31 | * @cf: align to the following CAN frame at skb->data |
31 | */ | 32 | */ |
32 | struct can_skb_priv { | 33 | struct can_skb_priv { |
33 | int ifindex; | 34 | int ifindex; |
35 | int skbcnt; | ||
34 | struct can_frame cf[0]; | 36 | struct can_frame cf[0]; |
35 | }; | 37 | }; |
36 | 38 | ||
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index e15499422fdc..37753278987a 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/radix-tree.h> | 8 | #include <linux/radix-tree.h> |
9 | #include <linux/uio.h> | 9 | #include <linux/uio.h> |
10 | #include <linux/workqueue.h> | 10 | #include <linux/workqueue.h> |
11 | #include <net/net_namespace.h> | ||
11 | 12 | ||
12 | #include <linux/ceph/types.h> | 13 | #include <linux/ceph/types.h> |
13 | #include <linux/ceph/buffer.h> | 14 | #include <linux/ceph/buffer.h> |
@@ -56,6 +57,7 @@ struct ceph_messenger { | |||
56 | struct ceph_entity_addr my_enc_addr; | 57 | struct ceph_entity_addr my_enc_addr; |
57 | 58 | ||
58 | atomic_t stopping; | 59 | atomic_t stopping; |
60 | possible_net_t net; | ||
59 | bool nocrc; | 61 | bool nocrc; |
60 | bool tcp_nodelay; | 62 | bool tcp_nodelay; |
61 | 63 | ||
@@ -267,6 +269,7 @@ extern void ceph_messenger_init(struct ceph_messenger *msgr, | |||
267 | u64 required_features, | 269 | u64 required_features, |
268 | bool nocrc, | 270 | bool nocrc, |
269 | bool tcp_nodelay); | 271 | bool tcp_nodelay); |
272 | extern void ceph_messenger_fini(struct ceph_messenger *msgr); | ||
270 | 273 | ||
271 | extern void ceph_con_init(struct ceph_connection *con, void *private, | 274 | extern void ceph_con_init(struct ceph_connection *con, void *private, |
272 | const struct ceph_connection_operations *ops, | 275 | const struct ceph_connection_operations *ops, |
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/compiler.h b/include/linux/compiler.h index 7f8ad9593da7..e08a6ae7c0a4 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -17,11 +17,11 @@ | |||
17 | # define __release(x) __context__(x,-1) | 17 | # define __release(x) __context__(x,-1) |
18 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) | 18 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) |
19 | # define __percpu __attribute__((noderef, address_space(3))) | 19 | # define __percpu __attribute__((noderef, address_space(3))) |
20 | # define __pmem __attribute__((noderef, address_space(5))) | ||
20 | #ifdef CONFIG_SPARSE_RCU_POINTER | 21 | #ifdef CONFIG_SPARSE_RCU_POINTER |
21 | # define __rcu __attribute__((noderef, address_space(4))) | 22 | # define __rcu __attribute__((noderef, address_space(4))) |
22 | #else | 23 | #else |
23 | # define __rcu | 24 | # define __rcu |
24 | # define __pmem __attribute__((noderef, address_space(5))) | ||
25 | #endif | 25 | #endif |
26 | extern void __chk_user_ptr(const volatile void __user *); | 26 | extern void __chk_user_ptr(const volatile void __user *); |
27 | extern void __chk_io_ptr(const volatile void __iomem *); | 27 | extern void __chk_io_ptr(const volatile void __iomem *); |
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/cper.h b/include/linux/cper.h index 76abba4b238e..dcacb1a72e26 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h | |||
@@ -340,7 +340,27 @@ struct cper_ia_proc_ctx { | |||
340 | __u64 mm_reg_addr; | 340 | __u64 mm_reg_addr; |
341 | }; | 341 | }; |
342 | 342 | ||
343 | /* Memory Error Section */ | 343 | /* Old Memory Error Section UEFI 2.1, 2.2 */ |
344 | struct cper_sec_mem_err_old { | ||
345 | __u64 validation_bits; | ||
346 | __u64 error_status; | ||
347 | __u64 physical_addr; | ||
348 | __u64 physical_addr_mask; | ||
349 | __u16 node; | ||
350 | __u16 card; | ||
351 | __u16 module; | ||
352 | __u16 bank; | ||
353 | __u16 device; | ||
354 | __u16 row; | ||
355 | __u16 column; | ||
356 | __u16 bit_pos; | ||
357 | __u64 requestor_id; | ||
358 | __u64 responder_id; | ||
359 | __u64 target_id; | ||
360 | __u8 error_type; | ||
361 | }; | ||
362 | |||
363 | /* Memory Error Section UEFI >= 2.3 */ | ||
344 | struct cper_sec_mem_err { | 364 | struct cper_sec_mem_err { |
345 | __u64 validation_bits; | 365 | __u64 validation_bits; |
346 | __u64 error_status; | 366 | __u64 error_status; |
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 22227e7fe463..3d3139ad5705 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) |
@@ -1015,12 +1016,10 @@ extern int __must_check device_reprobe(struct device *dev); | |||
1015 | /* | 1016 | /* |
1016 | * Easy functions for dynamically creating devices on the fly | 1017 | * Easy functions for dynamically creating devices on the fly |
1017 | */ | 1018 | */ |
1018 | extern struct device *device_create_vargs(struct class *cls, | 1019 | extern __printf(5, 0) |
1019 | struct device *parent, | 1020 | struct device *device_create_vargs(struct class *cls, struct device *parent, |
1020 | dev_t devt, | 1021 | dev_t devt, void *drvdata, |
1021 | void *drvdata, | 1022 | const char *fmt, va_list vargs); |
1022 | const char *fmt, | ||
1023 | va_list vargs); | ||
1024 | extern __printf(5, 6) | 1023 | extern __printf(5, 6) |
1025 | struct device *device_create(struct class *cls, struct device *parent, | 1024 | struct device *device_create(struct class *cls, struct device *parent, |
1026 | dev_t devt, void *drvdata, | 1025 | 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/ftrace.h b/include/linux/ftrace.h index 1da602982cf9..6cd8c0ee4b6f 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -116,6 +116,7 @@ ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops); | |||
116 | * SAVE_REGS. If another ops with this flag set is already registered | 116 | * SAVE_REGS. If another ops with this flag set is already registered |
117 | * for any of the functions that this ops will be registered for, then | 117 | * for any of the functions that this ops will be registered for, then |
118 | * this ops will fail to register or set_filter_ip. | 118 | * this ops will fail to register or set_filter_ip. |
119 | * PID - Is affected by set_ftrace_pid (allows filtering on those pids) | ||
119 | */ | 120 | */ |
120 | enum { | 121 | enum { |
121 | FTRACE_OPS_FL_ENABLED = 1 << 0, | 122 | FTRACE_OPS_FL_ENABLED = 1 << 0, |
@@ -132,6 +133,7 @@ enum { | |||
132 | FTRACE_OPS_FL_MODIFYING = 1 << 11, | 133 | FTRACE_OPS_FL_MODIFYING = 1 << 11, |
133 | FTRACE_OPS_FL_ALLOC_TRAMP = 1 << 12, | 134 | FTRACE_OPS_FL_ALLOC_TRAMP = 1 << 12, |
134 | FTRACE_OPS_FL_IPMODIFY = 1 << 13, | 135 | FTRACE_OPS_FL_IPMODIFY = 1 << 13, |
136 | FTRACE_OPS_FL_PID = 1 << 14, | ||
135 | }; | 137 | }; |
136 | 138 | ||
137 | #ifdef CONFIG_DYNAMIC_FTRACE | 139 | #ifdef CONFIG_DYNAMIC_FTRACE |
@@ -159,6 +161,7 @@ struct ftrace_ops { | |||
159 | struct ftrace_ops *next; | 161 | struct ftrace_ops *next; |
160 | unsigned long flags; | 162 | unsigned long flags; |
161 | void *private; | 163 | void *private; |
164 | ftrace_func_t saved_func; | ||
162 | int __percpu *disabled; | 165 | int __percpu *disabled; |
163 | #ifdef CONFIG_DYNAMIC_FTRACE | 166 | #ifdef CONFIG_DYNAMIC_FTRACE |
164 | int nr_trampolines; | 167 | int nr_trampolines; |
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/irqdesc.h b/include/linux/irqdesc.h index 624a668e61f1..fcea4e48e21f 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -87,7 +87,12 @@ struct irq_desc { | |||
87 | const char *name; | 87 | const char *name; |
88 | } ____cacheline_internodealigned_in_smp; | 88 | } ____cacheline_internodealigned_in_smp; |
89 | 89 | ||
90 | #ifndef CONFIG_SPARSE_IRQ | 90 | #ifdef CONFIG_SPARSE_IRQ |
91 | extern void irq_lock_sparse(void); | ||
92 | extern void irq_unlock_sparse(void); | ||
93 | #else | ||
94 | static inline void irq_lock_sparse(void) { } | ||
95 | static inline void irq_unlock_sparse(void) { } | ||
91 | extern struct irq_desc irq_desc[NR_IRQS]; | 96 | extern struct irq_desc irq_desc[NR_IRQS]; |
92 | #endif | 97 | #endif |
93 | 98 | ||
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/libata.h b/include/linux/libata.h index 36ce37bcc963..c9cfbcdb8d14 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -431,6 +431,8 @@ enum { | |||
431 | ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */ | 431 | ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */ |
432 | ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */ | 432 | ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */ |
433 | ATA_HORKAGE_NO_NCQ_LOG = (1 << 23), /* don't use NCQ for log read */ | 433 | ATA_HORKAGE_NO_NCQ_LOG = (1 << 23), /* don't use NCQ for log read */ |
434 | ATA_HORKAGE_NOTRIM = (1 << 24), /* don't use TRIM */ | ||
435 | ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */ | ||
434 | 436 | ||
435 | /* DMA mask for user DMA control: User visible values; DO NOT | 437 | /* DMA mask for user DMA control: User visible values; DO NOT |
436 | renumber */ | 438 | renumber */ |
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/mod_devicetable.h b/include/linux/mod_devicetable.h index 8183d6640ca7..34f25b7bf642 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -189,6 +189,8 @@ struct css_device_id { | |||
189 | struct acpi_device_id { | 189 | struct acpi_device_id { |
190 | __u8 id[ACPI_ID_LEN]; | 190 | __u8 id[ACPI_ID_LEN]; |
191 | kernel_ulong_t driver_data; | 191 | kernel_ulong_t driver_data; |
192 | __u32 cls; | ||
193 | __u32 cls_msk; | ||
192 | }; | 194 | }; |
193 | 195 | ||
194 | #define PNP_ID_LEN 8 | 196 | #define PNP_ID_LEN 8 |
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/mtd/nand.h b/include/linux/mtd/nand.h index f25e2bdd188c..272f42952f34 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -178,17 +178,17 @@ typedef enum { | |||
178 | /* Chip may not exist, so silence any errors in scan */ | 178 | /* Chip may not exist, so silence any errors in scan */ |
179 | #define NAND_SCAN_SILENT_NODEV 0x00040000 | 179 | #define NAND_SCAN_SILENT_NODEV 0x00040000 |
180 | /* | 180 | /* |
181 | * This option could be defined by controller drivers to protect against | ||
182 | * kmap'ed, vmalloc'ed highmem buffers being passed from upper layers | ||
183 | */ | ||
184 | #define NAND_USE_BOUNCE_BUFFER 0x00080000 | ||
185 | /* | ||
186 | * Autodetect nand buswidth with readid/onfi. | 181 | * Autodetect nand buswidth with readid/onfi. |
187 | * This suppose the driver will configure the hardware in 8 bits mode | 182 | * This suppose the driver will configure the hardware in 8 bits mode |
188 | * when calling nand_scan_ident, and update its configuration | 183 | * when calling nand_scan_ident, and update its configuration |
189 | * before calling nand_scan_tail. | 184 | * before calling nand_scan_tail. |
190 | */ | 185 | */ |
191 | #define NAND_BUSWIDTH_AUTO 0x00080000 | 186 | #define NAND_BUSWIDTH_AUTO 0x00080000 |
187 | /* | ||
188 | * This option could be defined by controller drivers to protect against | ||
189 | * kmap'ed, vmalloc'ed highmem buffers being passed from upper layers | ||
190 | */ | ||
191 | #define NAND_USE_BOUNCE_BUFFER 0x00100000 | ||
192 | 192 | ||
193 | /* Options set by nand scan */ | 193 | /* Options set by nand scan */ |
194 | /* Nand scan has allocated controller struct */ | 194 | /* Nand scan has allocated controller struct */ |
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/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h index 75f70f6ac137..e1571efa3f2b 100644 --- a/include/linux/platform_data/mmc-esdhc-imx.h +++ b/include/linux/platform_data/mmc-esdhc-imx.h | |||
@@ -43,7 +43,6 @@ struct esdhc_platform_data { | |||
43 | enum wp_types wp_type; | 43 | enum wp_types wp_type; |
44 | enum cd_types cd_type; | 44 | enum cd_types cd_type; |
45 | int max_bus_width; | 45 | int max_bus_width; |
46 | unsigned int f_max; | ||
47 | bool support_vsel; | 46 | bool support_vsel; |
48 | unsigned int delay_line; | 47 | unsigned int delay_line; |
49 | }; | 48 | }; |
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/rtc/sirfsoc_rtciobrg.h b/include/linux/rtc/sirfsoc_rtciobrg.h index 2c92e1c8e055..aefd997262e4 100644 --- a/include/linux/rtc/sirfsoc_rtciobrg.h +++ b/include/linux/rtc/sirfsoc_rtciobrg.h | |||
@@ -9,10 +9,14 @@ | |||
9 | #ifndef _SIRFSOC_RTC_IOBRG_H_ | 9 | #ifndef _SIRFSOC_RTC_IOBRG_H_ |
10 | #define _SIRFSOC_RTC_IOBRG_H_ | 10 | #define _SIRFSOC_RTC_IOBRG_H_ |
11 | 11 | ||
12 | struct regmap_config; | ||
13 | |||
12 | extern void sirfsoc_rtc_iobrg_besyncing(void); | 14 | extern void sirfsoc_rtc_iobrg_besyncing(void); |
13 | 15 | ||
14 | extern u32 sirfsoc_rtc_iobrg_readl(u32 addr); | 16 | extern u32 sirfsoc_rtc_iobrg_readl(u32 addr); |
15 | 17 | ||
16 | extern void sirfsoc_rtc_iobrg_writel(u32 val, u32 addr); | 18 | extern void sirfsoc_rtc_iobrg_writel(u32 val, u32 addr); |
19 | struct regmap *devm_regmap_init_iobg(struct device *dev, | ||
20 | const struct regmap_config *config); | ||
17 | 21 | ||
18 | #endif | 22 | #endif |
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/linux/tick.h b/include/linux/tick.h index 3741ba1a652c..edbfc9a5293e 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -67,10 +67,13 @@ extern void tick_broadcast_control(enum tick_broadcast_mode mode); | |||
67 | static inline void tick_broadcast_control(enum tick_broadcast_mode mode) { } | 67 | static inline void tick_broadcast_control(enum tick_broadcast_mode mode) { } |
68 | #endif /* BROADCAST */ | 68 | #endif /* BROADCAST */ |
69 | 69 | ||
70 | #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) | 70 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
71 | extern int tick_broadcast_oneshot_control(enum tick_broadcast_state state); | 71 | extern int tick_broadcast_oneshot_control(enum tick_broadcast_state state); |
72 | #else | 72 | #else |
73 | static inline int tick_broadcast_oneshot_control(enum tick_broadcast_state state) { return 0; } | 73 | static inline int tick_broadcast_oneshot_control(enum tick_broadcast_state state) |
74 | { | ||
75 | return 0; | ||
76 | } | ||
74 | #endif | 77 | #endif |
75 | 78 | ||
76 | static inline void tick_broadcast_enable(void) | 79 | static inline void tick_broadcast_enable(void) |
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 3aa72e648650..6e191e4e6ab6 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
@@ -145,7 +145,6 @@ static inline void getboottime(struct timespec *ts) | |||
145 | } | 145 | } |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) | ||
149 | #define ktime_get_real_ts64(ts) getnstimeofday64(ts) | 148 | #define ktime_get_real_ts64(ts) getnstimeofday64(ts) |
150 | 149 | ||
151 | /* | 150 | /* |
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index 7c9b484735c5..1f6526c76ee8 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
@@ -80,6 +80,9 @@ | |||
80 | #define CDC_NCM_TIMER_INTERVAL_MIN 5UL | 80 | #define CDC_NCM_TIMER_INTERVAL_MIN 5UL |
81 | #define CDC_NCM_TIMER_INTERVAL_MAX (U32_MAX / NSEC_PER_USEC) | 81 | #define CDC_NCM_TIMER_INTERVAL_MAX (U32_MAX / NSEC_PER_USEC) |
82 | 82 | ||
83 | /* Driver flags */ | ||
84 | #define CDC_NCM_FLAG_NDP_TO_END 0x02 /* NDP is placed at end of frame */ | ||
85 | |||
83 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ | 86 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ |
84 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) | 87 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) |
85 | #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) |
@@ -103,9 +106,11 @@ struct cdc_ncm_ctx { | |||
103 | 106 | ||
104 | spinlock_t mtx; | 107 | spinlock_t mtx; |
105 | atomic_t stop; | 108 | atomic_t stop; |
109 | int drvflags; | ||
106 | 110 | ||
107 | u32 timer_interval; | 111 | u32 timer_interval; |
108 | u32 max_ndp_size; | 112 | u32 max_ndp_size; |
113 | struct usb_cdc_ncm_ndp16 *delayed_ndp16; | ||
109 | 114 | ||
110 | u32 tx_timer_pending; | 115 | u32 tx_timer_pending; |
111 | u32 tx_curr_frame_num; | 116 | u32 tx_curr_frame_num; |
@@ -133,7 +138,7 @@ struct cdc_ncm_ctx { | |||
133 | }; | 138 | }; |
134 | 139 | ||
135 | u8 cdc_ncm_select_altsetting(struct usb_interface *intf); | 140 | u8 cdc_ncm_select_altsetting(struct usb_interface *intf); |
136 | int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); | 141 | int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting, int drvflags); |
137 | void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); | 142 | void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); |
138 | struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign); | 143 | struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign); |
139 | int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); | 144 | int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); |