diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-12-17 11:46:26 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-12-17 11:46:26 -0500 |
| commit | 76aea1eeb98d2d75d9297fda777efeffe3657aeb (patch) | |
| tree | 18fdf94ec846b553f1e60438279a3b449897189b /include/linux | |
| parent | 43b9e4febc66b98d83cc1560196d56ac7fef3c32 (diff) | |
| parent | 7566ec393f4161572ba6f11ad5171fd5d59b0fbd (diff) | |
Merge tag 'v4.20-rc7' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dax.h | 14 | ||||
| -rw-r--r-- | include/linux/filter.h | 7 | ||||
| -rw-r--r-- | include/linux/gfp.h | 12 | ||||
| -rw-r--r-- | include/linux/hyperv.h | 7 | ||||
| -rw-r--r-- | include/linux/mempolicy.h | 2 | ||||
| -rw-r--r-- | include/linux/mm_types.h | 5 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 6 | ||||
| -rw-r--r-- | include/linux/sfp.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 1 | ||||
| -rw-r--r-- | include/linux/tty.h | 1 | ||||
| -rw-r--r-- | include/linux/usb.h | 4 | ||||
| -rw-r--r-- | include/linux/xarray.h | 54 |
12 files changed, 99 insertions, 16 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h index 450b28db9533..0dd316a74a29 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #include <linux/radix-tree.h> | 7 | #include <linux/radix-tree.h> |
| 8 | #include <asm/pgtable.h> | 8 | #include <asm/pgtable.h> |
| 9 | 9 | ||
| 10 | typedef unsigned long dax_entry_t; | ||
| 11 | |||
| 10 | struct iomap_ops; | 12 | struct iomap_ops; |
| 11 | struct dax_device; | 13 | struct dax_device; |
| 12 | struct dax_operations { | 14 | struct dax_operations { |
| @@ -88,8 +90,8 @@ int dax_writeback_mapping_range(struct address_space *mapping, | |||
| 88 | struct block_device *bdev, struct writeback_control *wbc); | 90 | struct block_device *bdev, struct writeback_control *wbc); |
| 89 | 91 | ||
| 90 | struct page *dax_layout_busy_page(struct address_space *mapping); | 92 | struct page *dax_layout_busy_page(struct address_space *mapping); |
| 91 | bool dax_lock_mapping_entry(struct page *page); | 93 | dax_entry_t dax_lock_page(struct page *page); |
| 92 | void dax_unlock_mapping_entry(struct page *page); | 94 | void dax_unlock_page(struct page *page, dax_entry_t cookie); |
| 93 | #else | 95 | #else |
| 94 | static inline bool bdev_dax_supported(struct block_device *bdev, | 96 | static inline bool bdev_dax_supported(struct block_device *bdev, |
| 95 | int blocksize) | 97 | int blocksize) |
| @@ -122,14 +124,14 @@ static inline int dax_writeback_mapping_range(struct address_space *mapping, | |||
| 122 | return -EOPNOTSUPP; | 124 | return -EOPNOTSUPP; |
| 123 | } | 125 | } |
| 124 | 126 | ||
| 125 | static inline bool dax_lock_mapping_entry(struct page *page) | 127 | static inline dax_entry_t dax_lock_page(struct page *page) |
| 126 | { | 128 | { |
| 127 | if (IS_DAX(page->mapping->host)) | 129 | if (IS_DAX(page->mapping->host)) |
| 128 | return true; | 130 | return ~0UL; |
| 129 | return false; | 131 | return 0; |
| 130 | } | 132 | } |
| 131 | 133 | ||
| 132 | static inline void dax_unlock_mapping_entry(struct page *page) | 134 | static inline void dax_unlock_page(struct page *page, dax_entry_t cookie) |
| 133 | { | 135 | { |
| 134 | } | 136 | } |
| 135 | #endif | 137 | #endif |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 448dcc448f1f..795ff0b869bb 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -449,6 +449,13 @@ struct sock_reuseport; | |||
| 449 | offsetof(TYPE, MEMBER) ... offsetofend(TYPE, MEMBER) - 1 | 449 | offsetof(TYPE, MEMBER) ... offsetofend(TYPE, MEMBER) - 1 |
| 450 | #define bpf_ctx_range_till(TYPE, MEMBER1, MEMBER2) \ | 450 | #define bpf_ctx_range_till(TYPE, MEMBER1, MEMBER2) \ |
| 451 | offsetof(TYPE, MEMBER1) ... offsetofend(TYPE, MEMBER2) - 1 | 451 | offsetof(TYPE, MEMBER1) ... offsetofend(TYPE, MEMBER2) - 1 |
| 452 | #if BITS_PER_LONG == 64 | ||
| 453 | # define bpf_ctx_range_ptr(TYPE, MEMBER) \ | ||
| 454 | offsetof(TYPE, MEMBER) ... offsetofend(TYPE, MEMBER) - 1 | ||
| 455 | #else | ||
| 456 | # define bpf_ctx_range_ptr(TYPE, MEMBER) \ | ||
| 457 | offsetof(TYPE, MEMBER) ... offsetof(TYPE, MEMBER) + 8 - 1 | ||
| 458 | #endif /* BITS_PER_LONG == 64 */ | ||
| 452 | 459 | ||
| 453 | #define bpf_target_off(TYPE, MEMBER, SIZE, PTR_SIZE) \ | 460 | #define bpf_target_off(TYPE, MEMBER, SIZE, PTR_SIZE) \ |
| 454 | ({ \ | 461 | ({ \ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 76f8db0b0e71..0705164f928c 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -510,18 +510,22 @@ alloc_pages(gfp_t gfp_mask, unsigned int order) | |||
| 510 | } | 510 | } |
| 511 | extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, | 511 | extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, |
| 512 | struct vm_area_struct *vma, unsigned long addr, | 512 | struct vm_area_struct *vma, unsigned long addr, |
| 513 | int node); | 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) | ||
| 514 | #else | 516 | #else |
| 515 | #define alloc_pages(gfp_mask, order) \ | 517 | #define alloc_pages(gfp_mask, order) \ |
| 516 | alloc_pages_node(numa_node_id(), gfp_mask, order) | 518 | alloc_pages_node(numa_node_id(), gfp_mask, order) |
| 517 | #define alloc_pages_vma(gfp_mask, order, vma, addr, node)\ | 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) \ | ||
| 518 | alloc_pages(gfp_mask, order) | 522 | alloc_pages(gfp_mask, order) |
| 519 | #endif | 523 | #endif |
| 520 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) | 524 | #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) |
| 521 | #define alloc_page_vma(gfp_mask, vma, addr) \ | 525 | #define alloc_page_vma(gfp_mask, vma, addr) \ |
| 522 | alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id()) | 526 | alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id(), false) |
| 523 | #define alloc_page_vma_node(gfp_mask, vma, addr, node) \ | 527 | #define alloc_page_vma_node(gfp_mask, vma, addr, node) \ |
| 524 | alloc_pages_vma(gfp_mask, 0, vma, addr, node) | 528 | alloc_pages_vma(gfp_mask, 0, vma, addr, node, false) |
| 525 | 529 | ||
| 526 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); | 530 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); |
| 527 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); | 531 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index b3e24368930a..14131b6fae68 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -905,6 +905,13 @@ struct vmbus_channel { | |||
| 905 | 905 | ||
| 906 | bool probe_done; | 906 | bool probe_done; |
| 907 | 907 | ||
| 908 | /* | ||
| 909 | * We must offload the handling of the primary/sub channels | ||
| 910 | * from the single-threaded vmbus_connection.work_queue to | ||
| 911 | * two different workqueue, otherwise we can block | ||
| 912 | * vmbus_connection.work_queue and hang: see vmbus_process_offer(). | ||
| 913 | */ | ||
| 914 | struct work_struct add_channel_work; | ||
| 908 | }; | 915 | }; |
| 909 | 916 | ||
| 910 | static inline bool is_hvsock_channel(const struct vmbus_channel *c) | 917 | static inline bool is_hvsock_channel(const struct vmbus_channel *c) |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index bac395f1d00a..5228c62af416 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
| @@ -139,8 +139,6 @@ struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, | |||
| 139 | struct mempolicy *get_task_policy(struct task_struct *p); | 139 | struct mempolicy *get_task_policy(struct task_struct *p); |
| 140 | struct mempolicy *__get_vma_policy(struct vm_area_struct *vma, | 140 | struct mempolicy *__get_vma_policy(struct vm_area_struct *vma, |
| 141 | unsigned long addr); | 141 | unsigned long addr); |
| 142 | struct mempolicy *get_vma_policy(struct vm_area_struct *vma, | ||
| 143 | unsigned long addr); | ||
| 144 | bool vma_policy_mof(struct vm_area_struct *vma); | 142 | bool vma_policy_mof(struct vm_area_struct *vma); |
| 145 | 143 | ||
| 146 | extern void numa_default_policy(void); | 144 | extern void numa_default_policy(void); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 5ed8f6292a53..2c471a2c43fa 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -206,6 +206,11 @@ struct page { | |||
| 206 | #endif | 206 | #endif |
| 207 | } _struct_page_alignment; | 207 | } _struct_page_alignment; |
| 208 | 208 | ||
| 209 | /* | ||
| 210 | * Used for sizing the vmemmap region on some architectures | ||
| 211 | */ | ||
| 212 | #define STRUCT_PAGE_MAX_SHIFT (order_base_2(sizeof(struct page))) | ||
| 213 | |||
| 209 | #define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK) | 214 | #define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK) |
| 210 | #define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE) | 215 | #define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE) |
| 211 | 216 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 847705a6d0ec..db023a92f3a4 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -783,6 +783,12 @@ void memory_present(int nid, unsigned long start, unsigned long end); | |||
| 783 | static inline void memory_present(int nid, unsigned long start, unsigned long end) {} | 783 | static inline void memory_present(int nid, unsigned long start, unsigned long end) {} |
| 784 | #endif | 784 | #endif |
| 785 | 785 | ||
| 786 | #if defined(CONFIG_SPARSEMEM) | ||
| 787 | void memblocks_present(void); | ||
| 788 | #else | ||
| 789 | static inline void memblocks_present(void) {} | ||
| 790 | #endif | ||
| 791 | |||
| 786 | #ifdef CONFIG_HAVE_MEMORYLESS_NODES | 792 | #ifdef CONFIG_HAVE_MEMORYLESS_NODES |
| 787 | int local_memory_node(int node_id); | 793 | int local_memory_node(int node_id); |
| 788 | #else | 794 | #else |
diff --git a/include/linux/sfp.h b/include/linux/sfp.h index d37518e89db2..d9d9de3fcf8e 100644 --- a/include/linux/sfp.h +++ b/include/linux/sfp.h | |||
| @@ -224,7 +224,7 @@ struct sfp_eeprom_ext { | |||
| 224 | * | 224 | * |
| 225 | * See the SFF-8472 specification and related documents for the definition | 225 | * See the SFF-8472 specification and related documents for the definition |
| 226 | * of these structure members. This can be obtained from | 226 | * of these structure members. This can be obtained from |
| 227 | * ftp://ftp.seagate.com/sff | 227 | * https://www.snia.org/technology-communities/sff/specifications |
| 228 | */ | 228 | */ |
| 229 | struct sfp_eeprom_id { | 229 | struct sfp_eeprom_id { |
| 230 | struct sfp_eeprom_base base; | 230 | struct sfp_eeprom_base base; |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 43106ffa6788..2ec128060239 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -72,7 +72,6 @@ xdr_buf_init(struct xdr_buf *buf, void *start, size_t len) | |||
| 72 | buf->head[0].iov_base = start; | 72 | buf->head[0].iov_base = start; |
| 73 | buf->head[0].iov_len = len; | 73 | buf->head[0].iov_len = len; |
| 74 | buf->tail[0].iov_len = 0; | 74 | buf->tail[0].iov_len = 0; |
| 75 | buf->bvec = NULL; | ||
| 76 | buf->pages = NULL; | 75 | buf->pages = NULL; |
| 77 | buf->page_len = 0; | 76 | buf->page_len = 0; |
| 78 | buf->flags = 0; | 77 | buf->flags = 0; |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 414db2bce715..392138fe59b6 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -556,6 +556,7 @@ extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx); | |||
| 556 | extern void tty_release_struct(struct tty_struct *tty, int idx); | 556 | extern void tty_release_struct(struct tty_struct *tty, int idx); |
| 557 | extern int tty_release(struct inode *inode, struct file *filp); | 557 | extern int tty_release(struct inode *inode, struct file *filp); |
| 558 | extern void tty_init_termios(struct tty_struct *tty); | 558 | extern void tty_init_termios(struct tty_struct *tty); |
| 559 | extern void tty_save_termios(struct tty_struct *tty); | ||
| 559 | extern int tty_standard_install(struct tty_driver *driver, | 560 | extern int tty_standard_install(struct tty_driver *driver, |
| 560 | struct tty_struct *tty); | 561 | struct tty_struct *tty); |
| 561 | 562 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 4cdd515a4385..5e49e82c4368 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -407,11 +407,11 @@ struct usb_host_bos { | |||
| 407 | }; | 407 | }; |
| 408 | 408 | ||
| 409 | int __usb_get_extra_descriptor(char *buffer, unsigned size, | 409 | int __usb_get_extra_descriptor(char *buffer, unsigned size, |
| 410 | unsigned char type, void **ptr); | 410 | unsigned char type, void **ptr, size_t min); |
| 411 | #define usb_get_extra_descriptor(ifpoint, type, ptr) \ | 411 | #define usb_get_extra_descriptor(ifpoint, type, ptr) \ |
| 412 | __usb_get_extra_descriptor((ifpoint)->extra, \ | 412 | __usb_get_extra_descriptor((ifpoint)->extra, \ |
| 413 | (ifpoint)->extralen, \ | 413 | (ifpoint)->extralen, \ |
| 414 | type, (void **)ptr) | 414 | type, (void **)ptr, sizeof(**(ptr))) |
| 415 | 415 | ||
| 416 | /* ----------------------------------------------------------------------- */ | 416 | /* ----------------------------------------------------------------------- */ |
| 417 | 417 | ||
diff --git a/include/linux/xarray.h b/include/linux/xarray.h index 564892e19f8c..f492e21c4aa2 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h | |||
| @@ -554,6 +554,60 @@ static inline void *xa_cmpxchg(struct xarray *xa, unsigned long index, | |||
| 554 | } | 554 | } |
| 555 | 555 | ||
| 556 | /** | 556 | /** |
| 557 | * xa_cmpxchg_bh() - Conditionally replace an entry in the XArray. | ||
| 558 | * @xa: XArray. | ||
| 559 | * @index: Index into array. | ||
| 560 | * @old: Old value to test against. | ||
| 561 | * @entry: New value to place in array. | ||
| 562 | * @gfp: Memory allocation flags. | ||
| 563 | * | ||
| 564 | * This function is like calling xa_cmpxchg() except it disables softirqs | ||
| 565 | * while holding the array lock. | ||
| 566 | * | ||
| 567 | * Context: Any context. Takes and releases the xa_lock while | ||
| 568 | * disabling softirqs. May sleep if the @gfp flags permit. | ||
| 569 | * Return: The old value at this index or xa_err() if an error happened. | ||
| 570 | */ | ||
| 571 | static inline void *xa_cmpxchg_bh(struct xarray *xa, unsigned long index, | ||
| 572 | void *old, void *entry, gfp_t gfp) | ||
| 573 | { | ||
| 574 | void *curr; | ||
| 575 | |||
| 576 | xa_lock_bh(xa); | ||
| 577 | curr = __xa_cmpxchg(xa, index, old, entry, gfp); | ||
| 578 | xa_unlock_bh(xa); | ||
| 579 | |||
| 580 | return curr; | ||
| 581 | } | ||
| 582 | |||
| 583 | /** | ||
| 584 | * xa_cmpxchg_irq() - Conditionally replace an entry in the XArray. | ||
| 585 | * @xa: XArray. | ||
| 586 | * @index: Index into array. | ||
| 587 | * @old: Old value to test against. | ||
| 588 | * @entry: New value to place in array. | ||
| 589 | * @gfp: Memory allocation flags. | ||
| 590 | * | ||
| 591 | * This function is like calling xa_cmpxchg() except it disables interrupts | ||
| 592 | * while holding the array lock. | ||
| 593 | * | ||
| 594 | * Context: Process context. Takes and releases the xa_lock while | ||
| 595 | * disabling interrupts. May sleep if the @gfp flags permit. | ||
| 596 | * Return: The old value at this index or xa_err() if an error happened. | ||
| 597 | */ | ||
| 598 | static inline void *xa_cmpxchg_irq(struct xarray *xa, unsigned long index, | ||
| 599 | void *old, void *entry, gfp_t gfp) | ||
| 600 | { | ||
| 601 | void *curr; | ||
| 602 | |||
| 603 | xa_lock_irq(xa); | ||
| 604 | curr = __xa_cmpxchg(xa, index, old, entry, gfp); | ||
| 605 | xa_unlock_irq(xa); | ||
| 606 | |||
| 607 | return curr; | ||
| 608 | } | ||
| 609 | |||
| 610 | /** | ||
| 557 | * xa_insert() - Store this entry in the XArray unless another entry is | 611 | * xa_insert() - Store this entry in the XArray unless another entry is |
| 558 | * already present. | 612 | * already present. |
| 559 | * @xa: XArray. | 613 | * @xa: XArray. |
