History

Merge branch 'odp_fixes' into hmm.git

From rdma.git Jason Gunthorpe says: ==================== This is a collection of general cleanups for ODP to clarify some of the flows around umem creation and use of the interval tree. ==================== The branch is based on v5.3-rc5 due to dependencies, and is being taken into hmm.git due to dependencies in the next patches. * odp_fixes: RDMA/mlx5: Use odp instead of mr->umem in pagefault_mr RDMA/mlx5: Use ib_umem_start instead of umem.address RDMA/core: Make invalidate_range a device operation RDMA/odp: Use kvcalloc for the dma_list and page_list RDMA/odp: Check for overflow when computing the umem_odp end RDMA/odp: Provide ib_umem_odp_release() to undo the allocs RDMA/odp: Split creating a umem_odp from ib_umem_get RDMA/odp: Make the three ways to create a umem_odp clear RMDA/odp: Consolidate umem_odp initialization RDMA/odp: Make it clearer when a umem is an implicit ODP umem RDMA/odp: Iterate over the whole rbtree directly RDMA/odp: Use the common interval tree library instead of generic RDMA/mlx5: Fix MR npages calculation for IB_ACCESS_HUGETLB

Jason Gunthorpe committed 7 years ago

Commit daa138a2 parents 6869b7b fba0e441464 files · +13709 −10305Browse files

Showing the changes to include/linux (35 of 1464 files). Show all

Unified · Split

35 files
  1. include/linux/blk-cgroup.h +1 −0
  2. include/linux/ccp.h +2 −0
  3. include/linux/clk.h +1 −0
  4. include/linux/connector.h +0 −1
  5. include/linux/cred.h +7 −1
  6. include/linux/device.h +6 −0
  7. include/linux/dim.h +0 −56
  8. include/linux/dma-mapping.h +2 −2
  9. include/linux/dma-noncoherent.h +9 −4
  10. include/linux/elevator.h +0 −1
  11. include/linux/filter.h +13 −0
  12. include/linux/fs.h +6 −0
  13. include/linux/gfp.h +4 −8
  14. include/linux/gpio/consumer.h +32 −32
  15. include/linux/if_pppox.h +3 −0
  16. include/linux/if_rmnet.h +2 −2
  17. include/linux/iova.h +6 −0
  18. include/linux/kvm_host.h +4 −2
  19. include/linux/memcontrol.h +19 −0
  20. include/linux/mempolicy.h +2 −0
  21. include/linux/mlx5/fs.h +1 −0
  22. include/linux/mlx5/mlx5_ifc.h +4 −2
  23. include/linux/mm_types.h +10 −1
  24. include/linux/mod_devicetable.h +1 −0
  25. include/linux/netfilter/nf_conntrack_h323_asn1.h +1 −2
  26. include/linux/of.h +1 −1
  27. include/linux/page-flags-layout.h +11 −7
  28. include/linux/page-flags.h +4 −0
  29. include/linux/pci.h +2 −0
  30. include/linux/sched.h +9 −1
  31. include/linux/sched/numa_balancing.h +2 −2
  32. include/linux/skmsg.h +7 −1
  33. include/linux/usb.h +1 −1
  34. include/linux/usb/hcd.h +3 −0
  35. include/linux/wait.h +13 −0
include/linux/blk-cgroup.h+1−0
@@ -181,6 +181,7 @@ struct blkcg_policy { · 180 unmodified lines
181181
182182 extern struct blkcg blkcg_root;
183183 extern struct cgroup_subsys_state * const blkcg_root_css;
184+extern bool blkcg_debug_stats;
184185
185186 struct blkcg_gq *blkg_lookup_slowpath(struct blkcg *blkcg,
186187 struct request_queue *q, bool update_hint);
include/linux/ccp.h+2−0
@@ -170,6 +170,8 @@ struct ccp_aes_engine { · 169 unmodified lines
170170 enum ccp_aes_mode mode;
171171 enum ccp_aes_action action;
172172
173+ u32 authsize;
174+
173175 struct scatterlist *key;
174176 u32 key_len; /* In bytes */
175177
include/linux/clk.h+1−0
@@ -359,6 +359,7 @@ int __must_check devm_clk_bulk_get(struct device *dev, int num_clks, · 358 unmodified lines
359359 /**
360360 * devm_clk_bulk_get_optional - managed get multiple optional consumer clocks
361361 * @dev: device for clock "consumer"
362+ * @num_clks: the number of clk_bulk_data
362363 * @clks: pointer to the clk_bulk_data table of consumer
363364 *
364365 * Behaves the same as devm_clk_bulk_get() except where there is no clock
include/linux/connector.h+0−1
@@ -50,7 +50,6 @@ struct cn_dev { · 49 unmodified lines
5050
5151 u32 seq, groups;
5252 struct sock *nls;
53− void (*input) (struct sk_buff *skb);
5453
5554 struct cn_queue_dev *cbdev;
5655 };
include/linux/cred.h+7−1
@@ -145,7 +145,11 @@ struct cred { · 144 unmodified lines
145145 struct user_struct *user; /* real user ID subscription */
146146 struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */
147147 struct group_info *group_info; /* supplementary groups for euid/fsgid */
148− struct rcu_head rcu; /* RCU deletion hook */
148+ /* RCU deletion */
149+ union {
150+ int non_rcu; /* Can we skip RCU deletion? */
151+ struct rcu_head rcu; /* RCU deletion hook */
152+ };
149153 } __randomize_layout;
150154
151155 extern void __put_cred(struct cred *);
@@ -246,6 +250,7 @@ static inline const struct cred *get_cred(const struct cred *cred) · 94 unmodified lines
246250 if (!cred)
247251 return cred;
248252 validate_creds(cred);
253+ nonconst_cred->non_rcu = 0;
249254 return get_new_cred(nonconst_cred);
250255 }
251256
@@ -257,6 +262,7 @@ static inline const struct cred *get_cred_rcu(const struct cred *cred) · 5 unmodified lines
257262 if (!atomic_inc_not_zero(&nonconst_cred->usage))
258263 return NULL;
259264 validate_creds(cred);
265+ nonconst_cred->non_rcu = 0;
260266 return cred;
261267 }
262268
include/linux/device.h+6−0
@@ -915,6 +915,8 @@ struct dev_links_info { · 914 unmodified lines
915915 * This identifies the device type and carries type-specific
916916 * information.
917917 * @mutex: Mutex to synchronize calls to its driver.
918+ * @lockdep_mutex: An optional debug lock that a subsystem can use as a
919+ * peer lock to gain localized lockdep coverage of the device_lock.
918920 * @bus: Type of bus device is on.
919921 * @driver: Which driver has allocated this
920922 * @platform_data: Platform data specific to the device.
@@ -998,6 +1000,9 @@ struct device { · 77 unmodified lines
9981000 core doesn't touch it */
9991001 void *driver_data; /* Driver data, set and get with
10001002 dev_set_drvdata/dev_get_drvdata */
1003+#ifdef CONFIG_PROVE_LOCKING
1004+ struct mutex lockdep_mutex;
1005+#endif
10011006 struct mutex mutex; /* mutex to synchronize calls to
10021007 * its driver.
10031008 */
@@ -1383,6 +1388,7 @@ extern int (*platform_notify_remove)(struct device *dev); · 379 unmodified lines
13831388 */
13841389 extern struct device *get_device(struct device *dev);
13851390 extern void put_device(struct device *dev);
1391+extern bool kill_device(struct device *dev);
13861392
13871393 #ifdef CONFIG_DEVTMPFS
13881394 extern int devtmpfs_create_node(struct device *dev);
include/linux/dim.h+0−56
@@ -272,62 +272,6 @@ dim_update_sample_with_comps(u16 event_ctr, u64 packets, u64 bytes, u64 comps, · 271 unmodified lines
272272
273273 /* Net DIM */
274274
275−/*
276− * Net DIM profiles:
277− * There are different set of profiles for each CQ period mode.
278− * There are different set of profiles for RX/TX CQs.
279− * Each profile size must be of NET_DIM_PARAMS_NUM_PROFILES
280− */
281−#define NET_DIM_PARAMS_NUM_PROFILES 5
282−#define NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE 256
283−#define NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE 128
284−#define NET_DIM_DEF_PROFILE_CQE 1
285−#define NET_DIM_DEF_PROFILE_EQE 1
286−
287−#define NET_DIM_RX_EQE_PROFILES { \
288− {1, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
289− {8, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
290− {64, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
291− {128, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
292− {256, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
293−}
294−
295−#define NET_DIM_RX_CQE_PROFILES { \
296− {2, 256}, \
297− {8, 128}, \
298− {16, 64}, \
299− {32, 64}, \
300− {64, 64} \
301−}
302−
303−#define NET_DIM_TX_EQE_PROFILES { \
304− {1, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
305− {8, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
306− {32, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
307− {64, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
308− {128, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE} \
309−}
310−
311−#define NET_DIM_TX_CQE_PROFILES { \
312− {5, 128}, \
313− {8, 64}, \
314− {16, 32}, \
315− {32, 32}, \
316− {64, 32} \
317−}
318−
319−static const struct dim_cq_moder
320−rx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
321− NET_DIM_RX_EQE_PROFILES,
322− NET_DIM_RX_CQE_PROFILES,
323−};
324−
325−static const struct dim_cq_moder
326−tx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
327− NET_DIM_TX_EQE_PROFILES,
328− NET_DIM_TX_CQE_PROFILES,
329−};
330−
331275 /**
332276 * net_dim_get_rx_moderation - provide a CQ moderation object for the given RX profile
333277 * @cq_period_mode: CQ period mode
include/linux/dma-mapping.h+2−2
@@ -689,8 +689,8 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask) · 688 unmodified lines
689689 */
690690 static inline bool dma_addressing_limited(struct device *dev)
691691 {
692− return min_not_zero(*dev->dma_mask, dev->bus_dma_mask) <
693− dma_get_required_mask(dev);
692+ return min_not_zero(dma_get_mask(dev), dev->bus_dma_mask) <
693+ dma_get_required_mask(dev);
694694 }
695695
696696 #ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS
include/linux/dma-noncoherent.h+9−4
@@ -42,13 +42,18 @@ void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, · 41 unmodified lines
4242 dma_addr_t dma_addr, unsigned long attrs);
4343 long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr,
4444 dma_addr_t dma_addr);
45−
46−#ifdef CONFIG_ARCH_HAS_DMA_MMAP_PGPROT
4745 pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot,
4846 unsigned long attrs);
47+
48+#ifdef CONFIG_MMU
49+pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs);
4950 #else
50−# define arch_dma_mmap_pgprot(dev, prot, attrs) pgprot_noncached(prot)
51−#endif
51+static inline pgprot_t dma_pgprot(struct device *dev, pgprot_t prot,
52+ unsigned long attrs)
53+{
54+ return prot; /* no protection bits supported without page tables */
55+}
56+#endif /* CONFIG_MMU */
5257
5358 #ifdef CONFIG_DMA_NONCOHERENT_CACHE_SYNC
5459 void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
include/linux/elevator.h+0−1
@@ -45,7 +45,6 @@ struct elevator_mq_ops { · 44 unmodified lines
4545 struct request *(*dispatch_request)(struct blk_mq_hw_ctx *);
4646 bool (*has_work)(struct blk_mq_hw_ctx *);
4747 void (*completed_request)(struct request *, u64);
48− void (*started_request)(struct request *);
4948 void (*requeue_request)(struct request *);
5049 struct request *(*former_request)(struct request_queue *, struct request *);
5150 struct request *(*next_request)(struct request_queue *, struct request *);
include/linux/filter.h+13−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424
2525 #include <net/sch_generic.h>
2626
27+#include <asm/byteorder.h>
2728 #include <uapi/linux/filter.h>
2829 #include <uapi/linux/bpf.h>
2930
@@ -747,6 +748,18 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default) · 717 unmodified lines
747748 return size <= size_default && (size & (size - 1)) == 0;
748749 }
749750
751+static inline u8
752+bpf_ctx_narrow_load_shift(u32 off, u32 size, u32 size_default)
753+{
754+ u8 load_off = off & (size_default - 1);
755+
756+#ifdef __LITTLE_ENDIAN
757+ return load_off * 8;
758+#else
759+ return (size_default - (load_off + size)) * 8;
760+#endif
761+}
762+
750763 #define bpf_ctx_wide_access_ok(off, size, type, field) \
751764 (size == sizeof(__u64) && \
752765 off >= offsetof(type, field) && \
include/linux/fs.h+6−0
@@ -2598,6 +2598,12 @@ extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode, · 2597 unmodified lines
25982598 void *holder);
25992599 extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode,
26002600 void *holder);
2601+extern struct block_device *bd_start_claiming(struct block_device *bdev,
2602+ void *holder);
2603+extern void bd_finish_claiming(struct block_device *bdev,
2604+ struct block_device *whole, void *holder);
2605+extern void bd_abort_claiming(struct block_device *bdev,
2606+ struct block_device *whole, void *holder);
26012607 extern void blkdev_put(struct block_device *bdev, fmode_t mode);
26022608 extern int __blkdev_reread_part(struct block_device *bdev);
26032609 extern int blkdev_reread_part(struct block_device *bdev);
include/linux/gfp.h+4−8
@@ -510,22 +510,18 @@ alloc_pages(gfp_t gfp_mask, unsigned int order) · 509 unmodified lines
510510 }
511511 extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order,
512512 struct vm_area_struct *vma, unsigned long addr,
513− int node, bool hugepage);
514−#define alloc_hugepage_vma(gfp_mask, vma, addr, order) \
515− alloc_pages_vma(gfp_mask, order, vma, addr, numa_node_id(), true)
513+ int node);
516514 #else
517515 #define alloc_pages(gfp_mask, order) \
518516 alloc_pages_node(numa_node_id(), gfp_mask, order)
519−#define alloc_pages_vma(gfp_mask, order, vma, addr, node, false)\
520− alloc_pages(gfp_mask, order)
521−#define alloc_hugepage_vma(gfp_mask, vma, addr, order) \
517+#define alloc_pages_vma(gfp_mask, order, vma, addr, node)\
522518 alloc_pages(gfp_mask, order)
523519 #endif
524520 #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
525521 #define alloc_page_vma(gfp_mask, vma, addr) \
526− alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id(), false)
522+ alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id())
527523 #define alloc_page_vma_node(gfp_mask, vma, addr, node) \
528− alloc_pages_vma(gfp_mask, 0, vma, addr, node, false)
524+ alloc_pages_vma(gfp_mask, 0, vma, addr, node)
529525
530526 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
531527 extern unsigned long get_zeroed_page(gfp_t gfp_mask);
include/linux/gpio/consumer.h+32−32
@@ -247,7 +247,7 @@ static inline void gpiod_put(struct gpio_desc *desc) · 246 unmodified lines
247247 might_sleep();
248248
249249 /* GPIO can never have been requested */
250− WARN_ON(1);
250+ WARN_ON(desc);
251251 }
252252
253253 static inline void devm_gpiod_unhinge(struct device *dev,
@@ -256,7 +256,7 @@ static inline void devm_gpiod_unhinge(struct device *dev, · 2 unmodified lines
256256 might_sleep();
257257
258258 /* GPIO can never have been requested */
259− WARN_ON(1);
259+ WARN_ON(desc);
260260 }
261261
262262 static inline void gpiod_put_array(struct gpio_descs *descs)
@@ -264,7 +264,7 @@ static inline void gpiod_put_array(struct gpio_descs *descs) · 1 unmodified line
264264 might_sleep();
265265
266266 /* GPIO can never have been requested */
267− WARN_ON(1);
267+ WARN_ON(descs);
268268 }
269269
270270 static inline struct gpio_desc *__must_check
@@ -317,7 +317,7 @@ static inline void devm_gpiod_put(struct device *dev, struct gpio_desc *desc) · 46 unmodified lines
317317 might_sleep();
318318
319319 /* GPIO can never have been requested */
320− WARN_ON(1);
320+ WARN_ON(desc);
321321 }
322322
323323 static inline void devm_gpiod_put_array(struct device *dev,
@@ -326,32 +326,32 @@ static inline void devm_gpiod_put_array(struct device *dev, · 2 unmodified lines
326326 might_sleep();
327327
328328 /* GPIO can never have been requested */
329− WARN_ON(1);
329+ WARN_ON(descs);
330330 }
331331
332332
333333 static inline int gpiod_get_direction(const struct gpio_desc *desc)
334334 {
335335 /* GPIO can never have been requested */
336− WARN_ON(1);
336+ WARN_ON(desc);
337337 return -ENOSYS;
338338 }
339339 static inline int gpiod_direction_input(struct gpio_desc *desc)
340340 {
341341 /* GPIO can never have been requested */
342− WARN_ON(1);
342+ WARN_ON(desc);
343343 return -ENOSYS;
344344 }
345345 static inline int gpiod_direction_output(struct gpio_desc *desc, int value)
346346 {
347347 /* GPIO can never have been requested */
348− WARN_ON(1);
348+ WARN_ON(desc);
349349 return -ENOSYS;
350350 }
351351 static inline int gpiod_direction_output_raw(struct gpio_desc *desc, int value)
352352 {
353353 /* GPIO can never have been requested */
354− WARN_ON(1);
354+ WARN_ON(desc);
355355 return -ENOSYS;
356356 }
357357
@@ -359,7 +359,7 @@ static inline int gpiod_direction_output_raw(struct gpio_desc *desc, int value) · 1 unmodified line
359359 static inline int gpiod_get_value(const struct gpio_desc *desc)
360360 {
361361 /* GPIO can never have been requested */
362− WARN_ON(1);
362+ WARN_ON(desc);
363363 return 0;
364364 }
365365 static inline int gpiod_get_array_value(unsigned int array_size,
@@ -368,13 +368,13 @@ static inline int gpiod_get_array_value(unsigned int array_size, · 2 unmodified lines
368368 unsigned long *value_bitmap)
369369 {
370370 /* GPIO can never have been requested */
371− WARN_ON(1);
371+ WARN_ON(desc_array);
372372 return 0;
373373 }
374374 static inline void gpiod_set_value(struct gpio_desc *desc, int value)
375375 {
376376 /* GPIO can never have been requested */
377− WARN_ON(1);
377+ WARN_ON(desc);
378378 }
379379 static inline int gpiod_set_array_value(unsigned int array_size,
380380 struct gpio_desc **desc_array,
@@ -382,13 +382,13 @@ static inline int gpiod_set_array_value(unsigned int array_size, · 1 unmodified line
382382 unsigned long *value_bitmap)
383383 {
384384 /* GPIO can never have been requested */
385− WARN_ON(1);
385+ WARN_ON(desc_array);
386386 return 0;
387387 }
388388 static inline int gpiod_get_raw_value(const struct gpio_desc *desc)
389389 {
390390 /* GPIO can never have been requested */
391− WARN_ON(1);
391+ WARN_ON(desc);
392392 return 0;
393393 }
394394 static inline int gpiod_get_raw_array_value(unsigned int array_size,
@@ -397,13 +397,13 @@ static inline int gpiod_get_raw_array_value(unsigned int array_size, · 2 unmodified lines
397397 unsigned long *value_bitmap)
398398 {
399399 /* GPIO can never have been requested */
400− WARN_ON(1);
400+ WARN_ON(desc_array);
401401 return 0;
402402 }
403403 static inline void gpiod_set_raw_value(struct gpio_desc *desc, int value)
404404 {
405405 /* GPIO can never have been requested */
406− WARN_ON(1);
406+ WARN_ON(desc);
407407 }
408408 static inline int gpiod_set_raw_array_value(unsigned int array_size,
409409 struct gpio_desc **desc_array,
@@ -411,14 +411,14 @@ static inline int gpiod_set_raw_array_value(unsigned int array_size, · 1 unmodified line
411411 unsigned long *value_bitmap)
412412 {
413413 /* GPIO can never have been requested */
414− WARN_ON(1);
414+ WARN_ON(desc_array);
415415 return 0;
416416 }
417417
418418 static inline int gpiod_get_value_cansleep(const struct gpio_desc *desc)
419419 {
420420 /* GPIO can never have been requested */
421− WARN_ON(1);
421+ WARN_ON(desc);
422422 return 0;
423423 }
424424 static inline int gpiod_get_array_value_cansleep(unsigned int array_size,
@@ -427,13 +427,13 @@ static inline int gpiod_get_array_value_cansleep(unsigned int array_size, · 2 unmodified lines
427427 unsigned long *value_bitmap)
428428 {
429429 /* GPIO can never have been requested */
430− WARN_ON(1);
430+ WARN_ON(desc_array);
431431 return 0;
432432 }
433433 static inline void gpiod_set_value_cansleep(struct gpio_desc *desc, int value)
434434 {
435435 /* GPIO can never have been requested */
436− WARN_ON(1);
436+ WARN_ON(desc);
437437 }
438438 static inline int gpiod_set_array_value_cansleep(unsigned int array_size,
439439 struct gpio_desc **desc_array,
@@ -441,13 +441,13 @@ static inline int gpiod_set_array_value_cansleep(unsigned int array_size, · 1 unmodified line
441441 unsigned long *value_bitmap)
442442 {
443443 /* GPIO can never have been requested */
444− WARN_ON(1);
444+ WARN_ON(desc_array);
445445 return 0;
446446 }
447447 static inline int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc)
448448 {
449449 /* GPIO can never have been requested */
450− WARN_ON(1);
450+ WARN_ON(desc);
451451 return 0;
452452 }
453453 static inline int gpiod_get_raw_array_value_cansleep(unsigned int array_size,
@@ -456,14 +456,14 @@ static inline int gpiod_get_raw_array_value_cansleep(unsigned int array_size, · 2 unmodified lines
456456 unsigned long *value_bitmap)
457457 {
458458 /* GPIO can never have been requested */
459− WARN_ON(1);
459+ WARN_ON(desc_array);
460460 return 0;
461461 }
462462 static inline void gpiod_set_raw_value_cansleep(struct gpio_desc *desc,
463463 int value)
464464 {
465465 /* GPIO can never have been requested */
466− WARN_ON(1);
466+ WARN_ON(desc);
467467 }
468468 static inline int gpiod_set_raw_array_value_cansleep(unsigned int array_size,
469469 struct gpio_desc **desc_array,
@@ -471,41 +471,41 @@ static inline int gpiod_set_raw_array_value_cansleep(unsigned int array_size, · 1 unmodified line
471471 unsigned long *value_bitmap)
472472 {
473473 /* GPIO can never have been requested */
474− WARN_ON(1);
474+ WARN_ON(desc_array);
475475 return 0;
476476 }
477477
478478 static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce)
479479 {
480480 /* GPIO can never have been requested */
481− WARN_ON(1);
481+ WARN_ON(desc);
482482 return -ENOSYS;
483483 }
484484
485485 static inline int gpiod_set_transitory(struct gpio_desc *desc, bool transitory)
486486 {
487487 /* GPIO can never have been requested */
488− WARN_ON(1);
488+ WARN_ON(desc);
489489 return -ENOSYS;
490490 }
491491
492492 static inline int gpiod_is_active_low(const struct gpio_desc *desc)
493493 {
494494 /* GPIO can never have been requested */
495− WARN_ON(1);
495+ WARN_ON(desc);
496496 return 0;
497497 }
498498 static inline int gpiod_cansleep(const struct gpio_desc *desc)
499499 {
500500 /* GPIO can never have been requested */
501− WARN_ON(1);
501+ WARN_ON(desc);
502502 return 0;
503503 }
504504
505505 static inline int gpiod_to_irq(const struct gpio_desc *desc)
506506 {
507507 /* GPIO can never have been requested */
508− WARN_ON(1);
508+ WARN_ON(desc);
509509 return -EINVAL;
510510 }
511511
@@ -513,7 +513,7 @@ static inline int gpiod_set_consumer_name(struct gpio_desc *desc, · 1 unmodified line
513513 const char *name)
514514 {
515515 /* GPIO can never have been requested */
516− WARN_ON(1);
516+ WARN_ON(desc);
517517 return -EINVAL;
518518 }
519519
@@ -525,7 +525,7 @@ static inline struct gpio_desc *gpio_to_desc(unsigned gpio) · 5 unmodified lines
525525 static inline int desc_to_gpio(const struct gpio_desc *desc)
526526 {
527527 /* GPIO can never have been requested */
528− WARN_ON(1);
528+ WARN_ON(desc);
529529 return -EINVAL;
530530 }
531531
include/linux/if_pppox.h+3−0
@@ -80,6 +80,9 @@ extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp); · 79 unmodified lines
8080 extern void unregister_pppox_proto(int proto_num);
8181 extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
8282 extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
83+extern int pppox_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
84+
85+#define PPPOEIOCSFWD32 _IOW(0xB1 ,0, compat_size_t)
8386
8487 /* PPPoX socket states */
8588 enum {
include/linux/if_rmnet.h+2−2
@@ -41,11 +41,11 @@ struct rmnet_map_ul_csum_header { · 40 unmodified lines
4141 __be16 csum_start_offset;
4242 #if defined(__LITTLE_ENDIAN_BITFIELD)
4343 u16 csum_insert_offset:14;
44− u16 udp_ip4_ind:1;
44+ u16 udp_ind:1;
4545 u16 csum_enabled:1;
4646 #elif defined (__BIG_ENDIAN_BITFIELD)
4747 u16 csum_enabled:1;
48− u16 udp_ip4_ind:1;
48+ u16 udp_ind:1;
4949 u16 csum_insert_offset:14;
5050 #else
5151 #error "Please fix <asm/byteorder.h>"
include/linux/iova.h+6−0
@@ -155,6 +155,7 @@ struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo, · 154 unmodified lines
155155 void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to);
156156 void init_iova_domain(struct iova_domain *iovad, unsigned long granule,
157157 unsigned long start_pfn);
158+bool has_iova_flush_queue(struct iova_domain *iovad);
158159 int init_iova_flush_queue(struct iova_domain *iovad,
159160 iova_flush_cb flush_cb, iova_entry_dtor entry_dtor);
160161 struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn);
@@ -235,6 +236,11 @@ static inline void init_iova_domain(struct iova_domain *iovad, · 74 unmodified lines
235236 {
236237 }
237238
239+static inline bool has_iova_flush_queue(struct iova_domain *iovad)
240+{
241+ return false;
242+}
243+
238244 static inline int init_iova_flush_queue(struct iova_domain *iovad,
239245 iova_flush_cb flush_cb,
240246 iova_entry_dtor entry_dtor)
include/linux/kvm_host.h+4−2
@@ -861,8 +861,9 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); · 860 unmodified lines
861861 void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu);
862862 void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);
863863
864−bool kvm_arch_has_vcpu_debugfs(void);
865−int kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu);
864+#ifdef __KVM_HAVE_ARCH_VCPU_DEBUGFS
865+void kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu);
866+#endif
866867
867868 int kvm_arch_hardware_enable(void);
868869 void kvm_arch_hardware_disable(void);
@@ -872,6 +873,7 @@ int kvm_arch_check_processor_compat(void); · 3 unmodified lines
872873 int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
873874 bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
874875 int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
876+bool kvm_arch_dy_runnable(struct kvm_vcpu *vcpu);
875877
876878 #ifndef __KVM_HAVE_ARCH_VM_ALLOC
877879 /*
include/linux/memcontrol.h+19−0
@@ -668,6 +668,7 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec, · 667 unmodified lines
668668
669669 void __mod_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
670670 int val);
671+void __mod_lruvec_slab_state(void *p, enum node_stat_item idx, int val);
671672
672673 static inline void mod_lruvec_state(struct lruvec *lruvec,
673674 enum node_stat_item idx, int val)
@@ -1072,6 +1073,14 @@ static inline void mod_lruvec_page_state(struct page *page, · 398 unmodified lines
10721073 mod_node_page_state(page_pgdat(page), idx, val);
10731074 }
10741075
1076+static inline void __mod_lruvec_slab_state(void *p, enum node_stat_item idx,
1077+ int val)
1078+{
1079+ struct page *page = virt_to_head_page(p);
1080+
1081+ __mod_node_page_state(page_pgdat(page), idx, val);
1082+}
1083+
10751084 static inline
10761085 unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
10771086 gfp_t gfp_mask,
@@ -1159,6 +1168,16 @@ static inline void __dec_lruvec_page_state(struct page *page, · 81 unmodified lines
11591168 __mod_lruvec_page_state(page, idx, -1);
11601169 }
11611170
1171+static inline void __inc_lruvec_slab_state(void *p, enum node_stat_item idx)
1172+{
1173+ __mod_lruvec_slab_state(p, idx, 1);
1174+}
1175+
1176+static inline void __dec_lruvec_slab_state(void *p, enum node_stat_item idx)
1177+{
1178+ __mod_lruvec_slab_state(p, idx, -1);
1179+}
1180+
11621181 /* idx can be of type enum memcg_stat_item or node_stat_item */
11631182 static inline void inc_memcg_state(struct mem_cgroup *memcg,
11641183 int idx)
include/linux/mempolicy.h+2−0
@@ -139,6 +139,8 @@ struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, · 138 unmodified lines
139139 struct mempolicy *get_task_policy(struct task_struct *p);
140140 struct mempolicy *__get_vma_policy(struct vm_area_struct *vma,
141141 unsigned long addr);
142+struct mempolicy *get_vma_policy(struct vm_area_struct *vma,
143+ unsigned long addr);
142144 bool vma_policy_mof(struct vm_area_struct *vma);
143145
144146 extern void numa_default_policy(void);
include/linux/mlx5/fs.h+1−0
@@ -220,6 +220,7 @@ int mlx5_modify_rule_destination(struct mlx5_flow_handle *handler, · 219 unmodified lines
220220
221221 struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging);
222222 void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter);
223+u64 mlx5_fc_query_lastuse(struct mlx5_fc *counter);
223224 void mlx5_fc_query_cached(struct mlx5_fc *counter,
224225 u64 *bytes, u64 *packets, u64 *lastuse);
225226 int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter,
include/linux/mlx5/mlx5_ifc.h+4−2
@@ -5975,10 +5975,12 @@ struct mlx5_ifc_modify_cq_in_bits { · 5974 unmodified lines
59755975
59765976 struct mlx5_ifc_cqc_bits cq_context;
59775977
5978− u8 reserved_at_280[0x40];
5978+ u8 reserved_at_280[0x60];
59795979
59805980 u8 cq_umem_valid[0x1];
5981− u8 reserved_at_2c1[0x5bf];
5981+ u8 reserved_at_2e1[0x1f];
5982+
5983+ u8 reserved_at_300[0x580];
59825984
59835985 u8 pas[0][0x40];
59845986 };
include/linux/mm_types.h+10−1
@@ -158,7 +158,16 @@ struct page { · 157 unmodified lines
158158 /** @pgmap: Points to the hosting device page map. */
159159 struct dev_pagemap *pgmap;
160160 void *zone_device_data;
161− unsigned long _zd_pad_1; /* uses mapping */
161+ /*
162+ * ZONE_DEVICE private pages are counted as being
163+ * mapped so the next 3 words hold the mapping, index,
164+ * and private fields from the source anonymous or
165+ * page cache page while the page is migrated to device
166+ * private memory.
167+ * ZONE_DEVICE MEMORY_DEVICE_FS_DAX pages also
168+ * use the mapping, index, and private fields when
169+ * pmem backed DAX files are mapped.
170+ */
162171 };
163172
164173 /** @rcu_head: You can use this to free a page by RCU. */
include/linux/mod_devicetable.h+1−0
@@ -814,6 +814,7 @@ struct tee_client_device_id { · 813 unmodified lines
814814 /**
815815 * struct wmi_device_id - WMI device identifier
816816 * @guid_string: 36 char string of the form fa50ff2b-f2e8-45de-83fa-65417f2f49ba
817+ * @context: pointer to driver specific data
817818 */
818819 struct wmi_device_id {
819820 const char guid_string[UUID_STRING_LEN+1];
include/linux/netfilter/nf_conntrack_h323_asn1.h+1−2
@@ -1,7 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0-only */
22 /****************************************************************************
3− * ip_conntrack_h323_asn1.h - BER and PER decoding library for H.323
4− * conntrack/NAT module.
3+ * BER and PER decoding library for H.323 conntrack/NAT module.
54 *
65 * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net>
76 *
include/linux/of.h+1−1
@@ -1164,7 +1164,7 @@ static inline int of_property_read_string_index(const struct device_node *np, · 1163 unmodified lines
11641164 }
11651165
11661166 /**
1167− * of_property_read_bool - Findfrom a property
1167+ * of_property_read_bool - Find a property
11681168 * @np: device node from which the property value is to be read.
11691169 * @propname: name of the property to be searched.
11701170 *
include/linux/page-flags-layout.h+11−7
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232
3333 #endif /* CONFIG_SPARSEMEM */
3434
35+#ifndef BUILD_VDSO32_64
3536 /*
3637 * page->flags layout:
3738 *
@@ -76,20 +77,22 @@ · 38 unmodified lines
7677 #define LAST_CPUPID_SHIFT 0
7778 #endif
7879
79−#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
80+#ifdef CONFIG_KASAN_SW_TAGS
81+#define KASAN_TAG_WIDTH 8
82+#else
83+#define KASAN_TAG_WIDTH 0
84+#endif
85+
86+#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT+KASAN_TAG_WIDTH \
87+ <= BITS_PER_LONG - NR_PAGEFLAGS
8088 #define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT
8189 #else
8290 #define LAST_CPUPID_WIDTH 0
8391 #endif
8492
85−#ifdef CONFIG_KASAN_SW_TAGS
86−#define KASAN_TAG_WIDTH 8
8793 #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH+LAST_CPUPID_WIDTH+KASAN_TAG_WIDTH \
8894 > BITS_PER_LONG - NR_PAGEFLAGS
89−#error "KASAN: not enough bits in page flags for tag"
90−#endif
91−#else
92−#define KASAN_TAG_WIDTH 0
95+#error "Not enough bits in page flags"
9396 #endif
9497
9598 /*
@@ -104,4 +107,5 @@ · 8 unmodified lines
104107 #define LAST_CPUPID_NOT_IN_PAGE_FLAGS
105108 #endif
106109
110+#endif
107111 #endif /* _LINUX_PAGE_FLAGS_LAYOUT */
include/linux/page-flags.h+4−0
@@ -152,6 +152,8 @@ enum pageflags { · 151 unmodified lines
152152 PG_savepinned = PG_dirty,
153153 /* Has a grant mapping of another (foreign) domain's page. */
154154 PG_foreign = PG_owner_priv_1,
155+ /* Remapped by swiotlb-xen. */
156+ PG_xen_remapped = PG_owner_priv_1,
155157
156158 /* SLOB */
157159 PG_slob_free = PG_private,
@@ -329,6 +331,8 @@ PAGEFLAG(Pinned, pinned, PF_NO_COMPOUND) · 171 unmodified lines
329331 TESTSCFLAG(Pinned, pinned, PF_NO_COMPOUND)
330332 PAGEFLAG(SavePinned, savepinned, PF_NO_COMPOUND);
331333 PAGEFLAG(Foreign, foreign, PF_NO_COMPOUND);
334+PAGEFLAG(XenRemapped, xen_remapped, PF_NO_COMPOUND)
335+ TESTCLEARFLAG(XenRemapped, xen_remapped, PF_NO_COMPOUND)
332336
333337 PAGEFLAG(Reserved, reserved, PF_NO_COMPOUND)
334338 __CLEARPAGEFLAG(Reserved, reserved, PF_NO_COMPOUND)
include/linux/pci.h+2−0
@@ -1567,8 +1567,10 @@ extern bool pcie_ports_native; · 1566 unmodified lines
15671567
15681568 #ifdef CONFIG_PCIEASPM
15691569 bool pcie_aspm_support_enabled(void);
1570+bool pcie_aspm_enabled(struct pci_dev *pdev);
15701571 #else
15711572 static inline bool pcie_aspm_support_enabled(void) { return false; }
1573+static inline bool pcie_aspm_enabled(struct pci_dev *pdev) { return false; }
15721574 #endif
15731575
15741576 #ifdef CONFIG_PCIEAER
include/linux/sched.h+9−1
@@ -1092,7 +1092,15 @@ struct task_struct { · 1091 unmodified lines
10921092 u64 last_sum_exec_runtime;
10931093 struct callback_head numa_work;
10941094
1095− struct numa_group *numa_group;
1095+ /*
1096+ * This pointer is only modified for current in syscall and
1097+ * pagefault context (and for tasks being destroyed), so it can be read
1098+ * from any of the following contexts:
1099+ * - RCU read-side critical section
1100+ * - current->numa_group from everywhere
1101+ * - task's runqueue locked, task not running
1102+ */
1103+ struct numa_group __rcu *numa_group;
10961104
10971105 /*
10981106 * numa_faults is an array split into four regions:
include/linux/sched/numa_balancing.h+2−2
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 extern void task_numa_fault(int last_node, int node, int pages, int flags);
2020 extern pid_t task_numa_group_id(struct task_struct *p);
2121 extern void set_numabalancing_state(bool enabled);
22−extern void task_numa_free(struct task_struct *p);
22+extern void task_numa_free(struct task_struct *p, bool final);
2323 extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page,
2424 int src_nid, int dst_cpu);
2525 #else
@@ -34,7 +34,7 @@ static inline pid_t task_numa_group_id(struct task_struct *p) · 8 unmodified lines
3434 static inline void set_numabalancing_state(bool enabled)
3535 {
3636 }
37−static inline void task_numa_free(struct task_struct *p)
37+static inline void task_numa_free(struct task_struct *p, bool final)
3838 {
3939 }
4040 static inline bool should_numa_migrate_memory(struct task_struct *p,
include/linux/skmsg.h+7−1
@@ -354,7 +354,13 @@ static inline void sk_psock_restore_proto(struct sock *sk, · 353 unmodified lines
354354 sk->sk_write_space = psock->saved_write_space;
355355
356356 if (psock->sk_proto) {
357− sk->sk_prot = psock->sk_proto;
357+ struct inet_connection_sock *icsk = inet_csk(sk);
358+ bool has_ulp = !!icsk->icsk_ulp_data;
359+
360+ if (has_ulp)
361+ tcp_update_ulp(sk, psock->sk_proto);
362+ else
363+ sk->sk_prot = psock->sk_proto;
358364 psock->sk_proto = NULL;
359365 }
360366 }
include/linux/usb.h+1−1
@@ -1457,7 +1457,7 @@ typedef void (*usb_complete_t)(struct urb *); · 1456 unmodified lines
14571457 * field rather than determining a dma address themselves.
14581458 *
14591459 * Note that transfer_buffer must still be set if the controller
1460− * does not support DMA (as indicated by bus.uses_dma) and when talking
1460+ * does not support DMA (as indicated by hcd_uses_dma()) and when talking
14611461 * to root hub. If you have to trasfer between highmem zone and the device
14621462 * on such controller, create a bounce buffer or bail out with an error.
14631463 * If transfer_buffer cannot be set (is in highmem) and the controller is DMA
include/linux/usb/hcd.h+3−0
@@ -422,6 +422,9 @@ static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd, · 421 unmodified lines
422422 return hcd->high_prio_bh.completing_ep == ep;
423423 }
424424
425+#define hcd_uses_dma(hcd) \
426+ (IS_ENABLED(CONFIG_HAS_DMA) && (hcd)->self.uses_dma)
427+
425428 extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
426429 extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb,
427430 int status);
include/linux/wait.h+13−0
@@ -126,6 +126,19 @@ static inline int waitqueue_active(struct wait_queue_head *wq_head) · 125 unmodified lines
126126 return !list_empty(&wq_head->head);
127127 }
128128
129+/**
130+ * wq_has_single_sleeper - check if there is only one sleeper
131+ * @wq_head: wait queue head
132+ *
133+ * Returns true of wq_head has only one sleeper on the list.
134+ *
135+ * Please refer to the comment for waitqueue_active.
136+ */
137+static inline bool wq_has_single_sleeper(struct wait_queue_head *wq_head)
138+{
139+ return list_is_singular(&wq_head->head);
140+}
141+
129142 /**
130143 * wq_has_sleeper - check if there are any waiting processes
131144 * @wq_head: wait queue head

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t