diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ata.h | 4 | ||||
| -rw-r--r-- | include/linux/bio.h | 32 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 25 | ||||
| -rw-r--r-- | include/linux/cache.h | 14 | ||||
| -rw-r--r-- | include/linux/ceph/ceph_features.h | 1 | ||||
| -rw-r--r-- | include/linux/compiler.h | 5 | ||||
| -rw-r--r-- | include/linux/dcache.h | 4 | ||||
| -rw-r--r-- | include/linux/dma-mapping.h | 27 | ||||
| -rw-r--r-- | include/linux/init.h | 4 | ||||
| -rw-r--r-- | include/linux/ioport.h | 33 | ||||
| -rw-r--r-- | include/linux/kasan.h | 6 | ||||
| -rw-r--r-- | include/linux/libata.h | 2 | ||||
| -rw-r--r-- | include/linux/list.h | 11 | ||||
| -rw-r--r-- | include/linux/lockdep.h | 2 | ||||
| -rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 4 | ||||
| -rw-r--r-- | include/linux/mm.h | 3 | ||||
| -rw-r--r-- | include/linux/perf_event.h | 1 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 24 | ||||
| -rw-r--r-- | include/linux/stmmac.h | 1 | ||||
| -rw-r--r-- | include/linux/trace_events.h | 2 | ||||
| -rw-r--r-- | include/linux/tracepoint.h | 17 | ||||
| -rw-r--r-- | include/linux/writeback.h | 5 |
22 files changed, 177 insertions, 50 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index d2992bfa1706..c1a2f345cbe6 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -487,8 +487,8 @@ enum ata_tf_protocols { | |||
| 487 | }; | 487 | }; |
| 488 | 488 | ||
| 489 | enum ata_ioctls { | 489 | enum ata_ioctls { |
| 490 | ATA_IOC_GET_IO32 = 0x309, | 490 | ATA_IOC_GET_IO32 = 0x309, /* HDIO_GET_32BIT */ |
| 491 | ATA_IOC_SET_IO32 = 0x324, | 491 | ATA_IOC_SET_IO32 = 0x324, /* HDIO_SET_32BIT */ |
| 492 | }; | 492 | }; |
| 493 | 493 | ||
| 494 | /* core structures */ | 494 | /* core structures */ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5349e6816cbb..88bc64f00bb5 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -310,6 +310,38 @@ static inline void bio_clear_flag(struct bio *bio, unsigned int bit) | |||
| 310 | bio->bi_flags &= ~(1U << bit); | 310 | bio->bi_flags &= ~(1U << bit); |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | static inline void bio_get_first_bvec(struct bio *bio, struct bio_vec *bv) | ||
| 314 | { | ||
| 315 | *bv = bio_iovec(bio); | ||
| 316 | } | ||
| 317 | |||
| 318 | static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv) | ||
| 319 | { | ||
| 320 | struct bvec_iter iter = bio->bi_iter; | ||
| 321 | int idx; | ||
| 322 | |||
| 323 | if (unlikely(!bio_multiple_segments(bio))) { | ||
| 324 | *bv = bio_iovec(bio); | ||
| 325 | return; | ||
| 326 | } | ||
| 327 | |||
| 328 | bio_advance_iter(bio, &iter, iter.bi_size); | ||
| 329 | |||
| 330 | if (!iter.bi_bvec_done) | ||
| 331 | idx = iter.bi_idx - 1; | ||
| 332 | else /* in the middle of bvec */ | ||
| 333 | idx = iter.bi_idx; | ||
| 334 | |||
| 335 | *bv = bio->bi_io_vec[idx]; | ||
| 336 | |||
| 337 | /* | ||
| 338 | * iter.bi_bvec_done records actual length of the last bvec | ||
| 339 | * if this bio ends in the middle of one io vector | ||
| 340 | */ | ||
| 341 | if (iter.bi_bvec_done) | ||
| 342 | bv->bv_len = iter.bi_bvec_done; | ||
| 343 | } | ||
| 344 | |||
| 313 | enum bip_flags { | 345 | enum bip_flags { |
| 314 | BIP_BLOCK_INTEGRITY = 1 << 0, /* block layer owns integrity data */ | 346 | BIP_BLOCK_INTEGRITY = 1 << 0, /* block layer owns integrity data */ |
| 315 | BIP_MAPPED_INTEGRITY = 1 << 1, /* ref tag has been remapped */ | 347 | BIP_MAPPED_INTEGRITY = 1 << 1, /* ref tag has been remapped */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4571ef1a12a9..413c84fbc4ed 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -895,7 +895,7 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq) | |||
| 895 | { | 895 | { |
| 896 | struct request_queue *q = rq->q; | 896 | struct request_queue *q = rq->q; |
| 897 | 897 | ||
| 898 | if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) | 898 | if (unlikely(rq->cmd_type != REQ_TYPE_FS)) |
| 899 | return q->limits.max_hw_sectors; | 899 | return q->limits.max_hw_sectors; |
| 900 | 900 | ||
| 901 | if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) | 901 | if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) |
| @@ -1372,6 +1372,13 @@ static inline void put_dev_sector(Sector p) | |||
| 1372 | page_cache_release(p.v); | 1372 | page_cache_release(p.v); |
| 1373 | } | 1373 | } |
| 1374 | 1374 | ||
| 1375 | static inline bool __bvec_gap_to_prev(struct request_queue *q, | ||
| 1376 | struct bio_vec *bprv, unsigned int offset) | ||
| 1377 | { | ||
| 1378 | return offset || | ||
| 1379 | ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q)); | ||
| 1380 | } | ||
| 1381 | |||
| 1375 | /* | 1382 | /* |
| 1376 | * Check if adding a bio_vec after bprv with offset would create a gap in | 1383 | * Check if adding a bio_vec after bprv with offset would create a gap in |
| 1377 | * the SG list. Most drivers don't care about this, but some do. | 1384 | * the SG list. Most drivers don't care about this, but some do. |
| @@ -1381,18 +1388,22 @@ static inline bool bvec_gap_to_prev(struct request_queue *q, | |||
| 1381 | { | 1388 | { |
| 1382 | if (!queue_virt_boundary(q)) | 1389 | if (!queue_virt_boundary(q)) |
| 1383 | return false; | 1390 | return false; |
| 1384 | return offset || | 1391 | return __bvec_gap_to_prev(q, bprv, offset); |
| 1385 | ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q)); | ||
| 1386 | } | 1392 | } |
| 1387 | 1393 | ||
| 1388 | static inline bool bio_will_gap(struct request_queue *q, struct bio *prev, | 1394 | static inline bool bio_will_gap(struct request_queue *q, struct bio *prev, |
| 1389 | struct bio *next) | 1395 | struct bio *next) |
| 1390 | { | 1396 | { |
| 1391 | if (!bio_has_data(prev)) | 1397 | if (bio_has_data(prev) && queue_virt_boundary(q)) { |
| 1392 | return false; | 1398 | struct bio_vec pb, nb; |
| 1399 | |||
| 1400 | bio_get_last_bvec(prev, &pb); | ||
| 1401 | bio_get_first_bvec(next, &nb); | ||
| 1393 | 1402 | ||
| 1394 | return bvec_gap_to_prev(q, &prev->bi_io_vec[prev->bi_vcnt - 1], | 1403 | return __bvec_gap_to_prev(q, &pb, nb.bv_offset); |
| 1395 | next->bi_io_vec[0].bv_offset); | 1404 | } |
| 1405 | |||
| 1406 | return false; | ||
| 1396 | } | 1407 | } |
| 1397 | 1408 | ||
| 1398 | static inline bool req_gap_back_merge(struct request *req, struct bio *bio) | 1409 | static inline bool req_gap_back_merge(struct request *req, struct bio *bio) |
diff --git a/include/linux/cache.h b/include/linux/cache.h index 17e7e82d2aa7..1be04f8c563a 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
| @@ -12,10 +12,24 @@ | |||
| 12 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 12 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
| 13 | #endif | 13 | #endif |
| 14 | 14 | ||
| 15 | /* | ||
| 16 | * __read_mostly is used to keep rarely changing variables out of frequently | ||
| 17 | * updated cachelines. If an architecture doesn't support it, ignore the | ||
| 18 | * hint. | ||
| 19 | */ | ||
| 15 | #ifndef __read_mostly | 20 | #ifndef __read_mostly |
| 16 | #define __read_mostly | 21 | #define __read_mostly |
| 17 | #endif | 22 | #endif |
| 18 | 23 | ||
| 24 | /* | ||
| 25 | * __ro_after_init is used to mark things that are read-only after init (i.e. | ||
| 26 | * after mark_rodata_ro() has been called). These are effectively read-only, | ||
| 27 | * but may get written to during init, so can't live in .rodata (via "const"). | ||
| 28 | */ | ||
| 29 | #ifndef __ro_after_init | ||
| 30 | #define __ro_after_init __attribute__((__section__(".data..ro_after_init"))) | ||
| 31 | #endif | ||
| 32 | |||
| 19 | #ifndef ____cacheline_aligned | 33 | #ifndef ____cacheline_aligned |
| 20 | #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) | 34 | #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) |
| 21 | #endif | 35 | #endif |
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index c1ef6f14e7be..15151f3c4120 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h | |||
| @@ -75,6 +75,7 @@ | |||
| 75 | #define CEPH_FEATURE_CRUSH_TUNABLES5 (1ULL<<58) /* chooseleaf stable mode */ | 75 | #define CEPH_FEATURE_CRUSH_TUNABLES5 (1ULL<<58) /* chooseleaf stable mode */ |
| 76 | // duplicated since it was introduced at the same time as CEPH_FEATURE_CRUSH_TUNABLES5 | 76 | // duplicated since it was introduced at the same time as CEPH_FEATURE_CRUSH_TUNABLES5 |
| 77 | #define CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING (1ULL<<58) /* New, v7 encoding */ | 77 | #define CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING (1ULL<<58) /* New, v7 encoding */ |
| 78 | #define CEPH_FEATURE_FS_FILE_LAYOUT_V2 (1ULL<<58) /* file_layout_t */ | ||
| 78 | 79 | ||
| 79 | /* | 80 | /* |
| 80 | * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature | 81 | * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 48f5aab117ae..a27f4f17c382 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -263,8 +263,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
| 263 | * In contrast to ACCESS_ONCE these two macros will also work on aggregate | 263 | * In contrast to ACCESS_ONCE these two macros will also work on aggregate |
| 264 | * data types like structs or unions. If the size of the accessed data | 264 | * data types like structs or unions. If the size of the accessed data |
| 265 | * type exceeds the word size of the machine (e.g., 32 bits or 64 bits) | 265 | * type exceeds the word size of the machine (e.g., 32 bits or 64 bits) |
| 266 | * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a | 266 | * READ_ONCE() and WRITE_ONCE() will fall back to memcpy(). There's at |
| 267 | * compile-time warning. | 267 | * least two memcpy()s: one for the __builtin_memcpy() and then one for |
| 268 | * the macro doing the copy of variable - '__u' allocated on the stack. | ||
| 268 | * | 269 | * |
| 269 | * Their two major use cases are: (1) Mediating communication between | 270 | * Their two major use cases are: (1) Mediating communication between |
| 270 | * process-level code and irq/NMI handlers, all running on the same CPU, | 271 | * process-level code and irq/NMI handlers, all running on the same CPU, |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 7781ce110503..c4b5f4b3f8f8 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -409,9 +409,7 @@ static inline bool d_mountpoint(const struct dentry *dentry) | |||
| 409 | */ | 409 | */ |
| 410 | static inline unsigned __d_entry_type(const struct dentry *dentry) | 410 | static inline unsigned __d_entry_type(const struct dentry *dentry) |
| 411 | { | 411 | { |
| 412 | unsigned type = READ_ONCE(dentry->d_flags); | 412 | return dentry->d_flags & DCACHE_ENTRY_TYPE; |
| 413 | smp_rmb(); | ||
| 414 | return type & DCACHE_ENTRY_TYPE; | ||
| 415 | } | 413 | } |
| 416 | 414 | ||
| 417 | static inline bool d_is_miss(const struct dentry *dentry) | 415 | static inline bool d_is_miss(const struct dentry *dentry) |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 75857cda38e9..5e45cf930a3f 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -386,7 +386,7 @@ static inline void dma_free_attrs(struct device *dev, size_t size, | |||
| 386 | if (dma_release_from_coherent(dev, get_order(size), cpu_addr)) | 386 | if (dma_release_from_coherent(dev, get_order(size), cpu_addr)) |
| 387 | return; | 387 | return; |
| 388 | 388 | ||
| 389 | if (!ops->free) | 389 | if (!ops->free || !cpu_addr) |
| 390 | return; | 390 | return; |
| 391 | 391 | ||
| 392 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); | 392 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); |
| @@ -641,31 +641,40 @@ static inline void dmam_release_declared_memory(struct device *dev) | |||
| 641 | } | 641 | } |
| 642 | #endif /* CONFIG_HAVE_GENERIC_DMA_COHERENT */ | 642 | #endif /* CONFIG_HAVE_GENERIC_DMA_COHERENT */ |
| 643 | 643 | ||
| 644 | static inline void *dma_alloc_writecombine(struct device *dev, size_t size, | 644 | static inline void *dma_alloc_wc(struct device *dev, size_t size, |
| 645 | dma_addr_t *dma_addr, gfp_t gfp) | 645 | dma_addr_t *dma_addr, gfp_t gfp) |
| 646 | { | 646 | { |
| 647 | DEFINE_DMA_ATTRS(attrs); | 647 | DEFINE_DMA_ATTRS(attrs); |
| 648 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); | 648 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); |
| 649 | return dma_alloc_attrs(dev, size, dma_addr, gfp, &attrs); | 649 | return dma_alloc_attrs(dev, size, dma_addr, gfp, &attrs); |
| 650 | } | 650 | } |
| 651 | #ifndef dma_alloc_writecombine | ||
| 652 | #define dma_alloc_writecombine dma_alloc_wc | ||
| 653 | #endif | ||
| 651 | 654 | ||
| 652 | static inline void dma_free_writecombine(struct device *dev, size_t size, | 655 | static inline void dma_free_wc(struct device *dev, size_t size, |
| 653 | void *cpu_addr, dma_addr_t dma_addr) | 656 | void *cpu_addr, dma_addr_t dma_addr) |
| 654 | { | 657 | { |
| 655 | DEFINE_DMA_ATTRS(attrs); | 658 | DEFINE_DMA_ATTRS(attrs); |
| 656 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); | 659 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); |
| 657 | return dma_free_attrs(dev, size, cpu_addr, dma_addr, &attrs); | 660 | return dma_free_attrs(dev, size, cpu_addr, dma_addr, &attrs); |
| 658 | } | 661 | } |
| 662 | #ifndef dma_free_writecombine | ||
| 663 | #define dma_free_writecombine dma_free_wc | ||
| 664 | #endif | ||
| 659 | 665 | ||
| 660 | static inline int dma_mmap_writecombine(struct device *dev, | 666 | static inline int dma_mmap_wc(struct device *dev, |
| 661 | struct vm_area_struct *vma, | 667 | struct vm_area_struct *vma, |
| 662 | void *cpu_addr, dma_addr_t dma_addr, | 668 | void *cpu_addr, dma_addr_t dma_addr, |
| 663 | size_t size) | 669 | size_t size) |
| 664 | { | 670 | { |
| 665 | DEFINE_DMA_ATTRS(attrs); | 671 | DEFINE_DMA_ATTRS(attrs); |
| 666 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); | 672 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &attrs); |
| 667 | return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, &attrs); | 673 | return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, &attrs); |
| 668 | } | 674 | } |
| 675 | #ifndef dma_mmap_writecombine | ||
| 676 | #define dma_mmap_writecombine dma_mmap_wc | ||
| 677 | #endif | ||
| 669 | 678 | ||
| 670 | #ifdef CONFIG_NEED_DMA_MAP_STATE | 679 | #ifdef CONFIG_NEED_DMA_MAP_STATE |
| 671 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME | 680 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME |
diff --git a/include/linux/init.h b/include/linux/init.h index b449f378f995..aedb254abc37 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
| @@ -142,6 +142,10 @@ void prepare_namespace(void); | |||
| 142 | void __init load_default_modules(void); | 142 | void __init load_default_modules(void); |
| 143 | int __init init_rootfs(void); | 143 | int __init init_rootfs(void); |
| 144 | 144 | ||
| 145 | #ifdef CONFIG_DEBUG_RODATA | ||
| 146 | void mark_rodata_ro(void); | ||
| 147 | #endif | ||
| 148 | |||
| 145 | extern void (*late_time_init)(void); | 149 | extern void (*late_time_init)(void); |
| 146 | 150 | ||
| 147 | extern bool initcall_debug; | 151 | extern bool initcall_debug; |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 24bea087e7af..afb45597fb5f 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -20,6 +20,7 @@ struct resource { | |||
| 20 | resource_size_t end; | 20 | resource_size_t end; |
| 21 | const char *name; | 21 | const char *name; |
| 22 | unsigned long flags; | 22 | unsigned long flags; |
| 23 | unsigned long desc; | ||
| 23 | struct resource *parent, *sibling, *child; | 24 | struct resource *parent, *sibling, *child; |
| 24 | }; | 25 | }; |
| 25 | 26 | ||
| @@ -49,12 +50,19 @@ struct resource { | |||
| 49 | #define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */ | 50 | #define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */ |
| 50 | #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */ | 51 | #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */ |
| 51 | 52 | ||
| 53 | #define IORESOURCE_EXT_TYPE_BITS 0x01000000 /* Resource extended types */ | ||
| 54 | #define IORESOURCE_SYSRAM 0x01000000 /* System RAM (modifier) */ | ||
| 55 | |||
| 52 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 56 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
| 57 | |||
| 53 | #define IORESOURCE_DISABLED 0x10000000 | 58 | #define IORESOURCE_DISABLED 0x10000000 |
| 54 | #define IORESOURCE_UNSET 0x20000000 /* No address assigned yet */ | 59 | #define IORESOURCE_UNSET 0x20000000 /* No address assigned yet */ |
| 55 | #define IORESOURCE_AUTO 0x40000000 | 60 | #define IORESOURCE_AUTO 0x40000000 |
| 56 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ | 61 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ |
| 57 | 62 | ||
| 63 | /* I/O resource extended types */ | ||
| 64 | #define IORESOURCE_SYSTEM_RAM (IORESOURCE_MEM|IORESOURCE_SYSRAM) | ||
| 65 | |||
| 58 | /* PnP IRQ specific bits (IORESOURCE_BITS) */ | 66 | /* PnP IRQ specific bits (IORESOURCE_BITS) */ |
| 59 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) | 67 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) |
| 60 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) | 68 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) |
| @@ -105,6 +113,22 @@ struct resource { | |||
| 105 | /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ | 113 | /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ |
| 106 | #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ | 114 | #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ |
| 107 | 115 | ||
| 116 | /* | ||
| 117 | * I/O Resource Descriptors | ||
| 118 | * | ||
| 119 | * Descriptors are used by walk_iomem_res_desc() and region_intersects() | ||
| 120 | * for searching a specific resource range in the iomem table. Assign | ||
| 121 | * a new descriptor when a resource range supports the search interfaces. | ||
| 122 | * Otherwise, resource.desc must be set to IORES_DESC_NONE (0). | ||
| 123 | */ | ||
| 124 | enum { | ||
| 125 | IORES_DESC_NONE = 0, | ||
| 126 | IORES_DESC_CRASH_KERNEL = 1, | ||
| 127 | IORES_DESC_ACPI_TABLES = 2, | ||
| 128 | IORES_DESC_ACPI_NV_STORAGE = 3, | ||
| 129 | IORES_DESC_PERSISTENT_MEMORY = 4, | ||
| 130 | IORES_DESC_PERSISTENT_MEMORY_LEGACY = 5, | ||
| 131 | }; | ||
| 108 | 132 | ||
| 109 | /* helpers to define resources */ | 133 | /* helpers to define resources */ |
| 110 | #define DEFINE_RES_NAMED(_start, _size, _name, _flags) \ | 134 | #define DEFINE_RES_NAMED(_start, _size, _name, _flags) \ |
| @@ -113,6 +137,7 @@ struct resource { | |||
| 113 | .end = (_start) + (_size) - 1, \ | 137 | .end = (_start) + (_size) - 1, \ |
| 114 | .name = (_name), \ | 138 | .name = (_name), \ |
| 115 | .flags = (_flags), \ | 139 | .flags = (_flags), \ |
| 140 | .desc = IORES_DESC_NONE, \ | ||
| 116 | } | 141 | } |
| 117 | 142 | ||
| 118 | #define DEFINE_RES_IO_NAMED(_start, _size, _name) \ | 143 | #define DEFINE_RES_IO_NAMED(_start, _size, _name) \ |
| @@ -170,6 +195,10 @@ static inline unsigned long resource_type(const struct resource *res) | |||
| 170 | { | 195 | { |
| 171 | return res->flags & IORESOURCE_TYPE_BITS; | 196 | return res->flags & IORESOURCE_TYPE_BITS; |
| 172 | } | 197 | } |
| 198 | static inline unsigned long resource_ext_type(const struct resource *res) | ||
| 199 | { | ||
| 200 | return res->flags & IORESOURCE_EXT_TYPE_BITS; | ||
| 201 | } | ||
| 173 | /* True iff r1 completely contains r2 */ | 202 | /* True iff r1 completely contains r2 */ |
| 174 | static inline bool resource_contains(struct resource *r1, struct resource *r2) | 203 | static inline bool resource_contains(struct resource *r1, struct resource *r2) |
| 175 | { | 204 | { |
| @@ -239,8 +268,8 @@ extern int | |||
| 239 | walk_system_ram_res(u64 start, u64 end, void *arg, | 268 | walk_system_ram_res(u64 start, u64 end, void *arg, |
| 240 | int (*func)(u64, u64, void *)); | 269 | int (*func)(u64, u64, void *)); |
| 241 | extern int | 270 | extern int |
| 242 | walk_iomem_res(char *name, unsigned long flags, u64 start, u64 end, void *arg, | 271 | walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, u64 end, |
| 243 | int (*func)(u64, u64, void *)); | 272 | void *arg, int (*func)(u64, u64, void *)); |
| 244 | 273 | ||
| 245 | /* True if any part of r1 overlaps r2 */ | 274 | /* True if any part of r1 overlaps r2 */ |
| 246 | static inline bool resource_overlaps(struct resource *r1, struct resource *r2) | 275 | static inline bool resource_overlaps(struct resource *r1, struct resource *r2) |
diff --git a/include/linux/kasan.h b/include/linux/kasan.h index 4b9f85c963d0..0fdc798e3ff7 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_KASAN_H | 1 | #ifndef _LINUX_KASAN_H |
| 2 | #define _LINUX_KASAN_H | 2 | #define _LINUX_KASAN_H |
| 3 | 3 | ||
| 4 | #include <linux/sched.h> | ||
| 4 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 5 | 6 | ||
| 6 | struct kmem_cache; | 7 | struct kmem_cache; |
| @@ -13,7 +14,6 @@ struct vm_struct; | |||
| 13 | 14 | ||
| 14 | #include <asm/kasan.h> | 15 | #include <asm/kasan.h> |
| 15 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
| 16 | #include <linux/sched.h> | ||
| 17 | 17 | ||
| 18 | extern unsigned char kasan_zero_page[PAGE_SIZE]; | 18 | extern unsigned char kasan_zero_page[PAGE_SIZE]; |
| 19 | extern pte_t kasan_zero_pte[PTRS_PER_PTE]; | 19 | extern pte_t kasan_zero_pte[PTRS_PER_PTE]; |
| @@ -43,6 +43,8 @@ static inline void kasan_disable_current(void) | |||
| 43 | 43 | ||
| 44 | void kasan_unpoison_shadow(const void *address, size_t size); | 44 | void kasan_unpoison_shadow(const void *address, size_t size); |
| 45 | 45 | ||
| 46 | void kasan_unpoison_task_stack(struct task_struct *task); | ||
| 47 | |||
| 46 | void kasan_alloc_pages(struct page *page, unsigned int order); | 48 | void kasan_alloc_pages(struct page *page, unsigned int order); |
| 47 | void kasan_free_pages(struct page *page, unsigned int order); | 49 | void kasan_free_pages(struct page *page, unsigned int order); |
| 48 | 50 | ||
| @@ -66,6 +68,8 @@ void kasan_free_shadow(const struct vm_struct *vm); | |||
| 66 | 68 | ||
| 67 | static inline void kasan_unpoison_shadow(const void *address, size_t size) {} | 69 | static inline void kasan_unpoison_shadow(const void *address, size_t size) {} |
| 68 | 70 | ||
| 71 | static inline void kasan_unpoison_task_stack(struct task_struct *task) {} | ||
| 72 | |||
| 69 | static inline void kasan_enable_current(void) {} | 73 | static inline void kasan_enable_current(void) {} |
| 70 | static inline void kasan_disable_current(void) {} | 74 | static inline void kasan_disable_current(void) {} |
| 71 | 75 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index bec2abbd7ab2..2c4ebef79d0c 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -720,7 +720,7 @@ struct ata_device { | |||
| 720 | union { | 720 | union { |
| 721 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 721 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
| 722 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 722 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
| 723 | }; | 723 | } ____cacheline_aligned; |
| 724 | 724 | ||
| 725 | /* DEVSLP Timing Variables from Identify Device Data Log */ | 725 | /* DEVSLP Timing Variables from Identify Device Data Log */ |
| 726 | u8 devslp_timing[ATA_LOG_DEVSLP_SIZE]; | 726 | u8 devslp_timing[ATA_LOG_DEVSLP_SIZE]; |
diff --git a/include/linux/list.h b/include/linux/list.h index 30cf4200ab40..5356f4d661a7 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -113,17 +113,6 @@ extern void __list_del_entry(struct list_head *entry); | |||
| 113 | extern void list_del(struct list_head *entry); | 113 | extern void list_del(struct list_head *entry); |
| 114 | #endif | 114 | #endif |
| 115 | 115 | ||
| 116 | #ifdef CONFIG_DEBUG_LIST | ||
| 117 | /* | ||
| 118 | * See devm_memremap_pages() which wants DEBUG_LIST=y to assert if one | ||
| 119 | * of the pages it allocates is ever passed to list_add() | ||
| 120 | */ | ||
| 121 | extern void list_force_poison(struct list_head *entry); | ||
| 122 | #else | ||
| 123 | /* fallback to the less strict LIST_POISON* definitions */ | ||
| 124 | #define list_force_poison list_del | ||
| 125 | #endif | ||
| 126 | |||
| 127 | /** | 116 | /** |
| 128 | * list_replace - replace old entry by new one | 117 | * list_replace - replace old entry by new one |
| 129 | * @old : the element to be replaced | 118 | * @old : the element to be replaced |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 4dca42fd32f5..d026b190c530 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -261,7 +261,6 @@ struct held_lock { | |||
| 261 | /* | 261 | /* |
| 262 | * Initialization, self-test and debugging-output methods: | 262 | * Initialization, self-test and debugging-output methods: |
| 263 | */ | 263 | */ |
| 264 | extern void lockdep_init(void); | ||
| 265 | extern void lockdep_info(void); | 264 | extern void lockdep_info(void); |
| 266 | extern void lockdep_reset(void); | 265 | extern void lockdep_reset(void); |
| 267 | extern void lockdep_reset_lock(struct lockdep_map *lock); | 266 | extern void lockdep_reset_lock(struct lockdep_map *lock); |
| @@ -392,7 +391,6 @@ static inline void lockdep_on(void) | |||
| 392 | # define lockdep_set_current_reclaim_state(g) do { } while (0) | 391 | # define lockdep_set_current_reclaim_state(g) do { } while (0) |
| 393 | # define lockdep_clear_current_reclaim_state() do { } while (0) | 392 | # define lockdep_clear_current_reclaim_state() do { } while (0) |
| 394 | # define lockdep_trace_alloc(g) do { } while (0) | 393 | # define lockdep_trace_alloc(g) do { } while (0) |
| 395 | # define lockdep_init() do { } while (0) | ||
| 396 | # define lockdep_info() do { } while (0) | 394 | # define lockdep_info() do { } while (0) |
| 397 | # define lockdep_init_map(lock, name, key, sub) \ | 395 | # define lockdep_init_map(lock, name, key, sub) \ |
| 398 | do { (void)(name); (void)(key); } while (0) | 396 | do { (void)(name); (void)(key); } while (0) |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 51f1e540fc2b..58eef02edc7e 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -4245,7 +4245,9 @@ struct mlx5_ifc_modify_tir_bitmask_bits { | |||
| 4245 | 4245 | ||
| 4246 | u8 reserved_at_20[0x1b]; | 4246 | u8 reserved_at_20[0x1b]; |
| 4247 | u8 self_lb_en[0x1]; | 4247 | u8 self_lb_en[0x1]; |
| 4248 | u8 reserved_at_3c[0x3]; | 4248 | u8 reserved_at_3c[0x1]; |
| 4249 | u8 hash[0x1]; | ||
| 4250 | u8 reserved_at_3e[0x1]; | ||
| 4249 | u8 lro[0x1]; | 4251 | u8 lro[0x1]; |
| 4250 | }; | 4252 | }; |
| 4251 | 4253 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 516e14944339..2b6e22782699 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -387,7 +387,8 @@ enum { | |||
| 387 | REGION_MIXED, | 387 | REGION_MIXED, |
| 388 | }; | 388 | }; |
| 389 | 389 | ||
| 390 | int region_intersects(resource_size_t offset, size_t size, const char *type); | 390 | int region_intersects(resource_size_t offset, size_t size, unsigned long flags, |
| 391 | unsigned long desc); | ||
| 391 | 392 | ||
| 392 | /* Support for virtually mapped pages */ | 393 | /* Support for virtually mapped pages */ |
| 393 | struct page *vmalloc_to_page(const void *addr); | 394 | struct page *vmalloc_to_page(const void *addr); |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f5c5a3fa2c81..a9d8cab18b00 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -468,6 +468,7 @@ struct perf_event { | |||
| 468 | int group_flags; | 468 | int group_flags; |
| 469 | struct perf_event *group_leader; | 469 | struct perf_event *group_leader; |
| 470 | struct pmu *pmu; | 470 | struct pmu *pmu; |
| 471 | void *pmu_private; | ||
| 471 | 472 | ||
| 472 | enum perf_event_active_state state; | 473 | enum perf_event_active_state state; |
| 473 | unsigned int attach_state; | 474 | unsigned int attach_state; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 4ce9ff7086f4..d3fcd4591ce4 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1985,6 +1985,30 @@ static inline void skb_reserve(struct sk_buff *skb, int len) | |||
| 1985 | skb->tail += len; | 1985 | skb->tail += len; |
| 1986 | } | 1986 | } |
| 1987 | 1987 | ||
| 1988 | /** | ||
| 1989 | * skb_tailroom_reserve - adjust reserved_tailroom | ||
| 1990 | * @skb: buffer to alter | ||
| 1991 | * @mtu: maximum amount of headlen permitted | ||
| 1992 | * @needed_tailroom: minimum amount of reserved_tailroom | ||
| 1993 | * | ||
| 1994 | * Set reserved_tailroom so that headlen can be as large as possible but | ||
| 1995 | * not larger than mtu and tailroom cannot be smaller than | ||
| 1996 | * needed_tailroom. | ||
| 1997 | * The required headroom should already have been reserved before using | ||
| 1998 | * this function. | ||
| 1999 | */ | ||
| 2000 | static inline void skb_tailroom_reserve(struct sk_buff *skb, unsigned int mtu, | ||
| 2001 | unsigned int needed_tailroom) | ||
| 2002 | { | ||
| 2003 | SKB_LINEAR_ASSERT(skb); | ||
| 2004 | if (mtu < skb_tailroom(skb) - needed_tailroom) | ||
| 2005 | /* use at most mtu */ | ||
| 2006 | skb->reserved_tailroom = skb_tailroom(skb) - mtu; | ||
| 2007 | else | ||
| 2008 | /* use up to all available space */ | ||
| 2009 | skb->reserved_tailroom = needed_tailroom; | ||
| 2010 | } | ||
| 2011 | |||
| 1988 | #define ENCAP_TYPE_ETHER 0 | 2012 | #define ENCAP_TYPE_ETHER 0 |
| 1989 | #define ENCAP_TYPE_IPPROTO 1 | 2013 | #define ENCAP_TYPE_IPPROTO 1 |
| 1990 | 2014 | ||
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index eead8ab93c0a..881a79d52467 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
| @@ -100,6 +100,7 @@ struct plat_stmmacenet_data { | |||
| 100 | int interface; | 100 | int interface; |
| 101 | struct stmmac_mdio_bus_data *mdio_bus_data; | 101 | struct stmmac_mdio_bus_data *mdio_bus_data; |
| 102 | struct device_node *phy_node; | 102 | struct device_node *phy_node; |
| 103 | struct device_node *mdio_node; | ||
| 103 | struct stmmac_dma_cfg *dma_cfg; | 104 | struct stmmac_dma_cfg *dma_cfg; |
| 104 | int clk_csr; | 105 | int clk_csr; |
| 105 | int has_gmac; | 106 | int has_gmac; |
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 429fdfc3baf5..925730bc9fc1 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h | |||
| @@ -568,6 +568,8 @@ enum { | |||
| 568 | FILTER_DYN_STRING, | 568 | FILTER_DYN_STRING, |
| 569 | FILTER_PTR_STRING, | 569 | FILTER_PTR_STRING, |
| 570 | FILTER_TRACE_FN, | 570 | FILTER_TRACE_FN, |
| 571 | FILTER_COMM, | ||
| 572 | FILTER_CPU, | ||
| 571 | }; | 573 | }; |
| 572 | 574 | ||
| 573 | extern int trace_event_raw_init(struct trace_event_call *call); | 575 | extern int trace_event_raw_init(struct trace_event_call *call); |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index acfdbf353a0b..be586c632a0c 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -134,9 +134,6 @@ extern void syscall_unregfunc(void); | |||
| 134 | void *it_func; \ | 134 | void *it_func; \ |
| 135 | void *__data; \ | 135 | void *__data; \ |
| 136 | \ | 136 | \ |
| 137 | if (!cpu_online(raw_smp_processor_id())) \ | ||
| 138 | return; \ | ||
| 139 | \ | ||
| 140 | if (!(cond)) \ | 137 | if (!(cond)) \ |
| 141 | return; \ | 138 | return; \ |
| 142 | prercu; \ | 139 | prercu; \ |
| @@ -343,15 +340,19 @@ extern void syscall_unregfunc(void); | |||
| 343 | * "void *__data, proto" as the callback prototype. | 340 | * "void *__data, proto" as the callback prototype. |
| 344 | */ | 341 | */ |
| 345 | #define DECLARE_TRACE_NOARGS(name) \ | 342 | #define DECLARE_TRACE_NOARGS(name) \ |
| 346 | __DECLARE_TRACE(name, void, , 1, void *__data, __data) | 343 | __DECLARE_TRACE(name, void, , \ |
| 344 | cpu_online(raw_smp_processor_id()), \ | ||
| 345 | void *__data, __data) | ||
| 347 | 346 | ||
| 348 | #define DECLARE_TRACE(name, proto, args) \ | 347 | #define DECLARE_TRACE(name, proto, args) \ |
| 349 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \ | 348 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ |
| 350 | PARAMS(void *__data, proto), \ | 349 | cpu_online(raw_smp_processor_id()), \ |
| 351 | PARAMS(__data, args)) | 350 | PARAMS(void *__data, proto), \ |
| 351 | PARAMS(__data, args)) | ||
| 352 | 352 | ||
| 353 | #define DECLARE_TRACE_CONDITION(name, proto, args, cond) \ | 353 | #define DECLARE_TRACE_CONDITION(name, proto, args, cond) \ |
| 354 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), PARAMS(cond), \ | 354 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ |
| 355 | cpu_online(raw_smp_processor_id()) && (PARAMS(cond)), \ | ||
| 355 | PARAMS(void *__data, proto), \ | 356 | PARAMS(void *__data, proto), \ |
| 356 | PARAMS(__data, args)) | 357 | PARAMS(__data, args)) |
| 357 | 358 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index b333c945e571..d0b5ca5d4e08 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -198,6 +198,7 @@ void wbc_attach_and_unlock_inode(struct writeback_control *wbc, | |||
| 198 | void wbc_detach_inode(struct writeback_control *wbc); | 198 | void wbc_detach_inode(struct writeback_control *wbc); |
| 199 | void wbc_account_io(struct writeback_control *wbc, struct page *page, | 199 | void wbc_account_io(struct writeback_control *wbc, struct page *page, |
| 200 | size_t bytes); | 200 | size_t bytes); |
| 201 | void cgroup_writeback_umount(void); | ||
| 201 | 202 | ||
| 202 | /** | 203 | /** |
| 203 | * inode_attach_wb - associate an inode with its wb | 204 | * inode_attach_wb - associate an inode with its wb |
| @@ -301,6 +302,10 @@ static inline void wbc_account_io(struct writeback_control *wbc, | |||
| 301 | { | 302 | { |
| 302 | } | 303 | } |
| 303 | 304 | ||
| 305 | static inline void cgroup_writeback_umount(void) | ||
| 306 | { | ||
| 307 | } | ||
| 308 | |||
| 304 | #endif /* CONFIG_CGROUP_WRITEBACK */ | 309 | #endif /* CONFIG_CGROUP_WRITEBACK */ |
| 305 | 310 | ||
| 306 | /* | 311 | /* |
