History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

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'.

David S. Miller committed 11 years ago

Commit c5e40ee2 parents 0528318 c5dfd65544 files · +4152 −3347Browse files

Showing the changes to include/linux (23 of 544 files). Show all

Unified · Split

23 files
  1. include/linux/amba/sp810.h +1 −1
  2. include/linux/blk-cgroup.h +3 −8
  3. include/linux/clkdev.h +4 −3
  4. include/linux/compat.h +1 −1
  5. include/linux/configfs.h +2 −1
  6. include/linux/cpu.h +4 −3
  7. include/linux/dcache.h +2 −1
  8. include/linux/device.h +7 −8
  9. include/linux/fs.h +20 −10
  10. include/linux/gpio/driver.h +1 −1
  11. include/linux/hid-sensor-hub.h +1 −0
  12. include/linux/hugetlb.h +8 −9
  13. include/linux/init.h +0 −78
  14. include/linux/iommu.h +1 −1
  15. include/linux/kernel.h +5 −4
  16. include/linux/kobject.h +3 −2
  17. include/linux/kvm_host.h +18 −0
  18. include/linux/mmiotrace.h +1 −1
  19. include/linux/module.h +84 −0
  20. include/linux/page_owner.h +13 −0
  21. include/linux/pata_arasan_cf_data.h +1 −1
  22. include/linux/printk.h +3 −3
  23. include/linux/sched.h +14 −2
