aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/cppc_acpi.h1
-rw-r--r--include/drm/drm_cache.h9
-rw-r--r--include/drm/drm_dp_mst_helper.h25
-rw-r--r--include/drm/drm_fixed.h53
-rw-r--r--include/linux/dax.h11
-rw-r--r--include/linux/fs.h5
-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/netdevice.h11
-rw-r--r--include/linux/of.h2
-rw-r--r--include/linux/pfn_t.h4
-rw-r--r--include/linux/radix-tree.h16
-rw-r--r--include/linux/raid/pq.h2
-rw-r--r--include/media/videobuf2-core.h3
-rw-r--r--include/net/bluetooth/l2cap.h6
-rw-r--r--include/net/dst_metadata.h18
-rw-r--r--include/net/ip6_route.h12
-rw-r--r--include/net/netfilter/nf_conntrack_core.h8
-rw-r--r--include/net/sctp/structs.h5
-rw-r--r--include/net/sock.h12
-rw-r--r--include/net/sock_reuseport.h2
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/sound/rawmidi.h4
-rw-r--r--include/uapi/linux/fs.h1
26 files changed, 170 insertions, 65 deletions
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
index 717a29810473..dad8af3ebeb5 100644
--- a/include/acpi/cppc_acpi.h
+++ b/include/acpi/cppc_acpi.h
@@ -133,6 +133,5 @@ extern int acpi_get_psd_map(struct cpudata **);
133/* Methods to interact with the PCC mailbox controller. */ 133/* Methods to interact with the PCC mailbox controller. */
134extern struct mbox_chan * 134extern struct mbox_chan *
135 pcc_mbox_request_channel(struct mbox_client *, unsigned int); 135 pcc_mbox_request_channel(struct mbox_client *, unsigned int);
136extern int mbox_send_message(struct mbox_chan *chan, void *mssg);
137 136
138#endif /* _CPPC_ACPI_H*/ 137#endif /* _CPPC_ACPI_H*/
diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
index 7bfb063029d8..461a0558bca4 100644
--- a/include/drm/drm_cache.h
+++ b/include/drm/drm_cache.h
@@ -35,4 +35,13 @@
35 35
36void drm_clflush_pages(struct page *pages[], unsigned long num_pages); 36void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
37 37
38static inline bool drm_arch_can_wc_memory(void)
39{
40#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
41 return false;
42#else
43 return true;
44#endif
45}
46
38#endif 47#endif
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 24ab1787b771..fdb47051d549 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -44,8 +44,6 @@ struct drm_dp_vcpi {
44/** 44/**
45 * struct drm_dp_mst_port - MST port 45 * struct drm_dp_mst_port - MST port
46 * @kref: reference count for this port. 46 * @kref: reference count for this port.
47 * @guid_valid: for DP 1.2 devices if we have validated the GUID.
48 * @guid: guid for DP 1.2 device on this port.
49 * @port_num: port number 47 * @port_num: port number
50 * @input: if this port is an input port. 48 * @input: if this port is an input port.
51 * @mcs: message capability status - DP 1.2 spec. 49 * @mcs: message capability status - DP 1.2 spec.
@@ -70,10 +68,6 @@ struct drm_dp_vcpi {
70struct drm_dp_mst_port { 68struct drm_dp_mst_port {
71 struct kref kref; 69 struct kref kref;
72 70
73 /* if dpcd 1.2 device is on this port - its GUID info */
74 bool guid_valid;
75 u8 guid[16];
76
77 u8 port_num; 71 u8 port_num;
78 bool input; 72 bool input;
79 bool mcs; 73 bool mcs;
@@ -110,10 +104,12 @@ struct drm_dp_mst_port {
110 * @tx_slots: transmission slots for this device. 104 * @tx_slots: transmission slots for this device.
111 * @last_seqno: last sequence number used to talk to this. 105 * @last_seqno: last sequence number used to talk to this.
112 * @link_address_sent: if a link address message has been sent to this device yet. 106 * @link_address_sent: if a link address message has been sent to this device yet.
107 * @guid: guid for DP 1.2 branch device. port under this branch can be
108 * identified by port #.
113 * 109 *
114 * This structure represents an MST branch device, there is one 110 * This structure represents an MST branch device, there is one
115 * primary branch device at the root, along with any others connected 111 * primary branch device at the root, along with any other branches connected
116 * to downstream ports 112 * to downstream port of parent branches.
117 */ 113 */
118struct drm_dp_mst_branch { 114struct drm_dp_mst_branch {
119 struct kref kref; 115 struct kref kref;
@@ -132,6 +128,9 @@ struct drm_dp_mst_branch {
132 struct drm_dp_sideband_msg_tx *tx_slots[2]; 128 struct drm_dp_sideband_msg_tx *tx_slots[2];
133 int last_seqno; 129 int last_seqno;
134 bool link_address_sent; 130 bool link_address_sent;
131
132 /* global unique identifier to identify branch devices */
133 u8 guid[16];
135}; 134};
136 135
137 136
@@ -406,11 +405,9 @@ struct drm_dp_payload {
406 * @conn_base_id: DRM connector ID this mgr is connected to. 405 * @conn_base_id: DRM connector ID this mgr is connected to.
407 * @down_rep_recv: msg receiver state for down replies. 406 * @down_rep_recv: msg receiver state for down replies.
408 * @up_req_recv: msg receiver state for up requests. 407 * @up_req_recv: msg receiver state for up requests.
409 * @lock: protects mst state, primary, guid, dpcd. 408 * @lock: protects mst state, primary, dpcd.
410 * @mst_state: if this manager is enabled for an MST capable port. 409 * @mst_state: if this manager is enabled for an MST capable port.
411 * @mst_primary: pointer to the primary branch device. 410 * @mst_primary: pointer to the primary branch device.
412 * @guid_valid: GUID valid for the primary branch device.
413 * @guid: GUID for primary port.
414 * @dpcd: cache of DPCD for primary port. 411 * @dpcd: cache of DPCD for primary port.
415 * @pbn_div: PBN to slots divisor. 412 * @pbn_div: PBN to slots divisor.
416 * 413 *
@@ -432,13 +429,11 @@ struct drm_dp_mst_topology_mgr {
432 struct drm_dp_sideband_msg_rx up_req_recv; 429 struct drm_dp_sideband_msg_rx up_req_recv;
433 430
434 /* pointer to info about the initial MST device */ 431 /* pointer to info about the initial MST device */
435 struct mutex lock; /* protects mst_state + primary + guid + dpcd */ 432 struct mutex lock; /* protects mst_state + primary + dpcd */
436 433
437 bool mst_state; 434 bool mst_state;
438 struct drm_dp_mst_branch *mst_primary; 435 struct drm_dp_mst_branch *mst_primary;
439 /* primary MST device GUID */ 436
440 bool guid_valid;
441 u8 guid[16];
442 u8 dpcd[DP_RECEIVER_CAP_SIZE]; 437 u8 dpcd[DP_RECEIVER_CAP_SIZE];
443 u8 sink_count; 438 u8 sink_count;
444 int pbn_div; 439 int pbn_div;
diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h
index d639049a613d..553210c02ee0 100644
--- a/include/drm/drm_fixed.h
+++ b/include/drm/drm_fixed.h
@@ -73,18 +73,28 @@ static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
73#define DRM_FIXED_ONE (1ULL << DRM_FIXED_POINT) 73#define DRM_FIXED_ONE (1ULL << DRM_FIXED_POINT)
74#define DRM_FIXED_DECIMAL_MASK (DRM_FIXED_ONE - 1) 74#define DRM_FIXED_DECIMAL_MASK (DRM_FIXED_ONE - 1)
75#define DRM_FIXED_DIGITS_MASK (~DRM_FIXED_DECIMAL_MASK) 75#define DRM_FIXED_DIGITS_MASK (~DRM_FIXED_DECIMAL_MASK)
76#define DRM_FIXED_EPSILON 1LL
77#define DRM_FIXED_ALMOST_ONE (DRM_FIXED_ONE - DRM_FIXED_EPSILON)
76 78
77static inline s64 drm_int2fixp(int a) 79static inline s64 drm_int2fixp(int a)
78{ 80{
79 return ((s64)a) << DRM_FIXED_POINT; 81 return ((s64)a) << DRM_FIXED_POINT;
80} 82}
81 83
82static inline int drm_fixp2int(int64_t a) 84static inline int drm_fixp2int(s64 a)
83{ 85{
84 return ((s64)a) >> DRM_FIXED_POINT; 86 return ((s64)a) >> DRM_FIXED_POINT;
85} 87}
86 88
87static inline unsigned drm_fixp_msbset(int64_t a) 89static inline int drm_fixp2int_ceil(s64 a)
90{
91 if (a > 0)
92 return drm_fixp2int(a + DRM_FIXED_ALMOST_ONE);
93 else
94 return drm_fixp2int(a - DRM_FIXED_ALMOST_ONE);
95}
96
97static inline unsigned drm_fixp_msbset(s64 a)
88{ 98{
89 unsigned shift, sign = (a >> 63) & 1; 99 unsigned shift, sign = (a >> 63) & 1;
90 100
@@ -136,6 +146,45 @@ static inline s64 drm_fixp_div(s64 a, s64 b)
136 return result; 146 return result;
137} 147}
138 148
149static inline s64 drm_fixp_from_fraction(s64 a, s64 b)
150{
151 s64 res;
152 bool a_neg = a < 0;
153 bool b_neg = b < 0;
154 u64 a_abs = a_neg ? -a : a;
155 u64 b_abs = b_neg ? -b : b;
156 u64 rem;
157
158 /* determine integer part */
159 u64 res_abs = div64_u64_rem(a_abs, b_abs, &rem);
160
161 /* determine fractional part */
162 {
163 u32 i = DRM_FIXED_POINT;
164
165 do {
166 rem <<= 1;
167 res_abs <<= 1;
168 if (rem >= b_abs) {
169 res_abs |= 1;
170 rem -= b_abs;
171 }
172 } while (--i != 0);
173 }
174
175 /* round up LSB */
176 {
177 u64 summand = (rem << 1) >= b_abs;
178
179 res_abs += summand;
180 }
181
182 res = (s64) res_abs;
183 if (a_neg ^ b_neg)
184 res = -res;
185 return res;
186}
187
139static inline s64 drm_fixp_exp(s64 x) 188static inline s64 drm_fixp_exp(s64 x)
140{ 189{
141 s64 tolerance = div64_s64(DRM_FIXED_ONE, 1000000); 190 s64 tolerance = div64_s64(DRM_FIXED_ONE, 1000000);
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/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/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/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_t.h b/include/linux/pfn_t.h
index 0703b5360d31..37448ab5fb5c 100644
--- a/include/linux/pfn_t.h
+++ b/include/linux/pfn_t.h
@@ -29,7 +29,7 @@ static inline pfn_t pfn_to_pfn_t(unsigned long pfn)
29 return __pfn_to_pfn_t(pfn, 0); 29 return __pfn_to_pfn_t(pfn, 0);
30} 30}
31 31
32extern pfn_t phys_to_pfn_t(dma_addr_t addr, unsigned long flags); 32extern pfn_t phys_to_pfn_t(phys_addr_t addr, unsigned long flags);
33 33
34static inline bool pfn_t_has_page(pfn_t pfn) 34static inline bool pfn_t_has_page(pfn_t pfn)
35{ 35{
@@ -48,7 +48,7 @@ static inline struct page *pfn_t_to_page(pfn_t pfn)
48 return NULL; 48 return NULL;
49} 49}
50 50
51static inline dma_addr_t pfn_t_to_phys(pfn_t pfn) 51static inline phys_addr_t pfn_t_to_phys(pfn_t pfn)
52{ 52{
53 return PFN_PHYS(pfn_t_to_pfn(pfn)); 53 return PFN_PHYS(pfn_t_to_pfn(pfn));
54} 54}
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 7c88ad156a29..00b17c526c1f 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -379,6 +379,22 @@ 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
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/media/videobuf2-core.h b/include/media/videobuf2-core.h
index ef03ae56b1c1..8a0f55b6c2ba 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -533,7 +533,8 @@ int vb2_core_create_bufs(struct vb2_queue *q, enum vb2_memory memory,
533 const unsigned int requested_sizes[]); 533 const unsigned int requested_sizes[]);
534int vb2_core_prepare_buf(struct vb2_queue *q, unsigned int index, void *pb); 534int vb2_core_prepare_buf(struct vb2_queue *q, unsigned int index, void *pb);
535int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb); 535int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb);
536int vb2_core_dqbuf(struct vb2_queue *q, void *pb, bool nonblocking); 536int vb2_core_dqbuf(struct vb2_queue *q, unsigned int *pindex, void *pb,
537 bool nonblocking);
537 538
538int vb2_core_streamon(struct vb2_queue *q, unsigned int type); 539int vb2_core_streamon(struct vb2_queue *q, unsigned int type);
539int vb2_core_streamoff(struct vb2_queue *q, unsigned int type); 540int vb2_core_streamoff(struct vb2_queue *q, unsigned int type);
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 52899291f401..5ee3c689c863 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -252,6 +252,12 @@ struct l2cap_conn_rsp {
252#define L2CAP_PSM_3DSP 0x0021 252#define L2CAP_PSM_3DSP 0x0021
253#define L2CAP_PSM_IPSP 0x0023 /* 6LoWPAN */ 253#define L2CAP_PSM_IPSP 0x0023 /* 6LoWPAN */
254 254
255#define L2CAP_PSM_DYN_START 0x1001
256#define L2CAP_PSM_DYN_END 0xffff
257#define L2CAP_PSM_AUTO_END 0x10ff
258#define L2CAP_PSM_LE_DYN_START 0x0080
259#define L2CAP_PSM_LE_DYN_END 0x00ff
260
255/* channel identifier */ 261/* channel identifier */
256#define L2CAP_CID_SIGNALING 0x0001 262#define L2CAP_CID_SIGNALING 0x0001
257#define L2CAP_CID_CONN_LESS 0x0002 263#define L2CAP_CID_CONN_LESS 0x0002
diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h
index 6816f0fa5693..30a56ab2ccfb 100644
--- a/include/net/dst_metadata.h
+++ b/include/net/dst_metadata.h
@@ -44,6 +44,24 @@ static inline bool skb_valid_dst(const struct sk_buff *skb)
44 return dst && !(dst->flags & DST_METADATA); 44 return dst && !(dst->flags & DST_METADATA);
45} 45}
46 46
47static inline int skb_metadata_dst_cmp(const struct sk_buff *skb_a,
48 const struct sk_buff *skb_b)
49{
50 const struct metadata_dst *a, *b;
51
52 if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
53 return 0;
54
55 a = (const struct metadata_dst *) skb_dst(skb_a);
56 b = (const struct metadata_dst *) skb_dst(skb_b);
57
58 if (!a != !b || a->u.tun_info.options_len != b->u.tun_info.options_len)
59 return 1;
60
61 return memcmp(&a->u.tun_info, &b->u.tun_info,
62 sizeof(a->u.tun_info) + a->u.tun_info.options_len);
63}
64
47struct metadata_dst *metadata_dst_alloc(u8 optslen, gfp_t flags); 65struct metadata_dst *metadata_dst_alloc(u8 optslen, gfp_t flags);
48struct metadata_dst __percpu *metadata_dst_alloc_percpu(u8 optslen, gfp_t flags); 66struct metadata_dst __percpu *metadata_dst_alloc_percpu(u8 optslen, gfp_t flags);
49 67
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 877f682989b8..295d291269e2 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -64,8 +64,16 @@ static inline bool rt6_need_strict(const struct in6_addr *daddr)
64 64
65void ip6_route_input(struct sk_buff *skb); 65void ip6_route_input(struct sk_buff *skb);
66 66
67struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk, 67struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
68 struct flowi6 *fl6); 68 struct flowi6 *fl6, int flags);
69
70static inline struct dst_entry *ip6_route_output(struct net *net,
71 const struct sock *sk,
72 struct flowi6 *fl6)
73{
74 return ip6_route_output_flags(net, sk, fl6, 0);
75}
76
69struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6, 77struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6,
70 int flags); 78 int flags);
71 79
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index 788ef58a66b9..62e17d1319ff 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -79,12 +79,10 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
79 const struct nf_conntrack_l3proto *l3proto, 79 const struct nf_conntrack_l3proto *l3proto,
80 const struct nf_conntrack_l4proto *proto); 80 const struct nf_conntrack_l4proto *proto);
81 81
82#ifdef CONFIG_LOCKDEP 82#define CONNTRACK_LOCKS 1024
83# define CONNTRACK_LOCKS 8 83
84#else
85# define CONNTRACK_LOCKS 1024
86#endif
87extern spinlock_t nf_conntrack_locks[CONNTRACK_LOCKS]; 84extern spinlock_t nf_conntrack_locks[CONNTRACK_LOCKS];
85void nf_conntrack_lock(spinlock_t *lock);
88 86
89extern spinlock_t nf_conntrack_expect_lock; 87extern spinlock_t nf_conntrack_expect_lock;
90 88
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 20e72129be1c..205630bb5010 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -756,7 +756,6 @@ struct sctp_transport {
756 756
757 /* Reference counting. */ 757 /* Reference counting. */
758 atomic_t refcnt; 758 atomic_t refcnt;
759 __u32 dead:1,
760 /* RTO-Pending : A flag used to track if one of the DATA 759 /* RTO-Pending : A flag used to track if one of the DATA
761 * chunks sent to this address is currently being 760 * chunks sent to this address is currently being
762 * used to compute a RTT. If this flag is 0, 761 * used to compute a RTT. If this flag is 0,
@@ -766,7 +765,7 @@ struct sctp_transport {
766 * calculation completes (i.e. the DATA chunk 765 * calculation completes (i.e. the DATA chunk
767 * is SACK'd) clear this flag. 766 * is SACK'd) clear this flag.
768 */ 767 */
769 rto_pending:1, 768 __u32 rto_pending:1,
770 769
771 /* 770 /*
772 * hb_sent : a flag that signals that we have a pending 771 * hb_sent : a flag that signals that we have a pending
@@ -955,7 +954,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
955void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk); 954void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk);
956void sctp_transport_free(struct sctp_transport *); 955void sctp_transport_free(struct sctp_transport *);
957void sctp_transport_reset_timers(struct sctp_transport *); 956void sctp_transport_reset_timers(struct sctp_transport *);
958void sctp_transport_hold(struct sctp_transport *); 957int sctp_transport_hold(struct sctp_transport *);
959void sctp_transport_put(struct sctp_transport *); 958void sctp_transport_put(struct sctp_transport *);
960void sctp_transport_update_rto(struct sctp_transport *, __u32); 959void sctp_transport_update_rto(struct sctp_transport *, __u32);
961void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); 960void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32);
diff --git a/include/net/sock.h b/include/net/sock.h
index b9e7b3d863a0..f5ea148853e2 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1036,18 +1036,6 @@ struct proto {
1036#ifdef SOCK_REFCNT_DEBUG 1036#ifdef SOCK_REFCNT_DEBUG
1037 atomic_t socks; 1037 atomic_t socks;
1038#endif 1038#endif
1039#ifdef CONFIG_MEMCG_KMEM
1040 /*
1041 * cgroup specific init/deinit functions. Called once for all
1042 * protocols that implement it, from cgroups populate function.
1043 * This function has to setup any files the protocol want to
1044 * appear in the kmem cgroup filesystem.
1045 */
1046 int (*init_cgroup)(struct mem_cgroup *memcg,
1047 struct cgroup_subsys *ss);
1048 void (*destroy_cgroup)(struct mem_cgroup *memcg);
1049 struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg);
1050#endif
1051 int (*diag_destroy)(struct sock *sk, int err); 1039 int (*diag_destroy)(struct sock *sk, int err);
1052}; 1040};
1053 1041
diff --git a/include/net/sock_reuseport.h b/include/net/sock_reuseport.h
index 7dda3d7adba8..aecd30308d50 100644
--- a/include/net/sock_reuseport.h
+++ b/include/net/sock_reuseport.h
@@ -16,7 +16,7 @@ struct sock_reuseport {
16}; 16};
17 17
18extern int reuseport_alloc(struct sock *sk); 18extern int reuseport_alloc(struct sock *sk);
19extern int reuseport_add_sock(struct sock *sk, const struct sock *sk2); 19extern int reuseport_add_sock(struct sock *sk, struct sock *sk2);
20extern void reuseport_detach_sock(struct sock *sk); 20extern void reuseport_detach_sock(struct sock *sk);
21extern struct sock *reuseport_select_sock(struct sock *sk, 21extern struct sock *reuseport_select_sock(struct sock *sk,
22 u32 hash, 22 u32 hash,
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 8ea19977ea53..f6f8f032c73e 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -216,7 +216,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);
216/* TCP thin-stream limits */ 216/* TCP thin-stream limits */
217#define TCP_THIN_LINEAR_RETRIES 6 /* After 6 linear retries, do exp. backoff */ 217#define TCP_THIN_LINEAR_RETRIES 6 /* After 6 linear retries, do exp. backoff */
218 218
219/* TCP initial congestion window as per draft-hkchu-tcpm-initcwnd-01 */ 219/* TCP initial congestion window as per rfc6928 */
220#define TCP_INIT_CWND 10 220#define TCP_INIT_CWND 10
221 221
222/* Bit Flags for sysctl_tcp_fastopen */ 222/* Bit Flags for sysctl_tcp_fastopen */
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
index fdabbb4ddba9..f730b91e472f 100644
--- a/include/sound/rawmidi.h
+++ b/include/sound/rawmidi.h
@@ -167,6 +167,10 @@ int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
167int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count); 167int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count);
168int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, 168int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream,
169 unsigned char *buffer, int count); 169 unsigned char *buffer, int count);
170int __snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
171 unsigned char *buffer, int count);
172int __snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream,
173 int count);
170 174
171/* main midi functions */ 175/* main midi functions */
172 176
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index 41e0433b4a83..149bec83a907 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -222,7 +222,6 @@ struct fsxattr {
222#define BLKSECDISCARD _IO(0x12,125) 222#define BLKSECDISCARD _IO(0x12,125)
223#define BLKROTATIONAL _IO(0x12,126) 223#define BLKROTATIONAL _IO(0x12,126)
224#define BLKZEROOUT _IO(0x12,127) 224#define BLKZEROOUT _IO(0x12,127)
225#define BLKDAXSET _IO(0x12,128)
226#define BLKDAXGET _IO(0x12,129) 225#define BLKDAXGET _IO(0x12,129)
227 226
228#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ 227#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */