diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-11 00:00:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-11 00:00:29 -0400 |
commit | e4d35be584be88a3db3fa5635a97c62a2ec5aafe (patch) | |
tree | fc22a7fb65697306edd71411959ccee6df60c64d /include | |
parent | 99d825822eade8d827a1817357cbf3f889a552d6 (diff) | |
parent | 38b78a5f18584db6fa7441e0f4531b283b0e6725 (diff) |
Merge branch 'ovl-fixes' into for-linus
Diffstat (limited to 'include')
88 files changed, 634 insertions, 330 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 14362a84c78e..3a932501d690 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -394,13 +394,13 @@ struct acpi_data_node { | |||
394 | 394 | ||
395 | static inline bool is_acpi_node(struct fwnode_handle *fwnode) | 395 | static inline bool is_acpi_node(struct fwnode_handle *fwnode) |
396 | { | 396 | { |
397 | return fwnode && (fwnode->type == FWNODE_ACPI | 397 | return !IS_ERR_OR_NULL(fwnode) && (fwnode->type == FWNODE_ACPI |
398 | || fwnode->type == FWNODE_ACPI_DATA); | 398 | || fwnode->type == FWNODE_ACPI_DATA); |
399 | } | 399 | } |
400 | 400 | ||
401 | static inline bool is_acpi_device_node(struct fwnode_handle *fwnode) | 401 | static inline bool is_acpi_device_node(struct fwnode_handle *fwnode) |
402 | { | 402 | { |
403 | return fwnode && fwnode->type == FWNODE_ACPI; | 403 | return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_ACPI; |
404 | } | 404 | } |
405 | 405 | ||
406 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode) | 406 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode) |
diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h index e56272c919b5..bf2d34c9d804 100644 --- a/include/asm-generic/futex.h +++ b/include/asm-generic/futex.h | |||
@@ -108,11 +108,15 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
108 | u32 val; | 108 | u32 val; |
109 | 109 | ||
110 | preempt_disable(); | 110 | preempt_disable(); |
111 | if (unlikely(get_user(val, uaddr) != 0)) | 111 | if (unlikely(get_user(val, uaddr) != 0)) { |
112 | preempt_enable(); | ||
112 | return -EFAULT; | 113 | return -EFAULT; |
114 | } | ||
113 | 115 | ||
114 | if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) | 116 | if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) { |
117 | preempt_enable(); | ||
115 | return -EFAULT; | 118 | return -EFAULT; |
119 | } | ||
116 | 120 | ||
117 | *uval = val; | 121 | *uval = val; |
118 | preempt_enable(); | 122 | preempt_enable(); |
diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h index 461a0558bca4..cebecff536a3 100644 --- a/include/drm/drm_cache.h +++ b/include/drm/drm_cache.h | |||
@@ -39,6 +39,8 @@ static inline bool drm_arch_can_wc_memory(void) | |||
39 | { | 39 | { |
40 | #if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE) | 40 | #if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE) |
41 | return false; | 41 | return false; |
42 | #elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3) | ||
43 | return false; | ||
42 | #else | 44 | #else |
43 | return true; | 45 | return true; |
44 | #endif | 46 | #endif |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index afae2316bd43..055a08ddac02 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -92,7 +92,7 @@ struct ttm_placement { | |||
92 | */ | 92 | */ |
93 | struct ttm_bus_placement { | 93 | struct ttm_bus_placement { |
94 | void *addr; | 94 | void *addr; |
95 | unsigned long base; | 95 | phys_addr_t base; |
96 | unsigned long size; | 96 | unsigned long size; |
97 | unsigned long offset; | 97 | unsigned long offset; |
98 | bool is_iomem; | 98 | bool is_iomem; |
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index df4f369254c0..506c3531832e 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h | |||
@@ -559,25 +559,25 @@ static inline int atomic_dec_if_positive(atomic_t *v) | |||
559 | #endif | 559 | #endif |
560 | 560 | ||
561 | /** | 561 | /** |
562 | * fetch_or - perform *ptr |= mask and return old value of *ptr | 562 | * atomic_fetch_or - perform *p |= mask and return old value of *p |
563 | * @ptr: pointer to value | 563 | * @p: pointer to atomic_t |
564 | * @mask: mask to OR on the value | 564 | * @mask: mask to OR on the atomic_t |
565 | * | ||
566 | * cmpxchg based fetch_or, macro so it works for different integer types | ||
567 | */ | 565 | */ |
568 | #ifndef fetch_or | 566 | #ifndef atomic_fetch_or |
569 | #define fetch_or(ptr, mask) \ | 567 | static inline int atomic_fetch_or(atomic_t *p, int mask) |
570 | ({ typeof(*(ptr)) __old, __val = *(ptr); \ | 568 | { |
571 | for (;;) { \ | 569 | int old, val = atomic_read(p); |
572 | __old = cmpxchg((ptr), __val, __val | (mask)); \ | 570 | |
573 | if (__old == __val) \ | 571 | for (;;) { |
574 | break; \ | 572 | old = atomic_cmpxchg(p, val, val | mask); |
575 | __val = __old; \ | 573 | if (old == val) |
576 | } \ | 574 | break; |
577 | __old; \ | 575 | val = old; |
578 | }) | 576 | } |
579 | #endif | ||
580 | 577 | ||
578 | return old; | ||
579 | } | ||
580 | #endif | ||
581 | 581 | ||
582 | #ifdef CONFIG_GENERIC_ATOMIC64 | 582 | #ifdef CONFIG_GENERIC_ATOMIC64 |
583 | #include <asm-generic/atomic64.h> | 583 | #include <asm-generic/atomic64.h> |
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index 1b4d69f68c33..3f103076d0bf 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h | |||
@@ -135,7 +135,7 @@ struct bdi_writeback { | |||
135 | 135 | ||
136 | struct backing_dev_info { | 136 | struct backing_dev_info { |
137 | struct list_head bdi_list; | 137 | struct list_head bdi_list; |
138 | unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */ | 138 | unsigned long ra_pages; /* max readahead in PAGE_SIZE units */ |
139 | unsigned int capabilities; /* Device capabilities */ | 139 | unsigned int capabilities; /* Device capabilities */ |
140 | congested_fn *congested_fn; /* Function pointer if device is md/dm */ | 140 | congested_fn *congested_fn; /* Function pointer if device is md/dm */ |
141 | void *congested_data; /* Pointer to aux data for congested func */ | 141 | void *congested_data; /* Pointer to aux data for congested func */ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 88bc64f00bb5..6b7481f62218 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #define BIO_MAX_PAGES 256 | 43 | #define BIO_MAX_PAGES 256 |
44 | #define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT) | 44 | #define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_SHIFT) |
45 | #define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9) | 45 | #define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9) |
46 | 46 | ||
47 | /* | 47 | /* |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 7e5d7e018bea..669e419d6234 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1372,7 +1372,7 @@ unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *); | |||
1372 | 1372 | ||
1373 | static inline void put_dev_sector(Sector p) | 1373 | static inline void put_dev_sector(Sector p) |
1374 | { | 1374 | { |
1375 | page_cache_release(p.v); | 1375 | put_page(p.v); |
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | static inline bool __bvec_gap_to_prev(struct request_queue *q, | 1378 | static inline bool __bvec_gap_to_prev(struct request_queue *q, |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 21ee41b92e8a..f1d5c5acc8dd 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
@@ -171,12 +171,13 @@ void bpf_register_prog_type(struct bpf_prog_type_list *tl); | |||
171 | void bpf_register_map_type(struct bpf_map_type_list *tl); | 171 | void bpf_register_map_type(struct bpf_map_type_list *tl); |
172 | 172 | ||
173 | struct bpf_prog *bpf_prog_get(u32 ufd); | 173 | struct bpf_prog *bpf_prog_get(u32 ufd); |
174 | struct bpf_prog *bpf_prog_inc(struct bpf_prog *prog); | ||
174 | void bpf_prog_put(struct bpf_prog *prog); | 175 | void bpf_prog_put(struct bpf_prog *prog); |
175 | void bpf_prog_put_rcu(struct bpf_prog *prog); | 176 | void bpf_prog_put_rcu(struct bpf_prog *prog); |
176 | 177 | ||
177 | struct bpf_map *bpf_map_get_with_uref(u32 ufd); | 178 | struct bpf_map *bpf_map_get_with_uref(u32 ufd); |
178 | struct bpf_map *__bpf_map_get(struct fd f); | 179 | struct bpf_map *__bpf_map_get(struct fd f); |
179 | void bpf_map_inc(struct bpf_map *map, bool uref); | 180 | struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref); |
180 | void bpf_map_put_with_uref(struct bpf_map *map); | 181 | void bpf_map_put_with_uref(struct bpf_map *map); |
181 | void bpf_map_put(struct bpf_map *map); | 182 | void bpf_map_put(struct bpf_map *map); |
182 | int bpf_map_precharge_memlock(u32 pages); | 183 | int bpf_map_precharge_memlock(u32 pages); |
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h index f0ba9c2ec639..e3354b74286c 100644 --- a/include/linux/brcmphy.h +++ b/include/linux/brcmphy.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #define PHY_ID_BCM7250 0xae025280 | 24 | #define PHY_ID_BCM7250 0xae025280 |
25 | #define PHY_ID_BCM7364 0xae025260 | 25 | #define PHY_ID_BCM7364 0xae025260 |
26 | #define PHY_ID_BCM7366 0x600d8490 | 26 | #define PHY_ID_BCM7366 0x600d8490 |
27 | #define PHY_ID_BCM7346 0x600d8650 | ||
28 | #define PHY_ID_BCM7362 0x600d84b0 | ||
27 | #define PHY_ID_BCM7425 0x600d86b0 | 29 | #define PHY_ID_BCM7425 0x600d86b0 |
28 | #define PHY_ID_BCM7429 0x600d8730 | 30 | #define PHY_ID_BCM7429 0x600d8730 |
29 | #define PHY_ID_BCM7435 0x600d8750 | 31 | #define PHY_ID_BCM7435 0x600d8750 |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c67f052cc5e5..d48daa3f6f20 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -43,7 +43,7 @@ enum bh_state_bits { | |||
43 | */ | 43 | */ |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512) | 46 | #define MAX_BUF_PER_PAGE (PAGE_SIZE / 512) |
47 | 47 | ||
48 | struct page; | 48 | struct page; |
49 | struct buffer_head; | 49 | struct buffer_head; |
@@ -263,7 +263,7 @@ void buffer_init(void); | |||
263 | static inline void attach_page_buffers(struct page *page, | 263 | static inline void attach_page_buffers(struct page *page, |
264 | struct buffer_head *head) | 264 | struct buffer_head *head) |
265 | { | 265 | { |
266 | page_cache_get(page); | 266 | get_page(page); |
267 | SetPagePrivate(page); | 267 | SetPagePrivate(page); |
268 | set_page_private(page, (unsigned long)head); | 268 | set_page_private(page, (unsigned long)head); |
269 | } | 269 | } |
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index 260d78b587c4..1563265d2097 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
@@ -12,9 +12,12 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | struct ceph_auth_client; | 14 | struct ceph_auth_client; |
15 | struct ceph_authorizer; | ||
16 | struct ceph_msg; | 15 | struct ceph_msg; |
17 | 16 | ||
17 | struct ceph_authorizer { | ||
18 | void (*destroy)(struct ceph_authorizer *); | ||
19 | }; | ||
20 | |||
18 | struct ceph_auth_handshake { | 21 | struct ceph_auth_handshake { |
19 | struct ceph_authorizer *authorizer; | 22 | struct ceph_authorizer *authorizer; |
20 | void *authorizer_buf; | 23 | void *authorizer_buf; |
@@ -62,8 +65,6 @@ struct ceph_auth_client_ops { | |||
62 | struct ceph_auth_handshake *auth); | 65 | struct ceph_auth_handshake *auth); |
63 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, | 66 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, |
64 | struct ceph_authorizer *a, size_t len); | 67 | struct ceph_authorizer *a, size_t len); |
65 | void (*destroy_authorizer)(struct ceph_auth_client *ac, | ||
66 | struct ceph_authorizer *a); | ||
67 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, | 68 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, |
68 | int peer_type); | 69 | int peer_type); |
69 | 70 | ||
@@ -112,8 +113,7 @@ extern int ceph_auth_is_authenticated(struct ceph_auth_client *ac); | |||
112 | extern int ceph_auth_create_authorizer(struct ceph_auth_client *ac, | 113 | extern int ceph_auth_create_authorizer(struct ceph_auth_client *ac, |
113 | int peer_type, | 114 | int peer_type, |
114 | struct ceph_auth_handshake *auth); | 115 | struct ceph_auth_handshake *auth); |
115 | extern void ceph_auth_destroy_authorizer(struct ceph_auth_client *ac, | 116 | void ceph_auth_destroy_authorizer(struct ceph_authorizer *a); |
116 | struct ceph_authorizer *a); | ||
117 | extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac, | 117 | extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac, |
118 | int peer_type, | 118 | int peer_type, |
119 | struct ceph_auth_handshake *a); | 119 | struct ceph_auth_handshake *a); |
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index e7975e4681e1..db92a8d4926e 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -176,8 +176,8 @@ extern void ceph_put_snap_context(struct ceph_snap_context *sc); | |||
176 | */ | 176 | */ |
177 | static inline int calc_pages_for(u64 off, u64 len) | 177 | static inline int calc_pages_for(u64 off, u64 len) |
178 | { | 178 | { |
179 | return ((off+len+PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT) - | 179 | return ((off+len+PAGE_SIZE-1) >> PAGE_SHIFT) - |
180 | (off >> PAGE_CACHE_SHIFT); | 180 | (off >> PAGE_SHIFT); |
181 | } | 181 | } |
182 | 182 | ||
183 | extern struct kmem_cache *ceph_inode_cachep; | 183 | extern struct kmem_cache *ceph_inode_cachep; |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 4343df806710..cbf460927c42 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
@@ -16,7 +16,6 @@ struct ceph_msg; | |||
16 | struct ceph_snap_context; | 16 | struct ceph_snap_context; |
17 | struct ceph_osd_request; | 17 | struct ceph_osd_request; |
18 | struct ceph_osd_client; | 18 | struct ceph_osd_client; |
19 | struct ceph_authorizer; | ||
20 | 19 | ||
21 | /* | 20 | /* |
22 | * completion callback for async writepages | 21 | * completion callback for async writepages |
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 3e39ae5bc799..5b17de62c962 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h | |||
@@ -444,6 +444,7 @@ struct cgroup_subsys { | |||
444 | int (*can_attach)(struct cgroup_taskset *tset); | 444 | int (*can_attach)(struct cgroup_taskset *tset); |
445 | void (*cancel_attach)(struct cgroup_taskset *tset); | 445 | void (*cancel_attach)(struct cgroup_taskset *tset); |
446 | void (*attach)(struct cgroup_taskset *tset); | 446 | void (*attach)(struct cgroup_taskset *tset); |
447 | void (*post_attach)(void); | ||
447 | int (*can_fork)(struct task_struct *task); | 448 | int (*can_fork)(struct task_struct *task); |
448 | void (*cancel_fork)(struct task_struct *task); | 449 | void (*cancel_fork)(struct task_struct *task); |
449 | void (*fork)(struct task_struct *task); | 450 | void (*fork)(struct task_struct *task); |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 22ab246feed3..eeae401a2412 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -199,7 +199,7 @@ | |||
199 | #define unreachable() __builtin_unreachable() | 199 | #define unreachable() __builtin_unreachable() |
200 | 200 | ||
201 | /* Mark a function definition as prohibited from being cloned. */ | 201 | /* Mark a function definition as prohibited from being cloned. */ |
202 | #define __noclone __attribute__((__noclone__)) | 202 | #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) |
203 | 203 | ||
204 | #endif /* GCC_VERSION >= 40500 */ | 204 | #endif /* GCC_VERSION >= 40500 */ |
205 | 205 | ||
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 485fe5519448..d9d6a9d77489 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -188,7 +188,7 @@ static struct configfs_bin_attribute _pfx##attr_##_name = { \ | |||
188 | } | 188 | } |
189 | 189 | ||
190 | #define CONFIGFS_BIN_ATTR_RO(_pfx, _name, _priv, _maxsz) \ | 190 | #define CONFIGFS_BIN_ATTR_RO(_pfx, _name, _priv, _maxsz) \ |
191 | static struct configfs_attribute _pfx##attr_##_name = { \ | 191 | static struct configfs_bin_attribute _pfx##attr_##_name = { \ |
192 | .cb_attr = { \ | 192 | .cb_attr = { \ |
193 | .ca_name = __stringify(_name), \ | 193 | .ca_name = __stringify(_name), \ |
194 | .ca_mode = S_IRUGO, \ | 194 | .ca_mode = S_IRUGO, \ |
@@ -200,7 +200,7 @@ static struct configfs_attribute _pfx##attr_##_name = { \ | |||
200 | } | 200 | } |
201 | 201 | ||
202 | #define CONFIGFS_BIN_ATTR_WO(_pfx, _name, _priv, _maxsz) \ | 202 | #define CONFIGFS_BIN_ATTR_WO(_pfx, _name, _priv, _maxsz) \ |
203 | static struct configfs_attribute _pfx##attr_##_name = { \ | 203 | static struct configfs_bin_attribute _pfx##attr_##_name = { \ |
204 | .cb_attr = { \ | 204 | .cb_attr = { \ |
205 | .ca_name = __stringify(_name), \ | 205 | .ca_name = __stringify(_name), \ |
206 | .ca_mode = S_IWUSR, \ | 206 | .ca_mode = S_IWUSR, \ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index fea160ee5803..85a868ccb493 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -137,8 +137,6 @@ static inline void set_mems_allowed(nodemask_t nodemask) | |||
137 | task_unlock(current); | 137 | task_unlock(current); |
138 | } | 138 | } |
139 | 139 | ||
140 | extern void cpuset_post_attach_flush(void); | ||
141 | |||
142 | #else /* !CONFIG_CPUSETS */ | 140 | #else /* !CONFIG_CPUSETS */ |
143 | 141 | ||
144 | static inline bool cpusets_enabled(void) { return false; } | 142 | static inline bool cpusets_enabled(void) { return false; } |
@@ -245,10 +243,6 @@ static inline bool read_mems_allowed_retry(unsigned int seq) | |||
245 | return false; | 243 | return false; |
246 | } | 244 | } |
247 | 245 | ||
248 | static inline void cpuset_post_attach_flush(void) | ||
249 | { | ||
250 | } | ||
251 | |||
252 | #endif /* !CONFIG_CPUSETS */ | 246 | #endif /* !CONFIG_CPUSETS */ |
253 | 247 | ||
254 | #endif /* _LINUX_CPUSET_H */ | 248 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 7cb043d8f4e8..7e9422cb5989 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -161,6 +161,7 @@ struct dentry_operations { | |||
161 | struct vfsmount *(*d_automount)(struct path *); | 161 | struct vfsmount *(*d_automount)(struct path *); |
162 | int (*d_manage)(struct dentry *, bool); | 162 | int (*d_manage)(struct dentry *, bool); |
163 | struct inode *(*d_select_inode)(struct dentry *, unsigned); | 163 | struct inode *(*d_select_inode)(struct dentry *, unsigned); |
164 | struct dentry *(*d_real)(struct dentry *, struct inode *); | ||
164 | } ____cacheline_aligned; | 165 | } ____cacheline_aligned; |
165 | 166 | ||
166 | /* | 167 | /* |
@@ -229,6 +230,7 @@ struct dentry_operations { | |||
229 | #define DCACHE_OP_SELECT_INODE 0x02000000 /* Unioned entry: dcache op selects inode */ | 230 | #define DCACHE_OP_SELECT_INODE 0x02000000 /* Unioned entry: dcache op selects inode */ |
230 | 231 | ||
231 | #define DCACHE_ENCRYPTED_WITH_KEY 0x04000000 /* dir is encrypted with a valid key */ | 232 | #define DCACHE_ENCRYPTED_WITH_KEY 0x04000000 /* dir is encrypted with a valid key */ |
233 | #define DCACHE_OP_REAL 0x08000000 | ||
232 | 234 | ||
233 | extern seqlock_t rename_lock; | 235 | extern seqlock_t rename_lock; |
234 | 236 | ||
@@ -555,4 +557,24 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) | |||
555 | return upper; | 557 | return upper; |
556 | } | 558 | } |
557 | 559 | ||
560 | static inline struct dentry *d_real(struct dentry *dentry) | ||
561 | { | ||
562 | if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) | ||
563 | return dentry->d_op->d_real(dentry, NULL); | ||
564 | else | ||
565 | return dentry; | ||
566 | } | ||
567 | |||
568 | static inline struct inode *vfs_select_inode(struct dentry *dentry, | ||
569 | unsigned open_flags) | ||
570 | { | ||
571 | struct inode *inode = d_inode(dentry); | ||
572 | |||
573 | if (inode && unlikely(dentry->d_flags & DCACHE_OP_SELECT_INODE)) | ||
574 | inode = dentry->d_op->d_select_inode(dentry, open_flags); | ||
575 | |||
576 | return inode; | ||
577 | } | ||
578 | |||
579 | |||
558 | #endif /* __LINUX_DCACHE_H */ | 580 | #endif /* __LINUX_DCACHE_H */ |
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index e0ee0b3000b2..5871f292b596 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h | |||
@@ -15,37 +15,23 @@ | |||
15 | 15 | ||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | 17 | ||
18 | struct pts_fs_info; | ||
19 | |||
18 | #ifdef CONFIG_UNIX98_PTYS | 20 | #ifdef CONFIG_UNIX98_PTYS |
19 | 21 | ||
20 | int devpts_new_index(struct inode *ptmx_inode); | 22 | /* Look up a pts fs info and get a ref to it */ |
21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); | 23 | struct pts_fs_info *devpts_get_ref(struct inode *, struct file *); |
22 | void devpts_add_ref(struct inode *ptmx_inode); | 24 | void devpts_put_ref(struct pts_fs_info *); |
23 | void devpts_del_ref(struct inode *ptmx_inode); | 25 | |
26 | int devpts_new_index(struct pts_fs_info *); | ||
27 | void devpts_kill_index(struct pts_fs_info *, int); | ||
28 | |||
24 | /* mknod in devpts */ | 29 | /* mknod in devpts */ |
25 | struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, | 30 | struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *); |
26 | void *priv); | ||
27 | /* get private structure */ | 31 | /* get private structure */ |
28 | void *devpts_get_priv(struct inode *pts_inode); | 32 | void *devpts_get_priv(struct dentry *); |
29 | /* unlink */ | 33 | /* unlink */ |
30 | void devpts_pty_kill(struct inode *inode); | 34 | void devpts_pty_kill(struct dentry *); |
31 | |||
32 | #else | ||
33 | |||
34 | /* Dummy stubs in the no-pty case */ | ||
35 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } | ||
36 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } | ||
37 | static inline void devpts_add_ref(struct inode *ptmx_inode) { } | ||
38 | static inline void devpts_del_ref(struct inode *ptmx_inode) { } | ||
39 | static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, | ||
40 | dev_t device, int index, void *priv) | ||
41 | { | ||
42 | return ERR_PTR(-EINVAL); | ||
43 | } | ||
44 | static inline void *devpts_get_priv(struct inode *pts_inode) | ||
45 | { | ||
46 | return NULL; | ||
47 | } | ||
48 | static inline void devpts_pty_kill(struct inode *inode) { } | ||
49 | 35 | ||
50 | #endif | 36 | #endif |
51 | 37 | ||
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 9eb215a155e0..b90e9bdbd1dd 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h | |||
@@ -262,7 +262,7 @@ struct f2fs_node { | |||
262 | /* | 262 | /* |
263 | * For NAT entries | 263 | * For NAT entries |
264 | */ | 264 | */ |
265 | #define NAT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_nat_entry)) | 265 | #define NAT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_nat_entry)) |
266 | 266 | ||
267 | struct f2fs_nat_entry { | 267 | struct f2fs_nat_entry { |
268 | __u8 version; /* latest version of cached nat entry */ | 268 | __u8 version; /* latest version of cached nat entry */ |
@@ -282,7 +282,7 @@ struct f2fs_nat_block { | |||
282 | * Not allow to change this. | 282 | * Not allow to change this. |
283 | */ | 283 | */ |
284 | #define SIT_VBLOCK_MAP_SIZE 64 | 284 | #define SIT_VBLOCK_MAP_SIZE 64 |
285 | #define SIT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_sit_entry)) | 285 | #define SIT_ENTRY_PER_BLOCK (PAGE_SIZE / sizeof(struct f2fs_sit_entry)) |
286 | 286 | ||
287 | /* | 287 | /* |
288 | * Note that f2fs_sit_entry->vblocks has the following bit-field information. | 288 | * Note that f2fs_sit_entry->vblocks has the following bit-field information. |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 43aa1f8855c7..a51a5361695f 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -465,10 +465,14 @@ int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog, | |||
465 | void bpf_prog_destroy(struct bpf_prog *fp); | 465 | void bpf_prog_destroy(struct bpf_prog *fp); |
466 | 466 | ||
467 | int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 467 | int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
468 | int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk, | ||
469 | bool locked); | ||
468 | int sk_attach_bpf(u32 ufd, struct sock *sk); | 470 | int sk_attach_bpf(u32 ufd, struct sock *sk); |
469 | int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 471 | int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
470 | int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk); | 472 | int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk); |
471 | int sk_detach_filter(struct sock *sk); | 473 | int sk_detach_filter(struct sock *sk); |
474 | int __sk_detach_filter(struct sock *sk, bool locked); | ||
475 | |||
472 | int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, | 476 | int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, |
473 | unsigned int len); | 477 | unsigned int len); |
474 | 478 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 14a97194b34b..70e61b58baaf 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -929,7 +929,7 @@ static inline struct file *get_file(struct file *f) | |||
929 | /* Page cache limit. The filesystems should put that into their s_maxbytes | 929 | /* Page cache limit. The filesystems should put that into their s_maxbytes |
930 | limits, otherwise bad things can happen in VM. */ | 930 | limits, otherwise bad things can happen in VM. */ |
931 | #if BITS_PER_LONG==32 | 931 | #if BITS_PER_LONG==32 |
932 | #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) | 932 | #define MAX_LFS_FILESIZE (((loff_t)PAGE_SIZE << (BITS_PER_LONG-1))-1) |
933 | #elif BITS_PER_LONG==64 | 933 | #elif BITS_PER_LONG==64 |
934 | #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) | 934 | #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) |
935 | #endif | 935 | #endif |
@@ -1241,6 +1241,16 @@ static inline struct inode *file_inode(const struct file *f) | |||
1241 | return f->f_inode; | 1241 | return f->f_inode; |
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | static inline struct dentry *file_dentry(const struct file *file) | ||
1245 | { | ||
1246 | struct dentry *dentry = file->f_path.dentry; | ||
1247 | |||
1248 | if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) | ||
1249 | return dentry->d_op->d_real(dentry, file_inode(file)); | ||
1250 | else | ||
1251 | return dentry; | ||
1252 | } | ||
1253 | |||
1244 | static inline int locks_lock_file_wait(struct file *filp, struct file_lock *fl) | 1254 | static inline int locks_lock_file_wait(struct file *filp, struct file_lock *fl) |
1245 | { | 1255 | { |
1246 | return locks_lock_inode_wait(file_inode(filp), fl); | 1256 | return locks_lock_inode_wait(file_inode(filp), fl); |
@@ -2067,7 +2077,7 @@ extern int generic_update_time(struct inode *, struct timespec *, int); | |||
2067 | /* /sys/fs */ | 2077 | /* /sys/fs */ |
2068 | extern struct kobject *fs_kobj; | 2078 | extern struct kobject *fs_kobj; |
2069 | 2079 | ||
2070 | #define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK) | 2080 | #define MAX_RW_COUNT (INT_MAX & PAGE_MASK) |
2071 | 2081 | ||
2072 | #ifdef CONFIG_MANDATORY_FILE_LOCKING | 2082 | #ifdef CONFIG_MANDATORY_FILE_LOCKING |
2073 | extern int locks_mandatory_locked(struct file *); | 2083 | extern int locks_mandatory_locked(struct file *); |
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h index cd91f75de49b..6027f6bbb061 100644 --- a/include/linux/fscrypto.h +++ b/include/linux/fscrypto.h | |||
@@ -263,9 +263,9 @@ static inline void fscrypt_set_d_op(struct dentry *dentry) | |||
263 | extern struct kmem_cache *fscrypt_info_cachep; | 263 | extern struct kmem_cache *fscrypt_info_cachep; |
264 | int fscrypt_initialize(void); | 264 | int fscrypt_initialize(void); |
265 | 265 | ||
266 | extern struct fscrypt_ctx *fscrypt_get_ctx(struct inode *); | 266 | extern struct fscrypt_ctx *fscrypt_get_ctx(struct inode *, gfp_t); |
267 | extern void fscrypt_release_ctx(struct fscrypt_ctx *); | 267 | extern void fscrypt_release_ctx(struct fscrypt_ctx *); |
268 | extern struct page *fscrypt_encrypt_page(struct inode *, struct page *); | 268 | extern struct page *fscrypt_encrypt_page(struct inode *, struct page *, gfp_t); |
269 | extern int fscrypt_decrypt_page(struct page *); | 269 | extern int fscrypt_decrypt_page(struct page *); |
270 | extern void fscrypt_decrypt_bio_pages(struct fscrypt_ctx *, struct bio *); | 270 | extern void fscrypt_decrypt_bio_pages(struct fscrypt_ctx *, struct bio *); |
271 | extern void fscrypt_pullback_bio_page(struct page **, bool); | 271 | extern void fscrypt_pullback_bio_page(struct page **, bool); |
@@ -299,7 +299,8 @@ extern int fscrypt_fname_usr_to_disk(struct inode *, const struct qstr *, | |||
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | /* crypto.c */ | 301 | /* crypto.c */ |
302 | static inline struct fscrypt_ctx *fscrypt_notsupp_get_ctx(struct inode *i) | 302 | static inline struct fscrypt_ctx *fscrypt_notsupp_get_ctx(struct inode *i, |
303 | gfp_t f) | ||
303 | { | 304 | { |
304 | return ERR_PTR(-EOPNOTSUPP); | 305 | return ERR_PTR(-EOPNOTSUPP); |
305 | } | 306 | } |
@@ -310,7 +311,7 @@ static inline void fscrypt_notsupp_release_ctx(struct fscrypt_ctx *c) | |||
310 | } | 311 | } |
311 | 312 | ||
312 | static inline struct page *fscrypt_notsupp_encrypt_page(struct inode *i, | 313 | static inline struct page *fscrypt_notsupp_encrypt_page(struct inode *i, |
313 | struct page *p) | 314 | struct page *p, gfp_t f) |
314 | { | 315 | { |
315 | return ERR_PTR(-EOPNOTSUPP); | 316 | return ERR_PTR(-EOPNOTSUPP); |
316 | } | 317 | } |
diff --git a/include/linux/hash.h b/include/linux/hash.h index 1afde47e1528..79c52fa81cac 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
@@ -32,12 +32,28 @@ | |||
32 | #error Wordsize not 32 or 64 | 32 | #error Wordsize not 32 or 64 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | /* | ||
36 | * The above primes are actively bad for hashing, since they are | ||
37 | * too sparse. The 32-bit one is mostly ok, the 64-bit one causes | ||
38 | * real problems. Besides, the "prime" part is pointless for the | ||
39 | * multiplicative hash. | ||
40 | * | ||
41 | * Although a random odd number will do, it turns out that the golden | ||
42 | * ratio phi = (sqrt(5)-1)/2, or its negative, has particularly nice | ||
43 | * properties. | ||
44 | * | ||
45 | * These are the negative, (1 - phi) = (phi^2) = (3 - sqrt(5))/2. | ||
46 | * (See Knuth vol 3, section 6.4, exercise 9.) | ||
47 | */ | ||
48 | #define GOLDEN_RATIO_32 0x61C88647 | ||
49 | #define GOLDEN_RATIO_64 0x61C8864680B583EBull | ||
50 | |||
35 | static __always_inline u64 hash_64(u64 val, unsigned int bits) | 51 | static __always_inline u64 hash_64(u64 val, unsigned int bits) |
36 | { | 52 | { |
37 | u64 hash = val; | 53 | u64 hash = val; |
38 | 54 | ||
39 | #if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64 | 55 | #if BITS_PER_LONG == 64 |
40 | hash = hash * GOLDEN_RATIO_PRIME_64; | 56 | hash = hash * GOLDEN_RATIO_64; |
41 | #else | 57 | #else |
42 | /* Sigh, gcc can't optimise this alone like it does for 32 bits. */ | 58 | /* Sigh, gcc can't optimise this alone like it does for 32 bits. */ |
43 | u64 n = hash; | 59 | u64 n = hash; |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 79b0ef6aaa14..d7b9e5346fba 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -127,7 +127,7 @@ static inline spinlock_t *pmd_trans_huge_lock(pmd_t *pmd, | |||
127 | if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) | 127 | if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) |
128 | return __pmd_trans_huge_lock(pmd, vma); | 128 | return __pmd_trans_huge_lock(pmd, vma); |
129 | else | 129 | else |
130 | return false; | 130 | return NULL; |
131 | } | 131 | } |
132 | static inline int hpage_nr_pages(struct page *page) | 132 | static inline int hpage_nr_pages(struct page *page) |
133 | { | 133 | { |
@@ -152,6 +152,7 @@ static inline bool is_huge_zero_pmd(pmd_t pmd) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | struct page *get_huge_zero_page(void); | 154 | struct page *get_huge_zero_page(void); |
155 | void put_huge_zero_page(void); | ||
155 | 156 | ||
156 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ | 157 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ |
157 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) | 158 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) |
@@ -208,6 +209,10 @@ static inline bool is_huge_zero_page(struct page *page) | |||
208 | return false; | 209 | return false; |
209 | } | 210 | } |
210 | 211 | ||
212 | static inline void put_huge_zero_page(void) | ||
213 | { | ||
214 | BUILD_BUG(); | ||
215 | } | ||
211 | 216 | ||
212 | static inline struct page *follow_devmap_pmd(struct vm_area_struct *vma, | 217 | static inline struct page *follow_devmap_pmd(struct vm_area_struct *vma, |
213 | unsigned long addr, pmd_t *pmd, int flags) | 218 | unsigned long addr, pmd_t *pmd, int flags) |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index d5569734f672..548fd535fd02 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -28,6 +28,11 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) | |||
28 | return (struct ethhdr *)skb_mac_header(skb); | 28 | return (struct ethhdr *)skb_mac_header(skb); |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) | ||
32 | { | ||
33 | return (struct ethhdr *)skb_inner_mac_header(skb); | ||
34 | } | ||
35 | |||
31 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | 36 | int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); |
32 | 37 | ||
33 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 38 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index a5c539fa5d2b..ef7a6ecd8584 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -195,9 +195,7 @@ struct iommu_ops { | |||
195 | /* Get the number of windows per domain */ | 195 | /* Get the number of windows per domain */ |
196 | u32 (*domain_get_windows)(struct iommu_domain *domain); | 196 | u32 (*domain_get_windows)(struct iommu_domain *domain); |
197 | 197 | ||
198 | #ifdef CONFIG_OF_IOMMU | ||
199 | int (*of_xlate)(struct device *dev, struct of_phandle_args *args); | 198 | int (*of_xlate)(struct device *dev, struct of_phandle_args *args); |
200 | #endif | ||
201 | 199 | ||
202 | unsigned long pgsize_bitmap; | 200 | unsigned long pgsize_bitmap; |
203 | void *priv; | 201 | void *priv; |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index d026b190c530..d10ef06971b5 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -196,9 +196,11 @@ struct lock_list { | |||
196 | * We record lock dependency chains, so that we can cache them: | 196 | * We record lock dependency chains, so that we can cache them: |
197 | */ | 197 | */ |
198 | struct lock_chain { | 198 | struct lock_chain { |
199 | u8 irq_context; | 199 | /* see BUILD_BUG_ON()s in lookup_chain_cache() */ |
200 | u8 depth; | 200 | unsigned int irq_context : 2, |
201 | u16 base; | 201 | depth : 6, |
202 | base : 24; | ||
203 | /* 4 byte hole */ | ||
202 | struct hlist_node entry; | 204 | struct hlist_node entry; |
203 | u64 chain_key; | 205 | u64 chain_key; |
204 | }; | 206 | }; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 8541a913f6a3..d1f904c8b2cb 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -828,6 +828,11 @@ struct mlx4_vf_dev { | |||
828 | u8 n_ports; | 828 | u8 n_ports; |
829 | }; | 829 | }; |
830 | 830 | ||
831 | enum mlx4_pci_status { | ||
832 | MLX4_PCI_STATUS_DISABLED, | ||
833 | MLX4_PCI_STATUS_ENABLED, | ||
834 | }; | ||
835 | |||
831 | struct mlx4_dev_persistent { | 836 | struct mlx4_dev_persistent { |
832 | struct pci_dev *pdev; | 837 | struct pci_dev *pdev; |
833 | struct mlx4_dev *dev; | 838 | struct mlx4_dev *dev; |
@@ -841,6 +846,8 @@ struct mlx4_dev_persistent { | |||
841 | u8 state; | 846 | u8 state; |
842 | struct mutex interface_state_mutex; /* protect SW state */ | 847 | struct mutex interface_state_mutex; /* protect SW state */ |
843 | u8 interface_state; | 848 | u8 interface_state; |
849 | struct mutex pci_status_mutex; /* sync pci state */ | ||
850 | enum mlx4_pci_status pci_status; | ||
844 | }; | 851 | }; |
845 | 852 | ||
846 | struct mlx4_dev { | 853 | struct mlx4_dev { |
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 8156e3c9239c..b3575f392492 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h | |||
@@ -392,6 +392,17 @@ enum { | |||
392 | MLX5_CAP_OFF_CMDIF_CSUM = 46, | 392 | MLX5_CAP_OFF_CMDIF_CSUM = 46, |
393 | }; | 393 | }; |
394 | 394 | ||
395 | enum { | ||
396 | /* | ||
397 | * Max wqe size for rdma read is 512 bytes, so this | ||
398 | * limits our max_sge_rd as the wqe needs to fit: | ||
399 | * - ctrl segment (16 bytes) | ||
400 | * - rdma segment (16 bytes) | ||
401 | * - scatter elements (16 bytes each) | ||
402 | */ | ||
403 | MLX5_MAX_SGE_RD = (512 - 16 - 16) / 16 | ||
404 | }; | ||
405 | |||
395 | struct mlx5_inbox_hdr { | 406 | struct mlx5_inbox_hdr { |
396 | __be16 opcode; | 407 | __be16 opcode; |
397 | u8 rsvd[4]; | 408 | u8 rsvd[4]; |
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index dcd5ac8d3b14..369c837d40f5 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
@@ -519,8 +519,9 @@ enum mlx5_device_state { | |||
519 | }; | 519 | }; |
520 | 520 | ||
521 | enum mlx5_interface_state { | 521 | enum mlx5_interface_state { |
522 | MLX5_INTERFACE_STATE_DOWN, | 522 | MLX5_INTERFACE_STATE_DOWN = BIT(0), |
523 | MLX5_INTERFACE_STATE_UP, | 523 | MLX5_INTERFACE_STATE_UP = BIT(1), |
524 | MLX5_INTERFACE_STATE_SHUTDOWN = BIT(2), | ||
524 | }; | 525 | }; |
525 | 526 | ||
526 | enum mlx5_pci_status { | 527 | enum mlx5_pci_status { |
@@ -544,7 +545,7 @@ struct mlx5_core_dev { | |||
544 | enum mlx5_device_state state; | 545 | enum mlx5_device_state state; |
545 | /* sync interface state */ | 546 | /* sync interface state */ |
546 | struct mutex intf_state_mutex; | 547 | struct mutex intf_state_mutex; |
547 | enum mlx5_interface_state interface_state; | 548 | unsigned long intf_state; |
548 | void (*event) (struct mlx5_core_dev *dev, | 549 | void (*event) (struct mlx5_core_dev *dev, |
549 | enum mlx5_dev_event event, | 550 | enum mlx5_dev_event event, |
550 | unsigned long param); | 551 | unsigned long param); |
diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h index a1d145abd4eb..b30250ab7604 100644 --- a/include/linux/mlx5/port.h +++ b/include/linux/mlx5/port.h | |||
@@ -54,9 +54,9 @@ int mlx5_set_port_admin_status(struct mlx5_core_dev *dev, | |||
54 | int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, | 54 | int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, |
55 | enum mlx5_port_status *status); | 55 | enum mlx5_port_status *status); |
56 | 56 | ||
57 | int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu, u8 port); | 57 | int mlx5_set_port_mtu(struct mlx5_core_dev *dev, u16 mtu, u8 port); |
58 | void mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu, u8 port); | 58 | void mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, u16 *max_mtu, u8 port); |
59 | void mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu, | 59 | void mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, u16 *oper_mtu, |
60 | u8 port); | 60 | u8 port); |
61 | 61 | ||
62 | int mlx5_query_port_vl_hw_cap(struct mlx5_core_dev *dev, | 62 | int mlx5_query_port_vl_hw_cap(struct mlx5_core_dev *dev, |
diff --git a/include/linux/mlx5/vport.h b/include/linux/mlx5/vport.h index bd93e6323603..301da4a5e6bf 100644 --- a/include/linux/mlx5/vport.h +++ b/include/linux/mlx5/vport.h | |||
@@ -45,6 +45,8 @@ int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, | |||
45 | u16 vport, u8 *addr); | 45 | u16 vport, u8 *addr); |
46 | int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *dev, | 46 | int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *dev, |
47 | u16 vport, u8 *addr); | 47 | u16 vport, u8 *addr); |
48 | int mlx5_query_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 *mtu); | ||
49 | int mlx5_modify_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 mtu); | ||
48 | int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev, | 50 | int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev, |
49 | u64 *system_image_guid); | 51 | u64 *system_image_guid); |
50 | int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid); | 52 | int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index ed6407d1b7b5..864d7221de84 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -623,7 +623,7 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address, | |||
623 | * | 623 | * |
624 | * A page may belong to an inode's memory mapping. In this case, page->mapping | 624 | * A page may belong to an inode's memory mapping. In this case, page->mapping |
625 | * is the pointer to the inode, and page->index is the file offset of the page, | 625 | * is the pointer to the inode, and page->index is the file offset of the page, |
626 | * in units of PAGE_CACHE_SIZE. | 626 | * in units of PAGE_SIZE. |
627 | * | 627 | * |
628 | * If pagecache pages are not associated with an inode, they are said to be | 628 | * If pagecache pages are not associated with an inode, they are said to be |
629 | * anonymous pages. These may become associated with the swapcache, and in that | 629 | * anonymous pages. These may become associated with the swapcache, and in that |
@@ -1031,6 +1031,8 @@ static inline bool page_mapped(struct page *page) | |||
1031 | page = compound_head(page); | 1031 | page = compound_head(page); |
1032 | if (atomic_read(compound_mapcount_ptr(page)) >= 0) | 1032 | if (atomic_read(compound_mapcount_ptr(page)) >= 0) |
1033 | return true; | 1033 | return true; |
1034 | if (PageHuge(page)) | ||
1035 | return false; | ||
1034 | for (i = 0; i < hpage_nr_pages(page); i++) { | 1036 | for (i = 0; i < hpage_nr_pages(page); i++) { |
1035 | if (atomic_read(&page[i]._mapcount) >= 0) | 1037 | if (atomic_read(&page[i]._mapcount) >= 0) |
1036 | return true; | 1038 | return true; |
@@ -1138,6 +1140,8 @@ struct zap_details { | |||
1138 | 1140 | ||
1139 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, | 1141 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, |
1140 | pte_t pte); | 1142 | pte_t pte); |
1143 | struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr, | ||
1144 | pmd_t pmd); | ||
1141 | 1145 | ||
1142 | int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, | 1146 | int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, |
1143 | unsigned long size); | 1147 | unsigned long size); |
@@ -1250,78 +1254,20 @@ long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, | |||
1250 | unsigned long start, unsigned long nr_pages, | 1254 | unsigned long start, unsigned long nr_pages, |
1251 | int write, int force, struct page **pages, | 1255 | int write, int force, struct page **pages, |
1252 | struct vm_area_struct **vmas); | 1256 | struct vm_area_struct **vmas); |
1253 | long get_user_pages6(unsigned long start, unsigned long nr_pages, | 1257 | long get_user_pages(unsigned long start, unsigned long nr_pages, |
1254 | int write, int force, struct page **pages, | 1258 | int write, int force, struct page **pages, |
1255 | struct vm_area_struct **vmas); | 1259 | struct vm_area_struct **vmas); |
1256 | long get_user_pages_locked6(unsigned long start, unsigned long nr_pages, | 1260 | long get_user_pages_locked(unsigned long start, unsigned long nr_pages, |
1257 | int write, int force, struct page **pages, int *locked); | 1261 | int write, int force, struct page **pages, int *locked); |
1258 | long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, | 1262 | long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, |
1259 | unsigned long start, unsigned long nr_pages, | 1263 | unsigned long start, unsigned long nr_pages, |
1260 | int write, int force, struct page **pages, | 1264 | int write, int force, struct page **pages, |
1261 | unsigned int gup_flags); | 1265 | unsigned int gup_flags); |
1262 | long get_user_pages_unlocked5(unsigned long start, unsigned long nr_pages, | 1266 | long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages, |
1263 | int write, int force, struct page **pages); | 1267 | int write, int force, struct page **pages); |
1264 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 1268 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
1265 | struct page **pages); | 1269 | struct page **pages); |
1266 | 1270 | ||
1267 | /* suppress warnings from use in EXPORT_SYMBOL() */ | ||
1268 | #ifndef __DISABLE_GUP_DEPRECATED | ||
1269 | #define __gup_deprecated __deprecated | ||
1270 | #else | ||
1271 | #define __gup_deprecated | ||
1272 | #endif | ||
1273 | /* | ||
1274 | * These macros provide backward-compatibility with the old | ||
1275 | * get_user_pages() variants which took tsk/mm. These | ||
1276 | * functions/macros provide both compile-time __deprecated so we | ||
1277 | * can catch old-style use and not break the build. The actual | ||
1278 | * functions also have WARN_ON()s to let us know at runtime if | ||
1279 | * the get_user_pages() should have been the "remote" variant. | ||
1280 | * | ||
1281 | * These are hideous, but temporary. | ||
1282 | * | ||
1283 | * If you run into one of these __deprecated warnings, look | ||
1284 | * at how you are calling get_user_pages(). If you are calling | ||
1285 | * it with current/current->mm as the first two arguments, | ||
1286 | * simply remove those arguments. The behavior will be the same | ||
1287 | * as it is now. If you are calling it on another task, use | ||
1288 | * get_user_pages_remote() instead. | ||
1289 | * | ||
1290 | * Any questions? Ask Dave Hansen <dave@sr71.net> | ||
1291 | */ | ||
1292 | long | ||
1293 | __gup_deprecated | ||
1294 | get_user_pages8(struct task_struct *tsk, struct mm_struct *mm, | ||
1295 | unsigned long start, unsigned long nr_pages, | ||
1296 | int write, int force, struct page **pages, | ||
1297 | struct vm_area_struct **vmas); | ||
1298 | #define GUP_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, get_user_pages, ...) \ | ||
1299 | get_user_pages | ||
1300 | #define get_user_pages(...) GUP_MACRO(__VA_ARGS__, \ | ||
1301 | get_user_pages8, x, \ | ||
1302 | get_user_pages6, x, x, x, x, x)(__VA_ARGS__) | ||
1303 | |||
1304 | __gup_deprecated | ||
1305 | long get_user_pages_locked8(struct task_struct *tsk, struct mm_struct *mm, | ||
1306 | unsigned long start, unsigned long nr_pages, | ||
1307 | int write, int force, struct page **pages, | ||
1308 | int *locked); | ||
1309 | #define GUPL_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, get_user_pages_locked, ...) \ | ||
1310 | get_user_pages_locked | ||
1311 | #define get_user_pages_locked(...) GUPL_MACRO(__VA_ARGS__, \ | ||
1312 | get_user_pages_locked8, x, \ | ||
1313 | get_user_pages_locked6, x, x, x, x)(__VA_ARGS__) | ||
1314 | |||
1315 | __gup_deprecated | ||
1316 | long get_user_pages_unlocked7(struct task_struct *tsk, struct mm_struct *mm, | ||
1317 | unsigned long start, unsigned long nr_pages, | ||
1318 | int write, int force, struct page **pages); | ||
1319 | #define GUPU_MACRO(_1, _2, _3, _4, _5, _6, _7, get_user_pages_unlocked, ...) \ | ||
1320 | get_user_pages_unlocked | ||
1321 | #define get_user_pages_unlocked(...) GUPU_MACRO(__VA_ARGS__, \ | ||
1322 | get_user_pages_unlocked7, x, \ | ||
1323 | get_user_pages_unlocked5, x, x, x, x)(__VA_ARGS__) | ||
1324 | |||
1325 | /* Container for pinned pfns / pages */ | 1271 | /* Container for pinned pfns / pages */ |
1326 | struct frame_vector { | 1272 | struct frame_vector { |
1327 | unsigned int nr_allocated; /* Number of frames we have space for */ | 1273 | unsigned int nr_allocated; /* Number of frames we have space for */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 944b2b37313b..c2d75b4fa86c 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -341,7 +341,7 @@ struct vm_area_struct { | |||
341 | 341 | ||
342 | /* Information about our backing store: */ | 342 | /* Information about our backing store: */ |
343 | unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE | 343 | unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE |
344 | units, *not* PAGE_CACHE_SIZE */ | 344 | units */ |
345 | struct file * vm_file; /* File we map to (can be NULL). */ | 345 | struct file * vm_file; /* File we map to (can be NULL). */ |
346 | void * vm_private_data; /* was vm_pte (shared mem) */ | 346 | void * vm_private_data; /* was vm_pte (shared mem) */ |
347 | 347 | ||
diff --git a/include/linux/namei.h b/include/linux/namei.h index 77d01700daf7..ec5ec2818a28 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -79,6 +79,8 @@ extern int kern_path_mountpoint(int, const char *, struct path *, unsigned int); | |||
79 | 79 | ||
80 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 80 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
81 | extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int); | 81 | extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int); |
82 | struct qstr; | ||
83 | extern struct dentry *lookup_hash(const struct qstr *, struct dentry *); | ||
82 | 84 | ||
83 | extern int follow_down_one(struct path *); | 85 | extern int follow_down_one(struct path *); |
84 | extern int follow_down(struct path *); | 86 | extern int follow_down(struct path *); |
diff --git a/include/linux/net.h b/include/linux/net.h index 49175e4ced11..f840d77c6c31 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -246,7 +246,15 @@ do { \ | |||
246 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) | 246 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) |
247 | #define net_info_ratelimited(fmt, ...) \ | 247 | #define net_info_ratelimited(fmt, ...) \ |
248 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) | 248 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) |
249 | #if defined(DEBUG) | 249 | #if defined(CONFIG_DYNAMIC_DEBUG) |
250 | #define net_dbg_ratelimited(fmt, ...) \ | ||
251 | do { \ | ||
252 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | ||
253 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ | ||
254 | net_ratelimit()) \ | ||
255 | __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ | ||
256 | } while (0) | ||
257 | #elif defined(DEBUG) | ||
250 | #define net_dbg_ratelimited(fmt, ...) \ | 258 | #define net_dbg_ratelimited(fmt, ...) \ |
251 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 259 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
252 | #else | 260 | #else |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index cb0d5d09c2e4..b3c46b019ac1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2120,7 +2120,10 @@ struct napi_gro_cb { | |||
2120 | /* Used in foo-over-udp, set in udp[46]_gro_receive */ | 2120 | /* Used in foo-over-udp, set in udp[46]_gro_receive */ |
2121 | u8 is_ipv6:1; | 2121 | u8 is_ipv6:1; |
2122 | 2122 | ||
2123 | /* 7 bit hole */ | 2123 | /* Used in GRE, set in fou/gue_gro_receive */ |
2124 | u8 is_fou:1; | ||
2125 | |||
2126 | /* 6 bit hole */ | ||
2124 | 2127 | ||
2125 | /* used to support CHECKSUM_COMPLETE for tunneling protocols */ | 2128 | /* used to support CHECKSUM_COMPLETE for tunneling protocols */ |
2126 | __wsum csum; | 2129 | __wsum csum; |
@@ -4001,7 +4004,7 @@ netdev_features_t netif_skb_features(struct sk_buff *skb); | |||
4001 | 4004 | ||
4002 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) | 4005 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) |
4003 | { | 4006 | { |
4004 | netdev_features_t feature = gso_type << NETIF_F_GSO_SHIFT; | 4007 | netdev_features_t feature = (netdev_features_t)gso_type << NETIF_F_GSO_SHIFT; |
4005 | 4008 | ||
4006 | /* check flags correspondence */ | 4009 | /* check flags correspondence */ |
4007 | BUILD_BUG_ON(SKB_GSO_TCPV4 != (NETIF_F_TSO >> NETIF_F_GSO_SHIFT)); | 4010 | BUILD_BUG_ON(SKB_GSO_TCPV4 != (NETIF_F_TSO >> NETIF_F_GSO_SHIFT)); |
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index 0e1f433cc4b7..f48b8a664b0f 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h | |||
@@ -234,6 +234,10 @@ struct ip_set { | |||
234 | spinlock_t lock; | 234 | spinlock_t lock; |
235 | /* References to the set */ | 235 | /* References to the set */ |
236 | u32 ref; | 236 | u32 ref; |
237 | /* References to the set for netlink events like dump, | ||
238 | * ref can be swapped out by ip_set_swap | ||
239 | */ | ||
240 | u32 ref_netlink; | ||
237 | /* The core set type */ | 241 | /* The core set type */ |
238 | struct ip_set_type *type; | 242 | struct ip_set_type *type; |
239 | /* The type variant doing the real job */ | 243 | /* The type variant doing the real job */ |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index f2f650f136ee..957049f72290 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -41,8 +41,8 @@ struct nfs_page { | |||
41 | struct page *wb_page; /* page to read in/write out */ | 41 | struct page *wb_page; /* page to read in/write out */ |
42 | struct nfs_open_context *wb_context; /* File state context info */ | 42 | struct nfs_open_context *wb_context; /* File state context info */ |
43 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 43 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
44 | pgoff_t wb_index; /* Offset >> PAGE_CACHE_SHIFT */ | 44 | pgoff_t wb_index; /* Offset >> PAGE_SHIFT */ |
45 | unsigned int wb_offset, /* Offset & ~PAGE_CACHE_MASK */ | 45 | unsigned int wb_offset, /* Offset & ~PAGE_MASK */ |
46 | wb_pgbase, /* Start of page data */ | 46 | wb_pgbase, /* Start of page data */ |
47 | wb_bytes; /* Length of request */ | 47 | wb_bytes; /* Length of request */ |
48 | struct kref wb_kref; /* reference count */ | 48 | struct kref wb_kref; /* reference count */ |
@@ -184,7 +184,7 @@ nfs_list_entry(struct list_head *head) | |||
184 | static inline | 184 | static inline |
185 | loff_t req_offset(struct nfs_page *req) | 185 | loff_t req_offset(struct nfs_page *req) |
186 | { | 186 | { |
187 | return (((loff_t)req->wb_index) << PAGE_CACHE_SHIFT) + req->wb_offset; | 187 | return (((loff_t)req->wb_index) << PAGE_SHIFT) + req->wb_offset; |
188 | } | 188 | } |
189 | 189 | ||
190 | #endif /* _LINUX_NFS_PAGE_H */ | 190 | #endif /* _LINUX_NFS_PAGE_H */ |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 9abb763e4b86..e9fcf90b270d 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -331,7 +331,7 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen) | |||
331 | { | 331 | { |
332 | unsigned len = le16_to_cpu(dlen); | 332 | unsigned len = le16_to_cpu(dlen); |
333 | 333 | ||
334 | #if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536) | 334 | #if !defined(__KERNEL__) || (PAGE_SIZE >= 65536) |
335 | if (len == NILFS_MAX_REC_LEN) | 335 | if (len == NILFS_MAX_REC_LEN) |
336 | return 1 << 16; | 336 | return 1 << 16; |
337 | #endif | 337 | #endif |
@@ -340,7 +340,7 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen) | |||
340 | 340 | ||
341 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) | 341 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) |
342 | { | 342 | { |
343 | #if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536) | 343 | #if !defined(__KERNEL__) || (PAGE_SIZE >= 65536) |
344 | if (len == (1 << 16)) | 344 | if (len == (1 << 16)) |
345 | return cpu_to_le16(NILFS_MAX_REC_LEN); | 345 | return cpu_to_le16(NILFS_MAX_REC_LEN); |
346 | else if (len > (1 << 16)) | 346 | else if (len > (1 << 16)) |
diff --git a/include/linux/of.h b/include/linux/of.h index 7fcb681baadf..31758036787c 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -133,7 +133,7 @@ void of_core_init(void); | |||
133 | 133 | ||
134 | static inline bool is_of_node(struct fwnode_handle *fwnode) | 134 | static inline bool is_of_node(struct fwnode_handle *fwnode) |
135 | { | 135 | { |
136 | return fwnode && fwnode->type == FWNODE_OF; | 136 | return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_OF; |
137 | } | 137 | } |
138 | 138 | ||
139 | static inline struct device_node *to_of_node(struct fwnode_handle *fwnode) | 139 | static inline struct device_node *to_of_node(struct fwnode_handle *fwnode) |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f4ed4f1b0c77..6b052aa7b5b7 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -517,6 +517,27 @@ static inline int PageTransCompound(struct page *page) | |||
517 | } | 517 | } |
518 | 518 | ||
519 | /* | 519 | /* |
520 | * PageTransCompoundMap is the same as PageTransCompound, but it also | ||
521 | * guarantees the primary MMU has the entire compound page mapped | ||
522 | * through pmd_trans_huge, which in turn guarantees the secondary MMUs | ||
523 | * can also map the entire compound page. This allows the secondary | ||
524 | * MMUs to call get_user_pages() only once for each compound page and | ||
525 | * to immediately map the entire compound page with a single secondary | ||
526 | * MMU fault. If there will be a pmd split later, the secondary MMUs | ||
527 | * will get an update through the MMU notifier invalidation through | ||
528 | * split_huge_pmd(). | ||
529 | * | ||
530 | * Unlike PageTransCompound, this is safe to be called only while | ||
531 | * split_huge_pmd() cannot run from under us, like if protected by the | ||
532 | * MMU notifier, otherwise it may result in page->_mapcount < 0 false | ||
533 | * positives. | ||
534 | */ | ||
535 | static inline int PageTransCompoundMap(struct page *page) | ||
536 | { | ||
537 | return PageTransCompound(page) && atomic_read(&page->_mapcount) < 0; | ||
538 | } | ||
539 | |||
540 | /* | ||
520 | * PageTransTail returns true for both transparent huge pages | 541 | * PageTransTail returns true for both transparent huge pages |
521 | * and hugetlbfs pages, so it should only be called when it's known | 542 | * and hugetlbfs pages, so it should only be called when it's known |
522 | * that hugetlbfs pages aren't involved. | 543 | * that hugetlbfs pages aren't involved. |
@@ -559,6 +580,7 @@ static inline int TestClearPageDoubleMap(struct page *page) | |||
559 | #else | 580 | #else |
560 | TESTPAGEFLAG_FALSE(TransHuge) | 581 | TESTPAGEFLAG_FALSE(TransHuge) |
561 | TESTPAGEFLAG_FALSE(TransCompound) | 582 | TESTPAGEFLAG_FALSE(TransCompound) |
583 | TESTPAGEFLAG_FALSE(TransCompoundMap) | ||
562 | TESTPAGEFLAG_FALSE(TransTail) | 584 | TESTPAGEFLAG_FALSE(TransTail) |
563 | TESTPAGEFLAG_FALSE(DoubleMap) | 585 | TESTPAGEFLAG_FALSE(DoubleMap) |
564 | TESTSETFLAG_FALSE(DoubleMap) | 586 | TESTSETFLAG_FALSE(DoubleMap) |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 1ebd65c91422..7e1ab155c67c 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -86,21 +86,6 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) | |||
86 | (__force unsigned long)mask; | 86 | (__force unsigned long)mask; |
87 | } | 87 | } |
88 | 88 | ||
89 | /* | ||
90 | * The page cache can be done in larger chunks than | ||
91 | * one page, because it allows for more efficient | ||
92 | * throughput (it can then be mapped into user | ||
93 | * space in smaller chunks for same flexibility). | ||
94 | * | ||
95 | * Or rather, it _will_ be done in larger chunks. | ||
96 | */ | ||
97 | #define PAGE_CACHE_SHIFT PAGE_SHIFT | ||
98 | #define PAGE_CACHE_SIZE PAGE_SIZE | ||
99 | #define PAGE_CACHE_MASK PAGE_MASK | ||
100 | #define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK) | ||
101 | |||
102 | #define page_cache_get(page) get_page(page) | ||
103 | #define page_cache_release(page) put_page(page) | ||
104 | void release_pages(struct page **pages, int nr, bool cold); | 89 | void release_pages(struct page **pages, int nr, bool cold); |
105 | 90 | ||
106 | /* | 91 | /* |
@@ -390,13 +375,13 @@ static inline pgoff_t page_to_pgoff(struct page *page) | |||
390 | return page->index << compound_order(page); | 375 | return page->index << compound_order(page); |
391 | 376 | ||
392 | if (likely(!PageTransTail(page))) | 377 | if (likely(!PageTransTail(page))) |
393 | return page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); | 378 | return page->index; |
394 | 379 | ||
395 | /* | 380 | /* |
396 | * We don't initialize ->index for tail pages: calculate based on | 381 | * We don't initialize ->index for tail pages: calculate based on |
397 | * head page | 382 | * head page |
398 | */ | 383 | */ |
399 | pgoff = compound_head(page)->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); | 384 | pgoff = compound_head(page)->index; |
400 | pgoff += page - compound_head(page); | 385 | pgoff += page - compound_head(page); |
401 | return pgoff; | 386 | return pgoff; |
402 | } | 387 | } |
@@ -406,12 +391,12 @@ static inline pgoff_t page_to_pgoff(struct page *page) | |||
406 | */ | 391 | */ |
407 | static inline loff_t page_offset(struct page *page) | 392 | static inline loff_t page_offset(struct page *page) |
408 | { | 393 | { |
409 | return ((loff_t)page->index) << PAGE_CACHE_SHIFT; | 394 | return ((loff_t)page->index) << PAGE_SHIFT; |
410 | } | 395 | } |
411 | 396 | ||
412 | static inline loff_t page_file_offset(struct page *page) | 397 | static inline loff_t page_file_offset(struct page *page) |
413 | { | 398 | { |
414 | return ((loff_t)page_file_index(page)) << PAGE_CACHE_SHIFT; | 399 | return ((loff_t)page_file_index(page)) << PAGE_SHIFT; |
415 | } | 400 | } |
416 | 401 | ||
417 | extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma, | 402 | extern pgoff_t linear_hugepage_index(struct vm_area_struct *vma, |
@@ -425,7 +410,7 @@ static inline pgoff_t linear_page_index(struct vm_area_struct *vma, | |||
425 | return linear_hugepage_index(vma, address); | 410 | return linear_hugepage_index(vma, address); |
426 | pgoff = (address - vma->vm_start) >> PAGE_SHIFT; | 411 | pgoff = (address - vma->vm_start) >> PAGE_SHIFT; |
427 | pgoff += vma->vm_pgoff; | 412 | pgoff += vma->vm_pgoff; |
428 | return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT); | 413 | return pgoff; |
429 | } | 414 | } |
430 | 415 | ||
431 | extern void __lock_page(struct page *page); | 416 | extern void __lock_page(struct page *page); |
@@ -535,8 +520,7 @@ extern void add_page_wait_queue(struct page *page, wait_queue_t *waiter); | |||
535 | /* | 520 | /* |
536 | * Fault a userspace page into pagetables. Return non-zero on a fault. | 521 | * Fault a userspace page into pagetables. Return non-zero on a fault. |
537 | * | 522 | * |
538 | * This assumes that two userspace pages are always sufficient. That's | 523 | * This assumes that two userspace pages are always sufficient. |
539 | * not true if PAGE_CACHE_SIZE > PAGE_SIZE. | ||
540 | */ | 524 | */ |
541 | static inline int fault_in_pages_writeable(char __user *uaddr, int size) | 525 | static inline int fault_in_pages_writeable(char __user *uaddr, int size) |
542 | { | 526 | { |
@@ -671,8 +655,8 @@ static inline int add_to_page_cache(struct page *page, | |||
671 | 655 | ||
672 | static inline unsigned long dir_pages(struct inode *inode) | 656 | static inline unsigned long dir_pages(struct inode *inode) |
673 | { | 657 | { |
674 | return (unsigned long)(inode->i_size + PAGE_CACHE_SIZE - 1) >> | 658 | return (unsigned long)(inode->i_size + PAGE_SIZE - 1) >> |
675 | PAGE_CACHE_SHIFT; | 659 | PAGE_SHIFT; |
676 | } | 660 | } |
677 | 661 | ||
678 | #endif /* _LINUX_PAGEMAP_H */ | 662 | #endif /* _LINUX_PAGEMAP_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 004b8133417d..932ec74909c6 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1111,6 +1111,7 @@ void pci_unlock_rescan_remove(void); | |||
1111 | /* Vital product data routines */ | 1111 | /* Vital product data routines */ |
1112 | ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf); | 1112 | ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf); |
1113 | ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void *buf); | 1113 | ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void *buf); |
1114 | int pci_set_vpd_size(struct pci_dev *dev, size_t len); | ||
1114 | 1115 | ||
1115 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 1116 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
1116 | resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx); | 1117 | resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx); |
diff --git a/include/linux/pmem.h b/include/linux/pmem.h index 3ec5309e29f3..57d146fe44dd 100644 --- a/include/linux/pmem.h +++ b/include/linux/pmem.h | |||
@@ -42,6 +42,13 @@ static inline void arch_memcpy_to_pmem(void __pmem *dst, const void *src, | |||
42 | BUG(); | 42 | BUG(); |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline int arch_memcpy_from_pmem(void *dst, const void __pmem *src, | ||
46 | size_t n) | ||
47 | { | ||
48 | BUG(); | ||
49 | return -EFAULT; | ||
50 | } | ||
51 | |||
45 | static inline size_t arch_copy_from_iter_pmem(void __pmem *addr, size_t bytes, | 52 | static inline size_t arch_copy_from_iter_pmem(void __pmem *addr, size_t bytes, |
46 | struct iov_iter *i) | 53 | struct iov_iter *i) |
47 | { | 54 | { |
@@ -65,20 +72,33 @@ static inline void arch_invalidate_pmem(void __pmem *addr, size_t size) | |||
65 | } | 72 | } |
66 | #endif | 73 | #endif |
67 | 74 | ||
68 | /* | 75 | static inline bool arch_has_pmem_api(void) |
69 | * Architectures that define ARCH_HAS_PMEM_API must provide | ||
70 | * implementations for arch_memcpy_to_pmem(), arch_wmb_pmem(), | ||
71 | * arch_copy_from_iter_pmem(), arch_clear_pmem(), arch_wb_cache_pmem() | ||
72 | * and arch_has_wmb_pmem(). | ||
73 | */ | ||
74 | static inline void memcpy_from_pmem(void *dst, void __pmem const *src, size_t size) | ||
75 | { | 76 | { |
76 | memcpy(dst, (void __force const *) src, size); | 77 | return IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API); |
77 | } | 78 | } |
78 | 79 | ||
79 | static inline bool arch_has_pmem_api(void) | 80 | static inline int default_memcpy_from_pmem(void *dst, void __pmem const *src, |
81 | size_t size) | ||
80 | { | 82 | { |
81 | return IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API); | 83 | memcpy(dst, (void __force *) src, size); |
84 | return 0; | ||
85 | } | ||
86 | |||
87 | /* | ||
88 | * memcpy_from_pmem - read from persistent memory with error handling | ||
89 | * @dst: destination buffer | ||
90 | * @src: source buffer | ||
91 | * @size: transfer length | ||
92 | * | ||
93 | * Returns 0 on success negative error code on failure. | ||
94 | */ | ||
95 | static inline int memcpy_from_pmem(void *dst, void __pmem const *src, | ||
96 | size_t size) | ||
97 | { | ||
98 | if (arch_has_pmem_api()) | ||
99 | return arch_memcpy_from_pmem(dst, src, size); | ||
100 | else | ||
101 | return default_memcpy_from_pmem(dst, src, size); | ||
82 | } | 102 | } |
83 | 103 | ||
84 | /** | 104 | /** |
diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h index 1c33dd7da4a7..4ae95f7e8597 100644 --- a/include/linux/rculist_nulls.h +++ b/include/linux/rculist_nulls.h | |||
@@ -98,6 +98,45 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n, | |||
98 | if (!is_a_nulls(first)) | 98 | if (!is_a_nulls(first)) |
99 | first->pprev = &n->next; | 99 | first->pprev = &n->next; |
100 | } | 100 | } |
101 | |||
102 | /** | ||
103 | * hlist_nulls_add_tail_rcu | ||
104 | * @n: the element to add to the hash list. | ||
105 | * @h: the list to add to. | ||
106 | * | ||
107 | * Description: | ||
108 | * Adds the specified element to the end of the specified hlist_nulls, | ||
109 | * while permitting racing traversals. NOTE: tail insertion requires | ||
110 | * list traversal. | ||
111 | * | ||
112 | * The caller must take whatever precautions are necessary | ||
113 | * (such as holding appropriate locks) to avoid racing | ||
114 | * with another list-mutation primitive, such as hlist_nulls_add_head_rcu() | ||
115 | * or hlist_nulls_del_rcu(), running on this same list. | ||
116 | * However, it is perfectly legal to run concurrently with | ||
117 | * the _rcu list-traversal primitives, such as | ||
118 | * hlist_nulls_for_each_entry_rcu(), used to prevent memory-consistency | ||
119 | * problems on Alpha CPUs. Regardless of the type of CPU, the | ||
120 | * list-traversal primitive must be guarded by rcu_read_lock(). | ||
121 | */ | ||
122 | static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n, | ||
123 | struct hlist_nulls_head *h) | ||
124 | { | ||
125 | struct hlist_nulls_node *i, *last = NULL; | ||
126 | |||
127 | for (i = hlist_nulls_first_rcu(h); !is_a_nulls(i); | ||
128 | i = hlist_nulls_next_rcu(i)) | ||
129 | last = i; | ||
130 | |||
131 | if (last) { | ||
132 | n->next = last->next; | ||
133 | n->pprev = &last->next; | ||
134 | rcu_assign_pointer(hlist_nulls_next_rcu(last), n); | ||
135 | } else { | ||
136 | hlist_nulls_add_head_rcu(n, h); | ||
137 | } | ||
138 | } | ||
139 | |||
101 | /** | 140 | /** |
102 | * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type | 141 | * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type |
103 | * @tpos: the type * to use as a loop cursor. | 142 | * @tpos: the type * to use as a loop cursor. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 60bba7e032dc..52c4847b05e2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -720,7 +720,7 @@ struct signal_struct { | |||
720 | struct task_cputime cputime_expires; | 720 | struct task_cputime cputime_expires; |
721 | 721 | ||
722 | #ifdef CONFIG_NO_HZ_FULL | 722 | #ifdef CONFIG_NO_HZ_FULL |
723 | unsigned long tick_dep_mask; | 723 | atomic_t tick_dep_mask; |
724 | #endif | 724 | #endif |
725 | 725 | ||
726 | struct list_head cpu_timers[3]; | 726 | struct list_head cpu_timers[3]; |
@@ -1549,7 +1549,7 @@ struct task_struct { | |||
1549 | #endif | 1549 | #endif |
1550 | 1550 | ||
1551 | #ifdef CONFIG_NO_HZ_FULL | 1551 | #ifdef CONFIG_NO_HZ_FULL |
1552 | unsigned long tick_dep_mask; | 1552 | atomic_t tick_dep_mask; |
1553 | #endif | 1553 | #endif |
1554 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 1554 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
1555 | u64 start_time; /* monotonic time in nsec */ | 1555 | u64 start_time; /* monotonic time in nsec */ |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index dde00defbaa5..f3d45dd42695 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -7,13 +7,10 @@ | |||
7 | #include <linux/mutex.h> | 7 | #include <linux/mutex.h> |
8 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
9 | #include <linux/nodemask.h> | 9 | #include <linux/nodemask.h> |
10 | #include <linux/fs.h> | ||
11 | #include <linux/cred.h> | ||
10 | 12 | ||
11 | struct seq_operations; | 13 | struct seq_operations; |
12 | struct file; | ||
13 | struct path; | ||
14 | struct inode; | ||
15 | struct dentry; | ||
16 | struct user_namespace; | ||
17 | 14 | ||
18 | struct seq_file { | 15 | struct seq_file { |
19 | char *buf; | 16 | char *buf; |
@@ -27,9 +24,7 @@ struct seq_file { | |||
27 | struct mutex lock; | 24 | struct mutex lock; |
28 | const struct seq_operations *op; | 25 | const struct seq_operations *op; |
29 | int poll_event; | 26 | int poll_event; |
30 | #ifdef CONFIG_USER_NS | 27 | const struct file *file; |
31 | struct user_namespace *user_ns; | ||
32 | #endif | ||
33 | void *private; | 28 | void *private; |
34 | }; | 29 | }; |
35 | 30 | ||
@@ -147,7 +142,7 @@ int seq_release_private(struct inode *, struct file *); | |||
147 | static inline struct user_namespace *seq_user_ns(struct seq_file *seq) | 142 | static inline struct user_namespace *seq_user_ns(struct seq_file *seq) |
148 | { | 143 | { |
149 | #ifdef CONFIG_USER_NS | 144 | #ifdef CONFIG_USER_NS |
150 | return seq->user_ns; | 145 | return seq->file->f_cred->user_ns; |
151 | #else | 146 | #else |
152 | extern struct user_namespace init_user_ns; | 147 | extern struct user_namespace init_user_ns; |
153 | return &init_user_ns; | 148 | return &init_user_ns; |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 4bcf5a61aada..e6bc30a42a74 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -108,7 +108,6 @@ struct stmmac_axi { | |||
108 | }; | 108 | }; |
109 | 109 | ||
110 | struct plat_stmmacenet_data { | 110 | struct plat_stmmacenet_data { |
111 | char *phy_bus_name; | ||
112 | int bus_id; | 111 | int bus_id; |
113 | int phy_addr; | 112 | int phy_addr; |
114 | int interface; | 113 | int interface; |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index cc0fc712bb82..7ca44fb5b675 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -129,7 +129,7 @@ static inline void svc_get(struct svc_serv *serv) | |||
129 | * | 129 | * |
130 | * These happen to all be powers of 2, which is not strictly | 130 | * These happen to all be powers of 2, which is not strictly |
131 | * necessary but helps enforce the real limitation, which is | 131 | * necessary but helps enforce the real limitation, which is |
132 | * that they should be multiples of PAGE_CACHE_SIZE. | 132 | * that they should be multiples of PAGE_SIZE. |
133 | * | 133 | * |
134 | * For UDP transports, a block plus NFS,RPC, and UDP headers | 134 | * For UDP transports, a block plus NFS,RPC, and UDP headers |
135 | * has to fit into the IP datagram limit of 64K. The largest | 135 | * has to fit into the IP datagram limit of 64K. The largest |
diff --git a/include/linux/swap.h b/include/linux/swap.h index d18b65c53dbb..0a4cd4703f40 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -433,9 +433,9 @@ struct backing_dev_info; | |||
433 | #define si_swapinfo(val) \ | 433 | #define si_swapinfo(val) \ |
434 | do { (val)->freeswap = (val)->totalswap = 0; } while (0) | 434 | do { (val)->freeswap = (val)->totalswap = 0; } while (0) |
435 | /* only sparc can not include linux/pagemap.h in this file | 435 | /* only sparc can not include linux/pagemap.h in this file |
436 | * so leave page_cache_release and release_pages undeclared... */ | 436 | * so leave put_page and release_pages undeclared... */ |
437 | #define free_page_and_swap_cache(page) \ | 437 | #define free_page_and_swap_cache(page) \ |
438 | page_cache_release(page) | 438 | put_page(page) |
439 | #define free_pages_and_swap_cache(pages, nr) \ | 439 | #define free_pages_and_swap_cache(pages, nr) \ |
440 | release_pages((pages), (nr), false); | 440 | release_pages((pages), (nr), false); |
441 | 441 | ||
@@ -533,6 +533,10 @@ static inline swp_entry_t get_swap_page(void) | |||
533 | #ifdef CONFIG_MEMCG | 533 | #ifdef CONFIG_MEMCG |
534 | static inline int mem_cgroup_swappiness(struct mem_cgroup *memcg) | 534 | static inline int mem_cgroup_swappiness(struct mem_cgroup *memcg) |
535 | { | 535 | { |
536 | /* Cgroup2 doesn't have per-cgroup swappiness */ | ||
537 | if (cgroup_subsys_on_dfl(memory_cgrp_subsys)) | ||
538 | return vm_swappiness; | ||
539 | |||
536 | /* root ? */ | 540 | /* root ? */ |
537 | if (mem_cgroup_disabled() || !memcg->css.parent) | 541 | if (mem_cgroup_disabled() || !memcg->css.parent) |
538 | return vm_swappiness; | 542 | return vm_swappiness; |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index a55d0523f75d..1b8a5a7876ce 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -352,8 +352,8 @@ struct thermal_zone_of_device_ops { | |||
352 | 352 | ||
353 | struct thermal_trip { | 353 | struct thermal_trip { |
354 | struct device_node *np; | 354 | struct device_node *np; |
355 | unsigned long int temperature; | 355 | int temperature; |
356 | unsigned long int hysteresis; | 356 | int hysteresis; |
357 | enum thermal_trip_type type; | 357 | enum thermal_trip_type type; |
358 | }; | 358 | }; |
359 | 359 | ||
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 161052477f77..b742b5e47cc2 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * defined; unless noted otherwise, they are optional, and can be | 7 | * defined; unless noted otherwise, they are optional, and can be |
8 | * filled in with a null pointer. | 8 | * filled in with a null pointer. |
9 | * | 9 | * |
10 | * struct tty_struct * (*lookup)(struct tty_driver *self, int idx) | 10 | * struct tty_struct * (*lookup)(struct tty_driver *self, struct file *, int idx) |
11 | * | 11 | * |
12 | * Return the tty device corresponding to idx, NULL if there is not | 12 | * Return the tty device corresponding to idx, NULL if there is not |
13 | * one currently in use and an ERR_PTR value on error. Called under | 13 | * one currently in use and an ERR_PTR value on error. Called under |
@@ -250,7 +250,7 @@ struct serial_icounter_struct; | |||
250 | 250 | ||
251 | struct tty_operations { | 251 | struct tty_operations { |
252 | struct tty_struct * (*lookup)(struct tty_driver *driver, | 252 | struct tty_struct * (*lookup)(struct tty_driver *driver, |
253 | struct inode *inode, int idx); | 253 | struct file *filp, int idx); |
254 | int (*install)(struct tty_driver *driver, struct tty_struct *tty); | 254 | int (*install)(struct tty_driver *driver, struct tty_struct *tty); |
255 | void (*remove)(struct tty_driver *driver, struct tty_struct *tty); | 255 | void (*remove)(struct tty_driver *driver, struct tty_struct *tty); |
256 | int (*open)(struct tty_struct * tty, struct file * filp); | 256 | int (*open)(struct tty_struct * tty, struct file * filp); |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 7f5f78bd15ad..245f57dbbb61 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -79,6 +79,8 @@ | |||
79 | /* Cannot handle MI_REPORT_SUPPORTED_OPERATION_CODES */ \ | 79 | /* Cannot handle MI_REPORT_SUPPORTED_OPERATION_CODES */ \ |
80 | US_FLAG(MAX_SECTORS_240, 0x08000000) \ | 80 | US_FLAG(MAX_SECTORS_240, 0x08000000) \ |
81 | /* Sets max_sectors to 240 */ \ | 81 | /* Sets max_sectors to 240 */ \ |
82 | US_FLAG(NO_REPORT_LUNS, 0x10000000) \ | ||
83 | /* Cannot handle REPORT_LUNS */ \ | ||
82 | 84 | ||
83 | #define US_FLAG(name, value) US_FL_##name = value , | 85 | #define US_FLAG(name, value) US_FL_##name = value , |
84 | enum { US_DO_ALL_FLAGS }; | 86 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 8a0f55b6c2ba..88e3ab496e8f 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -375,6 +375,9 @@ struct vb2_ops { | |||
375 | /** | 375 | /** |
376 | * struct vb2_ops - driver-specific callbacks | 376 | * struct vb2_ops - driver-specific callbacks |
377 | * | 377 | * |
378 | * @verify_planes_array: Verify that a given user space structure contains | ||
379 | * enough planes for the buffer. This is called | ||
380 | * for each dequeued buffer. | ||
378 | * @fill_user_buffer: given a vb2_buffer fill in the userspace structure. | 381 | * @fill_user_buffer: given a vb2_buffer fill in the userspace structure. |
379 | * For V4L2 this is a struct v4l2_buffer. | 382 | * For V4L2 this is a struct v4l2_buffer. |
380 | * @fill_vb2_buffer: given a userspace structure, fill in the vb2_buffer. | 383 | * @fill_vb2_buffer: given a userspace structure, fill in the vb2_buffer. |
@@ -384,6 +387,7 @@ struct vb2_ops { | |||
384 | * the vb2_buffer struct. | 387 | * the vb2_buffer struct. |
385 | */ | 388 | */ |
386 | struct vb2_buf_ops { | 389 | struct vb2_buf_ops { |
390 | int (*verify_planes_array)(struct vb2_buffer *vb, const void *pb); | ||
387 | void (*fill_user_buffer)(struct vb2_buffer *vb, void *pb); | 391 | void (*fill_user_buffer)(struct vb2_buffer *vb, void *pb); |
388 | int (*fill_vb2_buffer)(struct vb2_buffer *vb, const void *pb, | 392 | int (*fill_vb2_buffer)(struct vb2_buffer *vb, const void *pb, |
389 | struct vb2_plane *planes); | 393 | struct vb2_plane *planes); |
@@ -400,6 +404,9 @@ struct vb2_buf_ops { | |||
400 | * @fileio_read_once: report EOF after reading the first buffer | 404 | * @fileio_read_once: report EOF after reading the first buffer |
401 | * @fileio_write_immediately: queue buffer after each write() call | 405 | * @fileio_write_immediately: queue buffer after each write() call |
402 | * @allow_zero_bytesused: allow bytesused == 0 to be passed to the driver | 406 | * @allow_zero_bytesused: allow bytesused == 0 to be passed to the driver |
407 | * @quirk_poll_must_check_waiting_for_buffers: Return POLLERR at poll when QBUF | ||
408 | * has not been called. This is a vb1 idiom that has been adopted | ||
409 | * also by vb2. | ||
403 | * @lock: pointer to a mutex that protects the vb2_queue struct. The | 410 | * @lock: pointer to a mutex that protects the vb2_queue struct. The |
404 | * driver can set this to a mutex to let the v4l2 core serialize | 411 | * driver can set this to a mutex to let the v4l2 core serialize |
405 | * the queuing ioctls. If the driver wants to handle locking | 412 | * the queuing ioctls. If the driver wants to handle locking |
@@ -463,6 +470,7 @@ struct vb2_queue { | |||
463 | unsigned fileio_read_once:1; | 470 | unsigned fileio_read_once:1; |
464 | unsigned fileio_write_immediately:1; | 471 | unsigned fileio_write_immediately:1; |
465 | unsigned allow_zero_bytesused:1; | 472 | unsigned allow_zero_bytesused:1; |
473 | unsigned quirk_poll_must_check_waiting_for_buffers:1; | ||
466 | 474 | ||
467 | struct mutex *lock; | 475 | struct mutex *lock; |
468 | void *owner; | 476 | void *owner; |
diff --git a/include/net/act_api.h b/include/net/act_api.h index 2a19fe111c78..03e322b30218 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -135,6 +135,7 @@ void tcf_hashinfo_destroy(const struct tc_action_ops *ops, | |||
135 | static inline void tc_action_net_exit(struct tc_action_net *tn) | 135 | static inline void tc_action_net_exit(struct tc_action_net *tn) |
136 | { | 136 | { |
137 | tcf_hashinfo_destroy(tn->ops, tn->hinfo); | 137 | tcf_hashinfo_destroy(tn->ops, tn->hinfo); |
138 | kfree(tn->hinfo); | ||
138 | } | 139 | } |
139 | 140 | ||
140 | int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb, | 141 | int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb, |
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index c0a92e2c286d..74c9693d4941 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/hardirq.h> | 17 | #include <linux/hardirq.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <net/sock.h> | 19 | #include <net/sock.h> |
20 | #include <net/inet_sock.h> | ||
20 | 21 | ||
21 | #ifdef CONFIG_CGROUP_NET_CLASSID | 22 | #ifdef CONFIG_CGROUP_NET_CLASSID |
22 | struct cgroup_cls_state { | 23 | struct cgroup_cls_state { |
@@ -63,11 +64,13 @@ static inline u32 task_get_classid(const struct sk_buff *skb) | |||
63 | * softirqs always disables bh. | 64 | * softirqs always disables bh. |
64 | */ | 65 | */ |
65 | if (in_serving_softirq()) { | 66 | if (in_serving_softirq()) { |
67 | struct sock *sk = skb_to_full_sk(skb); | ||
68 | |||
66 | /* If there is an sock_cgroup_classid we'll use that. */ | 69 | /* If there is an sock_cgroup_classid we'll use that. */ |
67 | if (!skb->sk) | 70 | if (!sk || !sk_fullsock(sk)) |
68 | return 0; | 71 | return 0; |
69 | 72 | ||
70 | classid = sock_cgroup_classid(&skb->sk->sk_cgrp_data); | 73 | classid = sock_cgroup_classid(&sk->sk_cgrp_data); |
71 | } | 74 | } |
72 | 75 | ||
73 | return classid; | 76 | return classid; |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 295d291269e2..54c779416eec 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -101,6 +101,9 @@ void fib6_force_start_gc(struct net *net); | |||
101 | struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | 101 | struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, |
102 | const struct in6_addr *addr, bool anycast); | 102 | const struct in6_addr *addr, bool anycast); |
103 | 103 | ||
104 | struct rt6_info *ip6_dst_alloc(struct net *net, struct net_device *dev, | ||
105 | int flags); | ||
106 | |||
104 | /* | 107 | /* |
105 | * support functions for ND | 108 | * support functions for ND |
106 | * | 109 | * |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index d0aeb97aec5d..1be050ada8c5 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -959,6 +959,8 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
959 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); | 959 | int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); |
960 | int ip6_datagram_connect_v6_only(struct sock *sk, struct sockaddr *addr, | 960 | int ip6_datagram_connect_v6_only(struct sock *sk, struct sockaddr *addr, |
961 | int addr_len); | 961 | int addr_len); |
962 | int ip6_datagram_dst_update(struct sock *sk, bool fix_sk_saddr); | ||
963 | void ip6_datagram_release_cb(struct sock *sk); | ||
962 | 964 | ||
963 | int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, | 965 | int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, |
964 | int *addr_len); | 966 | int *addr_len); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0c09da34b67a..e385eb3076a1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1001,6 +1001,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
1001 | * flag indicates that the PN was verified for replay protection. | 1001 | * flag indicates that the PN was verified for replay protection. |
1002 | * Note that this flag is also currently only supported when a frame | 1002 | * Note that this flag is also currently only supported when a frame |
1003 | * is also decrypted (ie. @RX_FLAG_DECRYPTED must be set) | 1003 | * is also decrypted (ie. @RX_FLAG_DECRYPTED must be set) |
1004 | * @RX_FLAG_DUP_VALIDATED: The driver should set this flag if it did | ||
1005 | * de-duplication by itself. | ||
1004 | * @RX_FLAG_FAILED_FCS_CRC: Set this flag if the FCS check failed on | 1006 | * @RX_FLAG_FAILED_FCS_CRC: Set this flag if the FCS check failed on |
1005 | * the frame. | 1007 | * the frame. |
1006 | * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on | 1008 | * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on |
diff --git a/include/net/route.h b/include/net/route.h index 9b0a523bb428..6de665bf1750 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -209,6 +209,9 @@ unsigned int inet_addr_type_dev_table(struct net *net, | |||
209 | void ip_rt_multicast_event(struct in_device *); | 209 | void ip_rt_multicast_event(struct in_device *); |
210 | int ip_rt_ioctl(struct net *, unsigned int cmd, void __user *arg); | 210 | int ip_rt_ioctl(struct net *, unsigned int cmd, void __user *arg); |
211 | void ip_rt_get_source(u8 *src, struct sk_buff *skb, struct rtable *rt); | 211 | void ip_rt_get_source(u8 *src, struct sk_buff *skb, struct rtable *rt); |
212 | struct rtable *rt_dst_alloc(struct net_device *dev, | ||
213 | unsigned int flags, u16 type, | ||
214 | bool nopolicy, bool noxfrm, bool will_cache); | ||
212 | 215 | ||
213 | struct in_ifaddr; | 216 | struct in_ifaddr; |
214 | void fib_add_ifaddr(struct in_ifaddr *); | 217 | void fib_add_ifaddr(struct in_ifaddr *); |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 65521cfdcade..03fb33efcae2 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -386,11 +386,9 @@ static inline struct list_head *sctp_list_dequeue(struct list_head *list) | |||
386 | { | 386 | { |
387 | struct list_head *result = NULL; | 387 | struct list_head *result = NULL; |
388 | 388 | ||
389 | if (list->next != list) { | 389 | if (!list_empty(list)) { |
390 | result = list->next; | 390 | result = list->next; |
391 | list->next = result->next; | 391 | list_del_init(result); |
392 | list->next->prev = list; | ||
393 | INIT_LIST_HEAD(result); | ||
394 | } | 392 | } |
395 | return result; | 393 | return result; |
396 | } | 394 | } |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 6df1ce7a411c..5a404c354f4c 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -847,6 +847,11 @@ struct sctp_transport { | |||
847 | */ | 847 | */ |
848 | ktime_t last_time_heard; | 848 | ktime_t last_time_heard; |
849 | 849 | ||
850 | /* When was the last time that we sent a chunk using this | ||
851 | * transport? We use this to check for idle transports | ||
852 | */ | ||
853 | unsigned long last_time_sent; | ||
854 | |||
850 | /* Last time(in jiffies) when cwnd is reduced due to the congestion | 855 | /* Last time(in jiffies) when cwnd is reduced due to the congestion |
851 | * indication based on ECNE chunk. | 856 | * indication based on ECNE chunk. |
852 | */ | 857 | */ |
@@ -952,7 +957,8 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
952 | struct sctp_sock *); | 957 | struct sctp_sock *); |
953 | void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk); | 958 | void sctp_transport_pmtu(struct sctp_transport *, struct sock *sk); |
954 | void sctp_transport_free(struct sctp_transport *); | 959 | void sctp_transport_free(struct sctp_transport *); |
955 | void sctp_transport_reset_timers(struct sctp_transport *); | 960 | void sctp_transport_reset_t3_rtx(struct sctp_transport *); |
961 | void sctp_transport_reset_hb_timer(struct sctp_transport *); | ||
956 | int sctp_transport_hold(struct sctp_transport *); | 962 | int sctp_transport_hold(struct sctp_transport *); |
957 | void sctp_transport_put(struct sctp_transport *); | 963 | void sctp_transport_put(struct sctp_transport *); |
958 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 964 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
diff --git a/include/net/sock.h b/include/net/sock.h index 255d3e03727b..121ffc115c4f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -630,7 +630,11 @@ static inline void sk_add_node_rcu(struct sock *sk, struct hlist_head *list) | |||
630 | 630 | ||
631 | static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) | 631 | static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) |
632 | { | 632 | { |
633 | hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list); | 633 | if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport && |
634 | sk->sk_family == AF_INET6) | ||
635 | hlist_nulls_add_tail_rcu(&sk->sk_nulls_node, list); | ||
636 | else | ||
637 | hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list); | ||
634 | } | 638 | } |
635 | 639 | ||
636 | static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) | 640 | static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) |
diff --git a/include/net/switchdev.h b/include/net/switchdev.h index d451122e8404..51d77b2ce2b2 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h | |||
@@ -54,6 +54,8 @@ struct switchdev_attr { | |||
54 | struct net_device *orig_dev; | 54 | struct net_device *orig_dev; |
55 | enum switchdev_attr_id id; | 55 | enum switchdev_attr_id id; |
56 | u32 flags; | 56 | u32 flags; |
57 | void *complete_priv; | ||
58 | void (*complete)(struct net_device *dev, int err, void *priv); | ||
57 | union { | 59 | union { |
58 | struct netdev_phys_item_id ppid; /* PORT_PARENT_ID */ | 60 | struct netdev_phys_item_id ppid; /* PORT_PARENT_ID */ |
59 | u8 stp_state; /* PORT_STP_STATE */ | 61 | u8 stp_state; /* PORT_STP_STATE */ |
@@ -75,6 +77,8 @@ struct switchdev_obj { | |||
75 | struct net_device *orig_dev; | 77 | struct net_device *orig_dev; |
76 | enum switchdev_obj_id id; | 78 | enum switchdev_obj_id id; |
77 | u32 flags; | 79 | u32 flags; |
80 | void *complete_priv; | ||
81 | void (*complete)(struct net_device *dev, int err, void *priv); | ||
78 | }; | 82 | }; |
79 | 83 | ||
80 | /* SWITCHDEV_OBJ_ID_PORT_VLAN */ | 84 | /* SWITCHDEV_OBJ_ID_PORT_VLAN */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index b91370f61be6..6db10228113f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -552,6 +552,8 @@ void tcp_send_ack(struct sock *sk); | |||
552 | void tcp_send_delayed_ack(struct sock *sk); | 552 | void tcp_send_delayed_ack(struct sock *sk); |
553 | void tcp_send_loss_probe(struct sock *sk); | 553 | void tcp_send_loss_probe(struct sock *sk); |
554 | bool tcp_schedule_loss_probe(struct sock *sk); | 554 | bool tcp_schedule_loss_probe(struct sock *sk); |
555 | void tcp_skb_collapse_tstamp(struct sk_buff *skb, | ||
556 | const struct sk_buff *next_skb); | ||
555 | 557 | ||
556 | /* tcp_input.c */ | 558 | /* tcp_input.c */ |
557 | void tcp_resume_early_retransmit(struct sock *sk); | 559 | void tcp_resume_early_retransmit(struct sock *sk); |
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 73ed2e951c02..35437c779da8 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h | |||
@@ -252,7 +252,9 @@ static inline netdev_features_t vxlan_features_check(struct sk_buff *skb, | |||
252 | (skb->inner_protocol_type != ENCAP_TYPE_ETHER || | 252 | (skb->inner_protocol_type != ENCAP_TYPE_ETHER || |
253 | skb->inner_protocol != htons(ETH_P_TEB) || | 253 | skb->inner_protocol != htons(ETH_P_TEB) || |
254 | (skb_inner_mac_header(skb) - skb_transport_header(skb) != | 254 | (skb_inner_mac_header(skb) - skb_transport_header(skb) != |
255 | sizeof(struct udphdr) + sizeof(struct vxlanhdr)))) | 255 | sizeof(struct udphdr) + sizeof(struct vxlanhdr)) || |
256 | (skb->ip_summed != CHECKSUM_NONE && | ||
257 | !can_checksum_protocol(features, inner_eth_hdr(skb)->h_proto)))) | ||
256 | return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK); | 258 | return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK); |
257 | 259 | ||
258 | return features; | 260 | return features; |
diff --git a/include/rdma/ib.h b/include/rdma/ib.h index cf8f9e700e48..a6b93706b0fc 100644 --- a/include/rdma/ib.h +++ b/include/rdma/ib.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define _RDMA_IB_H | 34 | #define _RDMA_IB_H |
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/sched.h> | ||
37 | 38 | ||
38 | struct ib_addr { | 39 | struct ib_addr { |
39 | union { | 40 | union { |
@@ -86,4 +87,19 @@ struct sockaddr_ib { | |||
86 | __u64 sib_scope_id; | 87 | __u64 sib_scope_id; |
87 | }; | 88 | }; |
88 | 89 | ||
90 | /* | ||
91 | * The IB interfaces that use write() as bi-directional ioctl() are | ||
92 | * fundamentally unsafe, since there are lots of ways to trigger "write()" | ||
93 | * calls from various contexts with elevated privileges. That includes the | ||
94 | * traditional suid executable error message writes, but also various kernel | ||
95 | * interfaces that can write to file descriptors. | ||
96 | * | ||
97 | * This function provides protection for the legacy API by restricting the | ||
98 | * calling context. | ||
99 | */ | ||
100 | static inline bool ib_safe_file_access(struct file *filp) | ||
101 | { | ||
102 | return filp->f_cred == current_cred() && segment_eq(get_fs(), USER_DS); | ||
103 | } | ||
104 | |||
89 | #endif /* _RDMA_IB_H */ | 105 | #endif /* _RDMA_IB_H */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index c067019ed12a..74d79bde7075 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -516,6 +516,31 @@ static inline int scsi_device_tpgs(struct scsi_device *sdev) | |||
516 | return sdev->inquiry ? (sdev->inquiry[5] >> 4) & 0x3 : 0; | 516 | return sdev->inquiry ? (sdev->inquiry[5] >> 4) & 0x3 : 0; |
517 | } | 517 | } |
518 | 518 | ||
519 | /** | ||
520 | * scsi_device_supports_vpd - test if a device supports VPD pages | ||
521 | * @sdev: the &struct scsi_device to test | ||
522 | * | ||
523 | * If the 'try_vpd_pages' flag is set it takes precedence. | ||
524 | * Otherwise we will assume VPD pages are supported if the | ||
525 | * SCSI level is at least SPC-3 and 'skip_vpd_pages' is not set. | ||
526 | */ | ||
527 | static inline int scsi_device_supports_vpd(struct scsi_device *sdev) | ||
528 | { | ||
529 | /* Attempt VPD inquiry if the device blacklist explicitly calls | ||
530 | * for it. | ||
531 | */ | ||
532 | if (sdev->try_vpd_pages) | ||
533 | return 1; | ||
534 | /* | ||
535 | * Although VPD inquiries can go to SCSI-2 type devices, | ||
536 | * some USB ones crash on receiving them, and the pages | ||
537 | * we currently ask for are for SPC-3 and beyond | ||
538 | */ | ||
539 | if (sdev->scsi_level > SCSI_SPC_2 && !sdev->skip_vpd_pages) | ||
540 | return 1; | ||
541 | return 0; | ||
542 | } | ||
543 | |||
519 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ | 544 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ |
520 | MODULE_ALIAS("scsi:t-" __stringify(type) "*") | 545 | MODULE_ALIAS("scsi:t-" __stringify(type) "*") |
521 | #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x" | 546 | #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x" |
diff --git a/include/sound/hda_i915.h b/include/sound/hda_i915.h index fa341fcb5829..f5842bcd9c94 100644 --- a/include/sound/hda_i915.h +++ b/include/sound/hda_i915.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifdef CONFIG_SND_HDA_I915 | 9 | #ifdef CONFIG_SND_HDA_I915 |
10 | int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable); | 10 | int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable); |
11 | int snd_hdac_display_power(struct hdac_bus *bus, bool enable); | 11 | int snd_hdac_display_power(struct hdac_bus *bus, bool enable); |
12 | int snd_hdac_get_display_clk(struct hdac_bus *bus); | 12 | void snd_hdac_i915_set_bclk(struct hdac_bus *bus); |
13 | int snd_hdac_sync_audio_rate(struct hdac_bus *bus, hda_nid_t nid, int rate); | 13 | int snd_hdac_sync_audio_rate(struct hdac_bus *bus, hda_nid_t nid, int rate); |
14 | int snd_hdac_acomp_get_eld(struct hdac_bus *bus, hda_nid_t nid, | 14 | int snd_hdac_acomp_get_eld(struct hdac_bus *bus, hda_nid_t nid, |
15 | bool *audio_enabled, char *buffer, int max_bytes); | 15 | bool *audio_enabled, char *buffer, int max_bytes); |
@@ -25,9 +25,8 @@ static inline int snd_hdac_display_power(struct hdac_bus *bus, bool enable) | |||
25 | { | 25 | { |
26 | return 0; | 26 | return 0; |
27 | } | 27 | } |
28 | static inline int snd_hdac_get_display_clk(struct hdac_bus *bus) | 28 | static inline void snd_hdac_i915_set_bclk(struct hdac_bus *bus) |
29 | { | 29 | { |
30 | return 0; | ||
31 | } | 30 | } |
32 | static inline int snd_hdac_sync_audio_rate(struct hdac_bus *bus, hda_nid_t nid, | 31 | static inline int snd_hdac_sync_audio_rate(struct hdac_bus *bus, hda_nid_t nid, |
33 | int rate) | 32 | int rate) |
diff --git a/include/sound/hda_regmap.h b/include/sound/hda_regmap.h index 2767c55a641e..ca64f0f50b45 100644 --- a/include/sound/hda_regmap.h +++ b/include/sound/hda_regmap.h | |||
@@ -17,6 +17,8 @@ int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec, | |||
17 | unsigned int verb); | 17 | unsigned int verb); |
18 | int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg, | 18 | int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg, |
19 | unsigned int *val); | 19 | unsigned int *val); |
20 | int snd_hdac_regmap_read_raw_uncached(struct hdac_device *codec, | ||
21 | unsigned int reg, unsigned int *val); | ||
20 | int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg, | 22 | int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg, |
21 | unsigned int val); | 23 | unsigned int val); |
22 | int snd_hdac_regmap_update_raw(struct hdac_device *codec, unsigned int reg, | 24 | int snd_hdac_regmap_update_raw(struct hdac_device *codec, unsigned int reg, |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 685a51aa98cc..8ff6d40a294f 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -76,6 +76,7 @@ struct target_core_fabric_ops { | |||
76 | struct se_wwn *(*fabric_make_wwn)(struct target_fabric_configfs *, | 76 | struct se_wwn *(*fabric_make_wwn)(struct target_fabric_configfs *, |
77 | struct config_group *, const char *); | 77 | struct config_group *, const char *); |
78 | void (*fabric_drop_wwn)(struct se_wwn *); | 78 | void (*fabric_drop_wwn)(struct se_wwn *); |
79 | void (*add_wwn_groups)(struct se_wwn *); | ||
79 | struct se_portal_group *(*fabric_make_tpg)(struct se_wwn *, | 80 | struct se_portal_group *(*fabric_make_tpg)(struct se_wwn *, |
80 | struct config_group *, const char *); | 81 | struct config_group *, const char *); |
81 | void (*fabric_drop_tpg)(struct se_portal_group *); | 82 | void (*fabric_drop_tpg)(struct se_portal_group *); |
@@ -87,7 +88,6 @@ struct target_core_fabric_ops { | |||
87 | struct config_group *, const char *); | 88 | struct config_group *, const char *); |
88 | void (*fabric_drop_np)(struct se_tpg_np *); | 89 | void (*fabric_drop_np)(struct se_tpg_np *); |
89 | int (*fabric_init_nodeacl)(struct se_node_acl *, const char *); | 90 | int (*fabric_init_nodeacl)(struct se_node_acl *, const char *); |
90 | void (*fabric_cleanup_nodeacl)(struct se_node_acl *); | ||
91 | 91 | ||
92 | struct configfs_attribute **tfc_discovery_attrs; | 92 | struct configfs_attribute **tfc_discovery_attrs; |
93 | struct configfs_attribute **tfc_wwn_attrs; | 93 | struct configfs_attribute **tfc_wwn_attrs; |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 677807f29a1c..e90e82ad6875 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h | |||
@@ -23,7 +23,7 @@ struct map_lookup; | |||
23 | struct extent_buffer; | 23 | struct extent_buffer; |
24 | struct btrfs_work; | 24 | struct btrfs_work; |
25 | struct __btrfs_workqueue; | 25 | struct __btrfs_workqueue; |
26 | struct btrfs_qgroup_operation; | 26 | struct btrfs_qgroup_extent_record; |
27 | 27 | ||
28 | #define show_ref_type(type) \ | 28 | #define show_ref_type(type) \ |
29 | __print_symbolic(type, \ | 29 | __print_symbolic(type, \ |
@@ -1231,6 +1231,93 @@ DEFINE_EVENT(btrfs__qgroup_delayed_ref, btrfs_qgroup_free_delayed_ref, | |||
1231 | 1231 | ||
1232 | TP_ARGS(ref_root, reserved) | 1232 | TP_ARGS(ref_root, reserved) |
1233 | ); | 1233 | ); |
1234 | |||
1235 | DECLARE_EVENT_CLASS(btrfs_qgroup_extent, | ||
1236 | TP_PROTO(struct btrfs_qgroup_extent_record *rec), | ||
1237 | |||
1238 | TP_ARGS(rec), | ||
1239 | |||
1240 | TP_STRUCT__entry( | ||
1241 | __field( u64, bytenr ) | ||
1242 | __field( u64, num_bytes ) | ||
1243 | ), | ||
1244 | |||
1245 | TP_fast_assign( | ||
1246 | __entry->bytenr = rec->bytenr, | ||
1247 | __entry->num_bytes = rec->num_bytes; | ||
1248 | ), | ||
1249 | |||
1250 | TP_printk("bytenr = %llu, num_bytes = %llu", | ||
1251 | (unsigned long long)__entry->bytenr, | ||
1252 | (unsigned long long)__entry->num_bytes) | ||
1253 | ); | ||
1254 | |||
1255 | DEFINE_EVENT(btrfs_qgroup_extent, btrfs_qgroup_account_extents, | ||
1256 | |||
1257 | TP_PROTO(struct btrfs_qgroup_extent_record *rec), | ||
1258 | |||
1259 | TP_ARGS(rec) | ||
1260 | ); | ||
1261 | |||
1262 | DEFINE_EVENT(btrfs_qgroup_extent, btrfs_qgroup_insert_dirty_extent, | ||
1263 | |||
1264 | TP_PROTO(struct btrfs_qgroup_extent_record *rec), | ||
1265 | |||
1266 | TP_ARGS(rec) | ||
1267 | ); | ||
1268 | |||
1269 | TRACE_EVENT(btrfs_qgroup_account_extent, | ||
1270 | |||
1271 | TP_PROTO(u64 bytenr, u64 num_bytes, u64 nr_old_roots, u64 nr_new_roots), | ||
1272 | |||
1273 | TP_ARGS(bytenr, num_bytes, nr_old_roots, nr_new_roots), | ||
1274 | |||
1275 | TP_STRUCT__entry( | ||
1276 | __field( u64, bytenr ) | ||
1277 | __field( u64, num_bytes ) | ||
1278 | __field( u64, nr_old_roots ) | ||
1279 | __field( u64, nr_new_roots ) | ||
1280 | ), | ||
1281 | |||
1282 | TP_fast_assign( | ||
1283 | __entry->bytenr = bytenr; | ||
1284 | __entry->num_bytes = num_bytes; | ||
1285 | __entry->nr_old_roots = nr_old_roots; | ||
1286 | __entry->nr_new_roots = nr_new_roots; | ||
1287 | ), | ||
1288 | |||
1289 | TP_printk("bytenr = %llu, num_bytes = %llu, nr_old_roots = %llu, " | ||
1290 | "nr_new_roots = %llu", | ||
1291 | __entry->bytenr, | ||
1292 | __entry->num_bytes, | ||
1293 | __entry->nr_old_roots, | ||
1294 | __entry->nr_new_roots) | ||
1295 | ); | ||
1296 | |||
1297 | TRACE_EVENT(qgroup_update_counters, | ||
1298 | |||
1299 | TP_PROTO(u64 qgid, u64 cur_old_count, u64 cur_new_count), | ||
1300 | |||
1301 | TP_ARGS(qgid, cur_old_count, cur_new_count), | ||
1302 | |||
1303 | TP_STRUCT__entry( | ||
1304 | __field( u64, qgid ) | ||
1305 | __field( u64, cur_old_count ) | ||
1306 | __field( u64, cur_new_count ) | ||
1307 | ), | ||
1308 | |||
1309 | TP_fast_assign( | ||
1310 | __entry->qgid = qgid; | ||
1311 | __entry->cur_old_count = cur_old_count; | ||
1312 | __entry->cur_new_count = cur_new_count; | ||
1313 | ), | ||
1314 | |||
1315 | TP_printk("qgid = %llu, cur_old_count = %llu, cur_new_count = %llu", | ||
1316 | __entry->qgid, | ||
1317 | __entry->cur_old_count, | ||
1318 | __entry->cur_new_count) | ||
1319 | ); | ||
1320 | |||
1234 | #endif /* _TRACE_BTRFS_H */ | 1321 | #endif /* _TRACE_BTRFS_H */ |
1235 | 1322 | ||
1236 | /* This part must be outside protection */ | 1323 | /* This part must be outside protection */ |
diff --git a/include/trace/events/page_isolation.h b/include/trace/events/page_isolation.h index 6fb644029c80..8738a78e6bf4 100644 --- a/include/trace/events/page_isolation.h +++ b/include/trace/events/page_isolation.h | |||
@@ -29,7 +29,7 @@ TRACE_EVENT(test_pages_isolated, | |||
29 | 29 | ||
30 | TP_printk("start_pfn=0x%lx end_pfn=0x%lx fin_pfn=0x%lx ret=%s", | 30 | TP_printk("start_pfn=0x%lx end_pfn=0x%lx fin_pfn=0x%lx ret=%s", |
31 | __entry->start_pfn, __entry->end_pfn, __entry->fin_pfn, | 31 | __entry->start_pfn, __entry->end_pfn, __entry->fin_pfn, |
32 | __entry->end_pfn == __entry->fin_pfn ? "success" : "fail") | 32 | __entry->end_pfn <= __entry->fin_pfn ? "success" : "fail") |
33 | ); | 33 | ); |
34 | 34 | ||
35 | #endif /* _TRACE_PAGE_ISOLATION_H */ | 35 | #endif /* _TRACE_PAGE_ISOLATION_H */ |
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 2622b33fb2ec..c51afb71bfab 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h | |||
@@ -717,9 +717,13 @@ __SYSCALL(__NR_membarrier, sys_membarrier) | |||
717 | __SYSCALL(__NR_mlock2, sys_mlock2) | 717 | __SYSCALL(__NR_mlock2, sys_mlock2) |
718 | #define __NR_copy_file_range 285 | 718 | #define __NR_copy_file_range 285 |
719 | __SYSCALL(__NR_copy_file_range, sys_copy_file_range) | 719 | __SYSCALL(__NR_copy_file_range, sys_copy_file_range) |
720 | #define __NR_preadv2 286 | ||
721 | __SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2) | ||
722 | #define __NR_pwritev2 287 | ||
723 | __SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2) | ||
720 | 724 | ||
721 | #undef __NR_syscalls | 725 | #undef __NR_syscalls |
722 | #define __NR_syscalls 286 | 726 | #define __NR_syscalls 288 |
723 | 727 | ||
724 | /* | 728 | /* |
725 | * All syscalls below here should go away really, | 729 | * All syscalls below here should go away really, |
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index b71fd0b5cbad..813ffb2e22c9 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
@@ -96,6 +96,7 @@ header-y += cyclades.h | |||
96 | header-y += cycx_cfm.h | 96 | header-y += cycx_cfm.h |
97 | header-y += dcbnl.h | 97 | header-y += dcbnl.h |
98 | header-y += dccp.h | 98 | header-y += dccp.h |
99 | header-y += devlink.h | ||
99 | header-y += dlmconstants.h | 100 | header-y += dlmconstants.h |
100 | header-y += dlm_device.h | 101 | header-y += dlm_device.h |
101 | header-y += dlm.h | 102 | header-y += dlm.h |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 924f537183fd..23917bb47bf3 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -375,6 +375,7 @@ struct bpf_tunnel_key { | |||
375 | }; | 375 | }; |
376 | __u8 tunnel_tos; | 376 | __u8 tunnel_tos; |
377 | __u8 tunnel_ttl; | 377 | __u8 tunnel_ttl; |
378 | __u16 tunnel_ext; | ||
378 | __u32 tunnel_label; | 379 | __u32 tunnel_label; |
379 | }; | 380 | }; |
380 | 381 | ||
diff --git a/include/uapi/linux/if_macsec.h b/include/uapi/linux/if_macsec.h index 26b0d1e3e3e7..4c58d9917aa4 100644 --- a/include/uapi/linux/if_macsec.h +++ b/include/uapi/linux/if_macsec.h | |||
@@ -19,8 +19,8 @@ | |||
19 | 19 | ||
20 | #define MACSEC_MAX_KEY_LEN 128 | 20 | #define MACSEC_MAX_KEY_LEN 128 |
21 | 21 | ||
22 | #define DEFAULT_CIPHER_ID 0x0080020001000001ULL | 22 | #define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL |
23 | #define DEFAULT_CIPHER_ALT 0x0080C20001000001ULL | 23 | #define MACSEC_DEFAULT_CIPHER_ALT 0x0080C20001000001ULL |
24 | 24 | ||
25 | #define MACSEC_MIN_ICV_LEN 8 | 25 | #define MACSEC_MIN_ICV_LEN 8 |
26 | #define MACSEC_MAX_ICV_LEN 32 | 26 | #define MACSEC_MAX_ICV_LEN 32 |
diff --git a/include/linux/rio_mport_cdev.h b/include/uapi/linux/rio_mport_cdev.h index b65d19df76d2..5796bf1d06ad 100644 --- a/include/linux/rio_mport_cdev.h +++ b/include/uapi/linux/rio_mport_cdev.h | |||
@@ -39,16 +39,16 @@ | |||
39 | #ifndef _RIO_MPORT_CDEV_H_ | 39 | #ifndef _RIO_MPORT_CDEV_H_ |
40 | #define _RIO_MPORT_CDEV_H_ | 40 | #define _RIO_MPORT_CDEV_H_ |
41 | 41 | ||
42 | #ifndef __user | 42 | #include <linux/ioctl.h> |
43 | #define __user | 43 | #include <linux/types.h> |
44 | #endif | ||
45 | 44 | ||
46 | struct rio_mport_maint_io { | 45 | struct rio_mport_maint_io { |
47 | uint32_t rioid; /* destID of remote device */ | 46 | __u16 rioid; /* destID of remote device */ |
48 | uint32_t hopcount; /* hopcount to remote device */ | 47 | __u8 hopcount; /* hopcount to remote device */ |
49 | uint32_t offset; /* offset in register space */ | 48 | __u8 pad0[5]; |
50 | size_t length; /* length in bytes */ | 49 | __u32 offset; /* offset in register space */ |
51 | void __user *buffer; /* data buffer */ | 50 | __u32 length; /* length in bytes */ |
51 | __u64 buffer; /* pointer to data buffer */ | ||
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -66,22 +66,23 @@ struct rio_mport_maint_io { | |||
66 | #define RIO_CAP_MAP_INB (1 << 7) | 66 | #define RIO_CAP_MAP_INB (1 << 7) |
67 | 67 | ||
68 | struct rio_mport_properties { | 68 | struct rio_mport_properties { |
69 | uint16_t hdid; | 69 | __u16 hdid; |
70 | uint8_t id; /* Physical port ID */ | 70 | __u8 id; /* Physical port ID */ |
71 | uint8_t index; | 71 | __u8 index; |
72 | uint32_t flags; | 72 | __u32 flags; |
73 | uint32_t sys_size; /* Default addressing size */ | 73 | __u32 sys_size; /* Default addressing size */ |
74 | uint8_t port_ok; | 74 | __u8 port_ok; |
75 | uint8_t link_speed; | 75 | __u8 link_speed; |
76 | uint8_t link_width; | 76 | __u8 link_width; |
77 | uint32_t dma_max_sge; | 77 | __u8 pad0; |
78 | uint32_t dma_max_size; | 78 | __u32 dma_max_sge; |
79 | uint32_t dma_align; | 79 | __u32 dma_max_size; |
80 | uint32_t transfer_mode; /* Default transfer mode */ | 80 | __u32 dma_align; |
81 | uint32_t cap_sys_size; /* Capable system sizes */ | 81 | __u32 transfer_mode; /* Default transfer mode */ |
82 | uint32_t cap_addr_size; /* Capable addressing sizes */ | 82 | __u32 cap_sys_size; /* Capable system sizes */ |
83 | uint32_t cap_transfer_mode; /* Capable transfer modes */ | 83 | __u32 cap_addr_size; /* Capable addressing sizes */ |
84 | uint32_t cap_mport; /* Mport capabilities */ | 84 | __u32 cap_transfer_mode; /* Capable transfer modes */ |
85 | __u32 cap_mport; /* Mport capabilities */ | ||
85 | }; | 86 | }; |
86 | 87 | ||
87 | /* | 88 | /* |
@@ -93,54 +94,57 @@ struct rio_mport_properties { | |||
93 | #define RIO_PORTWRITE (1 << 1) | 94 | #define RIO_PORTWRITE (1 << 1) |
94 | 95 | ||
95 | struct rio_doorbell { | 96 | struct rio_doorbell { |
96 | uint32_t rioid; | 97 | __u16 rioid; |
97 | uint16_t payload; | 98 | __u16 payload; |
98 | }; | 99 | }; |
99 | 100 | ||
100 | struct rio_doorbell_filter { | 101 | struct rio_doorbell_filter { |
101 | uint32_t rioid; /* 0xffffffff to match all ids */ | 102 | __u16 rioid; /* Use RIO_INVALID_DESTID to match all ids */ |
102 | uint16_t low; | 103 | __u16 low; |
103 | uint16_t high; | 104 | __u16 high; |
105 | __u16 pad0; | ||
104 | }; | 106 | }; |
105 | 107 | ||
106 | 108 | ||
107 | struct rio_portwrite { | 109 | struct rio_portwrite { |
108 | uint32_t payload[16]; | 110 | __u32 payload[16]; |
109 | }; | 111 | }; |
110 | 112 | ||
111 | struct rio_pw_filter { | 113 | struct rio_pw_filter { |
112 | uint32_t mask; | 114 | __u32 mask; |
113 | uint32_t low; | 115 | __u32 low; |
114 | uint32_t high; | 116 | __u32 high; |
117 | __u32 pad0; | ||
115 | }; | 118 | }; |
116 | 119 | ||
117 | /* RapidIO base address for inbound requests set to value defined below | 120 | /* RapidIO base address for inbound requests set to value defined below |
118 | * indicates that no specific RIO-to-local address translation is requested | 121 | * indicates that no specific RIO-to-local address translation is requested |
119 | * and driver should use direct (one-to-one) address mapping. | 122 | * and driver should use direct (one-to-one) address mapping. |
120 | */ | 123 | */ |
121 | #define RIO_MAP_ANY_ADDR (uint64_t)(~((uint64_t) 0)) | 124 | #define RIO_MAP_ANY_ADDR (__u64)(~((__u64) 0)) |
122 | 125 | ||
123 | struct rio_mmap { | 126 | struct rio_mmap { |
124 | uint32_t rioid; | 127 | __u16 rioid; |
125 | uint64_t rio_addr; | 128 | __u16 pad0[3]; |
126 | uint64_t length; | 129 | __u64 rio_addr; |
127 | uint64_t handle; | 130 | __u64 length; |
128 | void *address; | 131 | __u64 handle; |
132 | __u64 address; | ||
129 | }; | 133 | }; |
130 | 134 | ||
131 | struct rio_dma_mem { | 135 | struct rio_dma_mem { |
132 | uint64_t length; /* length of DMA memory */ | 136 | __u64 length; /* length of DMA memory */ |
133 | uint64_t dma_handle; /* handle associated with this memory */ | 137 | __u64 dma_handle; /* handle associated with this memory */ |
134 | void *buffer; /* pointer to this memory */ | 138 | __u64 address; |
135 | }; | 139 | }; |
136 | 140 | ||
137 | |||
138 | struct rio_event { | 141 | struct rio_event { |
139 | unsigned int header; /* event type RIO_DOORBELL or RIO_PORTWRITE */ | 142 | __u32 header; /* event type RIO_DOORBELL or RIO_PORTWRITE */ |
140 | union { | 143 | union { |
141 | struct rio_doorbell doorbell; /* header for RIO_DOORBELL */ | 144 | struct rio_doorbell doorbell; /* header for RIO_DOORBELL */ |
142 | struct rio_portwrite portwrite; /* header for RIO_PORTWRITE */ | 145 | struct rio_portwrite portwrite; /* header for RIO_PORTWRITE */ |
143 | } u; | 146 | } u; |
147 | __u32 pad0; | ||
144 | }; | 148 | }; |
145 | 149 | ||
146 | enum rio_transfer_sync { | 150 | enum rio_transfer_sync { |
@@ -184,35 +188,37 @@ enum rio_exchange { | |||
184 | }; | 188 | }; |
185 | 189 | ||
186 | struct rio_transfer_io { | 190 | struct rio_transfer_io { |
187 | uint32_t rioid; /* Target destID */ | 191 | __u64 rio_addr; /* Address in target's RIO mem space */ |
188 | uint64_t rio_addr; /* Address in target's RIO mem space */ | 192 | __u64 loc_addr; |
189 | enum rio_exchange method; /* Data exchange method */ | 193 | __u64 handle; |
190 | void __user *loc_addr; | 194 | __u64 offset; /* Offset in buffer */ |
191 | uint64_t handle; | 195 | __u64 length; /* Length in bytes */ |
192 | uint64_t offset; /* Offset in buffer */ | 196 | __u16 rioid; /* Target destID */ |
193 | uint64_t length; /* Length in bytes */ | 197 | __u16 method; /* Data exchange method, one of rio_exchange enum */ |
194 | uint32_t completion_code; /* Completion code for this transfer */ | 198 | __u32 completion_code; /* Completion code for this transfer */ |
195 | }; | 199 | }; |
196 | 200 | ||
197 | struct rio_transaction { | 201 | struct rio_transaction { |
198 | uint32_t transfer_mode; /* Data transfer mode */ | 202 | __u64 block; /* Pointer to array of <count> transfers */ |
199 | enum rio_transfer_sync sync; /* Synchronization method */ | 203 | __u32 count; /* Number of transfers */ |
200 | enum rio_transfer_dir dir; /* Transfer direction */ | 204 | __u32 transfer_mode; /* Data transfer mode */ |
201 | size_t count; /* Number of transfers */ | 205 | __u16 sync; /* Synch method, one of rio_transfer_sync enum */ |
202 | struct rio_transfer_io __user *block; /* Array of <count> transfers */ | 206 | __u16 dir; /* Transfer direction, one of rio_transfer_dir enum */ |
207 | __u32 pad0; | ||
203 | }; | 208 | }; |
204 | 209 | ||
205 | struct rio_async_tx_wait { | 210 | struct rio_async_tx_wait { |
206 | uint32_t token; /* DMA transaction ID token */ | 211 | __u32 token; /* DMA transaction ID token */ |
207 | uint32_t timeout; /* Wait timeout in msec, if 0 use default TO */ | 212 | __u32 timeout; /* Wait timeout in msec, if 0 use default TO */ |
208 | }; | 213 | }; |
209 | 214 | ||
210 | #define RIO_MAX_DEVNAME_SZ 20 | 215 | #define RIO_MAX_DEVNAME_SZ 20 |
211 | 216 | ||
212 | struct rio_rdev_info { | 217 | struct rio_rdev_info { |
213 | uint32_t destid; | 218 | __u16 destid; |
214 | uint8_t hopcount; | 219 | __u8 hopcount; |
215 | uint32_t comptag; | 220 | __u8 pad0; |
221 | __u32 comptag; | ||
216 | char name[RIO_MAX_DEVNAME_SZ + 1]; | 222 | char name[RIO_MAX_DEVNAME_SZ + 1]; |
217 | }; | 223 | }; |
218 | 224 | ||
@@ -220,11 +226,11 @@ struct rio_rdev_info { | |||
220 | #define RIO_MPORT_DRV_MAGIC 'm' | 226 | #define RIO_MPORT_DRV_MAGIC 'm' |
221 | 227 | ||
222 | #define RIO_MPORT_MAINT_HDID_SET \ | 228 | #define RIO_MPORT_MAINT_HDID_SET \ |
223 | _IOW(RIO_MPORT_DRV_MAGIC, 1, uint16_t) | 229 | _IOW(RIO_MPORT_DRV_MAGIC, 1, __u16) |
224 | #define RIO_MPORT_MAINT_COMPTAG_SET \ | 230 | #define RIO_MPORT_MAINT_COMPTAG_SET \ |
225 | _IOW(RIO_MPORT_DRV_MAGIC, 2, uint32_t) | 231 | _IOW(RIO_MPORT_DRV_MAGIC, 2, __u32) |
226 | #define RIO_MPORT_MAINT_PORT_IDX_GET \ | 232 | #define RIO_MPORT_MAINT_PORT_IDX_GET \ |
227 | _IOR(RIO_MPORT_DRV_MAGIC, 3, uint32_t) | 233 | _IOR(RIO_MPORT_DRV_MAGIC, 3, __u32) |
228 | #define RIO_MPORT_GET_PROPERTIES \ | 234 | #define RIO_MPORT_GET_PROPERTIES \ |
229 | _IOR(RIO_MPORT_DRV_MAGIC, 4, struct rio_mport_properties) | 235 | _IOR(RIO_MPORT_DRV_MAGIC, 4, struct rio_mport_properties) |
230 | #define RIO_MPORT_MAINT_READ_LOCAL \ | 236 | #define RIO_MPORT_MAINT_READ_LOCAL \ |
@@ -244,9 +250,9 @@ struct rio_rdev_info { | |||
244 | #define RIO_DISABLE_PORTWRITE_RANGE \ | 250 | #define RIO_DISABLE_PORTWRITE_RANGE \ |
245 | _IOW(RIO_MPORT_DRV_MAGIC, 12, struct rio_pw_filter) | 251 | _IOW(RIO_MPORT_DRV_MAGIC, 12, struct rio_pw_filter) |
246 | #define RIO_SET_EVENT_MASK \ | 252 | #define RIO_SET_EVENT_MASK \ |
247 | _IOW(RIO_MPORT_DRV_MAGIC, 13, unsigned int) | 253 | _IOW(RIO_MPORT_DRV_MAGIC, 13, __u32) |
248 | #define RIO_GET_EVENT_MASK \ | 254 | #define RIO_GET_EVENT_MASK \ |
249 | _IOR(RIO_MPORT_DRV_MAGIC, 14, unsigned int) | 255 | _IOR(RIO_MPORT_DRV_MAGIC, 14, __u32) |
250 | #define RIO_MAP_OUTBOUND \ | 256 | #define RIO_MAP_OUTBOUND \ |
251 | _IOWR(RIO_MPORT_DRV_MAGIC, 15, struct rio_mmap) | 257 | _IOWR(RIO_MPORT_DRV_MAGIC, 15, struct rio_mmap) |
252 | #define RIO_UNMAP_OUTBOUND \ | 258 | #define RIO_UNMAP_OUTBOUND \ |
@@ -254,11 +260,11 @@ struct rio_rdev_info { | |||
254 | #define RIO_MAP_INBOUND \ | 260 | #define RIO_MAP_INBOUND \ |
255 | _IOWR(RIO_MPORT_DRV_MAGIC, 17, struct rio_mmap) | 261 | _IOWR(RIO_MPORT_DRV_MAGIC, 17, struct rio_mmap) |
256 | #define RIO_UNMAP_INBOUND \ | 262 | #define RIO_UNMAP_INBOUND \ |
257 | _IOW(RIO_MPORT_DRV_MAGIC, 18, uint64_t) | 263 | _IOW(RIO_MPORT_DRV_MAGIC, 18, __u64) |
258 | #define RIO_ALLOC_DMA \ | 264 | #define RIO_ALLOC_DMA \ |
259 | _IOWR(RIO_MPORT_DRV_MAGIC, 19, struct rio_dma_mem) | 265 | _IOWR(RIO_MPORT_DRV_MAGIC, 19, struct rio_dma_mem) |
260 | #define RIO_FREE_DMA \ | 266 | #define RIO_FREE_DMA \ |
261 | _IOW(RIO_MPORT_DRV_MAGIC, 20, uint64_t) | 267 | _IOW(RIO_MPORT_DRV_MAGIC, 20, __u64) |
262 | #define RIO_TRANSFER \ | 268 | #define RIO_TRANSFER \ |
263 | _IOWR(RIO_MPORT_DRV_MAGIC, 21, struct rio_transaction) | 269 | _IOWR(RIO_MPORT_DRV_MAGIC, 21, struct rio_transaction) |
264 | #define RIO_WAIT_FOR_ASYNC \ | 270 | #define RIO_WAIT_FOR_ASYNC \ |
diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h index aa9f10428743..621fa8ac4425 100644 --- a/include/uapi/linux/stddef.h +++ b/include/uapi/linux/stddef.h | |||
@@ -1 +1,5 @@ | |||
1 | #include <linux/compiler.h> | 1 | #include <linux/compiler.h> |
2 | |||
3 | #ifndef __always_inline | ||
4 | #define __always_inline inline | ||
5 | #endif | ||
diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h index 3f10e5317b46..8f3a8f606fd9 100644 --- a/include/uapi/linux/swab.h +++ b/include/uapi/linux/swab.h | |||
@@ -45,9 +45,7 @@ | |||
45 | 45 | ||
46 | static inline __attribute_const__ __u16 __fswab16(__u16 val) | 46 | static inline __attribute_const__ __u16 __fswab16(__u16 val) |
47 | { | 47 | { |
48 | #ifdef __HAVE_BUILTIN_BSWAP16__ | 48 | #if defined (__arch_swab16) |
49 | return __builtin_bswap16(val); | ||
50 | #elif defined (__arch_swab16) | ||
51 | return __arch_swab16(val); | 49 | return __arch_swab16(val); |
52 | #else | 50 | #else |
53 | return ___constant_swab16(val); | 51 | return ___constant_swab16(val); |
@@ -56,9 +54,7 @@ static inline __attribute_const__ __u16 __fswab16(__u16 val) | |||
56 | 54 | ||
57 | static inline __attribute_const__ __u32 __fswab32(__u32 val) | 55 | static inline __attribute_const__ __u32 __fswab32(__u32 val) |
58 | { | 56 | { |
59 | #ifdef __HAVE_BUILTIN_BSWAP32__ | 57 | #if defined(__arch_swab32) |
60 | return __builtin_bswap32(val); | ||
61 | #elif defined(__arch_swab32) | ||
62 | return __arch_swab32(val); | 58 | return __arch_swab32(val); |
63 | #else | 59 | #else |
64 | return ___constant_swab32(val); | 60 | return ___constant_swab32(val); |
@@ -67,9 +63,7 @@ static inline __attribute_const__ __u32 __fswab32(__u32 val) | |||
67 | 63 | ||
68 | static inline __attribute_const__ __u64 __fswab64(__u64 val) | 64 | static inline __attribute_const__ __u64 __fswab64(__u64 val) |
69 | { | 65 | { |
70 | #ifdef __HAVE_BUILTIN_BSWAP64__ | 66 | #if defined (__arch_swab64) |
71 | return __builtin_bswap64(val); | ||
72 | #elif defined (__arch_swab64) | ||
73 | return __arch_swab64(val); | 67 | return __arch_swab64(val); |
74 | #elif defined(__SWAB_64_THRU_32__) | 68 | #elif defined(__SWAB_64_THRU_32__) |
75 | __u32 h = val >> 32; | 69 | __u32 h = val >> 32; |
@@ -102,28 +96,40 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) | |||
102 | * __swab16 - return a byteswapped 16-bit value | 96 | * __swab16 - return a byteswapped 16-bit value |
103 | * @x: value to byteswap | 97 | * @x: value to byteswap |
104 | */ | 98 | */ |
99 | #ifdef __HAVE_BUILTIN_BSWAP16__ | ||
100 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) | ||
101 | #else | ||
105 | #define __swab16(x) \ | 102 | #define __swab16(x) \ |
106 | (__builtin_constant_p((__u16)(x)) ? \ | 103 | (__builtin_constant_p((__u16)(x)) ? \ |
107 | ___constant_swab16(x) : \ | 104 | ___constant_swab16(x) : \ |
108 | __fswab16(x)) | 105 | __fswab16(x)) |
106 | #endif | ||
109 | 107 | ||
110 | /** | 108 | /** |
111 | * __swab32 - return a byteswapped 32-bit value | 109 | * __swab32 - return a byteswapped 32-bit value |
112 | * @x: value to byteswap | 110 | * @x: value to byteswap |
113 | */ | 111 | */ |
112 | #ifdef __HAVE_BUILTIN_BSWAP32__ | ||
113 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ||
114 | #else | ||
114 | #define __swab32(x) \ | 115 | #define __swab32(x) \ |
115 | (__builtin_constant_p((__u32)(x)) ? \ | 116 | (__builtin_constant_p((__u32)(x)) ? \ |
116 | ___constant_swab32(x) : \ | 117 | ___constant_swab32(x) : \ |
117 | __fswab32(x)) | 118 | __fswab32(x)) |
119 | #endif | ||
118 | 120 | ||
119 | /** | 121 | /** |
120 | * __swab64 - return a byteswapped 64-bit value | 122 | * __swab64 - return a byteswapped 64-bit value |
121 | * @x: value to byteswap | 123 | * @x: value to byteswap |
122 | */ | 124 | */ |
125 | #ifdef __HAVE_BUILTIN_BSWAP64__ | ||
126 | #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x)) | ||
127 | #else | ||
123 | #define __swab64(x) \ | 128 | #define __swab64(x) \ |
124 | (__builtin_constant_p((__u64)(x)) ? \ | 129 | (__builtin_constant_p((__u64)(x)) ? \ |
125 | ___constant_swab64(x) : \ | 130 | ___constant_swab64(x) : \ |
126 | __fswab64(x)) | 131 | __fswab64(x)) |
132 | #endif | ||
127 | 133 | ||
128 | /** | 134 | /** |
129 | * __swahw32 - return a word-swapped 32-bit value | 135 | * __swahw32 - return a word-swapped 32-bit value |
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 06d6c6228a7a..d5ce71607972 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h | |||
@@ -899,7 +899,7 @@ struct usb_ssp_cap_descriptor { | |||
899 | __le32 bmAttributes; | 899 | __le32 bmAttributes; |
900 | #define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) /* sublink speed entries */ | 900 | #define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0) /* sublink speed entries */ |
901 | #define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) /* speed ID entries */ | 901 | #define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5) /* speed ID entries */ |
902 | __u16 wFunctionalitySupport; | 902 | __le16 wFunctionalitySupport; |
903 | #define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf) | 903 | #define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf) |
904 | #define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8) | 904 | #define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8) |
905 | #define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12) | 905 | #define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12) |
diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h index c039f1d68a09..086168e18ca8 100644 --- a/include/uapi/linux/v4l2-dv-timings.h +++ b/include/uapi/linux/v4l2-dv-timings.h | |||
@@ -183,7 +183,8 @@ | |||
183 | 183 | ||
184 | #define V4L2_DV_BT_CEA_3840X2160P24 { \ | 184 | #define V4L2_DV_BT_CEA_3840X2160P24 { \ |
185 | .type = V4L2_DV_BT_656_1120, \ | 185 | .type = V4L2_DV_BT_656_1120, \ |
186 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 186 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, \ |
187 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
187 | 297000000, 1276, 88, 296, 8, 10, 72, 0, 0, 0, \ | 188 | 297000000, 1276, 88, 296, 8, 10, 72, 0, 0, 0, \ |
188 | V4L2_DV_BT_STD_CEA861, \ | 189 | V4L2_DV_BT_STD_CEA861, \ |
189 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ | 190 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ |
@@ -191,14 +192,16 @@ | |||
191 | 192 | ||
192 | #define V4L2_DV_BT_CEA_3840X2160P25 { \ | 193 | #define V4L2_DV_BT_CEA_3840X2160P25 { \ |
193 | .type = V4L2_DV_BT_656_1120, \ | 194 | .type = V4L2_DV_BT_656_1120, \ |
194 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 195 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, \ |
196 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
195 | 297000000, 1056, 88, 296, 8, 10, 72, 0, 0, 0, \ | 197 | 297000000, 1056, 88, 296, 8, 10, 72, 0, 0, 0, \ |
196 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ | 198 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ |
197 | } | 199 | } |
198 | 200 | ||
199 | #define V4L2_DV_BT_CEA_3840X2160P30 { \ | 201 | #define V4L2_DV_BT_CEA_3840X2160P30 { \ |
200 | .type = V4L2_DV_BT_656_1120, \ | 202 | .type = V4L2_DV_BT_656_1120, \ |
201 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 203 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, \ |
204 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
202 | 297000000, 176, 88, 296, 8, 10, 72, 0, 0, 0, \ | 205 | 297000000, 176, 88, 296, 8, 10, 72, 0, 0, 0, \ |
203 | V4L2_DV_BT_STD_CEA861, \ | 206 | V4L2_DV_BT_STD_CEA861, \ |
204 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ | 207 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ |
@@ -206,14 +209,16 @@ | |||
206 | 209 | ||
207 | #define V4L2_DV_BT_CEA_3840X2160P50 { \ | 210 | #define V4L2_DV_BT_CEA_3840X2160P50 { \ |
208 | .type = V4L2_DV_BT_656_1120, \ | 211 | .type = V4L2_DV_BT_656_1120, \ |
209 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 212 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, \ |
213 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
210 | 594000000, 1056, 88, 296, 8, 10, 72, 0, 0, 0, \ | 214 | 594000000, 1056, 88, 296, 8, 10, 72, 0, 0, 0, \ |
211 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ | 215 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ |
212 | } | 216 | } |
213 | 217 | ||
214 | #define V4L2_DV_BT_CEA_3840X2160P60 { \ | 218 | #define V4L2_DV_BT_CEA_3840X2160P60 { \ |
215 | .type = V4L2_DV_BT_656_1120, \ | 219 | .type = V4L2_DV_BT_656_1120, \ |
216 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 220 | V4L2_INIT_BT_TIMINGS(3840, 2160, 0, \ |
221 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
217 | 594000000, 176, 88, 296, 8, 10, 72, 0, 0, 0, \ | 222 | 594000000, 176, 88, 296, 8, 10, 72, 0, 0, 0, \ |
218 | V4L2_DV_BT_STD_CEA861, \ | 223 | V4L2_DV_BT_STD_CEA861, \ |
219 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ | 224 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ |
@@ -221,7 +226,8 @@ | |||
221 | 226 | ||
222 | #define V4L2_DV_BT_CEA_4096X2160P24 { \ | 227 | #define V4L2_DV_BT_CEA_4096X2160P24 { \ |
223 | .type = V4L2_DV_BT_656_1120, \ | 228 | .type = V4L2_DV_BT_656_1120, \ |
224 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 229 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, \ |
230 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
225 | 297000000, 1020, 88, 296, 8, 10, 72, 0, 0, 0, \ | 231 | 297000000, 1020, 88, 296, 8, 10, 72, 0, 0, 0, \ |
226 | V4L2_DV_BT_STD_CEA861, \ | 232 | V4L2_DV_BT_STD_CEA861, \ |
227 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ | 233 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ |
@@ -229,14 +235,16 @@ | |||
229 | 235 | ||
230 | #define V4L2_DV_BT_CEA_4096X2160P25 { \ | 236 | #define V4L2_DV_BT_CEA_4096X2160P25 { \ |
231 | .type = V4L2_DV_BT_656_1120, \ | 237 | .type = V4L2_DV_BT_656_1120, \ |
232 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 238 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, \ |
239 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
233 | 297000000, 968, 88, 128, 8, 10, 72, 0, 0, 0, \ | 240 | 297000000, 968, 88, 128, 8, 10, 72, 0, 0, 0, \ |
234 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ | 241 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ |
235 | } | 242 | } |
236 | 243 | ||
237 | #define V4L2_DV_BT_CEA_4096X2160P30 { \ | 244 | #define V4L2_DV_BT_CEA_4096X2160P30 { \ |
238 | .type = V4L2_DV_BT_656_1120, \ | 245 | .type = V4L2_DV_BT_656_1120, \ |
239 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 246 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, \ |
247 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
240 | 297000000, 88, 88, 128, 8, 10, 72, 0, 0, 0, \ | 248 | 297000000, 88, 88, 128, 8, 10, 72, 0, 0, 0, \ |
241 | V4L2_DV_BT_STD_CEA861, \ | 249 | V4L2_DV_BT_STD_CEA861, \ |
242 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ | 250 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ |
@@ -244,14 +252,16 @@ | |||
244 | 252 | ||
245 | #define V4L2_DV_BT_CEA_4096X2160P50 { \ | 253 | #define V4L2_DV_BT_CEA_4096X2160P50 { \ |
246 | .type = V4L2_DV_BT_656_1120, \ | 254 | .type = V4L2_DV_BT_656_1120, \ |
247 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 255 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, \ |
256 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
248 | 594000000, 968, 88, 128, 8, 10, 72, 0, 0, 0, \ | 257 | 594000000, 968, 88, 128, 8, 10, 72, 0, 0, 0, \ |
249 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ | 258 | V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_IS_CE_VIDEO) \ |
250 | } | 259 | } |
251 | 260 | ||
252 | #define V4L2_DV_BT_CEA_4096X2160P60 { \ | 261 | #define V4L2_DV_BT_CEA_4096X2160P60 { \ |
253 | .type = V4L2_DV_BT_656_1120, \ | 262 | .type = V4L2_DV_BT_656_1120, \ |
254 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, V4L2_DV_HSYNC_POS_POL, \ | 263 | V4L2_INIT_BT_TIMINGS(4096, 2160, 0, \ |
264 | V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | ||
255 | 594000000, 88, 88, 128, 8, 10, 72, 0, 0, 0, \ | 265 | 594000000, 88, 88, 128, 8, 10, 72, 0, 0, 0, \ |
256 | V4L2_DV_BT_STD_CEA861, \ | 266 | V4L2_DV_BT_STD_CEA861, \ |
257 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ | 267 | V4L2_DV_FL_CAN_REDUCE_FPS | V4L2_DV_FL_IS_CE_VIDEO) \ |
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index c18264df9504..4cb65bbfa654 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h | |||
@@ -40,6 +40,8 @@ | |||
40 | #define VIRTIO_CONFIG_S_DRIVER_OK 4 | 40 | #define VIRTIO_CONFIG_S_DRIVER_OK 4 |
41 | /* Driver has finished configuring features */ | 41 | /* Driver has finished configuring features */ |
42 | #define VIRTIO_CONFIG_S_FEATURES_OK 8 | 42 | #define VIRTIO_CONFIG_S_FEATURES_OK 8 |
43 | /* Device entered invalid state, driver must reset it */ | ||
44 | #define VIRTIO_CONFIG_S_NEEDS_RESET 0x40 | ||
43 | /* We've given up on this device. */ | 45 | /* We've given up on this device. */ |
44 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 46 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
45 | 47 | ||
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index eeba75395f7d..ad66589f2ae6 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
@@ -194,8 +194,9 @@ int ipu_cpmem_set_format_rgb(struct ipuv3_channel *ch, | |||
194 | int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width); | 194 | int ipu_cpmem_set_format_passthrough(struct ipuv3_channel *ch, int width); |
195 | void ipu_cpmem_set_yuv_interleaved(struct ipuv3_channel *ch, u32 pixel_format); | 195 | void ipu_cpmem_set_yuv_interleaved(struct ipuv3_channel *ch, u32 pixel_format); |
196 | void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch, | 196 | void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch, |
197 | u32 pixel_format, int stride, | 197 | unsigned int uv_stride, |
198 | int u_offset, int v_offset); | 198 | unsigned int u_offset, |
199 | unsigned int v_offset); | ||
199 | void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch, | 200 | void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch, |
200 | u32 pixel_format, int stride, int height); | 201 | u32 pixel_format, int stride, int height); |
201 | int ipu_cpmem_set_fmt(struct ipuv3_channel *ch, u32 drm_fourcc); | 202 | int ipu_cpmem_set_fmt(struct ipuv3_channel *ch, u32 drm_fourcc); |
@@ -236,7 +237,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc); | |||
236 | int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, | 237 | int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, |
237 | unsigned long bandwidth_mbs, int burstsize); | 238 | unsigned long bandwidth_mbs, int burstsize); |
238 | void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc); | 239 | void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc); |
239 | int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width); | 240 | void ipu_dmfc_config_wait4eot(struct dmfc_channel *dmfc, int width); |
240 | struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel); | 241 | struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel); |
241 | void ipu_dmfc_put(struct dmfc_channel *dmfc); | 242 | void ipu_dmfc_put(struct dmfc_channel *dmfc); |
242 | 243 | ||
diff --git a/include/xen/page.h b/include/xen/page.h index 96294ac93755..9dc46cb8a0fd 100644 --- a/include/xen/page.h +++ b/include/xen/page.h | |||
@@ -15,9 +15,9 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define xen_pfn_to_page(xen_pfn) \ | 17 | #define xen_pfn_to_page(xen_pfn) \ |
18 | ((pfn_to_page(((unsigned long)(xen_pfn) << XEN_PAGE_SHIFT) >> PAGE_SHIFT))) | 18 | (pfn_to_page((unsigned long)(xen_pfn) >> (PAGE_SHIFT - XEN_PAGE_SHIFT))) |
19 | #define page_to_xen_pfn(page) \ | 19 | #define page_to_xen_pfn(page) \ |
20 | (((page_to_pfn(page)) << PAGE_SHIFT) >> XEN_PAGE_SHIFT) | 20 | ((page_to_pfn(page)) << (PAGE_SHIFT - XEN_PAGE_SHIFT)) |
21 | 21 | ||
22 | #define XEN_PFN_PER_PAGE (PAGE_SIZE / XEN_PAGE_SIZE) | 22 | #define XEN_PFN_PER_PAGE (PAGE_SIZE / XEN_PAGE_SIZE) |
23 | 23 | ||