include/linux/amba/sp810.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * ARM PrimeXsys System Controller SP810 header file
33 *
44 * Copyright (C) 2009 ST Microelectronics
5− * Viresh Kumar <viresh.linux@gmail.com>
5+ * Viresh Kumar <vireshk@kernel.org>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
include/linux/blk-cgroup.h+3−8
@@ -47,6 +47,7 @@ struct blkcg { · 46 unmodified lines
4747
4848 struct blkcg_policy_data *pd[BLKCG_MAX_POLS];
4949
50+ struct list_head all_blkcgs_node;
5051 #ifdef CONFIG_CGROUP_WRITEBACK
5152 struct list_head cgwb_list;
5253 #endif
@@ -88,18 +89,12 @@ struct blkg_policy_data { · 35 unmodified lines
8889 * Policies that need to keep per-blkcg data which is independent
8990 * from any request_queue associated to it must specify its size
9091 * 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.
9694 */
9795 struct blkcg_policy_data {
9896 /* the policy id this per-policy data belongs to */
9997 int plid;
100−
101− /* used during policy activation */
102− struct list_head alloc_node;
10398 };
10499
105100 /* association between a blk cgroup and a request queue */
include/linux/clkdev.h+4−3
@@ -33,18 +33,19 @@ struct clk_lookup { · 32 unmodified lines
3333 }
3434
3535 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);
3737
3838 void clkdev_add(struct clk_lookup *cl);
3939 void clkdev_drop(struct clk_lookup *cl);
4040
4141 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);
4343
4444 void clkdev_add_table(struct clk_lookup *, size_t);
4545 int clk_add_alias(const char *, const char *, const char *, struct device *);
4646
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);
4849 int clk_register_clkdevs(struct clk *, struct clk_lookup *, size_t);
4950
5051 #ifdef CONFIG_COMMON_CLK
include/linux/compat.h+1−1
@@ -424,7 +424,7 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, · 423 unmodified lines
424424
425425 asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
426426
427−extern int compat_printk(const char *fmt, ...);
427+extern __printf(1, 2) int compat_printk(const char *fmt, ...);
428428 extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat);
429429 extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set);
430430
include/linux/configfs.h+2−1
@@ -64,7 +64,8 @@ struct config_item { · 63 unmodified lines
6464 struct dentry *ci_dentry;
6565 };
6666
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 *, ...);
6869
6970 static inline char *config_item_name(struct config_item * item)
7071 {
include/linux/cpu.h+4−3
@@ -40,9 +40,10 @@ extern void cpu_remove_dev_attr(struct device_attribute *attr); · 39 unmodified lines
4040 extern int cpu_add_dev_attr_group(struct attribute_group *attrs);
4141 extern void cpu_remove_dev_attr_group(struct attribute_group *attrs);
4242
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, ...);
4647 #ifdef CONFIG_HOTPLUG_CPU
4748 extern void unregister_cpu(struct cpu *cpu);
4849 extern ssize_t arch_cpu_probe(const char *, size_t);
include/linux/dcache.h+2−1
@@ -327,7 +327,8 @@ static inline unsigned d_count(const struct dentry *dentry) · 326 unmodified lines
327327 /*
328328 * helper function for dentry_operations.d_dname() members
329329 */
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 *, ...);
331332 extern char *simple_dname(struct dentry *, char *, int);
332333
333334 extern char *__d_path(const struct path *, const struct path *, char *, int);
include/linux/device.h+7−8
@@ -637,8 +637,9 @@ extern int devres_release_group(struct device *dev, void *id); · 636 unmodified lines
637637
638638 /* managed devm_k.alloc/kfree for device drivers */
639639 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);
642643 extern __printf(3, 4)
643644 char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...);
644645 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
10111012 /*
10121013 * Easy functions for dynamically creating devices on the fly
10131014 */
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);
10201019 extern __printf(5, 6)
10211020 struct device *device_create(struct class *cls, struct device *parent,
10221021 dev_t devt, void *drvdata,
include/linux/fs.h+20−10
@@ -1046,12 +1046,12 @@ extern void locks_remove_file(struct file *); · 1045 unmodified lines
10461046 extern void locks_release_private(struct file_lock *);
10471047 extern void posix_test_lock(struct file *, struct file_lock *);
10481048 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 *);
10501050 extern int posix_unblock_lock(struct file_lock *);
10511051 extern int vfs_test_lock(struct file *, struct file_lock *);
10521052 extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *);
10531053 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);
10551055 extern int __break_lease(struct inode *inode, unsigned int flags, unsigned int type);
10561056 extern void lease_get_mtime(struct inode *, struct timespec *time);
10571057 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
11371137 return -ENOLCK;
11381138 }
11391139
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)
11411142 {
11421143 return -ENOLCK;
11431144 }
@@ -1163,8 +1164,8 @@ static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl) · 19 unmodified lines
11631164 return 0;
11641165 }
11651166
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)
11681169 {
11691170 return -ENOLCK;
11701171 }
@@ -1202,6 +1203,20 @@ static inline void show_fd_locks(struct seq_file *f, · 31 unmodified lines
12021203 struct file *filp, struct files_struct *files) {}
12031204 #endif /* !CONFIG_FILE_LOCKING */
12041205
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+}
12051220
12061221 struct fasync_struct {
12071222 spinlock_t fa_lock;
@@ -2011,11 +2026,6 @@ extern void ihold(struct inode * inode); · 803 unmodified lines
20112026 extern void iput(struct inode *);
20122027 extern int generic_update_time(struct inode *, struct timespec *, int);
20132028
2014−static inline struct inode *file_inode(const struct file *f)
2015−{
2016− return f->f_inode;
2017−}
2018−
20192029 /* /sys/fs */
20202030 extern struct kobject *fs_kobj;
20212031
include/linux/gpio/driver.h+1−1
@@ -45,7 +45,7 @@ struct seq_file; · 44 unmodified lines
4545 * @base: identifies the first GPIO number handled by this chip;
4646 * or, if negative during registration, requests dynamic ID allocation.
4747 * 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
4949 * let gpiolib select the chip base in all possible cases. We want to
5050 * get rid of the static GPIO number space in the long run.
5151 * @ngpio: the number of GPIOs handled by this controller; the last GPIO
include/linux/hid-sensor-hub.h+1−0
@@ -230,6 +230,7 @@ struct hid_sensor_common { · 229 unmodified lines
230230 struct platform_device *pdev;
231231 unsigned usage_id;
232232 atomic_t data_ready;
233+ atomic_t user_requested_state;
233234 struct iio_trigger *trigger;
234235 struct hid_sensor_hub_attribute_info poll;
235236 struct hid_sensor_hub_attribute_info report_state;
include/linux/hugetlb.h+8−9
@@ -460,15 +460,14 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h, · 459 unmodified lines
460460 return &mm->page_table_lock;
461461 }
462462
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
472471
473472 #else /* CONFIG_HUGETLB_PAGE */
474473 struct hstate {};
include/linux/init.h+0−78
@@ -282,68 +282,8 @@ void __init parse_early_param(void); · 281 unmodified lines
282282 void __init parse_early_options(char *cmdline);
283283 #endif /* __ASSEMBLY__ */
284284
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−
307285 #else /* MODULE */
308286
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−
347287 #define __setup_param(str, unique_id, fn) /* nothing */
348288 #define __setup(str, func) /* nothing */
349289 #endif
@@ -351,24 +291,6 @@ void __init parse_early_options(char *cmdline); · 1 unmodified line
351291 /* Data marked not to be saved by software suspend */
352292 #define __nosavedata __section(.data..nosave)
353293
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−
372294 #ifdef MODULE
373295 #define __exit_p(x) x
374296 #else
include/linux/iommu.h+1−1
@@ -258,7 +258,7 @@ extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr, · 257 unmodified lines
258258 void *data);
259259 struct device *iommu_device_create(struct device *parent, void *drvdata,
260260 const struct attribute_group **groups,
261− const char *fmt, ...);
261+ const char *fmt, ...) __printf(4, 5);
262262 void iommu_device_destroy(struct device *dev);
263263 int iommu_device_link(struct device *dev, struct device *link);
264264 void iommu_device_unlink(struct device *dev, struct device *link);
include/linux/kernel.h+5−4
@@ -411,7 +411,8 @@ extern __printf(3, 0) · 410 unmodified lines
411411 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
412412 extern __printf(2, 3)
413413 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);
415416
416417 extern __scanf(2, 3)
417418 int sscanf(const char *, const char *, ...);
@@ -679,10 +680,10 @@ do { \ · 261 unmodified lines
679680 __ftrace_vprintk(_THIS_IP_, fmt, vargs); \
680681 } while (0)
681682
682−extern int
683+extern __printf(2, 0) int
683684 __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap);
684685
685−extern int
686+extern __printf(2, 0) int
686687 __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
687688
688689 extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
@@ -702,7 +703,7 @@ int trace_printk(const char *fmt, ...) · 13 unmodified lines
702703 {
703704 return 0;
704705 }
705−static inline int
706+static __printf(1, 0) inline int
706707 ftrace_vprintk(const char *fmt, va_list ap)
707708 {
708709 return 0;
include/linux/kobject.h+3−2
@@ -80,8 +80,9 @@ struct kobject { · 79 unmodified lines
8080
8181 extern __printf(2, 3)
8282 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);
8586
8687 static inline const char *kobject_name(const struct kobject *kobj)
8788 {
include/linux/kvm_host.h+18−0
@@ -734,6 +734,24 @@ static inline bool kvm_arch_has_noncoherent_dma(struct kvm *kvm) · 733 unmodified lines
734734 return false;
735735 }
736736 #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
737755
738756 static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu)
739757 {
include/linux/mmiotrace.h+1−1
@@ -106,6 +106,6 @@ extern void enable_mmiotrace(void); · 105 unmodified lines
106106 extern void disable_mmiotrace(void);
107107 extern void mmio_trace_rw(struct mmiotrace_rw *rw);
108108 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);
110110
111111 #endif /* _LINUX_MMIOTRACE_H */
include/linux/module.h+84−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #include <linux/compiler.h>
1212 #include <linux/cache.h>
1313 #include <linux/kmod.h>
14+#include <linux/init.h>
1415 #include <linux/elf.h>
1516 #include <linux/stringify.h>
1617 #include <linux/kobject.h>
@@ -71,6 +72,89 @@ extern struct module_attribute module_uevent; · 54 unmodified lines
7172 extern int init_module(void);
7273 extern void cleanup_module(void);
7374
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+
74158 /* Archs provide a method of finding the correct exception table. */
75159 struct exception_table_entry;
76160
include/linux/page_owner.h+13−0
@@ -8,6 +8,7 @@ extern struct page_ext_operations page_owner_ops; · 7 unmodified lines
88 extern void __reset_page_owner(struct page *page, unsigned int order);
99 extern void __set_page_owner(struct page *page,
1010 unsigned int order, gfp_t gfp_mask);
11+extern gfp_t __get_page_owner_gfp(struct page *page);
1112
1213 static inline void reset_page_owner(struct page *page, unsigned int order)
1314 {
@@ -25,6 +26,14 @@ static inline void set_page_owner(struct page *page, · 11 unmodified lines
2526
2627 __set_page_owner(page, order, gfp_mask);
2728 }
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+}
2837 #else
2938 static inline void reset_page_owner(struct page *page, unsigned int order)
3039 {
@@ -33,6 +42,10 @@ static inline void set_page_owner(struct page *page, · 2 unmodified lines
3342 unsigned int order, gfp_t gfp_mask)
3443 {
3544 }
45+static inline gfp_t get_page_owner_gfp(struct page *page)
46+{
47+ return 0;
48+}
3649
3750 #endif /* CONFIG_PAGE_OWNER */
3851 #endif /* __LINUX_PAGE_OWNER_H */
include/linux/pata_arasan_cf_data.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Arasan Compact Flash host controller platform data header file
55 *
66 * Copyright (C) 2011 ST Microelectronics
7− * Viresh Kumar <viresh.linux@gmail.com>
7+ * Viresh Kumar <vireshk@kernel.org>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
include/linux/printk.h+3−3
@@ -122,7 +122,7 @@ static inline __printf(1, 2) __cold · 121 unmodified lines
122122 void early_printk(const char *s, ...) { }
123123 #endif
124124
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);
126126
127127 #ifdef CONFIG_PRINTK
128128 asmlinkage __printf(5, 0)
@@ -166,7 +166,7 @@ char *log_buf_addr_get(void); · 37 unmodified lines
166166 u32 log_buf_len_get(void);
167167 void log_buf_kexec_setup(void);
168168 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, ...);
170170 void dump_stack_print_info(const char *log_lvl);
171171 void show_regs_print_info(const char *log_lvl);
172172 #else
@@ -217,7 +217,7 @@ static inline void setup_log_buf(int early) · 44 unmodified lines
217217 {
218218 }
219219
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, ...)
221221 {
222222 }
223223
include/linux/sched.h+14−2
@@ -1522,8 +1522,6 @@ struct task_struct { · 1521 unmodified lines
15221522 /* hung task detection */
15231523 unsigned long last_switch_count;
15241524 #endif
1525−/* CPU-specific state of this task */
1526− struct thread_struct thread;
15271525 /* filesystem information */
15281526 struct fs_struct *fs;
15291527 /* open file information */
@@ -1778,8 +1776,22 @@ struct task_struct { · 248 unmodified lines
17781776 unsigned long task_state_change;
17791777 #endif
17801778 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+ */
17811787 };
17821788
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+
17831795 /* Future-safe accessor for struct task_struct's cpus_allowed. */
17841796 #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
17851797