aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2018-05-01 14:02:34 -0400
committerJames Morris <james.morris@microsoft.com>2018-05-01 14:02:34 -0400
commitb3859ee18ed287170b66b19a78191f7312ec3470 (patch)
treec52550132fdf6802b159531498bde8dcfbd26180 /include
parentb393a707c84bb56a7800c93849fd8b492f76ba42 (diff)
parent6da6c0db5316275015e8cc2959f12a17584aeb64 (diff)
Merge tag 'v4.17-rc3' into next-general
Merge to Linux v4.17-rc3 which has stability bugfix.
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h2
-rw-r--r--include/kvm/arm_psci.h16
-rw-r--r--include/linux/blk-mq.h3
-rw-r--r--include/linux/blkdev.h6
-rw-r--r--include/linux/bpf.h4
-rw-r--r--include/linux/device.h6
-rw-r--r--include/linux/ethtool.h2
-rw-r--r--include/linux/fsnotify_backend.h4
-rw-r--r--include/linux/hrtimer.h2
-rw-r--r--include/linux/mtd/flashchip.h1
-rw-r--r--include/linux/serial_core.h21
-rw-r--r--include/linux/stringhash.h4
-rw-r--r--include/linux/ti-emif-sram.h75
-rw-r--r--include/linux/timekeeper_internal.h2
-rw-r--r--include/linux/timekeeping.h37
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/vbox_utils.h23
-rw-r--r--include/linux/virtio.h3
-rw-r--r--include/net/ife.h3
-rw-r--r--include/net/llc_conn.h1
-rw-r--r--include/scsi/scsi_dbg.h2
-rw-r--r--include/soc/bcm2835/raspberrypi-firmware.h4
-rw-r--r--include/sound/control.h7
-rw-r--r--include/trace/events/ufs.h27
-rw-r--r--include/trace/events/workqueue.h2
-rw-r--r--include/uapi/linux/kvm.h7
-rw-r--r--include/uapi/linux/sysctl.h18
-rw-r--r--include/uapi/linux/time.h1
-rw-r--r--include/uapi/linux/virtio_balloon.h15
29 files changed, 217 insertions, 83 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 278841c75b97..af240573e482 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -188,7 +188,7 @@
188#endif 188#endif
189 189
190#ifdef CONFIG_SERIAL_EARLYCON 190#ifdef CONFIG_SERIAL_EARLYCON
191#define EARLYCON_TABLE() STRUCT_ALIGN(); \ 191#define EARLYCON_TABLE() . = ALIGN(8); \
192 VMLINUX_SYMBOL(__earlycon_table) = .; \ 192 VMLINUX_SYMBOL(__earlycon_table) = .; \
193 KEEP(*(__earlycon_table)) \ 193 KEEP(*(__earlycon_table)) \
194 VMLINUX_SYMBOL(__earlycon_table_end) = .; 194 VMLINUX_SYMBOL(__earlycon_table_end) = .;
diff --git a/include/kvm/arm_psci.h b/include/kvm/arm_psci.h
index e518e4e3dfb5..4b1548129fa2 100644
--- a/include/kvm/arm_psci.h
+++ b/include/kvm/arm_psci.h
@@ -37,10 +37,15 @@ static inline int kvm_psci_version(struct kvm_vcpu *vcpu, struct kvm *kvm)
37 * Our PSCI implementation stays the same across versions from 37 * Our PSCI implementation stays the same across versions from
38 * v0.2 onward, only adding the few mandatory functions (such 38 * v0.2 onward, only adding the few mandatory functions (such
39 * as FEATURES with 1.0) that are required by newer 39 * as FEATURES with 1.0) that are required by newer
40 * revisions. It is thus safe to return the latest. 40 * revisions. It is thus safe to return the latest, unless
41 * userspace has instructed us otherwise.
41 */ 42 */
42 if (test_bit(KVM_ARM_VCPU_PSCI_0_2, vcpu->arch.features)) 43 if (test_bit(KVM_ARM_VCPU_PSCI_0_2, vcpu->arch.features)) {
44 if (vcpu->kvm->arch.psci_version)
45 return vcpu->kvm->arch.psci_version;
46
43 return KVM_ARM_PSCI_LATEST; 47 return KVM_ARM_PSCI_LATEST;
48 }
44 49
45 return KVM_ARM_PSCI_0_1; 50 return KVM_ARM_PSCI_0_1;
46} 51}
@@ -48,4 +53,11 @@ static inline int kvm_psci_version(struct kvm_vcpu *vcpu, struct kvm *kvm)
48 53
49int kvm_hvc_call_handler(struct kvm_vcpu *vcpu); 54int kvm_hvc_call_handler(struct kvm_vcpu *vcpu);
50 55
56struct kvm_one_reg;
57
58int kvm_arm_get_fw_num_regs(struct kvm_vcpu *vcpu);
59int kvm_arm_copy_fw_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices);
60int kvm_arm_get_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
61int kvm_arm_set_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
62
51#endif /* __KVM_ARM_PSCI_H__ */ 63#endif /* __KVM_ARM_PSCI_H__ */
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index e3986f4b3461..ebc34a5686dc 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -9,6 +9,9 @@
9struct blk_mq_tags; 9struct blk_mq_tags;
10struct blk_flush_queue; 10struct blk_flush_queue;
11 11
12/**
13 * struct blk_mq_hw_ctx - State for a hardware queue facing the hardware block device
14 */
12struct blk_mq_hw_ctx { 15struct blk_mq_hw_ctx {
13 struct { 16 struct {
14 spinlock_t lock; 17 spinlock_t lock;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9af3e0f430bc..5c4eee043191 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -605,6 +605,11 @@ struct request_queue {
605 * initialized by the low level device driver (e.g. scsi/sd.c). 605 * initialized by the low level device driver (e.g. scsi/sd.c).
606 * Stacking drivers (device mappers) may or may not initialize 606 * Stacking drivers (device mappers) may or may not initialize
607 * these fields. 607 * these fields.
608 *
609 * Reads of this information must be protected with blk_queue_enter() /
610 * blk_queue_exit(). Modifying this information is only allowed while
611 * no requests are being processed. See also blk_mq_freeze_queue() and
612 * blk_mq_unfreeze_queue().
608 */ 613 */
609 unsigned int nr_zones; 614 unsigned int nr_zones;
610 unsigned long *seq_zones_bitmap; 615 unsigned long *seq_zones_bitmap;
@@ -737,6 +742,7 @@ bool blk_queue_flag_test_and_clear(unsigned int flag, struct request_queue *q);
737#define blk_queue_quiesced(q) test_bit(QUEUE_FLAG_QUIESCED, &(q)->queue_flags) 742#define blk_queue_quiesced(q) test_bit(QUEUE_FLAG_QUIESCED, &(q)->queue_flags)
738#define blk_queue_preempt_only(q) \ 743#define blk_queue_preempt_only(q) \
739 test_bit(QUEUE_FLAG_PREEMPT_ONLY, &(q)->queue_flags) 744 test_bit(QUEUE_FLAG_PREEMPT_ONLY, &(q)->queue_flags)
745#define blk_queue_fua(q) test_bit(QUEUE_FLAG_FUA, &(q)->queue_flags)
740 746
741extern int blk_set_preempt_only(struct request_queue *q); 747extern int blk_set_preempt_only(struct request_queue *q);
742extern void blk_clear_preempt_only(struct request_queue *q); 748extern void blk_clear_preempt_only(struct request_queue *q);
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 95a7abd0ee92..486e65e3db26 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -339,8 +339,8 @@ int bpf_prog_array_copy_to_user(struct bpf_prog_array __rcu *progs,
339void bpf_prog_array_delete_safe(struct bpf_prog_array __rcu *progs, 339void bpf_prog_array_delete_safe(struct bpf_prog_array __rcu *progs,
340 struct bpf_prog *old_prog); 340 struct bpf_prog *old_prog);
341int bpf_prog_array_copy_info(struct bpf_prog_array __rcu *array, 341int bpf_prog_array_copy_info(struct bpf_prog_array __rcu *array,
342 __u32 __user *prog_ids, u32 request_cnt, 342 u32 *prog_ids, u32 request_cnt,
343 __u32 __user *prog_cnt); 343 u32 *prog_cnt);
344int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array, 344int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array,
345 struct bpf_prog *exclude_prog, 345 struct bpf_prog *exclude_prog,
346 struct bpf_prog *include_prog, 346 struct bpf_prog *include_prog,
diff --git a/include/linux/device.h b/include/linux/device.h
index 0059b99e1f25..477956990f5e 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -256,7 +256,9 @@ enum probe_type {
256 * automatically. 256 * automatically.
257 * @pm: Power management operations of the device which matched 257 * @pm: Power management operations of the device which matched
258 * this driver. 258 * this driver.
259 * @coredump: Called through sysfs to initiate a device coredump. 259 * @coredump: Called when sysfs entry is written to. The device driver
260 * is expected to call the dev_coredump API resulting in a
261 * uevent.
260 * @p: Driver core's private data, no one other than the driver 262 * @p: Driver core's private data, no one other than the driver
261 * core can touch this. 263 * core can touch this.
262 * 264 *
@@ -288,7 +290,7 @@ struct device_driver {
288 const struct attribute_group **groups; 290 const struct attribute_group **groups;
289 291
290 const struct dev_pm_ops *pm; 292 const struct dev_pm_ops *pm;
291 int (*coredump) (struct device *dev); 293 void (*coredump) (struct device *dev);
292 294
293 struct driver_private *p; 295 struct driver_private *p;
294}; 296};
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index ebe41811ed34..b32cd2062f18 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -310,6 +310,8 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
310 * fields should be ignored (use %__ETHTOOL_LINK_MODE_MASK_NBITS 310 * fields should be ignored (use %__ETHTOOL_LINK_MODE_MASK_NBITS
311 * instead of the latter), any change to them will be overwritten 311 * instead of the latter), any change to them will be overwritten
312 * by kernel. Returns a negative error code or zero. 312 * by kernel. Returns a negative error code or zero.
313 * @get_fecparam: Get the network device Forward Error Correction parameters.
314 * @set_fecparam: Set the network device Forward Error Correction parameters.
313 * 315 *
314 * All operations are optional (i.e. the function pointer may be set 316 * All operations are optional (i.e. the function pointer may be set
315 * to %NULL) and callers must take this into account. Callers must 317 * to %NULL) and callers must take this into account. Callers must
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index e0c95c9f1e29..e64c0294f50b 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -217,12 +217,10 @@ struct fsnotify_mark_connector {
217 union { /* Object pointer [lock] */ 217 union { /* Object pointer [lock] */
218 struct inode *inode; 218 struct inode *inode;
219 struct vfsmount *mnt; 219 struct vfsmount *mnt;
220 };
221 union {
222 struct hlist_head list;
223 /* Used listing heads to free after srcu period expires */ 220 /* Used listing heads to free after srcu period expires */
224 struct fsnotify_mark_connector *destroy_next; 221 struct fsnotify_mark_connector *destroy_next;
225 }; 222 };
223 struct hlist_head list;
226}; 224};
227 225
228/* 226/*
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index a2656c3ebe81..3892e9c8b2de 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -161,9 +161,11 @@ struct hrtimer_clock_base {
161enum hrtimer_base_type { 161enum hrtimer_base_type {
162 HRTIMER_BASE_MONOTONIC, 162 HRTIMER_BASE_MONOTONIC,
163 HRTIMER_BASE_REALTIME, 163 HRTIMER_BASE_REALTIME,
164 HRTIMER_BASE_BOOTTIME,
164 HRTIMER_BASE_TAI, 165 HRTIMER_BASE_TAI,
165 HRTIMER_BASE_MONOTONIC_SOFT, 166 HRTIMER_BASE_MONOTONIC_SOFT,
166 HRTIMER_BASE_REALTIME_SOFT, 167 HRTIMER_BASE_REALTIME_SOFT,
168 HRTIMER_BASE_BOOTTIME_SOFT,
167 HRTIMER_BASE_TAI_SOFT, 169 HRTIMER_BASE_TAI_SOFT,
168 HRTIMER_MAX_CLOCK_BASES, 170 HRTIMER_MAX_CLOCK_BASES,
169}; 171};
diff --git a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h
index b63fa457febd..3529683f691e 100644
--- a/include/linux/mtd/flashchip.h
+++ b/include/linux/mtd/flashchip.h
@@ -85,6 +85,7 @@ struct flchip {
85 unsigned int write_suspended:1; 85 unsigned int write_suspended:1;
86 unsigned int erase_suspended:1; 86 unsigned int erase_suspended:1;
87 unsigned long in_progress_block_addr; 87 unsigned long in_progress_block_addr;
88 unsigned long in_progress_block_mask;
88 89
89 struct mutex mutex; 90 struct mutex mutex;
90 wait_queue_head_t wq; /* Wait on here when we're waiting for the chip 91 wait_queue_head_t wq; /* Wait on here when we're waiting for the chip
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 1d356105f25a..b4c9fda9d833 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -351,10 +351,10 @@ struct earlycon_id {
351 char name[16]; 351 char name[16];
352 char compatible[128]; 352 char compatible[128];
353 int (*setup)(struct earlycon_device *, const char *options); 353 int (*setup)(struct earlycon_device *, const char *options);
354} __aligned(32); 354};
355 355
356extern const struct earlycon_id __earlycon_table[]; 356extern const struct earlycon_id *__earlycon_table[];
357extern const struct earlycon_id __earlycon_table_end[]; 357extern const struct earlycon_id *__earlycon_table_end[];
358 358
359#if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE) 359#if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
360#define EARLYCON_USED_OR_UNUSED __used 360#define EARLYCON_USED_OR_UNUSED __used
@@ -362,12 +362,19 @@ extern const struct earlycon_id __earlycon_table_end[];
362#define EARLYCON_USED_OR_UNUSED __maybe_unused 362#define EARLYCON_USED_OR_UNUSED __maybe_unused
363#endif 363#endif
364 364
365#define OF_EARLYCON_DECLARE(_name, compat, fn) \ 365#define _OF_EARLYCON_DECLARE(_name, compat, fn, unique_id) \
366 static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \ 366 static const struct earlycon_id unique_id \
367 EARLYCON_USED_OR_UNUSED __section(__earlycon_table) \ 367 EARLYCON_USED_OR_UNUSED __initconst \
368 = { .name = __stringify(_name), \ 368 = { .name = __stringify(_name), \
369 .compatible = compat, \ 369 .compatible = compat, \
370 .setup = fn } 370 .setup = fn }; \
371 static const struct earlycon_id EARLYCON_USED_OR_UNUSED \
372 __section(__earlycon_table) \
373 * const __PASTE(__p, unique_id) = &unique_id
374
375#define OF_EARLYCON_DECLARE(_name, compat, fn) \
376 _OF_EARLYCON_DECLARE(_name, compat, fn, \
377 __UNIQUE_ID(__earlycon_##_name))
371 378
372#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn) 379#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
373 380
diff --git a/include/linux/stringhash.h b/include/linux/stringhash.h
index e8f0f852968f..c0c5c5b73dc0 100644
--- a/include/linux/stringhash.h
+++ b/include/linux/stringhash.h
@@ -50,9 +50,9 @@ partial_name_hash(unsigned long c, unsigned long prevhash)
50 * losing bits). This also has the property (wanted by the dcache) 50 * losing bits). This also has the property (wanted by the dcache)
51 * that the msbits make a good hash table index. 51 * that the msbits make a good hash table index.
52 */ 52 */
53static inline unsigned long end_name_hash(unsigned long hash) 53static inline unsigned int end_name_hash(unsigned long hash)
54{ 54{
55 return __hash_32((unsigned int)hash); 55 return hash_long(hash, 32);
56} 56}
57 57
58/* 58/*
diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
index 45bc6b376492..53604b087f2c 100644
--- a/include/linux/ti-emif-sram.h
+++ b/include/linux/ti-emif-sram.h
@@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
60 u32 abort_sr; 60 u32 abort_sr;
61} __packed __aligned(8); 61} __packed __aligned(8);
62 62
63static inline void ti_emif_asm_offsets(void)
64{
65 DEFINE(EMIF_SDCFG_VAL_OFFSET,
66 offsetof(struct emif_regs_amx3, emif_sdcfg_val));
67 DEFINE(EMIF_TIMING1_VAL_OFFSET,
68 offsetof(struct emif_regs_amx3, emif_timing1_val));
69 DEFINE(EMIF_TIMING2_VAL_OFFSET,
70 offsetof(struct emif_regs_amx3, emif_timing2_val));
71 DEFINE(EMIF_TIMING3_VAL_OFFSET,
72 offsetof(struct emif_regs_amx3, emif_timing3_val));
73 DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
74 offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
75 DEFINE(EMIF_ZQCFG_VAL_OFFSET,
76 offsetof(struct emif_regs_amx3, emif_zqcfg_val));
77 DEFINE(EMIF_PMCR_VAL_OFFSET,
78 offsetof(struct emif_regs_amx3, emif_pmcr_val));
79 DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
80 offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
81 DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
82 offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
83 DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
84 offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
85 DEFINE(EMIF_COS_CONFIG_OFFSET,
86 offsetof(struct emif_regs_amx3, emif_cos_config));
87 DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
88 offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
89 DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
90 offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
91 DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
92 offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
93 DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
94 offsetof(struct emif_regs_amx3, emif_ocp_config_val));
95 DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
96 offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
97 DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
98 offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
99 DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
100 offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
101 DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
102 offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
103 DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
104 offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
105 DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
106 offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
107 DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
108
109 BLANK();
110
111 DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
112 offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
113 DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
114 offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
115 DEFINE(EMIF_PM_CONFIG_OFFSET,
116 offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
117 DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
118 offsetof(struct ti_emif_pm_data, regs_virt));
119 DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
120 offsetof(struct ti_emif_pm_data, regs_phys));
121 DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
122
123 BLANK();
124
125 DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
126 offsetof(struct ti_emif_pm_functions, save_context));
127 DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
128 offsetof(struct ti_emif_pm_functions, restore_context));
129 DEFINE(EMIF_PM_ENTER_SR_OFFSET,
130 offsetof(struct ti_emif_pm_functions, enter_sr));
131 DEFINE(EMIF_PM_EXIT_SR_OFFSET,
132 offsetof(struct ti_emif_pm_functions, exit_sr));
133 DEFINE(EMIF_PM_ABORT_SR_OFFSET,
134 offsetof(struct ti_emif_pm_functions, abort_sr));
135 DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
136}
137
63struct gen_pool; 138struct gen_pool;
64 139
65int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst); 140int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index 4b3dca173e89..7acb953298a7 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -52,7 +52,6 @@ struct tk_read_base {
52 * @offs_real: Offset clock monotonic -> clock realtime 52 * @offs_real: Offset clock monotonic -> clock realtime
53 * @offs_boot: Offset clock monotonic -> clock boottime 53 * @offs_boot: Offset clock monotonic -> clock boottime
54 * @offs_tai: Offset clock monotonic -> clock tai 54 * @offs_tai: Offset clock monotonic -> clock tai
55 * @time_suspended: Accumulated suspend time
56 * @tai_offset: The current UTC to TAI offset in seconds 55 * @tai_offset: The current UTC to TAI offset in seconds
57 * @clock_was_set_seq: The sequence number of clock was set events 56 * @clock_was_set_seq: The sequence number of clock was set events
58 * @cs_was_changed_seq: The sequence number of clocksource change events 57 * @cs_was_changed_seq: The sequence number of clocksource change events
@@ -95,7 +94,6 @@ struct timekeeper {
95 ktime_t offs_real; 94 ktime_t offs_real;
96 ktime_t offs_boot; 95 ktime_t offs_boot;
97 ktime_t offs_tai; 96 ktime_t offs_tai;
98 ktime_t time_suspended;
99 s32 tai_offset; 97 s32 tai_offset;
100 unsigned int clock_was_set_seq; 98 unsigned int clock_was_set_seq;
101 u8 cs_was_changed_seq; 99 u8 cs_was_changed_seq;
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 9737fbec7019..588a0e4b1ab9 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -33,25 +33,20 @@ extern void ktime_get_ts64(struct timespec64 *ts);
33extern time64_t ktime_get_seconds(void); 33extern time64_t ktime_get_seconds(void);
34extern time64_t __ktime_get_real_seconds(void); 34extern time64_t __ktime_get_real_seconds(void);
35extern time64_t ktime_get_real_seconds(void); 35extern time64_t ktime_get_real_seconds(void);
36extern void ktime_get_active_ts64(struct timespec64 *ts);
37 36
38extern int __getnstimeofday64(struct timespec64 *tv); 37extern int __getnstimeofday64(struct timespec64 *tv);
39extern void getnstimeofday64(struct timespec64 *tv); 38extern void getnstimeofday64(struct timespec64 *tv);
40extern void getboottime64(struct timespec64 *ts); 39extern void getboottime64(struct timespec64 *ts);
41 40
42#define ktime_get_real_ts64(ts) getnstimeofday64(ts) 41#define ktime_get_real_ts64(ts) getnstimeofday64(ts)
43
44/* Clock BOOTTIME compatibility wrappers */
45static inline void get_monotonic_boottime64(struct timespec64 *ts)
46{
47 ktime_get_ts64(ts);
48}
49 42
50/* 43/*
51 * ktime_t based interfaces 44 * ktime_t based interfaces
52 */ 45 */
46
53enum tk_offsets { 47enum tk_offsets {
54 TK_OFFS_REAL, 48 TK_OFFS_REAL,
49 TK_OFFS_BOOT,
55 TK_OFFS_TAI, 50 TK_OFFS_TAI,
56 TK_OFFS_MAX, 51 TK_OFFS_MAX,
57}; 52};
@@ -62,10 +57,6 @@ extern ktime_t ktime_mono_to_any(ktime_t tmono, enum tk_offsets offs);
62extern ktime_t ktime_get_raw(void); 57extern ktime_t ktime_get_raw(void);
63extern u32 ktime_get_resolution_ns(void); 58extern u32 ktime_get_resolution_ns(void);
64 59
65/* Clock BOOTTIME compatibility wrappers */
66static inline ktime_t ktime_get_boottime(void) { return ktime_get(); }
67static inline u64 ktime_get_boot_ns(void) { return ktime_get(); }
68
69/** 60/**
70 * ktime_get_real - get the real (wall-) time in ktime_t format 61 * ktime_get_real - get the real (wall-) time in ktime_t format
71 */ 62 */
@@ -75,6 +66,17 @@ static inline ktime_t ktime_get_real(void)
75} 66}
76 67
77/** 68/**
69 * ktime_get_boottime - Returns monotonic time since boot in ktime_t format
70 *
71 * This is similar to CLOCK_MONTONIC/ktime_get, but also includes the
72 * time spent in suspend.
73 */
74static inline ktime_t ktime_get_boottime(void)
75{
76 return ktime_get_with_offset(TK_OFFS_BOOT);
77}
78
79/**
78 * ktime_get_clocktai - Returns the TAI time of day in ktime_t format 80 * ktime_get_clocktai - Returns the TAI time of day in ktime_t format
79 */ 81 */
80static inline ktime_t ktime_get_clocktai(void) 82static inline ktime_t ktime_get_clocktai(void)
@@ -100,6 +102,11 @@ static inline u64 ktime_get_real_ns(void)
100 return ktime_to_ns(ktime_get_real()); 102 return ktime_to_ns(ktime_get_real());
101} 103}
102 104
105static inline u64 ktime_get_boot_ns(void)
106{
107 return ktime_to_ns(ktime_get_boottime());
108}
109
103static inline u64 ktime_get_tai_ns(void) 110static inline u64 ktime_get_tai_ns(void)
104{ 111{
105 return ktime_to_ns(ktime_get_clocktai()); 112 return ktime_to_ns(ktime_get_clocktai());
@@ -112,11 +119,17 @@ static inline u64 ktime_get_raw_ns(void)
112 119
113extern u64 ktime_get_mono_fast_ns(void); 120extern u64 ktime_get_mono_fast_ns(void);
114extern u64 ktime_get_raw_fast_ns(void); 121extern u64 ktime_get_raw_fast_ns(void);
122extern u64 ktime_get_boot_fast_ns(void);
115extern u64 ktime_get_real_fast_ns(void); 123extern u64 ktime_get_real_fast_ns(void);
116 124
117/* 125/*
118 * timespec64 interfaces utilizing the ktime based ones 126 * timespec64 interfaces utilizing the ktime based ones
119 */ 127 */
128static inline void get_monotonic_boottime64(struct timespec64 *ts)
129{
130 *ts = ktime_to_timespec64(ktime_get_boottime());
131}
132
120static inline void timekeeping_clocktai64(struct timespec64 *ts) 133static inline void timekeeping_clocktai64(struct timespec64 *ts)
121{ 134{
122 *ts = ktime_to_timespec64(ktime_get_clocktai()); 135 *ts = ktime_to_timespec64(ktime_get_clocktai());
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 47f8af22f216..1dd587ba6d88 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -701,7 +701,7 @@ extern int tty_unregister_ldisc(int disc);
701extern int tty_set_ldisc(struct tty_struct *tty, int disc); 701extern int tty_set_ldisc(struct tty_struct *tty, int disc);
702extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); 702extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty);
703extern void tty_ldisc_release(struct tty_struct *tty); 703extern void tty_ldisc_release(struct tty_struct *tty);
704extern void tty_ldisc_init(struct tty_struct *tty); 704extern int __must_check tty_ldisc_init(struct tty_struct *tty);
705extern void tty_ldisc_deinit(struct tty_struct *tty); 705extern void tty_ldisc_deinit(struct tty_struct *tty);
706extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p, 706extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
707 char *f, int count); 707 char *f, int count);
diff --git a/include/linux/vbox_utils.h b/include/linux/vbox_utils.h
index c71def6b310f..a240ed2a0372 100644
--- a/include/linux/vbox_utils.h
+++ b/include/linux/vbox_utils.h
@@ -24,24 +24,6 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...);
24#define vbg_debug pr_debug 24#define vbg_debug pr_debug
25#endif 25#endif
26 26
27/**
28 * Allocate memory for generic request and initialize the request header.
29 *
30 * Return: the allocated memory
31 * @len: Size of memory block required for the request.
32 * @req_type: The generic request type.
33 */
34void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type);
35
36/**
37 * Perform a generic request.
38 *
39 * Return: VBox status code
40 * @gdev: The Guest extension device.
41 * @req: Pointer to the request structure.
42 */
43int vbg_req_perform(struct vbg_dev *gdev, void *req);
44
45int vbg_hgcm_connect(struct vbg_dev *gdev, 27int vbg_hgcm_connect(struct vbg_dev *gdev,
46 struct vmmdev_hgcm_service_location *loc, 28 struct vmmdev_hgcm_service_location *loc,
47 u32 *client_id, int *vbox_status); 29 u32 *client_id, int *vbox_status);
@@ -52,11 +34,6 @@ int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
52 u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms, 34 u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms,
53 u32 parm_count, int *vbox_status); 35 u32 parm_count, int *vbox_status);
54 36
55int vbg_hgcm_call32(
56 struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
57 struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
58 int *vbox_status);
59
60/** 37/**
61 * Convert a VirtualBox status code to a standard Linux kernel return value. 38 * Convert a VirtualBox status code to a standard Linux kernel return value.
62 * Return: 0 or negative errno value. 39 * Return: 0 or negative errno value.
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 988c7355bc22..fa1b5da2804e 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -157,6 +157,9 @@ int virtio_device_freeze(struct virtio_device *dev);
157int virtio_device_restore(struct virtio_device *dev); 157int virtio_device_restore(struct virtio_device *dev);
158#endif 158#endif
159 159
160#define virtio_device_for_each_vq(vdev, vq) \
161 list_for_each_entry(vq, &vdev->vqs, list)
162
160/** 163/**
161 * virtio_driver - operations for a virtio I/O driver 164 * virtio_driver - operations for a virtio I/O driver
162 * @driver: underlying device driver (populate name and owner). 165 * @driver: underlying device driver (populate name and owner).
diff --git a/include/net/ife.h b/include/net/ife.h
index 44b9c00f7223..e117617e3c34 100644
--- a/include/net/ife.h
+++ b/include/net/ife.h
@@ -12,7 +12,8 @@
12void *ife_encode(struct sk_buff *skb, u16 metalen); 12void *ife_encode(struct sk_buff *skb, u16 metalen);
13void *ife_decode(struct sk_buff *skb, u16 *metalen); 13void *ife_decode(struct sk_buff *skb, u16 *metalen);
14 14
15void *ife_tlv_meta_decode(void *skbdata, u16 *attrtype, u16 *dlen, u16 *totlen); 15void *ife_tlv_meta_decode(void *skbdata, const void *ifehdr_end, u16 *attrtype,
16 u16 *dlen, u16 *totlen);
16int ife_tlv_meta_encode(void *skbdata, u16 attrtype, u16 dlen, 17int ife_tlv_meta_encode(void *skbdata, u16 attrtype, u16 dlen,
17 const void *dval); 18 const void *dval);
18 19
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h
index 5c40f118c0fa..df528a623548 100644
--- a/include/net/llc_conn.h
+++ b/include/net/llc_conn.h
@@ -97,6 +97,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb)
97 97
98struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, 98struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority,
99 struct proto *prot, int kern); 99 struct proto *prot, int kern);
100void llc_sk_stop_all_timers(struct sock *sk, bool sync);
100void llc_sk_free(struct sock *sk); 101void llc_sk_free(struct sock *sk);
101 102
102void llc_sk_reset(struct sock *sk); 103void llc_sk_reset(struct sock *sk);
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h
index 04e0679767f6..e03bd9d41fa8 100644
--- a/include/scsi/scsi_dbg.h
+++ b/include/scsi/scsi_dbg.h
@@ -11,8 +11,6 @@ struct scsi_sense_hdr;
11extern void scsi_print_command(struct scsi_cmnd *); 11extern void scsi_print_command(struct scsi_cmnd *);
12extern size_t __scsi_format_command(char *, size_t, 12extern size_t __scsi_format_command(char *, size_t,
13 const unsigned char *, size_t); 13 const unsigned char *, size_t);
14extern void scsi_show_extd_sense(const struct scsi_device *, const char *,
15 unsigned char, unsigned char);
16extern void scsi_print_sense_hdr(const struct scsi_device *, const char *, 14extern void scsi_print_sense_hdr(const struct scsi_device *, const char *,
17 const struct scsi_sense_hdr *); 15 const struct scsi_sense_hdr *);
18extern void scsi_print_sense(const struct scsi_cmnd *); 16extern void scsi_print_sense(const struct scsi_cmnd *);
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
index 50df5b28d2c9..8ee8991aa099 100644
--- a/include/soc/bcm2835/raspberrypi-firmware.h
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -143,13 +143,13 @@ struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node);
143static inline int rpi_firmware_property(struct rpi_firmware *fw, u32 tag, 143static inline int rpi_firmware_property(struct rpi_firmware *fw, u32 tag,
144 void *data, size_t len) 144 void *data, size_t len)
145{ 145{
146 return 0; 146 return -ENOSYS;
147} 147}
148 148
149static inline int rpi_firmware_property_list(struct rpi_firmware *fw, 149static inline int rpi_firmware_property_list(struct rpi_firmware *fw,
150 void *data, size_t tag_size) 150 void *data, size_t tag_size)
151{ 151{
152 return 0; 152 return -ENOSYS;
153} 153}
154 154
155static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) 155static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node)
diff --git a/include/sound/control.h b/include/sound/control.h
index ca13a44ae9d4..6011a58d3e20 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -23,6 +23,7 @@
23 */ 23 */
24 24
25#include <linux/wait.h> 25#include <linux/wait.h>
26#include <linux/nospec.h>
26#include <sound/asound.h> 27#include <sound/asound.h>
27 28
28#define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) 29#define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data)
@@ -148,12 +149,14 @@ int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type);
148 149
149static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) 150static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
150{ 151{
151 return id->numid - kctl->id.numid; 152 unsigned int ioff = id->numid - kctl->id.numid;
153 return array_index_nospec(ioff, kctl->count);
152} 154}
153 155
154static inline unsigned int snd_ctl_get_ioffidx(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) 156static inline unsigned int snd_ctl_get_ioffidx(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
155{ 157{
156 return id->index - kctl->id.index; 158 unsigned int ioff = id->index - kctl->id.index;
159 return array_index_nospec(ioff, kctl->count);
157} 160}
158 161
159static inline unsigned int snd_ctl_get_ioff(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) 162static inline unsigned int snd_ctl_get_ioff(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
index bf6f82673492..f8260e5c79ad 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -257,6 +257,33 @@ TRACE_EVENT(ufshcd_command,
257 ) 257 )
258); 258);
259 259
260TRACE_EVENT(ufshcd_upiu,
261 TP_PROTO(const char *dev_name, const char *str, void *hdr, void *tsf),
262
263 TP_ARGS(dev_name, str, hdr, tsf),
264
265 TP_STRUCT__entry(
266 __string(dev_name, dev_name)
267 __string(str, str)
268 __array(unsigned char, hdr, 12)
269 __array(unsigned char, tsf, 16)
270 ),
271
272 TP_fast_assign(
273 __assign_str(dev_name, dev_name);
274 __assign_str(str, str);
275 memcpy(__entry->hdr, hdr, sizeof(__entry->hdr));
276 memcpy(__entry->tsf, tsf, sizeof(__entry->tsf));
277 ),
278
279 TP_printk(
280 "%s: %s: HDR:%s, CDB:%s",
281 __get_str(str), __get_str(dev_name),
282 __print_hex(__entry->hdr, sizeof(__entry->hdr)),
283 __print_hex(__entry->tsf, sizeof(__entry->tsf))
284 )
285);
286
260#endif /* if !defined(_TRACE_UFS_H) || defined(TRACE_HEADER_MULTI_READ) */ 287#endif /* if !defined(_TRACE_UFS_H) || defined(TRACE_HEADER_MULTI_READ) */
261 288
262/* This part must be outside protection */ 289/* This part must be outside protection */
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h
index 2f057a494d93..9a761bc6a251 100644
--- a/include/trace/events/workqueue.h
+++ b/include/trace/events/workqueue.h
@@ -25,6 +25,8 @@ DECLARE_EVENT_CLASS(workqueue_work,
25 TP_printk("work struct %p", __entry->work) 25 TP_printk("work struct %p", __entry->work)
26); 26);
27 27
28struct pool_workqueue;
29
28/** 30/**
29 * workqueue_queue_work - called when a work gets queued 31 * workqueue_queue_work - called when a work gets queued
30 * @req_cpu: the requested cpu 32 * @req_cpu: the requested cpu
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 1065006c9bf5..b02c41e53d56 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -676,6 +676,13 @@ struct kvm_ioeventfd {
676 __u8 pad[36]; 676 __u8 pad[36];
677}; 677};
678 678
679#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
680#define KVM_X86_DISABLE_EXITS_HTL (1 << 1)
681#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
682#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
683 KVM_X86_DISABLE_EXITS_HTL | \
684 KVM_X86_DISABLE_EXITS_PAUSE)
685
679/* for KVM_ENABLE_CAP */ 686/* for KVM_ENABLE_CAP */
680struct kvm_enable_cap { 687struct kvm_enable_cap {
681 /* in */ 688 /* in */
diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index 0f272818a4d2..6b58371b1f0d 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -780,24 +780,6 @@ enum {
780 NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, 780 NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5,
781}; 781};
782 782
783/* proc/sys/net/irda */
784enum {
785 NET_IRDA_DISCOVERY=1,
786 NET_IRDA_DEVNAME=2,
787 NET_IRDA_DEBUG=3,
788 NET_IRDA_FAST_POLL=4,
789 NET_IRDA_DISCOVERY_SLOTS=5,
790 NET_IRDA_DISCOVERY_TIMEOUT=6,
791 NET_IRDA_SLOT_TIMEOUT=7,
792 NET_IRDA_MAX_BAUD_RATE=8,
793 NET_IRDA_MIN_TX_TURN_TIME=9,
794 NET_IRDA_MAX_TX_DATA_SIZE=10,
795 NET_IRDA_MAX_TX_WINDOW=11,
796 NET_IRDA_MAX_NOREPLY_TIME=12,
797 NET_IRDA_WARN_NOREPLY_TIME=13,
798 NET_IRDA_LAP_KEEPALIVE_TIME=14,
799};
800
801 783
802/* CTL_FS names: */ 784/* CTL_FS names: */
803enum 785enum
diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
index 16a296612ba4..4c0338ea308a 100644
--- a/include/uapi/linux/time.h
+++ b/include/uapi/linux/time.h
@@ -73,7 +73,6 @@ struct __kernel_old_timeval {
73 */ 73 */
74#define CLOCK_SGI_CYCLE 10 74#define CLOCK_SGI_CYCLE 10
75#define CLOCK_TAI 11 75#define CLOCK_TAI 11
76#define CLOCK_MONOTONIC_ACTIVE 12
77 76
78#define MAX_CLOCKS 16 77#define MAX_CLOCKS 16
79#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) 78#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index 40297a3181ed..13b8cb563892 100644
--- a/include/uapi/linux/virtio_balloon.h
+++ b/include/uapi/linux/virtio_balloon.h
@@ -57,6 +57,21 @@ struct virtio_balloon_config {
57#define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */ 57#define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */
58#define VIRTIO_BALLOON_S_NR 10 58#define VIRTIO_BALLOON_S_NR 10
59 59
60#define VIRTIO_BALLOON_S_NAMES_WITH_PREFIX(VIRTIO_BALLOON_S_NAMES_prefix) { \
61 VIRTIO_BALLOON_S_NAMES_prefix "swap-in", \
62 VIRTIO_BALLOON_S_NAMES_prefix "swap-out", \
63 VIRTIO_BALLOON_S_NAMES_prefix "major-faults", \
64 VIRTIO_BALLOON_S_NAMES_prefix "minor-faults", \
65 VIRTIO_BALLOON_S_NAMES_prefix "free-memory", \
66 VIRTIO_BALLOON_S_NAMES_prefix "total-memory", \
67 VIRTIO_BALLOON_S_NAMES_prefix "available-memory", \
68 VIRTIO_BALLOON_S_NAMES_prefix "disk-caches", \
69 VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-allocations", \
70 VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-failures" \
71}
72
73#define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("")
74
60/* 75/*
61 * Memory statistics structure. 76 * Memory statistics structure.
62 * Driver fills an array of these structures and passes to device. 77 * Driver fills an array of these structures and passes to device.