aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-04-22 11:47:36 -0400
committerJens Axboe <axboe@kernel.dk>2019-04-22 11:47:36 -0400
commit5c61ee2cd5860e41c8ab98837761ffaa93eb4dfe (patch)
tree0c78e25f5020eeee47863092ccbb2a3f56bea8a9 /include
parentcdf3e3deb747d5e193dee617ed37c83060eb576f (diff)
parent085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff)
Merge tag 'v5.1-rc6' into for-5.2/block
Pull in v5.1-rc6 to resolve two conflicts. One is in BFQ, in just a comment, and is trivial. The other one is a conflict due to a later fix in the bio multi-page work, and needs a bit more care. * tag 'v5.1-rc6': (770 commits) Linux 5.1-rc6 block: make sure that bvec length can't be overflow block: kill all_q_node in request_queue x86/cpu/intel: Lower the "ENERGY_PERF_BIAS: Set to normal" message's log priority coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping mm/kmemleak.c: fix unused-function warning init: initialize jump labels before command line option parsing kernel/watchdog_hld.c: hard lockup message should end with a newline kcov: improve CONFIG_ARCH_HAS_KCOV help text mm: fix inactive list balancing between NUMA nodes and cgroups mm/hotplug: treat CMA pages as unmovable proc: fixup proc-pid-vm test proc: fix map_files test on F29 mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock mm: swapoff: shmem_unuse() stop eviction without igrab() mm: swapoff: take notice of completion sooner mm: swapoff: remove too limiting SWAP_UNUSE_MAX_TRIES mm: swapoff: shmem_find_swap_entries() filter out other types slab: store tagged freelist for off-slab slabmgmt ... Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/syscall.h21
-rw-r--r--include/drm/drm_modeset_helper_vtables.h4
-rw-r--r--include/dt-bindings/clock/sifive-fu540-prci.h18
-rw-r--r--include/dt-bindings/reset/amlogic,meson-g12a-reset.h5
-rw-r--r--include/keys/trusted.h2
-rw-r--r--include/linux/bio.h20
-rw-r--r--include/linux/bitrev.h46
-rw-r--r--include/linux/blk-mq.h1
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/bvec.h24
-rw-r--r--include/linux/efi.h7
-rw-r--r--include/linux/elevator.h1
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/kernel.h4
-rw-r--r--include/linux/kprobes.h1
-rw-r--r--include/linux/kvm_host.h10
-rw-r--r--include/linux/memcontrol.h5
-rw-r--r--include/linux/mii.h2
-rw-r--r--include/linux/mlx5/driver.h2
-rw-r--r--include/linux/mm.h15
-rw-r--r--include/linux/mm_types.h2
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/linux/nvme.h9
-rw-r--r--include/linux/pipe_fs_i.h10
-rw-r--r--include/linux/platform_data/x86/clk-pmc-atom.h3
-rw-r--r--include/linux/ptrace.h11
-rw-r--r--include/linux/sched/mm.h21
-rw-r--r--include/linux/shmem_fs.h1
-rw-r--r--include/linux/string.h3
-rw-r--r--include/linux/sunrpc/sched.h8
-rw-r--r--include/linux/virtio_ring.h2
-rw-r--r--include/net/af_rxrpc.h4
-rw-r--r--include/net/cfg80211.h5
-rw-r--r--include/net/ip.h2
-rw-r--r--include/net/mac80211.h63
-rw-r--r--include/net/net_namespace.h1
-rw-r--r--include/net/netns/hash.h10
-rw-r--r--include/net/netrom.h2
-rw-r--r--include/net/nfc/nci_core.h2
-rw-r--r--include/net/sch_generic.h44
-rw-r--r--include/net/sock.h6
-rw-r--r--include/net/tls.h4
-rw-r--r--include/sound/soc.h11
-rw-r--r--include/trace/events/syscalls.h2
-rw-r--r--include/uapi/linux/ethtool.h2
-rw-r--r--include/uapi/linux/input-event-codes.h6
-rw-r--r--include/uapi/sound/asound.h1
47 files changed, 285 insertions, 146 deletions
diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h
index 0c938a4354f6..b88239e9efe4 100644
--- a/include/asm-generic/syscall.h
+++ b/include/asm-generic/syscall.h
@@ -105,41 +105,30 @@ void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
105 * syscall_get_arguments - extract system call parameter values 105 * syscall_get_arguments - extract system call parameter values
106 * @task: task of interest, must be blocked 106 * @task: task of interest, must be blocked
107 * @regs: task_pt_regs() of @task 107 * @regs: task_pt_regs() of @task
108 * @i: argument index [0,5]
109 * @n: number of arguments; n+i must be [1,6].
110 * @args: array filled with argument values 108 * @args: array filled with argument values
111 * 109 *
112 * Fetches @n arguments to the system call starting with the @i'th argument 110 * Fetches 6 arguments to the system call. First argument is stored in
113 * (from 0 through 5). Argument @i is stored in @args[0], and so on. 111* @args[0], and so on.
114 * An arch inline version is probably optimal when @i and @n are constants.
115 * 112 *
116 * It's only valid to call this when @task is stopped for tracing on 113 * It's only valid to call this when @task is stopped for tracing on
117 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 114 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
118 * It's invalid to call this with @i + @n > 6; we only support system calls
119 * taking up to 6 arguments.
120 */ 115 */
121void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, 116void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
122 unsigned int i, unsigned int n, unsigned long *args); 117 unsigned long *args);
123 118
124/** 119/**
125 * syscall_set_arguments - change system call parameter value 120 * syscall_set_arguments - change system call parameter value
126 * @task: task of interest, must be in system call entry tracing 121 * @task: task of interest, must be in system call entry tracing
127 * @regs: task_pt_regs() of @task 122 * @regs: task_pt_regs() of @task
128 * @i: argument index [0,5]
129 * @n: number of arguments; n+i must be [1,6].
130 * @args: array of argument values to store 123 * @args: array of argument values to store
131 * 124 *
132 * Changes @n arguments to the system call starting with the @i'th argument. 125 * Changes 6 arguments to the system call.
133 * Argument @i gets value @args[0], and so on. 126 * The first argument gets value @args[0], and so on.
134 * An arch inline version is probably optimal when @i and @n are constants.
135 * 127 *
136 * It's only valid to call this when @task is stopped for tracing on 128 * It's only valid to call this when @task is stopped for tracing on
137 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 129 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
138 * It's invalid to call this with @i + @n > 6; we only support system calls
139 * taking up to 6 arguments.
140 */ 130 */
141void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, 131void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
142 unsigned int i, unsigned int n,
143 const unsigned long *args); 132 const unsigned long *args);
144 133
145/** 134/**
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index cfb7be40bed7..ce4de6b1e444 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -418,6 +418,8 @@ struct drm_crtc_helper_funcs {
418 * Drivers can use the @old_crtc_state input parameter if the operations 418 * Drivers can use the @old_crtc_state input parameter if the operations
419 * needed to enable the CRTC don't depend solely on the new state but 419 * needed to enable the CRTC don't depend solely on the new state but
420 * also on the transition between the old state and the new state. 420 * also on the transition between the old state and the new state.
421 *
422 * This function is optional.
421 */ 423 */
422 void (*atomic_enable)(struct drm_crtc *crtc, 424 void (*atomic_enable)(struct drm_crtc *crtc,
423 struct drm_crtc_state *old_crtc_state); 425 struct drm_crtc_state *old_crtc_state);
@@ -441,6 +443,8 @@ struct drm_crtc_helper_funcs {
441 * parameter @old_crtc_state which could be used to access the old 443 * parameter @old_crtc_state which could be used to access the old
442 * state. Atomic drivers should consider to use this one instead 444 * state. Atomic drivers should consider to use this one instead
443 * of @disable. 445 * of @disable.
446 *
447 * This function is optional.
444 */ 448 */
445 void (*atomic_disable)(struct drm_crtc *crtc, 449 void (*atomic_disable)(struct drm_crtc *crtc,
446 struct drm_crtc_state *old_crtc_state); 450 struct drm_crtc_state *old_crtc_state);
diff --git a/include/dt-bindings/clock/sifive-fu540-prci.h b/include/dt-bindings/clock/sifive-fu540-prci.h
new file mode 100644
index 000000000000..6a0b70a37d78
--- /dev/null
+++ b/include/dt-bindings/clock/sifive-fu540-prci.h
@@ -0,0 +1,18 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2018-2019 SiFive, Inc.
4 * Wesley Terpstra
5 * Paul Walmsley
6 */
7
8#ifndef __DT_BINDINGS_CLOCK_SIFIVE_FU540_PRCI_H
9#define __DT_BINDINGS_CLOCK_SIFIVE_FU540_PRCI_H
10
11/* Clock indexes for use by Device Tree data and the PRCI driver */
12
13#define PRCI_CLK_COREPLL 0
14#define PRCI_CLK_DDRPLL 1
15#define PRCI_CLK_GEMGXLPLL 2
16#define PRCI_CLK_TLCLK 3
17
18#endif
diff --git a/include/dt-bindings/reset/amlogic,meson-g12a-reset.h b/include/dt-bindings/reset/amlogic,meson-g12a-reset.h
index 8063e8314eef..6d487c5eba2c 100644
--- a/include/dt-bindings/reset/amlogic,meson-g12a-reset.h
+++ b/include/dt-bindings/reset/amlogic,meson-g12a-reset.h
@@ -51,7 +51,10 @@
51#define RESET_SD_EMMC_A 44 51#define RESET_SD_EMMC_A 44
52#define RESET_SD_EMMC_B 45 52#define RESET_SD_EMMC_B 45
53#define RESET_SD_EMMC_C 46 53#define RESET_SD_EMMC_C 46
54/* 47-60 */ 54/* 47 */
55#define RESET_USB_PHY20 48
56#define RESET_USB_PHY21 49
57/* 50-60 */
55#define RESET_AUDIO_CODEC 61 58#define RESET_AUDIO_CODEC 61
56/* 62-63 */ 59/* 62-63 */
57/* RESET2 */ 60/* RESET2 */
diff --git a/include/keys/trusted.h b/include/keys/trusted.h
index adbcb6817826..0071298b9b28 100644
--- a/include/keys/trusted.h
+++ b/include/keys/trusted.h
@@ -38,7 +38,7 @@ enum {
38 38
39int TSS_authhmac(unsigned char *digest, const unsigned char *key, 39int TSS_authhmac(unsigned char *digest, const unsigned char *key,
40 unsigned int keylen, unsigned char *h1, 40 unsigned int keylen, unsigned char *h1,
41 unsigned char *h2, unsigned char h3, ...); 41 unsigned char *h2, unsigned int h3, ...);
42int TSS_checkhmac1(unsigned char *buffer, 42int TSS_checkhmac1(unsigned char *buffer,
43 const uint32_t command, 43 const uint32_t command,
44 const unsigned char *ononce, 44 const unsigned char *ononce,
diff --git a/include/linux/bio.h b/include/linux/bio.h
index bb915591557b..9577ad8f6e28 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -120,19 +120,23 @@ static inline bool bio_full(struct bio *bio)
120 return bio->bi_vcnt >= bio->bi_max_vecs; 120 return bio->bi_vcnt >= bio->bi_max_vecs;
121} 121}
122 122
123#define mp_bvec_for_each_segment(bv, bvl, i, iter_all) \ 123static inline bool bio_next_segment(const struct bio *bio,
124 for (bv = bvec_init_iter_all(&iter_all); \ 124 struct bvec_iter_all *iter)
125 (iter_all.done < (bvl)->bv_len) && \ 125{
126 (mp_bvec_next_segment((bvl), &iter_all), 1); \ 126 if (iter->idx >= bio->bi_vcnt)
127 iter_all.done += bv->bv_len, i += 1) 127 return false;
128
129 bvec_advance(&bio->bi_io_vec[iter->idx], iter);
130 return true;
131}
128 132
129/* 133/*
130 * drivers should _never_ use the all version - the bio may have been split 134 * drivers should _never_ use the all version - the bio may have been split
131 * before it got to the driver and the driver won't own all of it 135 * before it got to the driver and the driver won't own all of it
132 */ 136 */
133#define bio_for_each_segment_all(bvl, bio, i, iter_all) \ 137#define bio_for_each_segment_all(bvl, bio, i, iter) \
134 for (i = 0, iter_all.idx = 0; iter_all.idx < (bio)->bi_vcnt; iter_all.idx++) \ 138 for (i = 0, bvl = bvec_init_iter_all(&iter); \
135 mp_bvec_for_each_segment(bvl, &((bio)->bi_io_vec[iter_all.idx]), i, iter_all) 139 bio_next_segment((bio), &iter); i++)
136 140
137static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter, 141static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
138 unsigned bytes) 142 unsigned bytes)
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h
index 50fb0dee23e8..d35b8ec1c485 100644
--- a/include/linux/bitrev.h
+++ b/include/linux/bitrev.h
@@ -34,41 +34,41 @@ static inline u32 __bitrev32(u32 x)
34 34
35#define __constant_bitrev32(x) \ 35#define __constant_bitrev32(x) \
36({ \ 36({ \
37 u32 __x = x; \ 37 u32 ___x = x; \
38 __x = (__x >> 16) | (__x << 16); \ 38 ___x = (___x >> 16) | (___x << 16); \
39 __x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8); \ 39 ___x = ((___x & (u32)0xFF00FF00UL) >> 8) | ((___x & (u32)0x00FF00FFUL) << 8); \
40 __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ 40 ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \
41 __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ 41 ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \
42 __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ 42 ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \
43 __x; \ 43 ___x; \
44}) 44})
45 45
46#define __constant_bitrev16(x) \ 46#define __constant_bitrev16(x) \
47({ \ 47({ \
48 u16 __x = x; \ 48 u16 ___x = x; \
49 __x = (__x >> 8) | (__x << 8); \ 49 ___x = (___x >> 8) | (___x << 8); \
50 __x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4); \ 50 ___x = ((___x & (u16)0xF0F0U) >> 4) | ((___x & (u16)0x0F0FU) << 4); \
51 __x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2); \ 51 ___x = ((___x & (u16)0xCCCCU) >> 2) | ((___x & (u16)0x3333U) << 2); \
52 __x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1); \ 52 ___x = ((___x & (u16)0xAAAAU) >> 1) | ((___x & (u16)0x5555U) << 1); \
53 __x; \ 53 ___x; \
54}) 54})
55 55
56#define __constant_bitrev8x4(x) \ 56#define __constant_bitrev8x4(x) \
57({ \ 57({ \
58 u32 __x = x; \ 58 u32 ___x = x; \
59 __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ 59 ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \
60 __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ 60 ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \
61 __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ 61 ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \
62 __x; \ 62 ___x; \
63}) 63})
64 64
65#define __constant_bitrev8(x) \ 65#define __constant_bitrev8(x) \
66({ \ 66({ \
67 u8 __x = x; \ 67 u8 ___x = x; \
68 __x = (__x >> 4) | (__x << 4); \ 68 ___x = (___x >> 4) | (___x << 4); \
69 __x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2); \ 69 ___x = ((___x & (u8)0xCCU) >> 2) | ((___x & (u8)0x33U) << 2); \
70 __x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1); \ 70 ___x = ((___x & (u8)0xAAU) >> 1) | ((___x & (u8)0x55U) << 1); \
71 __x; \ 71 ___x; \
72}) 72})
73 73
74#define bitrev32(x) \ 74#define bitrev32(x) \
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index cb2aa7ecafff..db29928de467 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -302,6 +302,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list);
302void blk_mq_kick_requeue_list(struct request_queue *q); 302void blk_mq_kick_requeue_list(struct request_queue *q);
303void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs); 303void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs);
304bool blk_mq_complete_request(struct request *rq); 304bool blk_mq_complete_request(struct request *rq);
305void blk_mq_complete_request_sync(struct request *rq);
305bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list, 306bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list,
306 struct bio *bio); 307 struct bio *bio);
307bool blk_mq_queue_stopped(struct request_queue *q); 308bool blk_mq_queue_stopped(struct request_queue *q);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 4b85dc066264..99aa98f60b9e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -548,7 +548,6 @@ struct request_queue {
548 struct rcu_head rcu_head; 548 struct rcu_head rcu_head;
549 wait_queue_head_t mq_freeze_wq; 549 wait_queue_head_t mq_freeze_wq;
550 struct percpu_ref q_usage_counter; 550 struct percpu_ref q_usage_counter;
551 struct list_head all_q_node;
552 551
553 struct blk_mq_tag_set *tag_set; 552 struct blk_mq_tag_set *tag_set;
554 struct list_head tag_set_list; 553 struct list_head tag_set_list;
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 44b0f4684190..a4811410e4fc 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -140,26 +140,38 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv,
140 140
141static inline struct bio_vec *bvec_init_iter_all(struct bvec_iter_all *iter_all) 141static inline struct bio_vec *bvec_init_iter_all(struct bvec_iter_all *iter_all)
142{ 142{
143 iter_all->bv.bv_page = NULL;
144 iter_all->done = 0; 143 iter_all->done = 0;
144 iter_all->idx = 0;
145 145
146 return &iter_all->bv; 146 return &iter_all->bv;
147} 147}
148 148
149static inline void mp_bvec_next_segment(const struct bio_vec *bvec, 149static inline struct page *bvec_nth_page(struct page *page, int idx)
150 struct bvec_iter_all *iter_all) 150{
151 return idx == 0 ? page : nth_page(page, idx);
152}
153
154static inline void bvec_advance(const struct bio_vec *bvec,
155 struct bvec_iter_all *iter_all)
151{ 156{
152 struct bio_vec *bv = &iter_all->bv; 157 struct bio_vec *bv = &iter_all->bv;
153 158
154 if (bv->bv_page) { 159 if (iter_all->done) {
155 bv->bv_page++; 160 bv->bv_page++;
156 bv->bv_offset = 0; 161 bv->bv_offset = 0;
157 } else { 162 } else {
158 bv->bv_page = bvec->bv_page; 163 bv->bv_page = bvec_nth_page(bvec->bv_page, bvec->bv_offset /
159 bv->bv_offset = bvec->bv_offset; 164 PAGE_SIZE);
165 bv->bv_offset = bvec->bv_offset & ~PAGE_MASK;
160 } 166 }
161 bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset, 167 bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset,
162 bvec->bv_len - iter_all->done); 168 bvec->bv_len - iter_all->done);
169 iter_all->done += bv->bv_len;
170
171 if (iter_all->done == bvec->bv_len) {
172 iter_all->idx++;
173 iter_all->done = 0;
174 }
163} 175}
164 176
165/* 177/*
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 54357a258b35..6ebc2098cfe1 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1611,7 +1611,12 @@ efi_status_t efi_setup_gop(efi_system_table_t *sys_table_arg,
1611 struct screen_info *si, efi_guid_t *proto, 1611 struct screen_info *si, efi_guid_t *proto,
1612 unsigned long size); 1612 unsigned long size);
1613 1613
1614bool efi_runtime_disabled(void); 1614#ifdef CONFIG_EFI
1615extern bool efi_runtime_disabled(void);
1616#else
1617static inline bool efi_runtime_disabled(void) { return true; }
1618#endif
1619
1615extern void efi_call_virt_check_flags(unsigned long flags, const char *call); 1620extern void efi_call_virt_check_flags(unsigned long flags, const char *call);
1616extern unsigned long efi_call_virt_save_flags(void); 1621extern unsigned long efi_call_virt_save_flags(void);
1617 1622
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 2e9e2763bf47..6e8bc53740f0 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -31,6 +31,7 @@ struct elevator_mq_ops {
31 void (*exit_sched)(struct elevator_queue *); 31 void (*exit_sched)(struct elevator_queue *);
32 int (*init_hctx)(struct blk_mq_hw_ctx *, unsigned int); 32 int (*init_hctx)(struct blk_mq_hw_ctx *, unsigned int);
33 void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int); 33 void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int);
34 void (*depth_updated)(struct blk_mq_hw_ctx *);
34 35
35 bool (*allow_merge)(struct request_queue *, struct request *, struct bio *); 36 bool (*allow_merge)(struct request_queue *, struct request *, struct bio *);
36 bool (*bio_merge)(struct blk_mq_hw_ctx *, struct bio *); 37 bool (*bio_merge)(struct blk_mq_hw_ctx *, struct bio *);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8b42df09b04c..dd28e7679089 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -158,6 +158,9 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
158#define FMODE_OPENED ((__force fmode_t)0x80000) 158#define FMODE_OPENED ((__force fmode_t)0x80000)
159#define FMODE_CREATED ((__force fmode_t)0x100000) 159#define FMODE_CREATED ((__force fmode_t)0x100000)
160 160
161/* File is stream-like */
162#define FMODE_STREAM ((__force fmode_t)0x200000)
163
161/* File was opened by fanotify and shouldn't generate fanotify events */ 164/* File was opened by fanotify and shouldn't generate fanotify events */
162#define FMODE_NONOTIFY ((__force fmode_t)0x4000000) 165#define FMODE_NONOTIFY ((__force fmode_t)0x4000000)
163 166
@@ -3074,6 +3077,7 @@ extern loff_t no_seek_end_llseek_size(struct file *, loff_t, int, loff_t);
3074extern loff_t no_seek_end_llseek(struct file *, loff_t, int); 3077extern loff_t no_seek_end_llseek(struct file *, loff_t, int);
3075extern int generic_file_open(struct inode * inode, struct file * filp); 3078extern int generic_file_open(struct inode * inode, struct file * filp);
3076extern int nonseekable_open(struct inode * inode, struct file * filp); 3079extern int nonseekable_open(struct inode * inode, struct file * filp);
3080extern int stream_open(struct inode * inode, struct file * filp);
3077 3081
3078#ifdef CONFIG_BLOCK 3082#ifdef CONFIG_BLOCK
3079typedef void (dio_submit_t)(struct bio *bio, struct inode *inode, 3083typedef void (dio_submit_t)(struct bio *bio, struct inode *inode,
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 24ef5a018a5e..a3b59d143afb 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -48,8 +48,8 @@
48 48
49#define u64_to_user_ptr(x) ( \ 49#define u64_to_user_ptr(x) ( \
50{ \ 50{ \
51 typecheck(u64, x); \ 51 typecheck(u64, (x)); \
52 (void __user *)(uintptr_t)x; \ 52 (void __user *)(uintptr_t)(x); \
53} \ 53} \
54) 54)
55 55
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 201f0f2683f2..9a897256e481 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -173,6 +173,7 @@ struct kretprobe_instance {
173 struct kretprobe *rp; 173 struct kretprobe *rp;
174 kprobe_opcode_t *ret_addr; 174 kprobe_opcode_t *ret_addr;
175 struct task_struct *task; 175 struct task_struct *task;
176 void *fp;
176 char data[0]; 177 char data[0];
177}; 178};
178 179
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 9d55c63db09b..640a03642766 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -28,6 +28,7 @@
28#include <linux/irqbypass.h> 28#include <linux/irqbypass.h>
29#include <linux/swait.h> 29#include <linux/swait.h>
30#include <linux/refcount.h> 30#include <linux/refcount.h>
31#include <linux/nospec.h>
31#include <asm/signal.h> 32#include <asm/signal.h>
32 33
33#include <linux/kvm.h> 34#include <linux/kvm.h>
@@ -513,10 +514,10 @@ static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx)
513 514
514static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) 515static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
515{ 516{
516 /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case 517 int num_vcpus = atomic_read(&kvm->online_vcpus);
517 * the caller has read kvm->online_vcpus before (as is the case 518 i = array_index_nospec(i, num_vcpus);
518 * for kvm_for_each_vcpu, for example). 519
519 */ 520 /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu. */
520 smp_rmb(); 521 smp_rmb();
521 return kvm->vcpus[i]; 522 return kvm->vcpus[i];
522} 523}
@@ -600,6 +601,7 @@ void kvm_put_kvm(struct kvm *kvm);
600 601
601static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id) 602static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id)
602{ 603{
604 as_id = array_index_nospec(as_id, KVM_ADDRESS_SPACE_NUM);
603 return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu, 605 return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu,
604 lockdep_is_held(&kvm->slots_lock) || 606 lockdep_is_held(&kvm->slots_lock) ||
605 !refcount_read(&kvm->users_count)); 607 !refcount_read(&kvm->users_count));
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 1f3d880b7ca1..dbb6118370c1 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -566,7 +566,10 @@ struct mem_cgroup *lock_page_memcg(struct page *page);
566void __unlock_page_memcg(struct mem_cgroup *memcg); 566void __unlock_page_memcg(struct mem_cgroup *memcg);
567void unlock_page_memcg(struct page *page); 567void unlock_page_memcg(struct page *page);
568 568
569/* idx can be of type enum memcg_stat_item or node_stat_item */ 569/*
570 * idx can be of type enum memcg_stat_item or node_stat_item.
571 * Keep in sync with memcg_exact_page_state().
572 */
570static inline unsigned long memcg_page_state(struct mem_cgroup *memcg, 573static inline unsigned long memcg_page_state(struct mem_cgroup *memcg,
571 int idx) 574 int idx)
572{ 575{
diff --git a/include/linux/mii.h b/include/linux/mii.h
index 6fee8b1a4400..5cd824c1c0ca 100644
--- a/include/linux/mii.h
+++ b/include/linux/mii.h
@@ -469,7 +469,7 @@ static inline u32 linkmode_adv_to_lcl_adv_t(unsigned long *advertising)
469 if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, 469 if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
470 advertising)) 470 advertising))
471 lcl_adv |= ADVERTISE_PAUSE_CAP; 471 lcl_adv |= ADVERTISE_PAUSE_CAP;
472 if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, 472 if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
473 advertising)) 473 advertising))
474 lcl_adv |= ADVERTISE_PAUSE_ASYM; 474 lcl_adv |= ADVERTISE_PAUSE_ASYM;
475 475
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 022541dc5dbf..0d0729648844 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -594,6 +594,8 @@ enum mlx5_pagefault_type_flags {
594}; 594};
595 595
596struct mlx5_td { 596struct mlx5_td {
597 /* protects tirs list changes while tirs refresh */
598 struct mutex list_lock;
597 struct list_head tirs_list; 599 struct list_head tirs_list;
598 u32 tdn; 600 u32 tdn;
599}; 601};
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 76769749b5a5..6b10c21630f5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -966,6 +966,10 @@ static inline bool is_pci_p2pdma_page(const struct page *page)
966} 966}
967#endif /* CONFIG_DEV_PAGEMAP_OPS */ 967#endif /* CONFIG_DEV_PAGEMAP_OPS */
968 968
969/* 127: arbitrary random number, small enough to assemble well */
970#define page_ref_zero_or_close_to_overflow(page) \
971 ((unsigned int) page_ref_count(page) + 127u <= 127u)
972
969static inline void get_page(struct page *page) 973static inline void get_page(struct page *page)
970{ 974{
971 page = compound_head(page); 975 page = compound_head(page);
@@ -973,8 +977,17 @@ static inline void get_page(struct page *page)
973 * Getting a normal page or the head of a compound page 977 * Getting a normal page or the head of a compound page
974 * requires to already have an elevated page->_refcount. 978 * requires to already have an elevated page->_refcount.
975 */ 979 */
976 VM_BUG_ON_PAGE(page_ref_count(page) <= 0, page); 980 VM_BUG_ON_PAGE(page_ref_zero_or_close_to_overflow(page), page);
981 page_ref_inc(page);
982}
983
984static inline __must_check bool try_get_page(struct page *page)
985{
986 page = compound_head(page);
987 if (WARN_ON_ONCE(page_ref_count(page) <= 0))
988 return false;
977 page_ref_inc(page); 989 page_ref_inc(page);
990 return true;
978} 991}
979 992
980static inline void put_page(struct page *page) 993static inline void put_page(struct page *page)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 7eade9132f02..4ef4bbe78a1d 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -671,7 +671,7 @@ enum vm_fault_reason {
671 671
672/* Encode hstate index for a hwpoisoned large page */ 672/* Encode hstate index for a hwpoisoned large page */
673#define VM_FAULT_SET_HINDEX(x) ((__force vm_fault_t)((x) << 16)) 673#define VM_FAULT_SET_HINDEX(x) ((__force vm_fault_t)((x) << 16))
674#define VM_FAULT_GET_HINDEX(x) (((x) >> 16) & 0xf) 674#define VM_FAULT_GET_HINDEX(x) (((__force unsigned int)(x) >> 16) & 0xf)
675 675
676#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | \ 676#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | \
677 VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \ 677 VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 26f69cf763f4..324e872c91d1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1500,6 +1500,7 @@ struct net_device_ops {
1500 * @IFF_FAILOVER: device is a failover master device 1500 * @IFF_FAILOVER: device is a failover master device
1501 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device 1501 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
1502 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device 1502 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
1503 * @IFF_LIVE_RENAME_OK: rename is allowed while device is up and running
1503 */ 1504 */
1504enum netdev_priv_flags { 1505enum netdev_priv_flags {
1505 IFF_802_1Q_VLAN = 1<<0, 1506 IFF_802_1Q_VLAN = 1<<0,
@@ -1532,6 +1533,7 @@ enum netdev_priv_flags {
1532 IFF_FAILOVER = 1<<27, 1533 IFF_FAILOVER = 1<<27,
1533 IFF_FAILOVER_SLAVE = 1<<28, 1534 IFF_FAILOVER_SLAVE = 1<<28,
1534 IFF_L3MDEV_RX_HANDLER = 1<<29, 1535 IFF_L3MDEV_RX_HANDLER = 1<<29,
1536 IFF_LIVE_RENAME_OK = 1<<30,
1535}; 1537};
1536 1538
1537#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN 1539#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1563,6 +1565,7 @@ enum netdev_priv_flags {
1563#define IFF_FAILOVER IFF_FAILOVER 1565#define IFF_FAILOVER IFF_FAILOVER
1564#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE 1566#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
1565#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER 1567#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
1568#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
1566 1569
1567/** 1570/**
1568 * struct net_device - The DEVICE structure. 1571 * struct net_device - The DEVICE structure.
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index baa49e6a23cc..c40720cb59ac 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -967,8 +967,13 @@ struct nvme_get_log_page_command {
967 __le16 numdl; 967 __le16 numdl;
968 __le16 numdu; 968 __le16 numdu;
969 __u16 rsvd11; 969 __u16 rsvd11;
970 __le32 lpol; 970 union {
971 __le32 lpou; 971 struct {
972 __le32 lpol;
973 __le32 lpou;
974 };
975 __le64 lpo;
976 };
972 __u32 rsvd14[2]; 977 __u32 rsvd14[2];
973}; 978};
974 979
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index 787d224ff43e..abb2dac3da9b 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -101,18 +101,20 @@ struct pipe_buf_operations {
101 /* 101 /*
102 * Get a reference to the pipe buffer. 102 * Get a reference to the pipe buffer.
103 */ 103 */
104 void (*get)(struct pipe_inode_info *, struct pipe_buffer *); 104 bool (*get)(struct pipe_inode_info *, struct pipe_buffer *);
105}; 105};
106 106
107/** 107/**
108 * pipe_buf_get - get a reference to a pipe_buffer 108 * pipe_buf_get - get a reference to a pipe_buffer
109 * @pipe: the pipe that the buffer belongs to 109 * @pipe: the pipe that the buffer belongs to
110 * @buf: the buffer to get a reference to 110 * @buf: the buffer to get a reference to
111 *
112 * Return: %true if the reference was successfully obtained.
111 */ 113 */
112static inline void pipe_buf_get(struct pipe_inode_info *pipe, 114static inline __must_check bool pipe_buf_get(struct pipe_inode_info *pipe,
113 struct pipe_buffer *buf) 115 struct pipe_buffer *buf)
114{ 116{
115 buf->ops->get(pipe, buf); 117 return buf->ops->get(pipe, buf);
116} 118}
117 119
118/** 120/**
@@ -171,7 +173,7 @@ struct pipe_inode_info *alloc_pipe_info(void);
171void free_pipe_info(struct pipe_inode_info *); 173void free_pipe_info(struct pipe_inode_info *);
172 174
173/* Generic pipe buffer ops functions */ 175/* Generic pipe buffer ops functions */
174void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); 176bool generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);
175int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); 177int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);
176int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); 178int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *);
177void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); 179void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);
diff --git a/include/linux/platform_data/x86/clk-pmc-atom.h b/include/linux/platform_data/x86/clk-pmc-atom.h
index 3ab892208343..7a37ac27d0fb 100644
--- a/include/linux/platform_data/x86/clk-pmc-atom.h
+++ b/include/linux/platform_data/x86/clk-pmc-atom.h
@@ -35,10 +35,13 @@ struct pmc_clk {
35 * 35 *
36 * @base: PMC clock register base offset 36 * @base: PMC clock register base offset
37 * @clks: pointer to set of registered clocks, typically 0..5 37 * @clks: pointer to set of registered clocks, typically 0..5
38 * @critical: flag to indicate if firmware enabled pmc_plt_clks
39 * should be marked as critial or not
38 */ 40 */
39struct pmc_clk_data { 41struct pmc_clk_data {
40 void __iomem *base; 42 void __iomem *base;
41 const struct pmc_clk *clks; 43 const struct pmc_clk *clks;
44 bool critical;
42}; 45};
43 46
44#endif /* __PLATFORM_DATA_X86_CLK_PMC_ATOM_H */ 47#endif /* __PLATFORM_DATA_X86_CLK_PMC_ATOM_H */
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index edb9b040c94c..d5084ebd9f03 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -9,6 +9,13 @@
9#include <linux/bug.h> /* For BUG_ON. */ 9#include <linux/bug.h> /* For BUG_ON. */
10#include <linux/pid_namespace.h> /* For task_active_pid_ns. */ 10#include <linux/pid_namespace.h> /* For task_active_pid_ns. */
11#include <uapi/linux/ptrace.h> 11#include <uapi/linux/ptrace.h>
12#include <linux/seccomp.h>
13
14/* Add sp to seccomp_data, as seccomp is user API, we don't want to modify it */
15struct syscall_info {
16 __u64 sp;
17 struct seccomp_data data;
18};
12 19
13extern int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, 20extern int ptrace_access_vm(struct task_struct *tsk, unsigned long addr,
14 void *buf, int len, unsigned int gup_flags); 21 void *buf, int len, unsigned int gup_flags);
@@ -407,9 +414,7 @@ static inline void user_single_step_report(struct pt_regs *regs)
407#define current_user_stack_pointer() user_stack_pointer(current_pt_regs()) 414#define current_user_stack_pointer() user_stack_pointer(current_pt_regs())
408#endif 415#endif
409 416
410extern int task_current_syscall(struct task_struct *target, long *callno, 417extern int task_current_syscall(struct task_struct *target, struct syscall_info *info);
411 unsigned long args[6], unsigned int maxargs,
412 unsigned long *sp, unsigned long *pc);
413 418
414extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact); 419extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact);
415#endif 420#endif
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
index 0cd9f10423fb..a3fda9f024c3 100644
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -49,6 +49,27 @@ static inline void mmdrop(struct mm_struct *mm)
49 __mmdrop(mm); 49 __mmdrop(mm);
50} 50}
51 51
52/*
53 * This has to be called after a get_task_mm()/mmget_not_zero()
54 * followed by taking the mmap_sem for writing before modifying the
55 * vmas or anything the coredump pretends not to change from under it.
56 *
57 * NOTE: find_extend_vma() called from GUP context is the only place
58 * that can modify the "mm" (notably the vm_start/end) under mmap_sem
59 * for reading and outside the context of the process, so it is also
60 * the only case that holds the mmap_sem for reading that must call
61 * this function. Generally if the mmap_sem is hold for reading
62 * there's no need of this check after get_task_mm()/mmget_not_zero().
63 *
64 * This function can be obsoleted and the check can be removed, after
65 * the coredump code will hold the mmap_sem for writing before
66 * invoking the ->core_dump methods.
67 */
68static inline bool mmget_still_valid(struct mm_struct *mm)
69{
70 return likely(!mm->core_state);
71}
72
52/** 73/**
53 * mmget() - Pin the address space associated with a &struct mm_struct. 74 * mmget() - Pin the address space associated with a &struct mm_struct.
54 * @mm: The address space to pin. 75 * @mm: The address space to pin.
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index f3fb1edb3526..20d815a33145 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -21,6 +21,7 @@ struct shmem_inode_info {
21 struct list_head swaplist; /* chain of maybes on swap */ 21 struct list_head swaplist; /* chain of maybes on swap */
22 struct shared_policy policy; /* NUMA memory alloc policy */ 22 struct shared_policy policy; /* NUMA memory alloc policy */
23 struct simple_xattrs xattrs; /* list of xattrs */ 23 struct simple_xattrs xattrs; /* list of xattrs */
24 atomic_t stop_eviction; /* hold when working on inode */
24 struct inode vfs_inode; 25 struct inode vfs_inode;
25}; 26};
26 27
diff --git a/include/linux/string.h b/include/linux/string.h
index 7927b875f80c..6ab0a6fa512e 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -150,6 +150,9 @@ extern void * memscan(void *,int,__kernel_size_t);
150#ifndef __HAVE_ARCH_MEMCMP 150#ifndef __HAVE_ARCH_MEMCMP
151extern int memcmp(const void *,const void *,__kernel_size_t); 151extern int memcmp(const void *,const void *,__kernel_size_t);
152#endif 152#endif
153#ifndef __HAVE_ARCH_BCMP
154extern int bcmp(const void *,const void *,__kernel_size_t);
155#endif
153#ifndef __HAVE_ARCH_MEMCHR 156#ifndef __HAVE_ARCH_MEMCHR
154extern void * memchr(const void *,int,__kernel_size_t); 157extern void * memchr(const void *,int,__kernel_size_t);
155#endif 158#endif
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index ec861cd0cfe8..52d41d0c1ae1 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -304,12 +304,4 @@ rpc_clnt_swap_deactivate(struct rpc_clnt *clnt)
304} 304}
305#endif /* CONFIG_SUNRPC_SWAP */ 305#endif /* CONFIG_SUNRPC_SWAP */
306 306
307static inline bool
308rpc_task_need_resched(const struct rpc_task *task)
309{
310 if (RPC_IS_QUEUED(task) || task->tk_callback)
311 return true;
312 return false;
313}
314
315#endif /* _LINUX_SUNRPC_SCHED_H_ */ 307#endif /* _LINUX_SUNRPC_SCHED_H_ */
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h
index fab02133a919..3dc70adfe5f5 100644
--- a/include/linux/virtio_ring.h
+++ b/include/linux/virtio_ring.h
@@ -63,7 +63,7 @@ struct virtqueue;
63/* 63/*
64 * Creates a virtqueue and allocates the descriptor ring. If 64 * Creates a virtqueue and allocates the descriptor ring. If
65 * may_reduce_num is set, then this may allocate a smaller ring than 65 * may_reduce_num is set, then this may allocate a smaller ring than
66 * expected. The caller should query virtqueue_get_ring_size to learn 66 * expected. The caller should query virtqueue_get_vring_size to learn
67 * the actual size of the ring. 67 * the actual size of the ring.
68 */ 68 */
69struct virtqueue *vring_create_virtqueue(unsigned int index, 69struct virtqueue *vring_create_virtqueue(unsigned int index,
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index 2bfb87eb98ce..78c856cba4f5 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -61,10 +61,12 @@ int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
61 rxrpc_user_attach_call_t, unsigned long, gfp_t, 61 rxrpc_user_attach_call_t, unsigned long, gfp_t,
62 unsigned int); 62 unsigned int);
63void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64); 63void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
64u32 rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *); 64bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *,
65 u32 *);
65void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *); 66void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *);
66u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *); 67u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
67bool rxrpc_kernel_get_reply_time(struct socket *, struct rxrpc_call *, 68bool rxrpc_kernel_get_reply_time(struct socket *, struct rxrpc_call *,
68 ktime_t *); 69 ktime_t *);
70bool rxrpc_kernel_call_is_complete(struct rxrpc_call *);
69 71
70#endif /* _NET_RXRPC_H */ 72#endif /* _NET_RXRPC_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index bb307a11ee63..13bfeb712d36 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -7183,6 +7183,11 @@ void cfg80211_pmsr_complete(struct wireless_dev *wdev,
7183#define wiphy_info(wiphy, format, args...) \ 7183#define wiphy_info(wiphy, format, args...) \
7184 dev_info(&(wiphy)->dev, format, ##args) 7184 dev_info(&(wiphy)->dev, format, ##args)
7185 7185
7186#define wiphy_err_ratelimited(wiphy, format, args...) \
7187 dev_err_ratelimited(&(wiphy)->dev, format, ##args)
7188#define wiphy_warn_ratelimited(wiphy, format, args...) \
7189 dev_warn_ratelimited(&(wiphy)->dev, format, ##args)
7190
7186#define wiphy_debug(wiphy, format, args...) \ 7191#define wiphy_debug(wiphy, format, args...) \
7187 wiphy_printk(KERN_DEBUG, wiphy, format, ##args) 7192 wiphy_printk(KERN_DEBUG, wiphy, format, ##args)
7188 7193
diff --git a/include/net/ip.h b/include/net/ip.h
index be3cad9c2e4c..583526aad1d0 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -677,7 +677,7 @@ int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp,
677 unsigned char __user *data, int optlen); 677 unsigned char __user *data, int optlen);
678void ip_options_undo(struct ip_options *opt); 678void ip_options_undo(struct ip_options *opt);
679void ip_forward_options(struct sk_buff *skb); 679void ip_forward_options(struct sk_buff *skb);
680int ip_options_rcv_srr(struct sk_buff *skb); 680int ip_options_rcv_srr(struct sk_buff *skb, struct net_device *dev);
681 681
682/* 682/*
683 * Functions provided by ip_sockglue.c 683 * Functions provided by ip_sockglue.c
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ac2ed8ec662b..112dc18c658f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -6231,8 +6231,6 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
6231 * @hw: pointer as obtained from ieee80211_alloc_hw() 6231 * @hw: pointer as obtained from ieee80211_alloc_hw()
6232 * @ac: AC number to return packets from. 6232 * @ac: AC number to return packets from.
6233 * 6233 *
6234 * Should only be called between calls to ieee80211_txq_schedule_start()
6235 * and ieee80211_txq_schedule_end().
6236 * Returns the next txq if successful, %NULL if no queue is eligible. If a txq 6234 * Returns the next txq if successful, %NULL if no queue is eligible. If a txq
6237 * is returned, it should be returned with ieee80211_return_txq() after the 6235 * is returned, it should be returned with ieee80211_return_txq() after the
6238 * driver has finished scheduling it. 6236 * driver has finished scheduling it.
@@ -6240,51 +6238,58 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
6240struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac); 6238struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac);
6241 6239
6242/** 6240/**
6243 * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq() 6241 * ieee80211_txq_schedule_start - start new scheduling round for TXQs
6244 *
6245 * @hw: pointer as obtained from ieee80211_alloc_hw()
6246 * @txq: pointer obtained from station or virtual interface
6247 *
6248 * Should only be called between calls to ieee80211_txq_schedule_start()
6249 * and ieee80211_txq_schedule_end().
6250 */
6251void ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
6252
6253/**
6254 * ieee80211_txq_schedule_start - acquire locks for safe scheduling of an AC
6255 * 6242 *
6256 * @hw: pointer as obtained from ieee80211_alloc_hw() 6243 * @hw: pointer as obtained from ieee80211_alloc_hw()
6257 * @ac: AC number to acquire locks for 6244 * @ac: AC number to acquire locks for
6258 * 6245 *
6259 * Acquire locks needed to schedule TXQs from the given AC. Should be called 6246 * Should be called before ieee80211_next_txq() or ieee80211_return_txq().
6260 * before ieee80211_next_txq() or ieee80211_return_txq(). 6247 * The driver must not call multiple TXQ scheduling rounds concurrently.
6261 */ 6248 */
6262void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac) 6249void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac);
6263 __acquires(txq_lock); 6250
6251/* (deprecated) */
6252static inline void ieee80211_txq_schedule_end(struct ieee80211_hw *hw, u8 ac)
6253{
6254}
6255
6256void __ieee80211_schedule_txq(struct ieee80211_hw *hw,
6257 struct ieee80211_txq *txq, bool force);
6264 6258
6265/** 6259/**
6266 * ieee80211_txq_schedule_end - release locks for safe scheduling of an AC 6260 * ieee80211_schedule_txq - schedule a TXQ for transmission
6267 * 6261 *
6268 * @hw: pointer as obtained from ieee80211_alloc_hw() 6262 * @hw: pointer as obtained from ieee80211_alloc_hw()
6269 * @ac: AC number to acquire locks for 6263 * @txq: pointer obtained from station or virtual interface
6270 * 6264 *
6271 * Release locks previously acquired by ieee80211_txq_schedule_end(). 6265 * Schedules a TXQ for transmission if it is not already scheduled,
6266 * even if mac80211 does not have any packets buffered.
6267 *
6268 * The driver may call this function if it has buffered packets for
6269 * this TXQ internally.
6272 */ 6270 */
6273void ieee80211_txq_schedule_end(struct ieee80211_hw *hw, u8 ac) 6271static inline void
6274 __releases(txq_lock); 6272ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
6273{
6274 __ieee80211_schedule_txq(hw, txq, true);
6275}
6275 6276
6276/** 6277/**
6277 * ieee80211_schedule_txq - schedule a TXQ for transmission 6278 * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq()
6278 * 6279 *
6279 * @hw: pointer as obtained from ieee80211_alloc_hw() 6280 * @hw: pointer as obtained from ieee80211_alloc_hw()
6280 * @txq: pointer obtained from station or virtual interface 6281 * @txq: pointer obtained from station or virtual interface
6282 * @force: schedule txq even if mac80211 does not have any buffered packets.
6281 * 6283 *
6282 * Schedules a TXQ for transmission if it is not already scheduled. Takes a 6284 * The driver may set force=true if it has buffered packets for this TXQ
6283 * lock, which means it must *not* be called between 6285 * internally.
6284 * ieee80211_txq_schedule_start() and ieee80211_txq_schedule_end()
6285 */ 6286 */
6286void ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq) 6287static inline void
6287 __acquires(txq_lock) __releases(txq_lock); 6288ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq,
6289 bool force)
6290{
6291 __ieee80211_schedule_txq(hw, txq, force);
6292}
6288 6293
6289/** 6294/**
6290 * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit 6295 * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index a68ced28d8f4..12689ddfc24c 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -59,6 +59,7 @@ struct net {
59 */ 59 */
60 spinlock_t rules_mod_lock; 60 spinlock_t rules_mod_lock;
61 61
62 u32 hash_mix;
62 atomic64_t cookie_gen; 63 atomic64_t cookie_gen;
63 64
64 struct list_head list; /* list of network namespaces */ 65 struct list_head list; /* list of network namespaces */
diff --git a/include/net/netns/hash.h b/include/net/netns/hash.h
index 16a842456189..d9b665151f3d 100644
--- a/include/net/netns/hash.h
+++ b/include/net/netns/hash.h
@@ -2,16 +2,10 @@
2#ifndef __NET_NS_HASH_H__ 2#ifndef __NET_NS_HASH_H__
3#define __NET_NS_HASH_H__ 3#define __NET_NS_HASH_H__
4 4
5#include <asm/cache.h> 5#include <net/net_namespace.h>
6
7struct net;
8 6
9static inline u32 net_hash_mix(const struct net *net) 7static inline u32 net_hash_mix(const struct net *net)
10{ 8{
11#ifdef CONFIG_NET_NS 9 return net->hash_mix;
12 return (u32)(((unsigned long)net) >> ilog2(sizeof(*net)));
13#else
14 return 0;
15#endif
16} 10}
17#endif 11#endif
diff --git a/include/net/netrom.h b/include/net/netrom.h
index 5a0714ff500f..80f15b1c1a48 100644
--- a/include/net/netrom.h
+++ b/include/net/netrom.h
@@ -266,7 +266,7 @@ void nr_stop_idletimer(struct sock *);
266int nr_t1timer_running(struct sock *); 266int nr_t1timer_running(struct sock *);
267 267
268/* sysctl_net_netrom.c */ 268/* sysctl_net_netrom.c */
269void nr_register_sysctl(void); 269int nr_register_sysctl(void);
270void nr_unregister_sysctl(void); 270void nr_unregister_sysctl(void);
271 271
272#endif 272#endif
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 87499b6b35d6..df5c69db68af 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -166,7 +166,7 @@ struct nci_conn_info {
166 * According to specification 102 622 chapter 4.4 Pipes, 166 * According to specification 102 622 chapter 4.4 Pipes,
167 * the pipe identifier is 7 bits long. 167 * the pipe identifier is 7 bits long.
168 */ 168 */
169#define NCI_HCI_MAX_PIPES 127 169#define NCI_HCI_MAX_PIPES 128
170 170
171struct nci_hci_gate { 171struct nci_hci_gate {
172 u8 gate; 172 u8 gate;
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 7d1a0483a17b..a2b38b3deeca 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -923,6 +923,41 @@ static inline void qdisc_qstats_overlimit(struct Qdisc *sch)
923 sch->qstats.overlimits++; 923 sch->qstats.overlimits++;
924} 924}
925 925
926static inline int qdisc_qstats_copy(struct gnet_dump *d, struct Qdisc *sch)
927{
928 __u32 qlen = qdisc_qlen_sum(sch);
929
930 return gnet_stats_copy_queue(d, sch->cpu_qstats, &sch->qstats, qlen);
931}
932
933static inline void qdisc_qstats_qlen_backlog(struct Qdisc *sch, __u32 *qlen,
934 __u32 *backlog)
935{
936 struct gnet_stats_queue qstats = { 0 };
937 __u32 len = qdisc_qlen_sum(sch);
938
939 __gnet_stats_copy_queue(&qstats, sch->cpu_qstats, &sch->qstats, len);
940 *qlen = qstats.qlen;
941 *backlog = qstats.backlog;
942}
943
944static inline void qdisc_tree_flush_backlog(struct Qdisc *sch)
945{
946 __u32 qlen, backlog;
947
948 qdisc_qstats_qlen_backlog(sch, &qlen, &backlog);
949 qdisc_tree_reduce_backlog(sch, qlen, backlog);
950}
951
952static inline void qdisc_purge_queue(struct Qdisc *sch)
953{
954 __u32 qlen, backlog;
955
956 qdisc_qstats_qlen_backlog(sch, &qlen, &backlog);
957 qdisc_reset(sch);
958 qdisc_tree_reduce_backlog(sch, qlen, backlog);
959}
960
926static inline void qdisc_skb_head_init(struct qdisc_skb_head *qh) 961static inline void qdisc_skb_head_init(struct qdisc_skb_head *qh)
927{ 962{
928 qh->head = NULL; 963 qh->head = NULL;
@@ -1106,13 +1141,8 @@ static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new,
1106 sch_tree_lock(sch); 1141 sch_tree_lock(sch);
1107 old = *pold; 1142 old = *pold;
1108 *pold = new; 1143 *pold = new;
1109 if (old != NULL) { 1144 if (old != NULL)
1110 unsigned int qlen = old->q.qlen; 1145 qdisc_tree_flush_backlog(old);
1111 unsigned int backlog = old->qstats.backlog;
1112
1113 qdisc_reset(old);
1114 qdisc_tree_reduce_backlog(old, qlen, backlog);
1115 }
1116 sch_tree_unlock(sch); 1146 sch_tree_unlock(sch);
1117 1147
1118 return old; 1148 return old;
diff --git a/include/net/sock.h b/include/net/sock.h
index 8de5ee258b93..341f8bafa0cf 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2084,12 +2084,6 @@ static inline bool skwq_has_sleeper(struct socket_wq *wq)
2084 * @p: poll_table 2084 * @p: poll_table
2085 * 2085 *
2086 * See the comments in the wq_has_sleeper function. 2086 * See the comments in the wq_has_sleeper function.
2087 *
2088 * Do not derive sock from filp->private_data here. An SMC socket establishes
2089 * an internal TCP socket that is used in the fallback case. All socket
2090 * operations on the SMC socket are then forwarded to the TCP socket. In case of
2091 * poll, the filp->private_data pointer references the SMC socket because the
2092 * TCP socket has no file assigned.
2093 */ 2087 */
2094static inline void sock_poll_wait(struct file *filp, struct socket *sock, 2088static inline void sock_poll_wait(struct file *filp, struct socket *sock,
2095 poll_table *p) 2089 poll_table *p)
diff --git a/include/net/tls.h b/include/net/tls.h
index a5a938583295..5934246b2c6f 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -307,6 +307,7 @@ int tls_device_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
307int tls_device_sendpage(struct sock *sk, struct page *page, 307int tls_device_sendpage(struct sock *sk, struct page *page,
308 int offset, size_t size, int flags); 308 int offset, size_t size, int flags);
309void tls_device_sk_destruct(struct sock *sk); 309void tls_device_sk_destruct(struct sock *sk);
310void tls_device_free_resources_tx(struct sock *sk);
310void tls_device_init(void); 311void tls_device_init(void);
311void tls_device_cleanup(void); 312void tls_device_cleanup(void);
312int tls_tx_records(struct sock *sk, int flags); 313int tls_tx_records(struct sock *sk, int flags);
@@ -330,6 +331,7 @@ int tls_push_sg(struct sock *sk, struct tls_context *ctx,
330 int flags); 331 int flags);
331int tls_push_partial_record(struct sock *sk, struct tls_context *ctx, 332int tls_push_partial_record(struct sock *sk, struct tls_context *ctx,
332 int flags); 333 int flags);
334bool tls_free_partial_record(struct sock *sk, struct tls_context *ctx);
333 335
334static inline struct tls_msg *tls_msg(struct sk_buff *skb) 336static inline struct tls_msg *tls_msg(struct sk_buff *skb)
335{ 337{
@@ -379,7 +381,7 @@ tls_validate_xmit_skb(struct sock *sk, struct net_device *dev,
379static inline bool tls_is_sk_tx_device_offloaded(struct sock *sk) 381static inline bool tls_is_sk_tx_device_offloaded(struct sock *sk)
380{ 382{
381#ifdef CONFIG_SOCK_VALIDATE_XMIT 383#ifdef CONFIG_SOCK_VALIDATE_XMIT
382 return sk_fullsock(sk) & 384 return sk_fullsock(sk) &&
383 (smp_load_acquire(&sk->sk_validate_xmit_skb) == 385 (smp_load_acquire(&sk->sk_validate_xmit_skb) ==
384 &tls_validate_xmit_skb); 386 &tls_validate_xmit_skb);
385#else 387#else
diff --git a/include/sound/soc.h b/include/sound/soc.h
index eb7db605955b..482b4ea87c3c 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -802,8 +802,13 @@ struct snd_soc_component_driver {
802 int probe_order; 802 int probe_order;
803 int remove_order; 803 int remove_order;
804 804
805 /* signal if the module handling the component cannot be removed */ 805 /*
806 unsigned int ignore_module_refcount:1; 806 * signal if the module handling the component should not be removed
807 * if a pcm is open. Setting this would prevent the module
808 * refcount being incremented in probe() but allow it be incremented
809 * when a pcm is opened and decremented when it is closed.
810 */
811 unsigned int module_get_upon_open:1;
807 812
808 /* bits */ 813 /* bits */
809 unsigned int idle_bias_on:1; 814 unsigned int idle_bias_on:1;
@@ -1083,6 +1088,8 @@ struct snd_soc_card {
1083 struct mutex mutex; 1088 struct mutex mutex;
1084 struct mutex dapm_mutex; 1089 struct mutex dapm_mutex;
1085 1090
1091 spinlock_t dpcm_lock;
1092
1086 bool instantiated; 1093 bool instantiated;
1087 bool topology_shortname_created; 1094 bool topology_shortname_created;
1088 1095
diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h
index 44a3259ed4a5..b6e0cbc2c71f 100644
--- a/include/trace/events/syscalls.h
+++ b/include/trace/events/syscalls.h
@@ -28,7 +28,7 @@ TRACE_EVENT_FN(sys_enter,
28 28
29 TP_fast_assign( 29 TP_fast_assign(
30 __entry->id = id; 30 __entry->id = id;
31 syscall_get_arguments(current, regs, 0, 6, __entry->args); 31 syscall_get_arguments(current, regs, __entry->args);
32 ), 32 ),
33 33
34 TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)", 34 TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)",
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 3652b239dad1..d473e5ed044c 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1591,7 +1591,7 @@ enum ethtool_link_mode_bit_indices {
1591 1591
1592static inline int ethtool_validate_speed(__u32 speed) 1592static inline int ethtool_validate_speed(__u32 speed)
1593{ 1593{
1594 return speed <= INT_MAX || speed == SPEED_UNKNOWN; 1594 return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN;
1595} 1595}
1596 1596
1597/* Duplex, half or full. */ 1597/* Duplex, half or full. */
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 7f14d4a66c28..64cee116928e 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -439,10 +439,12 @@
439#define KEY_TITLE 0x171 439#define KEY_TITLE 0x171
440#define KEY_SUBTITLE 0x172 440#define KEY_SUBTITLE 0x172
441#define KEY_ANGLE 0x173 441#define KEY_ANGLE 0x173
442#define KEY_ZOOM 0x174 442#define KEY_FULL_SCREEN 0x174 /* AC View Toggle */
443#define KEY_ZOOM KEY_FULL_SCREEN
443#define KEY_MODE 0x175 444#define KEY_MODE 0x175
444#define KEY_KEYBOARD 0x176 445#define KEY_KEYBOARD 0x176
445#define KEY_SCREEN 0x177 446#define KEY_ASPECT_RATIO 0x177 /* HUTRR37: Aspect */
447#define KEY_SCREEN KEY_ASPECT_RATIO
446#define KEY_PC 0x178 /* Media Select Computer */ 448#define KEY_PC 0x178 /* Media Select Computer */
447#define KEY_TV 0x179 /* Media Select TV */ 449#define KEY_TV 0x179 /* Media Select TV */
448#define KEY_TV2 0x17a /* Media Select Cable */ 450#define KEY_TV2 0x17a /* Media Select Cable */
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 404d4b9ffe76..df1153cea0b7 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -32,6 +32,7 @@
32 32
33#ifndef __KERNEL__ 33#ifndef __KERNEL__
34#include <stdlib.h> 34#include <stdlib.h>
35#include <time.h>
35#endif 36#endif
36 37
37/* 38/*