aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/compiler.h7
-rw-r--r--include/linux/cpuhotplug.h2
-rw-r--r--include/linux/fscrypto.h5
-rw-r--r--include/linux/fsnotify_backend.h6
-rw-r--r--include/linux/irq.h10
-rw-r--r--include/linux/mlx5/mlx5_ifc.h5
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/linux/thread_info.h7
-rw-r--r--include/linux/uio.h2
9 files changed, 30 insertions, 15 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 436aa4e42221..668569844d37 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -527,13 +527,14 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
527 * object's lifetime is managed by something other than RCU. That 527 * object's lifetime is managed by something other than RCU. That
528 * "something other" might be reference counting or simple immortality. 528 * "something other" might be reference counting or simple immortality.
529 * 529 *
530 * The seemingly unused size_t variable is to validate @p is indeed a pointer 530 * The seemingly unused variable ___typecheck_p validates that @p is
531 * type by making sure it can be dereferenced. 531 * indeed a pointer type by using a pointer to typeof(*p) as the type.
532 * Taking a pointer to typeof(*p) again is needed in case p is void *.
532 */ 533 */
533#define lockless_dereference(p) \ 534#define lockless_dereference(p) \
534({ \ 535({ \
535 typeof(p) _________p1 = READ_ONCE(p); \ 536 typeof(p) _________p1 = READ_ONCE(p); \
536 size_t __maybe_unused __size_of_ptr = sizeof(*(p)); \ 537 typeof(*(p)) *___typecheck_p __maybe_unused; \
537 smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ 538 smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
538 (_________p1); \ 539 (_________p1); \
539}) 540})
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index 242bf530edfc..34bd80512a0c 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -1,6 +1,8 @@
1#ifndef __CPUHOTPLUG_H 1#ifndef __CPUHOTPLUG_H
2#define __CPUHOTPLUG_H 2#define __CPUHOTPLUG_H
3 3
4#include <linux/types.h>
5
4enum cpuhp_state { 6enum cpuhp_state {
5 CPUHP_OFFLINE, 7 CPUHP_OFFLINE,
6 CPUHP_CREATE_THREADS, 8 CPUHP_CREATE_THREADS,
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h
index cfa6cde25f8e..76cff18bb032 100644
--- a/include/linux/fscrypto.h
+++ b/include/linux/fscrypto.h
@@ -274,8 +274,7 @@ extern void fscrypt_restore_control_page(struct page *);
274extern int fscrypt_zeroout_range(struct inode *, pgoff_t, sector_t, 274extern int fscrypt_zeroout_range(struct inode *, pgoff_t, sector_t,
275 unsigned int); 275 unsigned int);
276/* policy.c */ 276/* policy.c */
277extern int fscrypt_process_policy(struct inode *, 277extern int fscrypt_process_policy(struct file *, const struct fscrypt_policy *);
278 const struct fscrypt_policy *);
279extern int fscrypt_get_policy(struct inode *, struct fscrypt_policy *); 278extern int fscrypt_get_policy(struct inode *, struct fscrypt_policy *);
280extern int fscrypt_has_permitted_context(struct inode *, struct inode *); 279extern int fscrypt_has_permitted_context(struct inode *, struct inode *);
281extern int fscrypt_inherit_context(struct inode *, struct inode *, 280extern int fscrypt_inherit_context(struct inode *, struct inode *,
@@ -345,7 +344,7 @@ static inline int fscrypt_notsupp_zeroout_range(struct inode *i, pgoff_t p,
345} 344}
346 345
347/* policy.c */ 346/* policy.c */
348static inline int fscrypt_notsupp_process_policy(struct inode *i, 347static inline int fscrypt_notsupp_process_policy(struct file *f,
349 const struct fscrypt_policy *p) 348 const struct fscrypt_policy *p)
350{ 349{
351 return -EOPNOTSUPP; 350 return -EOPNOTSUPP;
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 58205f33af02..7268ed076be8 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -148,6 +148,7 @@ struct fsnotify_group {
148 #define FS_PRIO_1 1 /* fanotify content based access control */ 148 #define FS_PRIO_1 1 /* fanotify content based access control */
149 #define FS_PRIO_2 2 /* fanotify pre-content access */ 149 #define FS_PRIO_2 2 /* fanotify pre-content access */
150 unsigned int priority; 150 unsigned int priority;
151 bool shutdown; /* group is being shut down, don't queue more events */
151 152
152 /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ 153 /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */
153 struct mutex mark_mutex; /* protect marks_list */ 154 struct mutex mark_mutex; /* protect marks_list */
@@ -179,7 +180,6 @@ struct fsnotify_group {
179 spinlock_t access_lock; 180 spinlock_t access_lock;
180 struct list_head access_list; 181 struct list_head access_list;
181 wait_queue_head_t access_waitq; 182 wait_queue_head_t access_waitq;
182 atomic_t bypass_perm;
183#endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ 183#endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */
184 int f_flags; 184 int f_flags;
185 unsigned int max_marks; 185 unsigned int max_marks;
@@ -292,6 +292,8 @@ extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *op
292extern void fsnotify_get_group(struct fsnotify_group *group); 292extern void fsnotify_get_group(struct fsnotify_group *group);
293/* drop reference on a group from fsnotify_alloc_group */ 293/* drop reference on a group from fsnotify_alloc_group */
294extern void fsnotify_put_group(struct fsnotify_group *group); 294extern void fsnotify_put_group(struct fsnotify_group *group);
295/* group destruction begins, stop queuing new events */
296extern void fsnotify_group_stop_queueing(struct fsnotify_group *group);
295/* destroy group */ 297/* destroy group */
296extern void fsnotify_destroy_group(struct fsnotify_group *group); 298extern void fsnotify_destroy_group(struct fsnotify_group *group);
297/* fasync handler function */ 299/* fasync handler function */
@@ -304,8 +306,6 @@ extern int fsnotify_add_event(struct fsnotify_group *group,
304 struct fsnotify_event *event, 306 struct fsnotify_event *event,
305 int (*merge)(struct list_head *, 307 int (*merge)(struct list_head *,
306 struct fsnotify_event *)); 308 struct fsnotify_event *));
307/* Remove passed event from groups notification queue */
308extern void fsnotify_remove_event(struct fsnotify_group *group, struct fsnotify_event *event);
309/* true if the group notification queue is empty */ 309/* true if the group notification queue is empty */
310extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); 310extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group);
311/* return, but do not dequeue the first event on the notification queue */ 311/* return, but do not dequeue the first event on the notification queue */
diff --git a/include/linux/irq.h b/include/linux/irq.h
index b52424eaa0ed..0ac26c892fe2 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -945,6 +945,16 @@ static inline void irq_gc_lock(struct irq_chip_generic *gc) { }
945static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } 945static inline void irq_gc_unlock(struct irq_chip_generic *gc) { }
946#endif 946#endif
947 947
948/*
949 * The irqsave variants are for usage in non interrupt code. Do not use
950 * them in irq_chip callbacks. Use irq_gc_lock() instead.
951 */
952#define irq_gc_lock_irqsave(gc, flags) \
953 raw_spin_lock_irqsave(&(gc)->lock, flags)
954
955#define irq_gc_unlock_irqrestore(gc, flags) \
956 raw_spin_unlock_irqrestore(&(gc)->lock, flags)
957
948static inline void irq_reg_writel(struct irq_chip_generic *gc, 958static inline void irq_reg_writel(struct irq_chip_generic *gc,
949 u32 val, int reg_offset) 959 u32 val, int reg_offset)
950{ 960{
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 21bc4557b67a..d1f9a581aca8 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -6710,9 +6710,10 @@ struct mlx5_ifc_pude_reg_bits {
6710}; 6710};
6711 6711
6712struct mlx5_ifc_ptys_reg_bits { 6712struct mlx5_ifc_ptys_reg_bits {
6713 u8 an_disable_cap[0x1]; 6713 u8 reserved_at_0[0x1];
6714 u8 an_disable_admin[0x1]; 6714 u8 an_disable_admin[0x1];
6715 u8 reserved_at_2[0x6]; 6715 u8 an_disable_cap[0x1];
6716 u8 reserved_at_3[0x5];
6716 u8 local_port[0x8]; 6717 u8 local_port[0x8];
6717 u8 reserved_at_10[0xd]; 6718 u8 reserved_at_10[0xd];
6718 u8 proto_mask[0x3]; 6719 u8 proto_mask[0x3];
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3a788bf0affd..e8d79d4ebcfe 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3267,6 +3267,7 @@ static inline void napi_free_frags(struct napi_struct *napi)
3267 napi->skb = NULL; 3267 napi->skb = NULL;
3268} 3268}
3269 3269
3270bool netdev_is_rx_handler_busy(struct net_device *dev);
3270int netdev_rx_handler_register(struct net_device *dev, 3271int netdev_rx_handler_register(struct net_device *dev,
3271 rx_handler_func_t *rx_handler, 3272 rx_handler_func_t *rx_handler,
3272 void *rx_handler_data); 3273 void *rx_handler_data);
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index cbd8990e2e77..2b5b10eed74f 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -118,10 +118,11 @@ static inline int arch_within_stack_frames(const void * const stack,
118extern void __check_object_size(const void *ptr, unsigned long n, 118extern void __check_object_size(const void *ptr, unsigned long n,
119 bool to_user); 119 bool to_user);
120 120
121static inline void check_object_size(const void *ptr, unsigned long n, 121static __always_inline void check_object_size(const void *ptr, unsigned long n,
122 bool to_user) 122 bool to_user)
123{ 123{
124 __check_object_size(ptr, n, to_user); 124 if (!__builtin_constant_p(n))
125 __check_object_size(ptr, n, to_user);
125} 126}
126#else 127#else
127static inline void check_object_size(const void *ptr, unsigned long n, 128static inline void check_object_size(const void *ptr, unsigned long n,
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 1b5d1cd796e2..75b4aaf31a9d 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -76,7 +76,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page,
76 struct iov_iter *i, unsigned long offset, size_t bytes); 76 struct iov_iter *i, unsigned long offset, size_t bytes);
77void iov_iter_advance(struct iov_iter *i, size_t bytes); 77void iov_iter_advance(struct iov_iter *i, size_t bytes);
78int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); 78int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
79int iov_iter_fault_in_multipages_readable(struct iov_iter *i, size_t bytes); 79#define iov_iter_fault_in_multipages_readable iov_iter_fault_in_readable
80size_t iov_iter_single_seg_count(const struct iov_iter *i); 80size_t iov_iter_single_seg_count(const struct iov_iter *i);
81size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, 81size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
82 struct iov_iter *i); 82 struct iov_iter *i);