aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 17:38:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 17:38:30 -0500
commit172ad9af55d236cb124d67de7314a90dedb50df1 (patch)
treeab225ebb0bcab867305fec87308bda97ca060102 /include/linux
parenta44007a42dfd8e487537c7b1f8045577b28a4d95 (diff)
parent18558cae0272f8fd9647e69d3fec1565a7949865 (diff)
Merge 4.5-rc4 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h9
-rw-r--r--include/linux/ceph/ceph_features.h16
-rw-r--r--include/linux/cgroup-defs.h6
-rw-r--r--include/linux/cpuset.h6
-rw-r--r--include/linux/crush/crush.h8
-rw-r--r--include/linux/dax.h11
-rw-r--r--include/linux/devpts_fs.h4
-rw-r--r--include/linux/fs.h5
-rw-r--r--include/linux/gfp.h6
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/lockdep.h4
-rw-r--r--include/linux/memcontrol.h2
-rw-r--r--include/linux/mm.h9
-rw-r--r--include/linux/mm_types.h6
-rw-r--r--include/linux/mmzone.h6
-rw-r--r--include/linux/module.h19
-rw-r--r--include/linux/netdevice.h11
-rw-r--r--include/linux/of.h2
-rw-r--r--include/linux/pfn.h2
-rw-r--r--include/linux/pfn_t.h21
-rw-r--r--include/linux/radix-tree.h22
-rw-r--r--include/linux/raid/pq.h2
-rw-r--r--include/linux/rmap.h14
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/workqueue.h9
25 files changed, 131 insertions, 71 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 29189aeace19..4571ef1a12a9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -682,9 +682,12 @@ static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b)
682/* 682/*
683 * q->prep_rq_fn return values 683 * q->prep_rq_fn return values
684 */ 684 */
685#define BLKPREP_OK 0 /* serve it */ 685enum {
686#define BLKPREP_KILL 1 /* fatal error, kill */ 686 BLKPREP_OK, /* serve it */
687#define BLKPREP_DEFER 2 /* leave on queue */ 687 BLKPREP_KILL, /* fatal error, kill, return -EIO */
688 BLKPREP_DEFER, /* leave on queue */
689 BLKPREP_INVALID, /* invalid command, kill, return -EREMOTEIO */
690};
688 691
689extern unsigned long blk_max_low_pfn, blk_max_pfn; 692extern unsigned long blk_max_low_pfn, blk_max_pfn;
690 693
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index f89b31d45cc8..c1ef6f14e7be 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -63,6 +63,18 @@
63#define CEPH_FEATURE_OSD_MIN_SIZE_RECOVERY (1ULL<<49) 63#define CEPH_FEATURE_OSD_MIN_SIZE_RECOVERY (1ULL<<49)
64// duplicated since it was introduced at the same time as MIN_SIZE_RECOVERY 64// duplicated since it was introduced at the same time as MIN_SIZE_RECOVERY
65#define CEPH_FEATURE_OSD_PROXY_FEATURES (1ULL<<49) /* overlap w/ above */ 65#define CEPH_FEATURE_OSD_PROXY_FEATURES (1ULL<<49) /* overlap w/ above */
66#define CEPH_FEATURE_MON_METADATA (1ULL<<50)
67#define CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT (1ULL<<51) /* can sort objs bitwise */
68#define CEPH_FEATURE_OSD_PROXY_WRITE_FEATURES (1ULL<<52)
69#define CEPH_FEATURE_ERASURE_CODE_PLUGINS_V3 (1ULL<<53)
70#define CEPH_FEATURE_OSD_HITSET_GMT (1ULL<<54)
71#define CEPH_FEATURE_HAMMER_0_94_4 (1ULL<<55)
72#define CEPH_FEATURE_NEW_OSDOP_ENCODING (1ULL<<56) /* New, v7 encoding */
73#define CEPH_FEATURE_MON_STATEFUL_SUB (1ULL<<57) /* stateful mon subscription */
74#define CEPH_FEATURE_MON_ROUTE_OSDMAP (1ULL<<57) /* peon sends osdmaps */
75#define CEPH_FEATURE_CRUSH_TUNABLES5 (1ULL<<58) /* chooseleaf stable mode */
76// duplicated since it was introduced at the same time as CEPH_FEATURE_CRUSH_TUNABLES5
77#define CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING (1ULL<<58) /* New, v7 encoding */
66 78
67/* 79/*
68 * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature 80 * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature
@@ -108,7 +120,9 @@ static inline u64 ceph_sanitize_features(u64 features)
108 CEPH_FEATURE_CRUSH_TUNABLES3 | \ 120 CEPH_FEATURE_CRUSH_TUNABLES3 | \
109 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \ 121 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
110 CEPH_FEATURE_MSGR_KEEPALIVE2 | \ 122 CEPH_FEATURE_MSGR_KEEPALIVE2 | \
111 CEPH_FEATURE_CRUSH_V4) 123 CEPH_FEATURE_CRUSH_V4 | \
124 CEPH_FEATURE_CRUSH_TUNABLES5 | \
125 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING)
112 126
113#define CEPH_FEATURES_REQUIRED_DEFAULT \ 127#define CEPH_FEATURES_REQUIRED_DEFAULT \
114 (CEPH_FEATURE_NOSRCADDR | \ 128 (CEPH_FEATURE_NOSRCADDR | \
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 7f540f7f588d..789471dba6fb 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -127,6 +127,12 @@ struct cgroup_subsys_state {
127 */ 127 */
128 u64 serial_nr; 128 u64 serial_nr;
129 129
130 /*
131 * Incremented by online self and children. Used to guarantee that
132 * parents are not offlined before their children.
133 */
134 atomic_t online_cnt;
135
130 /* percpu_ref killing and RCU release */ 136 /* percpu_ref killing and RCU release */
131 struct rcu_head rcu_head; 137 struct rcu_head rcu_head;
132 struct work_struct destroy_work; 138 struct work_struct destroy_work;
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 85a868ccb493..fea160ee5803 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -137,6 +137,8 @@ static inline void set_mems_allowed(nodemask_t nodemask)
137 task_unlock(current); 137 task_unlock(current);
138} 138}
139 139
140extern void cpuset_post_attach_flush(void);
141
140#else /* !CONFIG_CPUSETS */ 142#else /* !CONFIG_CPUSETS */
141 143
142static inline bool cpusets_enabled(void) { return false; } 144static inline bool cpusets_enabled(void) { return false; }
@@ -243,6 +245,10 @@ static inline bool read_mems_allowed_retry(unsigned int seq)
243 return false; 245 return false;
244} 246}
245 247
248static inline void cpuset_post_attach_flush(void)
249{
250}
251
246#endif /* !CONFIG_CPUSETS */ 252#endif /* !CONFIG_CPUSETS */
247 253
248#endif /* _LINUX_CPUSET_H */ 254#endif /* _LINUX_CPUSET_H */
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 48b49305716b..be8f12b8f195 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -59,7 +59,8 @@ enum {
59 CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */ 59 CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */
60 CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10, 60 CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10,
61 CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11, 61 CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11,
62 CRUSH_RULE_SET_CHOOSELEAF_VARY_R = 12 62 CRUSH_RULE_SET_CHOOSELEAF_VARY_R = 12,
63 CRUSH_RULE_SET_CHOOSELEAF_STABLE = 13
63}; 64};
64 65
65/* 66/*
@@ -205,6 +206,11 @@ struct crush_map {
205 * mappings line up a bit better with previous mappings. */ 206 * mappings line up a bit better with previous mappings. */
206 __u8 chooseleaf_vary_r; 207 __u8 chooseleaf_vary_r;
207 208
209 /* if true, it makes chooseleaf firstn to return stable results (if
210 * no local retry) so that data migrations would be optimal when some
211 * device fails. */
212 __u8 chooseleaf_stable;
213
208#ifndef __KERNEL__ 214#ifndef __KERNEL__
209 /* 215 /*
210 * version 0 (original) of straw_calc has various flaws. version 1 216 * version 0 (original) of straw_calc has various flaws. version 1
diff --git a/include/linux/dax.h b/include/linux/dax.h
index 8204c3dc3800..818e45078929 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -14,6 +14,17 @@ int dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t,
14 dax_iodone_t); 14 dax_iodone_t);
15int __dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t, 15int __dax_fault(struct vm_area_struct *, struct vm_fault *, get_block_t,
16 dax_iodone_t); 16 dax_iodone_t);
17
18#ifdef CONFIG_FS_DAX
19struct page *read_dax_sector(struct block_device *bdev, sector_t n);
20#else
21static inline struct page *read_dax_sector(struct block_device *bdev,
22 sector_t n)
23{
24 return ERR_PTR(-ENXIO);
25}
26#endif
27
17#ifdef CONFIG_TRANSPARENT_HUGEPAGE 28#ifdef CONFIG_TRANSPARENT_HUGEPAGE
18int dax_pmd_fault(struct vm_area_struct *, unsigned long addr, pmd_t *, 29int dax_pmd_fault(struct vm_area_struct *, unsigned long addr, pmd_t *,
19 unsigned int flags, get_block_t, dax_iodone_t); 30 unsigned int flags, get_block_t, dax_iodone_t);
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h
index 251a2090a554..e0ee0b3000b2 100644
--- a/include/linux/devpts_fs.h
+++ b/include/linux/devpts_fs.h
@@ -19,6 +19,8 @@
19 19
20int devpts_new_index(struct inode *ptmx_inode); 20int devpts_new_index(struct inode *ptmx_inode);
21void devpts_kill_index(struct inode *ptmx_inode, int idx); 21void devpts_kill_index(struct inode *ptmx_inode, int idx);
22void devpts_add_ref(struct inode *ptmx_inode);
23void devpts_del_ref(struct inode *ptmx_inode);
22/* mknod in devpts */ 24/* mknod in devpts */
23struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, 25struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index,
24 void *priv); 26 void *priv);
@@ -32,6 +34,8 @@ void devpts_pty_kill(struct inode *inode);
32/* Dummy stubs in the no-pty case */ 34/* Dummy stubs in the no-pty case */
33static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } 35static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; }
34static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } 36static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { }
37static inline void devpts_add_ref(struct inode *ptmx_inode) { }
38static inline void devpts_del_ref(struct inode *ptmx_inode) { }
35static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, 39static inline struct inode *devpts_pty_new(struct inode *ptmx_inode,
36 dev_t device, int index, void *priv) 40 dev_t device, int index, void *priv)
37{ 41{
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 1a2046275cdf..ae681002100a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -484,9 +484,6 @@ struct block_device {
484 int bd_fsfreeze_count; 484 int bd_fsfreeze_count;
485 /* Mutex for freeze */ 485 /* Mutex for freeze */
486 struct mutex bd_fsfreeze_mutex; 486 struct mutex bd_fsfreeze_mutex;
487#ifdef CONFIG_FS_DAX
488 int bd_map_count;
489#endif
490}; 487};
491 488
492/* 489/*
@@ -2907,7 +2904,7 @@ extern void replace_mount_options(struct super_block *sb, char *options);
2907 2904
2908static inline bool io_is_direct(struct file *filp) 2905static inline bool io_is_direct(struct file *filp)
2909{ 2906{
2910 return (filp->f_flags & O_DIRECT) || IS_DAX(file_inode(filp)); 2907 return (filp->f_flags & O_DIRECT) || IS_DAX(filp->f_mapping->host);
2911} 2908}
2912 2909
2913static inline int iocb_flags(struct file *file) 2910static inline int iocb_flags(struct file *file)
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 28ad5f6494b0..af1f2b24bbe4 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -547,16 +547,16 @@ static inline bool pm_suspended_storage(void)
547} 547}
548#endif /* CONFIG_PM_SLEEP */ 548#endif /* CONFIG_PM_SLEEP */
549 549
550#ifdef CONFIG_CMA 550#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)
551
552/* The below functions must be run on a range from a single zone. */ 551/* The below functions must be run on a range from a single zone. */
553extern int alloc_contig_range(unsigned long start, unsigned long end, 552extern int alloc_contig_range(unsigned long start, unsigned long end,
554 unsigned migratetype); 553 unsigned migratetype);
555extern void free_contig_range(unsigned long pfn, unsigned nr_pages); 554extern void free_contig_range(unsigned long pfn, unsigned nr_pages);
555#endif
556 556
557#ifdef CONFIG_CMA
557/* CMA stuff */ 558/* CMA stuff */
558extern void init_cma_reserved_pageblock(struct page *page); 559extern void init_cma_reserved_pageblock(struct page *page);
559
560#endif 560#endif
561 561
562#endif /* __LINUX_GFP_H */ 562#endif /* __LINUX_GFP_H */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 851821bfd553..bec2abbd7ab2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -526,6 +526,7 @@ enum ata_lpm_policy {
526enum ata_lpm_hints { 526enum ata_lpm_hints {
527 ATA_LPM_EMPTY = (1 << 0), /* port empty/probing */ 527 ATA_LPM_EMPTY = (1 << 0), /* port empty/probing */
528 ATA_LPM_HIPM = (1 << 1), /* may use HIPM */ 528 ATA_LPM_HIPM = (1 << 1), /* may use HIPM */
529 ATA_LPM_WAKE_ONLY = (1 << 2), /* only wake up link */
529}; 530};
530 531
531/* forward declarations */ 532/* forward declarations */
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index c57e424d914b..4dca42fd32f5 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -66,7 +66,7 @@ struct lock_class {
66 /* 66 /*
67 * class-hash: 67 * class-hash:
68 */ 68 */
69 struct list_head hash_entry; 69 struct hlist_node hash_entry;
70 70
71 /* 71 /*
72 * global list of all lock-classes: 72 * global list of all lock-classes:
@@ -199,7 +199,7 @@ struct lock_chain {
199 u8 irq_context; 199 u8 irq_context;
200 u8 depth; 200 u8 depth;
201 u16 base; 201 u16 base;
202 struct list_head entry; 202 struct hlist_node entry;
203 u64 chain_key; 203 u64 chain_key;
204}; 204};
205 205
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 9ae48d4aeb5e..792c8981e633 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -51,7 +51,7 @@ enum mem_cgroup_stat_index {
51 MEM_CGROUP_STAT_SWAP, /* # of pages, swapped out */ 51 MEM_CGROUP_STAT_SWAP, /* # of pages, swapped out */
52 MEM_CGROUP_STAT_NSTATS, 52 MEM_CGROUP_STAT_NSTATS,
53 /* default hierarchy stats */ 53 /* default hierarchy stats */
54 MEMCG_SOCK, 54 MEMCG_SOCK = MEM_CGROUP_STAT_NSTATS,
55 MEMCG_NR_STAT, 55 MEMCG_NR_STAT,
56}; 56};
57 57
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f1cd22f2df1a..516e14944339 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -201,11 +201,13 @@ extern unsigned int kobjsize(const void *objp);
201#endif 201#endif
202 202
203#ifdef CONFIG_STACK_GROWSUP 203#ifdef CONFIG_STACK_GROWSUP
204#define VM_STACK_FLAGS (VM_GROWSUP | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) 204#define VM_STACK VM_GROWSUP
205#else 205#else
206#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) 206#define VM_STACK VM_GROWSDOWN
207#endif 207#endif
208 208
209#define VM_STACK_FLAGS (VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
210
209/* 211/*
210 * Special vmas that are non-mergable, non-mlock()able. 212 * Special vmas that are non-mergable, non-mlock()able.
211 * Note: mm/huge_memory.c VM_NO_THP depends on this definition. 213 * Note: mm/huge_memory.c VM_NO_THP depends on this definition.
@@ -1341,8 +1343,7 @@ static inline int stack_guard_page_end(struct vm_area_struct *vma,
1341 !vma_growsup(vma->vm_next, addr); 1343 !vma_growsup(vma->vm_next, addr);
1342} 1344}
1343 1345
1344extern struct task_struct *task_of_stack(struct task_struct *task, 1346int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t);
1345 struct vm_area_struct *vma, bool in_group);
1346 1347
1347extern unsigned long move_page_tables(struct vm_area_struct *vma, 1348extern unsigned long move_page_tables(struct vm_area_struct *vma,
1348 unsigned long old_addr, struct vm_area_struct *new_vma, 1349 unsigned long old_addr, struct vm_area_struct *new_vma,
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index d3ebb9d21a53..624b78b848b8 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -424,9 +424,9 @@ struct mm_struct {
424 unsigned long total_vm; /* Total pages mapped */ 424 unsigned long total_vm; /* Total pages mapped */
425 unsigned long locked_vm; /* Pages that have PG_mlocked set */ 425 unsigned long locked_vm; /* Pages that have PG_mlocked set */
426 unsigned long pinned_vm; /* Refcount permanently increased */ 426 unsigned long pinned_vm; /* Refcount permanently increased */
427 unsigned long data_vm; /* VM_WRITE & ~VM_SHARED/GROWSDOWN */ 427 unsigned long data_vm; /* VM_WRITE & ~VM_SHARED & ~VM_STACK */
428 unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE */ 428 unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE & ~VM_STACK */
429 unsigned long stack_vm; /* VM_GROWSUP/DOWN */ 429 unsigned long stack_vm; /* VM_STACK */
430 unsigned long def_flags; 430 unsigned long def_flags;
431 unsigned long start_code, end_code, start_data, end_data; 431 unsigned long start_code, end_code, start_data, end_data;
432 unsigned long start_brk, brk, start_stack; 432 unsigned long start_brk, brk, start_stack;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 33bb1b19273e..7b6c2cfee390 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -682,6 +682,12 @@ typedef struct pglist_data {
682 */ 682 */
683 unsigned long first_deferred_pfn; 683 unsigned long first_deferred_pfn;
684#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */ 684#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
685
686#ifdef CONFIG_TRANSPARENT_HUGEPAGE
687 spinlock_t split_queue_lock;
688 struct list_head split_queue;
689 unsigned long split_queue_len;
690#endif
685} pg_data_t; 691} pg_data_t;
686 692
687#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) 693#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)
diff --git a/include/linux/module.h b/include/linux/module.h
index 4560d8f1545d..2bb0c3085706 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -324,6 +324,12 @@ struct module_layout {
324#define __module_layout_align 324#define __module_layout_align
325#endif 325#endif
326 326
327struct mod_kallsyms {
328 Elf_Sym *symtab;
329 unsigned int num_symtab;
330 char *strtab;
331};
332
327struct module { 333struct module {
328 enum module_state state; 334 enum module_state state;
329 335
@@ -405,15 +411,10 @@ struct module {
405#endif 411#endif
406 412
407#ifdef CONFIG_KALLSYMS 413#ifdef CONFIG_KALLSYMS
408 /* 414 /* Protected by RCU and/or module_mutex: use rcu_dereference() */
409 * We keep the symbol and string tables for kallsyms. 415 struct mod_kallsyms *kallsyms;
410 * The core_* fields below are temporary, loader-only (they 416 struct mod_kallsyms core_kallsyms;
411 * could really be discarded after module init). 417
412 */
413 Elf_Sym *symtab, *core_symtab;
414 unsigned int num_symtab, core_num_syms;
415 char *strtab, *core_strtab;
416
417 /* Section attributes */ 418 /* Section attributes */
418 struct module_sect_attrs *sect_attrs; 419 struct module_sect_attrs *sect_attrs;
419 420
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5ac140dcb789..289c2314d766 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -512,7 +512,6 @@ static inline void napi_enable(struct napi_struct *n)
512 clear_bit(NAPI_STATE_NPSVC, &n->state); 512 clear_bit(NAPI_STATE_NPSVC, &n->state);
513} 513}
514 514
515#ifdef CONFIG_SMP
516/** 515/**
517 * napi_synchronize - wait until NAPI is not running 516 * napi_synchronize - wait until NAPI is not running
518 * @n: napi context 517 * @n: napi context
@@ -523,12 +522,12 @@ static inline void napi_enable(struct napi_struct *n)
523 */ 522 */
524static inline void napi_synchronize(const struct napi_struct *n) 523static inline void napi_synchronize(const struct napi_struct *n)
525{ 524{
526 while (test_bit(NAPI_STATE_SCHED, &n->state)) 525 if (IS_ENABLED(CONFIG_SMP))
527 msleep(1); 526 while (test_bit(NAPI_STATE_SCHED, &n->state))
527 msleep(1);
528 else
529 barrier();
528} 530}
529#else
530# define napi_synchronize(n) barrier()
531#endif
532 531
533enum netdev_queue_state_t { 532enum netdev_queue_state_t {
534 __QUEUE_STATE_DRV_XOFF, 533 __QUEUE_STATE_DRV_XOFF,
diff --git a/include/linux/of.h b/include/linux/of.h
index dd10626a615f..dc6e39696b64 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -929,7 +929,7 @@ static inline int of_get_available_child_count(const struct device_node *np)
929 return num; 929 return num;
930} 930}
931 931
932#ifdef CONFIG_OF 932#if defined(CONFIG_OF) && !defined(MODULE)
933#define _OF_DECLARE(table, name, compat, fn, fn_type) \ 933#define _OF_DECLARE(table, name, compat, fn, fn_type) \
934 static const struct of_device_id __of_table_##name \ 934 static const struct of_device_id __of_table_##name \
935 __used __section(__##table##_of_table) \ 935 __used __section(__##table##_of_table) \
diff --git a/include/linux/pfn.h b/include/linux/pfn.h
index 2d8e49711b63..1132953235c0 100644
--- a/include/linux/pfn.h
+++ b/include/linux/pfn.h
@@ -10,7 +10,7 @@
10 * backing is indicated by flags in the high bits of the value. 10 * backing is indicated by flags in the high bits of the value.
11 */ 11 */
12typedef struct { 12typedef struct {
13 unsigned long val; 13 u64 val;
14} pfn_t; 14} pfn_t;
15#endif 15#endif
16 16
diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
index 0703b5360d31..94994810c7c0 100644
--- a/include/linux/pfn_t.h
+++ b/include/linux/pfn_t.h
@@ -9,14 +9,13 @@
9 * PFN_DEV - pfn is not covered by system memmap by default 9 * PFN_DEV - pfn is not covered by system memmap by default
10 * PFN_MAP - pfn has a dynamic page mapping established by a device driver 10 * PFN_MAP - pfn has a dynamic page mapping established by a device driver
11 */ 11 */
12#define PFN_FLAGS_MASK (((unsigned long) ~PAGE_MASK) \ 12#define PFN_FLAGS_MASK (((u64) ~PAGE_MASK) << (BITS_PER_LONG_LONG - PAGE_SHIFT))
13 << (BITS_PER_LONG - PAGE_SHIFT)) 13#define PFN_SG_CHAIN (1ULL << (BITS_PER_LONG_LONG - 1))
14#define PFN_SG_CHAIN (1UL << (BITS_PER_LONG - 1)) 14#define PFN_SG_LAST (1ULL << (BITS_PER_LONG_LONG - 2))
15#define PFN_SG_LAST (1UL << (BITS_PER_LONG - 2)) 15#define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
16#define PFN_DEV (1UL << (BITS_PER_LONG - 3)) 16#define PFN_MAP (1ULL << (BITS_PER_LONG_LONG - 4))
17#define PFN_MAP (1UL << (BITS_PER_LONG - 4)) 17
18 18static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, u64 flags)
19static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, unsigned long flags)
20{ 19{
21 pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), }; 20 pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), };
22 21
@@ -29,7 +28,7 @@ static inline pfn_t pfn_to_pfn_t(unsigned long pfn)
29 return __pfn_to_pfn_t(pfn, 0); 28 return __pfn_to_pfn_t(pfn, 0);
30} 29}
31 30
32extern pfn_t phys_to_pfn_t(dma_addr_t addr, unsigned long flags); 31extern pfn_t phys_to_pfn_t(phys_addr_t addr, u64 flags);
33 32
34static inline bool pfn_t_has_page(pfn_t pfn) 33static inline bool pfn_t_has_page(pfn_t pfn)
35{ 34{
@@ -48,7 +47,7 @@ static inline struct page *pfn_t_to_page(pfn_t pfn)
48 return NULL; 47 return NULL;
49} 48}
50 49
51static inline dma_addr_t pfn_t_to_phys(pfn_t pfn) 50static inline phys_addr_t pfn_t_to_phys(pfn_t pfn)
52{ 51{
53 return PFN_PHYS(pfn_t_to_pfn(pfn)); 52 return PFN_PHYS(pfn_t_to_pfn(pfn));
54} 53}
@@ -87,7 +86,7 @@ static inline pmd_t pfn_t_pmd(pfn_t pfn, pgprot_t pgprot)
87#ifdef __HAVE_ARCH_PTE_DEVMAP 86#ifdef __HAVE_ARCH_PTE_DEVMAP
88static inline bool pfn_t_devmap(pfn_t pfn) 87static inline bool pfn_t_devmap(pfn_t pfn)
89{ 88{
90 const unsigned long flags = PFN_DEV|PFN_MAP; 89 const u64 flags = PFN_DEV|PFN_MAP;
91 90
92 return (pfn.val & flags) == flags; 91 return (pfn.val & flags) == flags;
93} 92}
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 7c88ad156a29..f54be7082207 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -379,12 +379,28 @@ void **radix_tree_next_chunk(struct radix_tree_root *root,
379 struct radix_tree_iter *iter, unsigned flags); 379 struct radix_tree_iter *iter, unsigned flags);
380 380
381/** 381/**
382 * radix_tree_iter_retry - retry this chunk of the iteration
383 * @iter: iterator state
384 *
385 * If we iterate over a tree protected only by the RCU lock, a race
386 * against deletion or creation may result in seeing a slot for which
387 * radix_tree_deref_retry() returns true. If so, call this function
388 * and continue the iteration.
389 */
390static inline __must_check
391void **radix_tree_iter_retry(struct radix_tree_iter *iter)
392{
393 iter->next_index = iter->index;
394 return NULL;
395}
396
397/**
382 * radix_tree_chunk_size - get current chunk size 398 * radix_tree_chunk_size - get current chunk size
383 * 399 *
384 * @iter: pointer to radix tree iterator 400 * @iter: pointer to radix tree iterator
385 * Returns: current chunk size 401 * Returns: current chunk size
386 */ 402 */
387static __always_inline unsigned 403static __always_inline long
388radix_tree_chunk_size(struct radix_tree_iter *iter) 404radix_tree_chunk_size(struct radix_tree_iter *iter)
389{ 405{
390 return iter->next_index - iter->index; 406 return iter->next_index - iter->index;
@@ -418,9 +434,9 @@ radix_tree_next_slot(void **slot, struct radix_tree_iter *iter, unsigned flags)
418 return slot + offset + 1; 434 return slot + offset + 1;
419 } 435 }
420 } else { 436 } else {
421 unsigned size = radix_tree_chunk_size(iter) - 1; 437 long size = radix_tree_chunk_size(iter);
422 438
423 while (size--) { 439 while (--size > 0) {
424 slot++; 440 slot++;
425 iter->index++; 441 iter->index++;
426 if (likely(*slot)) 442 if (likely(*slot))
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
index a7a06d1dcf9c..a0118d5929a9 100644
--- a/include/linux/raid/pq.h
+++ b/include/linux/raid/pq.h
@@ -152,6 +152,8 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
152 152
153# define jiffies raid6_jiffies() 153# define jiffies raid6_jiffies()
154# define printk printf 154# define printk printf
155# define pr_err(format, ...) fprintf(stderr, format, ## __VA_ARGS__)
156# define pr_info(format, ...) fprintf(stdout, format, ## __VA_ARGS__)
155# define GFP_KERNEL 0 157# define GFP_KERNEL 0
156# define __get_free_pages(x, y) ((unsigned long)mmap(NULL, PAGE_SIZE << (y), \ 158# define __get_free_pages(x, y) ((unsigned long)mmap(NULL, PAGE_SIZE << (y), \
157 PROT_READ|PROT_WRITE, \ 159 PROT_READ|PROT_WRITE, \
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index bdf597c4f0be..a07f42bedda3 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -109,20 +109,6 @@ static inline void put_anon_vma(struct anon_vma *anon_vma)
109 __put_anon_vma(anon_vma); 109 __put_anon_vma(anon_vma);
110} 110}
111 111
112static inline void vma_lock_anon_vma(struct vm_area_struct *vma)
113{
114 struct anon_vma *anon_vma = vma->anon_vma;
115 if (anon_vma)
116 down_write(&anon_vma->root->rwsem);
117}
118
119static inline void vma_unlock_anon_vma(struct vm_area_struct *vma)
120{
121 struct anon_vma *anon_vma = vma->anon_vma;
122 if (anon_vma)
123 up_write(&anon_vma->root->rwsem);
124}
125
126static inline void anon_vma_lock_write(struct anon_vma *anon_vma) 112static inline void anon_vma_lock_write(struct anon_vma *anon_vma)
127{ 113{
128 down_write(&anon_vma->root->rwsem); 114 down_write(&anon_vma->root->rwsem);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 11f935c1a090..4ce9ff7086f4 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -299,6 +299,7 @@ struct sk_buff;
299#else 299#else
300#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 1) 300#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 1)
301#endif 301#endif
302extern int sysctl_max_skb_frags;
302 303
303typedef struct skb_frag_struct skb_frag_t; 304typedef struct skb_frag_struct skb_frag_t;
304 305
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 0e32bc71245e..ca73c503b92a 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -311,6 +311,7 @@ enum {
311 311
312 __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ 312 __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */
313 __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ 313 __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */
314 __WQ_LEGACY = 1 << 18, /* internal: create*_workqueue() */
314 315
315 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ 316 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */
316 WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ 317 WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */
@@ -411,12 +412,12 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
411 alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) 412 alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args)
412 413
413#define create_workqueue(name) \ 414#define create_workqueue(name) \
414 alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, (name)) 415 alloc_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, 1, (name))
415#define create_freezable_workqueue(name) \ 416#define create_freezable_workqueue(name) \
416 alloc_workqueue("%s", WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, \ 417 alloc_workqueue("%s", __WQ_LEGACY | WQ_FREEZABLE | WQ_UNBOUND | \
417 1, (name)) 418 WQ_MEM_RECLAIM, 1, (name))
418#define create_singlethread_workqueue(name) \ 419#define create_singlethread_workqueue(name) \
419 alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, name) 420 alloc_ordered_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, name)
420 421
421extern void destroy_workqueue(struct workqueue_struct *wq); 422extern void destroy_workqueue(struct workqueue_struct *wq);
422 423