Required due to dependencies in following patches.
Showing the changes to include (65 of 1267 files). Show all
Unified · Split
| @@ -50,13 +50,7 @@ static inline void flush_dcache_page(struct page *page) · 49 unmodified lines | ||
| 50 | 50 | { |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | −static inline void flush_dcache_folio(struct folio *folio) { } | |
| 54 | 53 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 |
| 55 | −#define ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO | |
| 56 | −#endif | |
| 57 | − | |
| 58 | −#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO | |
| 59 | −void flush_dcache_folio(struct folio *folio); | |
| 60 | 54 | #endif |
| 61 | 55 | |
| 62 | 56 | #ifndef flush_dcache_mmap_lock |
| @@ -974,6 +974,15 @@ static inline int acpi_get_local_address(acpi_handle handle, u32 *addr) · 973 unmodified lines | ||
| 974 | 974 | return -ENODEV; |
| 975 | 975 | } |
| 976 | 976 | |
| 977 | +static inline int acpi_register_wakeup_handler(int wake_irq, | |
| 978 | + bool (*wakeup)(void *context), void *context) | |
| 979 | +{ | |
| 980 | + return -ENXIO; | |
| 981 | +} | |
| 982 | + | |
| 983 | +static inline void acpi_unregister_wakeup_handler( | |
| 984 | + bool (*wakeup)(void *context), void *context) { } | |
| 985 | + | |
| 977 | 986 | #endif /* !CONFIG_ACPI */ |
| 978 | 987 | |
| 979 | 988 | #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC |
| @@ -1173,7 +1182,6 @@ int acpi_node_prop_get(const struct fwnode_handle *fwnode, const char *propname, · 193 unmodified lines | ||
| 1173 | 1182 | |
| 1174 | 1183 | struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode, |
| 1175 | 1184 | struct fwnode_handle *child); |
| 1176 | −struct fwnode_handle *acpi_node_get_parent(const struct fwnode_handle *fwnode); | |
| 1177 | 1185 | |
| 1178 | 1186 | struct acpi_probe_entry; |
| 1179 | 1187 | typedef bool (*acpi_probe_entry_validate_subtbl)(struct acpi_subtable_header *, |
| @@ -1278,12 +1286,6 @@ acpi_get_next_subnode(const struct fwnode_handle *fwnode, · 98 unmodified lines | ||
| 1278 | 1286 | return NULL; |
| 1279 | 1287 | } |
| 1280 | 1288 | |
| 1281 | −static inline struct fwnode_handle * | |
| 1282 | −acpi_node_get_parent(const struct fwnode_handle *fwnode) | |
| 1283 | −{ | |
| 1284 | − return NULL; | |
| 1285 | −} | |
| 1286 | − | |
| 1287 | 1289 | static inline struct fwnode_handle * |
| 1288 | 1290 | acpi_graph_get_next_endpoint(const struct fwnode_handle *fwnode, |
| 1289 | 1291 | struct fwnode_handle *prev) |
| @@ -193,7 +193,7 @@ struct bpf_map { · 192 unmodified lines | ||
| 193 | 193 | atomic64_t usercnt; |
| 194 | 194 | struct work_struct work; |
| 195 | 195 | struct mutex freeze_mutex; |
| 196 | − u64 writecnt; /* writable mmap cnt; protected by freeze_mutex */ | |
| 196 | + atomic64_t writecnt; | |
| 197 | 197 | }; |
| 198 | 198 | |
| 199 | 199 | static inline bool map_value_has_spin_lock(const struct bpf_map *map) |
| @@ -732,6 +732,7 @@ int bpf_trampoline_unlink_prog(struct bpf_prog *prog, struct bpf_trampoline *tr) · 532 unmodified lines | ||
| 732 | 732 | struct bpf_trampoline *bpf_trampoline_get(u64 key, |
| 733 | 733 | struct bpf_attach_target_info *tgt_info); |
| 734 | 734 | void bpf_trampoline_put(struct bpf_trampoline *tr); |
| 735 | +int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs); | |
| 735 | 736 | #define BPF_DISPATCHER_INIT(_name) { \ |
| 736 | 737 | .mutex = __MUTEX_INITIALIZER(_name.mutex), \ |
| 737 | 738 | .func = &_name##_func, \ |
| @@ -1352,28 +1353,16 @@ extern struct mutex bpf_stats_enabled_mutex; · 614 unmodified lines | ||
| 1352 | 1353 | * kprobes, tracepoints) to prevent deadlocks on map operations as any of |
| 1353 | 1354 | * these events can happen inside a region which holds a map bucket lock |
| 1354 | 1355 | * and can deadlock on it. |
| 1355 | − * | |
| 1356 | − * Use the preemption safe inc/dec variants on RT because migrate disable | |
| 1357 | − * is preemptible on RT and preemption in the middle of the RMW operation | |
| 1358 | − * might lead to inconsistent state. Use the raw variants for non RT | |
| 1359 | − * kernels as migrate_disable() maps to preempt_disable() so the slightly | |
| 1360 | − * more expensive save operation can be avoided. | |
| 1361 | 1356 | */ |
| 1362 | 1357 | static inline void bpf_disable_instrumentation(void) |
| 1363 | 1358 | { |
| 1364 | 1359 | migrate_disable(); |
| 1365 | − if (IS_ENABLED(CONFIG_PREEMPT_RT)) | |
| 1366 | − this_cpu_inc(bpf_prog_active); | |
| 1367 | − else | |
| 1368 | − __this_cpu_inc(bpf_prog_active); | |
| 1360 | + this_cpu_inc(bpf_prog_active); | |
| 1369 | 1361 | } |
| 1370 | 1362 | |
| 1371 | 1363 | static inline void bpf_enable_instrumentation(void) |
| 1372 | 1364 | { |
| 1373 | − if (IS_ENABLED(CONFIG_PREEMPT_RT)) | |
| 1374 | − this_cpu_dec(bpf_prog_active); | |
| 1375 | − else | |
| 1376 | − __this_cpu_dec(bpf_prog_active); | |
| 1365 | + this_cpu_dec(bpf_prog_active); | |
| 1377 | 1366 | migrate_enable(); |
| 1378 | 1367 | } |
| 1379 | 1368 | |
| @@ -1419,6 +1408,7 @@ void bpf_map_put(struct bpf_map *map); · 39 unmodified lines | ||
| 1419 | 1408 | void *bpf_map_area_alloc(u64 size, int numa_node); |
| 1420 | 1409 | void *bpf_map_area_mmapable_alloc(u64 size, int numa_node); |
| 1421 | 1410 | void bpf_map_area_free(void *base); |
| 1411 | +bool bpf_map_write_active(const struct bpf_map *map); | |
| 1422 | 1412 | void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr); |
| 1423 | 1413 | int generic_map_lookup_batch(struct bpf_map *map, |
| 1424 | 1414 | const union bpf_attr *attr, |
| @@ -245,7 +245,10 @@ struct kfunc_btf_id_set { · 244 unmodified lines | ||
| 245 | 245 | struct module *owner; |
| 246 | 246 | }; |
| 247 | 247 | |
| 248 | −struct kfunc_btf_id_list; | |
| 248 | +struct kfunc_btf_id_list { | |
| 249 | + struct list_head list; | |
| 250 | + struct mutex mutex; | |
| 251 | +}; | |
| 249 | 252 | |
| 250 | 253 | #ifdef CONFIG_DEBUG_INFO_BTF_MODULES |
| 251 | 254 | void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l, |
| @@ -254,6 +257,9 @@ void unregister_kfunc_btf_id_set(struct kfunc_btf_id_list *l, · 2 unmodified lines | ||
| 254 | 257 | struct kfunc_btf_id_set *s); |
| 255 | 258 | bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id, |
| 256 | 259 | struct module *owner); |
| 260 | + | |
| 261 | +extern struct kfunc_btf_id_list bpf_tcp_ca_kfunc_list; | |
| 262 | +extern struct kfunc_btf_id_list prog_test_kfunc_list; | |
| 257 | 263 | #else |
| 258 | 264 | static inline void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l, |
| 259 | 265 | struct kfunc_btf_id_set *s) |
| @@ -268,13 +274,13 @@ static inline bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, · 8 unmodified lines | ||
| 268 | 274 | { |
| 269 | 275 | return false; |
| 270 | 276 | } |
| 277 | + | |
| 278 | +static struct kfunc_btf_id_list bpf_tcp_ca_kfunc_list __maybe_unused; | |
| 279 | +static struct kfunc_btf_id_list prog_test_kfunc_list __maybe_unused; | |
| 271 | 280 | #endif |
| 272 | 281 | |
| 273 | 282 | #define DEFINE_KFUNC_BTF_ID_SET(set, name) \ |
| 274 | 283 | struct kfunc_btf_id_set name = { LIST_HEAD_INIT(name.list), (set), \ |
| 275 | 284 | THIS_MODULE } |
| 276 | 285 | |
| 277 | −extern struct kfunc_btf_id_list bpf_tcp_ca_kfunc_list; | |
| 278 | −extern struct kfunc_btf_id_list prog_test_kfunc_list; | |
| 279 | − | |
| 280 | 286 | #endif |
| @@ -0,0 +1,18 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | +#ifndef _LINUX_CACHEFLUSH_H | |
| 3 | +#define _LINUX_CACHEFLUSH_H | |
| 4 | + | |
| 5 | +#include <asm/cacheflush.h> | |
| 6 | + | |
| 7 | +#if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE | |
| 8 | +#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO | |
| 9 | +void flush_dcache_folio(struct folio *folio); | |
| 10 | +#endif | |
| 11 | +#else | |
| 12 | +static inline void flush_dcache_folio(struct folio *folio) | |
| 13 | +{ | |
| 14 | +} | |
| 15 | +#define ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO 0 | |
| 16 | +#endif /* ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE */ | |
| 17 | + | |
| 18 | +#endif /* _LINUX_CACHEFLUSH_H */ | |
| @@ -3,7 +3,6 @@ · 2 unmodified lines | ||
| 3 | 3 | #define _LINUX_CACHEINFO_H |
| 4 | 4 | |
| 5 | 5 | #include <linux/bitops.h> |
| 6 | −#include <linux/cpu.h> | |
| 7 | 6 | #include <linux/cpumask.h> |
| 8 | 7 | #include <linux/smp.h> |
| 9 | 8 | |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | #include <linux/math.h> |
| 23 | +#include <linux/sched.h> | |
| 23 | 24 | |
| 24 | 25 | extern unsigned long loops_per_jiffy; |
| 25 | 26 | |
| @@ -58,7 +59,18 @@ void calibrate_delay(void); · 32 unmodified lines | ||
| 58 | 59 | void __attribute__((weak)) calibration_delay_done(void); |
| 59 | 60 | void msleep(unsigned int msecs); |
| 60 | 61 | unsigned long msleep_interruptible(unsigned int msecs); |
| 61 | −void usleep_range(unsigned long min, unsigned long max); | |
| 62 | +void usleep_range_state(unsigned long min, unsigned long max, | |
| 63 | + unsigned int state); | |
| 64 | + | |
| 65 | +static inline void usleep_range(unsigned long min, unsigned long max) | |
| 66 | +{ | |
| 67 | + usleep_range_state(min, max, TASK_UNINTERRUPTIBLE); | |
| 68 | +} | |
| 69 | + | |
| 70 | +static inline void usleep_idle_range(unsigned long min, unsigned long max) | |
| 71 | +{ | |
| 72 | + usleep_range_state(min, max, TASK_IDLE); | |
| 73 | +} | |
| 62 | 74 | |
| 63 | 75 | static inline void ssleep(unsigned int seconds) |
| 64 | 76 | { |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #include <linux/klist.h> |
| 19 | 19 | #include <linux/pm.h> |
| 20 | 20 | #include <linux/device/bus.h> |
| 21 | +#include <linux/module.h> | |
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * enum probe_type - device driver probe type to try |
| @@ -6,6 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | #define __LINUX_FILTER_H__ |
| 7 | 7 | |
| 8 | 8 | #include <linux/atomic.h> |
| 9 | +#include <linux/bpf.h> | |
| 9 | 10 | #include <linux/refcount.h> |
| 10 | 11 | #include <linux/compat.h> |
| 11 | 12 | #include <linux/skbuff.h> |
| @@ -26,7 +27,6 @@ · 14 unmodified lines | ||
| 26 | 27 | |
| 27 | 28 | #include <asm/byteorder.h> |
| 28 | 29 | #include <uapi/linux/filter.h> |
| 29 | −#include <uapi/linux/bpf.h> | |
| 30 | 30 | |
| 31 | 31 | struct sk_buff; |
| 32 | 32 | struct sock; |
| @@ -640,9 +640,6 @@ static __always_inline u32 bpf_prog_run(const struct bpf_prog *prog, const void · 607 unmodified lines | ||
| 640 | 640 | * This uses migrate_disable/enable() explicitly to document that the |
| 641 | 641 | * invocation of a BPF program does not require reentrancy protection |
| 642 | 642 | * against a BPF program which is invoked from a preempting task. |
| 643 | − * | |
| 644 | − * For non RT enabled kernels migrate_disable/enable() maps to | |
| 645 | − * preempt_disable/enable(), i.e. it disables also preemption. | |
| 646 | 643 | */ |
| 647 | 644 | static inline u32 bpf_prog_run_pin_on_cpu(const struct bpf_prog *prog, |
| 648 | 645 | const void *ctx) |
| @@ -2518,7 +2518,6 @@ struct file_system_type { · 2517 unmodified lines | ||
| 2518 | 2518 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ |
| 2519 | 2519 | #define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */ |
| 2520 | 2520 | #define FS_ALLOW_IDMAP 32 /* FS has been updated to handle vfs idmappings. */ |
| 2521 | −#define FS_THP_SUPPORT 8192 /* Remove once all fs converted */ | |
| 2522 | 2521 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ |
| 2523 | 2522 | int (*init_fs_context)(struct fs_context *); |
| 2524 | 2523 | const struct fs_parameter_spec *parameters; |
| @@ -840,6 +840,11 @@ static inline bool hid_is_using_ll_driver(struct hid_device *hdev, · 839 unmodified lines | ||
| 840 | 840 | return hdev->ll_driver == driver; |
| 841 | 841 | } |
| 842 | 842 | |
| 843 | +static inline bool hid_is_usb(struct hid_device *hdev) | |
| 844 | +{ | |
| 845 | + return hid_is_using_ll_driver(hdev, &usb_hid_driver); | |
| 846 | +} | |
| 847 | + | |
| 843 | 848 | #define PM_HINT_FULLON 1<<5 |
| 844 | 849 | #define PM_HINT_NORMAL 1<<1 |
| 845 | 850 | |
| @@ -5,12 +5,11 @@ · 4 unmodified lines | ||
| 5 | 5 | #include <linux/fs.h> |
| 6 | 6 | #include <linux/kernel.h> |
| 7 | 7 | #include <linux/bug.h> |
| 8 | +#include <linux/cacheflush.h> | |
| 8 | 9 | #include <linux/mm.h> |
| 9 | 10 | #include <linux/uaccess.h> |
| 10 | 11 | #include <linux/hardirq.h> |
| 11 | 12 | |
| 12 | −#include <asm/cacheflush.h> | |
| 13 | − | |
| 14 | 13 | #include "highmem-internal.h" |
| 15 | 14 | |
| 16 | 15 | /** |
| @@ -231,10 +230,10 @@ static inline void tag_clear_highpage(struct page *page) · 214 unmodified lines | ||
| 231 | 230 | * If we pass in a base or tail page, we can zero up to PAGE_SIZE. |
| 232 | 231 | * If we pass in a head page, we can zero up to the size of the compound page. |
| 233 | 232 | */ |
| 234 | −#if defined(CONFIG_HIGHMEM) && defined(CONFIG_TRANSPARENT_HUGEPAGE) | |
| 233 | +#ifdef CONFIG_HIGHMEM | |
| 235 | 234 | void zero_user_segments(struct page *page, unsigned start1, unsigned end1, |
| 236 | 235 | unsigned start2, unsigned end2); |
| 237 | −#else /* !HIGHMEM || !TRANSPARENT_HUGEPAGE */ | |
| 236 | +#else | |
| 238 | 237 | static inline void zero_user_segments(struct page *page, |
| 239 | 238 | unsigned start1, unsigned end1, |
| 240 | 239 | unsigned start2, unsigned end2) |
| @@ -254,7 +253,7 @@ static inline void zero_user_segments(struct page *page, · 13 unmodified lines | ||
| 254 | 253 | for (i = 0; i < compound_nr(page); i++) |
| 255 | 254 | flush_dcache_page(page + i); |
| 256 | 255 | } |
| 257 | −#endif /* !HIGHMEM || !TRANSPARENT_HUGEPAGE */ | |
| 256 | +#endif | |
| 258 | 257 | |
| 259 | 258 | static inline void zero_user_segment(struct page *page, |
| 260 | 259 | unsigned start, unsigned end) |
| @@ -364,4 +363,42 @@ static inline void memzero_page(struct page *page, size_t offset, size_t len) · 103 unmodified lines | ||
| 364 | 363 | kunmap_local(addr); |
| 365 | 364 | } |
| 366 | 365 | |
| 366 | +/** | |
| 367 | + * folio_zero_segments() - Zero two byte ranges in a folio. | |
| 368 | + * @folio: The folio to write to. | |
| 369 | + * @start1: The first byte to zero. | |
| 370 | + * @xend1: One more than the last byte in the first range. | |
| 371 | + * @start2: The first byte to zero in the second range. | |
| 372 | + * @xend2: One more than the last byte in the second range. | |
| 373 | + */ | |
| 374 | +static inline void folio_zero_segments(struct folio *folio, | |
| 375 | + size_t start1, size_t xend1, size_t start2, size_t xend2) | |
| 376 | +{ | |
| 377 | + zero_user_segments(&folio->page, start1, xend1, start2, xend2); | |
| 378 | +} | |
| 379 | + | |
| 380 | +/** | |
| 381 | + * folio_zero_segment() - Zero a byte range in a folio. | |
| 382 | + * @folio: The folio to write to. | |
| 383 | + * @start: The first byte to zero. | |
| 384 | + * @xend: One more than the last byte to zero. | |
| 385 | + */ | |
| 386 | +static inline void folio_zero_segment(struct folio *folio, | |
| 387 | + size_t start, size_t xend) | |
| 388 | +{ | |
| 389 | + zero_user_segments(&folio->page, start, xend, 0, 0); | |
| 390 | +} | |
| 391 | + | |
| 392 | +/** | |
| 393 | + * folio_zero_range() - Zero a byte range in a folio. | |
| 394 | + * @folio: The folio to write to. | |
| 395 | + * @start: The first byte to zero. | |
| 396 | + * @length: The number of bytes to zero. | |
| 397 | + */ | |
| 398 | +static inline void folio_zero_range(struct folio *folio, | |
| 399 | + size_t start, size_t length) | |
| 400 | +{ | |
| 401 | + zero_user_segments(&folio->page, start, start + length, 0, 0); | |
| 402 | +} | |
| 403 | + | |
| 367 | 404 | #endif /* _LINUX_HIGHMEM_H */ |
| @@ -128,6 +128,13 @@ static inline void resv_map_dup_hugetlb_cgroup_uncharge_info( · 127 unmodified lines | ||
| 128 | 128 | css_get(resv_map->css); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | +static inline void resv_map_put_hugetlb_cgroup_uncharge_info( | |
| 132 | + struct resv_map *resv_map) | |
| 133 | +{ | |
| 134 | + if (resv_map->css) | |
| 135 | + css_put(resv_map->css); | |
| 136 | +} | |
| 137 | + | |
| 131 | 138 | extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, |
| 132 | 139 | struct hugetlb_cgroup **ptr); |
| 133 | 140 | extern int hugetlb_cgroup_charge_cgroup_rsvd(int idx, unsigned long nr_pages, |
| @@ -211,6 +218,11 @@ static inline void resv_map_dup_hugetlb_cgroup_uncharge_info( · 77 unmodified lines | ||
| 211 | 218 | { |
| 212 | 219 | } |
| 213 | 220 | |
| 221 | +static inline void resv_map_put_hugetlb_cgroup_uncharge_info( | |
| 222 | + struct resv_map *resv_map) | |
| 223 | +{ | |
| 224 | +} | |
| 225 | + | |
| 214 | 226 | static inline int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, |
| 215 | 227 | struct hugetlb_cgroup **ptr) |
| 216 | 228 | { |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | #define _INTEL_ISH_CLIENT_IF_H_ |
| 10 | 10 | |
| 11 | 11 | #include <linux/device.h> |
| 12 | −#include <linux/uuid.h> | |
| 12 | +#include <linux/mod_devicetable.h> | |
| 13 | 13 | |
| 14 | 14 | struct ishtp_cl_device; |
| 15 | 15 | struct ishtp_device; |
| @@ -40,7 +40,7 @@ enum cl_state { · 24 unmodified lines | ||
| 40 | 40 | struct ishtp_cl_driver { |
| 41 | 41 | struct device_driver driver; |
| 42 | 42 | const char *name; |
| 43 | − const guid_t *guid; | |
| 43 | + const struct ishtp_device_id *id; | |
| 44 | 44 | int (*probe)(struct ishtp_cl_device *dev); |
| 45 | 45 | void (*remove)(struct ishtp_cl_device *dev); |
| 46 | 46 | int (*reset)(struct ishtp_cl_device *dev); |
| @@ -131,6 +131,16 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) · 130 unmodified lines | ||
| 131 | 131 | return ns; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | +static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns) | |
| 135 | +{ | |
| 136 | + if (ns) { | |
| 137 | + if (refcount_inc_not_zero(&ns->ns.count)) | |
| 138 | + return ns; | |
| 139 | + } | |
| 140 | + | |
| 141 | + return NULL; | |
| 142 | +} | |
| 143 | + | |
| 134 | 144 | extern void put_ipc_ns(struct ipc_namespace *ns); |
| 135 | 145 | #else |
| 136 | 146 | static inline struct ipc_namespace *copy_ipcs(unsigned long flags, |
| @@ -147,6 +157,11 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) · 10 unmodified lines | ||
| 147 | 157 | return ns; |
| 148 | 158 | } |
| 149 | 159 | |
| 160 | +static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns) | |
| 161 | +{ | |
| 162 | + return ns; | |
| 163 | +} | |
| 164 | + | |
| 150 | 165 | static inline void put_ipc_ns(struct ipc_namespace *ns) |
| 151 | 166 | { |
| 152 | 167 | } |
| @@ -153,6 +153,8 @@ struct kretprobe { · 152 unmodified lines | ||
| 153 | 153 | struct kretprobe_holder *rph; |
| 154 | 154 | }; |
| 155 | 155 | |
| 156 | +#define KRETPROBE_MAX_DATA_SIZE 4096 | |
| 157 | + | |
| 156 | 158 | struct kretprobe_instance { |
| 157 | 159 | union { |
| 158 | 160 | struct freelist_node freelist; |
| @@ -874,7 +874,7 @@ void kvm_release_pfn_dirty(kvm_pfn_t pfn); · 873 unmodified lines | ||
| 874 | 874 | void kvm_set_pfn_dirty(kvm_pfn_t pfn); |
| 875 | 875 | void kvm_set_pfn_accessed(kvm_pfn_t pfn); |
| 876 | 876 | |
| 877 | −void kvm_release_pfn(kvm_pfn_t pfn, bool dirty, struct gfn_to_pfn_cache *cache); | |
| 877 | +void kvm_release_pfn(kvm_pfn_t pfn, bool dirty); | |
| 878 | 878 | int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset, |
| 879 | 879 | int len); |
| 880 | 880 | int kvm_read_guest(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len); |
| @@ -950,12 +950,8 @@ struct kvm_memory_slot *kvm_vcpu_gfn_to_memslot(struct kvm_vcpu *vcpu, gfn_t gfn · 69 unmodified lines | ||
| 950 | 950 | kvm_pfn_t kvm_vcpu_gfn_to_pfn_atomic(struct kvm_vcpu *vcpu, gfn_t gfn); |
| 951 | 951 | kvm_pfn_t kvm_vcpu_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn); |
| 952 | 952 | int kvm_vcpu_map(struct kvm_vcpu *vcpu, gpa_t gpa, struct kvm_host_map *map); |
| 953 | −int kvm_map_gfn(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map, | |
| 954 | − struct gfn_to_pfn_cache *cache, bool atomic); | |
| 955 | 953 | struct page *kvm_vcpu_gfn_to_page(struct kvm_vcpu *vcpu, gfn_t gfn); |
| 956 | 954 | void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, bool dirty); |
| 957 | −int kvm_unmap_gfn(struct kvm_vcpu *vcpu, struct kvm_host_map *map, | |
| 958 | − struct gfn_to_pfn_cache *cache, bool dirty, bool atomic); | |
| 959 | 955 | unsigned long kvm_vcpu_gfn_to_hva(struct kvm_vcpu *vcpu, gfn_t gfn); |
| 960 | 956 | unsigned long kvm_vcpu_gfn_to_hva_prot(struct kvm_vcpu *vcpu, gfn_t gfn, bool *writable); |
| 961 | 957 | int kvm_vcpu_read_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn, void *data, int offset, |
| @@ -53,13 +53,6 @@ struct gfn_to_hva_cache { · 52 unmodified lines | ||
| 53 | 53 | struct kvm_memory_slot *memslot; |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | −struct gfn_to_pfn_cache { | |
| 57 | − u64 generation; | |
| 58 | − gfn_t gfn; | |
| 59 | − kvm_pfn_t pfn; | |
| 60 | − bool dirty; | |
| 61 | −}; | |
| 62 | − | |
| 63 | 56 | #ifdef KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE |
| 64 | 57 | /* |
| 65 | 58 | * Memory caches are used to preallocate memory ahead of various MMU flows, |
| @@ -663,6 +663,19 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl); · 662 unmodified lines | ||
| 663 | 663 | */ |
| 664 | 664 | int mhi_pm_resume(struct mhi_controller *mhi_cntrl); |
| 665 | 665 | |
| 666 | +/** | |
| 667 | + * mhi_pm_resume_force - Force resume MHI from suspended state | |
| 668 | + * @mhi_cntrl: MHI controller | |
| 669 | + * | |
| 670 | + * Resume the device irrespective of its MHI state. As per the MHI spec, devices | |
| 671 | + * has to be in M3 state during resume. But some devices seem to be in a | |
| 672 | + * different MHI state other than M3 but they continue working fine if allowed. | |
| 673 | + * This API is intented to be used for such devices. | |
| 674 | + * | |
| 675 | + * Return: 0 if the resume succeeds, a negative error code otherwise | |
| 676 | + */ | |
| 677 | +int mhi_pm_resume_force(struct mhi_controller *mhi_cntrl); | |
| 678 | + | |
| 666 | 679 | /** |
| 667 | 680 | * mhi_download_rddm_image - Download ramdump image from device for |
| 668 | 681 | * debugging purpose. |
| @@ -145,13 +145,13 @@ u32 mlx5_eswitch_get_vport_metadata_for_set(struct mlx5_eswitch *esw, · 144 unmodified lines | ||
| 145 | 145 | GENMASK(31 - ESW_TUN_ID_BITS - ESW_RESERVED_BITS, \ |
| 146 | 146 | ESW_TUN_OPTS_OFFSET + 1) |
| 147 | 147 | |
| 148 | −u8 mlx5_eswitch_mode(struct mlx5_core_dev *dev); | |
| 148 | +u8 mlx5_eswitch_mode(const struct mlx5_core_dev *dev); | |
| 149 | 149 | u16 mlx5_eswitch_get_total_vports(const struct mlx5_core_dev *dev); |
| 150 | 150 | struct mlx5_core_dev *mlx5_eswitch_get_core_dev(struct mlx5_eswitch *esw); |
| 151 | 151 | |
| 152 | 152 | #else /* CONFIG_MLX5_ESWITCH */ |
| 153 | 153 | |
| 154 | −static inline u8 mlx5_eswitch_mode(struct mlx5_core_dev *dev) | |
| 154 | +static inline u8 mlx5_eswitch_mode(const struct mlx5_core_dev *dev) | |
| 155 | 155 | { |
| 156 | 156 | return MLX5_ESWITCH_NONE; |
| 157 | 157 | } |
| @@ -9698,7 +9698,10 @@ struct mlx5_ifc_mcam_access_reg_bits { · 9697 unmodified lines | ||
| 9698 | 9698 | u8 regs_84_to_68[0x11]; |
| 9699 | 9699 | u8 tracer_registers[0x4]; |
| 9700 | 9700 | |
| 9701 | − u8 regs_63_to_32[0x20]; | |
| 9701 | + u8 regs_63_to_46[0x12]; | |
| 9702 | + u8 mrtc[0x1]; | |
| 9703 | + u8 regs_44_to_32[0xd]; | |
| 9704 | + | |
| 9702 | 9705 | u8 regs_31_to_0[0x20]; |
| 9703 | 9706 | }; |
| 9704 | 9707 | |
| @@ -105,7 +105,18 @@ struct page { · 104 unmodified lines | ||
| 105 | 105 | struct page_pool *pp; |
| 106 | 106 | unsigned long _pp_mapping_pad; |
| 107 | 107 | unsigned long dma_addr; |
| 108 | − atomic_long_t pp_frag_count; | |
| 108 | + union { | |
| 109 | + /** | |
| 110 | + * dma_addr_upper: might require a 64-bit | |
| 111 | + * value on 32-bit architectures. | |
| 112 | + */ | |
| 113 | + unsigned long dma_addr_upper; | |
| 114 | + /** | |
| 115 | + * For frag page support, not supported in | |
| 116 | + * 32-bit architectures with 64-bit DMA. | |
| 117 | + */ | |
| 118 | + atomic_long_t pp_frag_count; | |
| 119 | + }; | |
| 109 | 120 | }; |
| 110 | 121 | struct { /* slab, slob and slub */ |
| 111 | 122 | union { |
| @@ -895,4 +895,18 @@ struct dfl_device_id { · 894 unmodified lines | ||
| 895 | 895 | kernel_ulong_t driver_data; |
| 896 | 896 | }; |
| 897 | 897 | |
| 898 | +/* ISHTP (Integrated Sensor Hub Transport Protocol) */ | |
| 899 | + | |
| 900 | +#define ISHTP_MODULE_PREFIX "ishtp:" | |
| 901 | + | |
| 902 | +/** | |
| 903 | + * struct ishtp_device_id - ISHTP device identifier | |
| 904 | + * @guid: GUID of the device. | |
| 905 | + * @driver_data: pointer to driver specific data | |
| 906 | + */ | |
| 907 | +struct ishtp_device_id { | |
| 908 | + guid_t guid; | |
| 909 | + kernel_ulong_t driver_data; | |
| 910 | +}; | |
| 911 | + | |
| 898 | 912 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
| @@ -4404,7 +4404,8 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) · 4403 unmodified lines | ||
| 4404 | 4404 | static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) |
| 4405 | 4405 | { |
| 4406 | 4406 | spin_lock(&txq->_xmit_lock); |
| 4407 | − txq->xmit_lock_owner = cpu; | |
| 4407 | + /* Pairs with READ_ONCE() in __dev_queue_xmit() */ | |
| 4408 | + WRITE_ONCE(txq->xmit_lock_owner, cpu); | |
| 4408 | 4409 | } |
| 4409 | 4410 | |
| 4410 | 4411 | static inline bool __netif_tx_acquire(struct netdev_queue *txq) |
| @@ -4421,26 +4422,32 @@ static inline void __netif_tx_release(struct netdev_queue *txq) · 10 unmodified lines | ||
| 4421 | 4422 | static inline void __netif_tx_lock_bh(struct netdev_queue *txq) |
| 4422 | 4423 | { |
| 4423 | 4424 | spin_lock_bh(&txq->_xmit_lock); |
| 4424 | − txq->xmit_lock_owner = smp_processor_id(); | |
| 4425 | + /* Pairs with READ_ONCE() in __dev_queue_xmit() */ | |
| 4426 | + WRITE_ONCE(txq->xmit_lock_owner, smp_processor_id()); | |
| 4425 | 4427 | } |
| 4426 | 4428 | |
| 4427 | 4429 | static inline bool __netif_tx_trylock(struct netdev_queue *txq) |
| 4428 | 4430 | { |
| 4429 | 4431 | bool ok = spin_trylock(&txq->_xmit_lock); |
| 4430 | − if (likely(ok)) | |
| 4431 | − txq->xmit_lock_owner = smp_processor_id(); | |
| 4432 | + | |
| 4433 | + if (likely(ok)) { | |
| 4434 | + /* Pairs with READ_ONCE() in __dev_queue_xmit() */ | |
| 4435 | + WRITE_ONCE(txq->xmit_lock_owner, smp_processor_id()); | |
| 4436 | + } | |
| 4432 | 4437 | return ok; |
| 4433 | 4438 | } |
| 4434 | 4439 | |
| 4435 | 4440 | static inline void __netif_tx_unlock(struct netdev_queue *txq) |
| 4436 | 4441 | { |
| 4437 | − txq->xmit_lock_owner = -1; | |
| 4442 | + /* Pairs with READ_ONCE() in __dev_queue_xmit() */ | |
| 4443 | + WRITE_ONCE(txq->xmit_lock_owner, -1); | |
| 4438 | 4444 | spin_unlock(&txq->_xmit_lock); |
| 4439 | 4445 | } |
| 4440 | 4446 | |
| 4441 | 4447 | static inline void __netif_tx_unlock_bh(struct netdev_queue *txq) |
| 4442 | 4448 | { |
| 4443 | − txq->xmit_lock_owner = -1; | |
| 4449 | + /* Pairs with READ_ONCE() in __dev_queue_xmit() */ | |
| 4450 | + WRITE_ONCE(txq->xmit_lock_owner, -1); | |
| 4444 | 4451 | spin_unlock_bh(&txq->_xmit_lock); |
| 4445 | 4452 | } |
| 4446 | 4453 | |
| @@ -686,13 +686,13 @@ static inline bool test_set_page_writeback(struct page *page) · 685 unmodified lines | ||
| 686 | 686 | |
| 687 | 687 | __PAGEFLAG(Head, head, PF_ANY) CLEARPAGEFLAG(Head, head, PF_ANY) |
| 688 | 688 | |
| 689 | −/* Whether there are one or multiple pages in a folio */ | |
| 690 | −static inline bool folio_test_single(struct folio *folio) | |
| 691 | −{ | |
| 692 | − return !folio_test_head(folio); | |
| 693 | −} | |
| 694 | − | |
| 695 | −static inline bool folio_test_multi(struct folio *folio) | |
| 689 | +/** | |
| 690 | + * folio_test_large() - Does this folio contain more than one page? | |
| 691 | + * @folio: The folio to test. | |
| 692 | + * | |
| 693 | + * Return: True if the folio is larger than one page. | |
| 694 | + */ | |
| 695 | +static inline bool folio_test_large(struct folio *folio) | |
| 696 | 696 | { |
| 697 | 697 | return folio_test_head(folio); |
| 698 | 698 | } |
| @@ -84,7 +84,7 @@ enum mapping_flags { · 83 unmodified lines | ||
| 84 | 84 | AS_EXITING = 4, /* final truncate in progress */ |
| 85 | 85 | /* writeback related tags are not used */ |
| 86 | 86 | AS_NO_WRITEBACK_TAGS = 5, |
| 87 | − AS_THP_SUPPORT = 6, /* THPs supported */ | |
| 87 | + AS_LARGE_FOLIO_SUPPORT = 6, | |
| 88 | 88 | }; |
| 89 | 89 | |
| 90 | 90 | /** |
| @@ -176,9 +176,25 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) · 85 unmodified lines | ||
| 176 | 176 | m->gfp_mask = mask; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | −static inline bool mapping_thp_support(struct address_space *mapping) | |
| 179 | +/** | |
| 180 | + * mapping_set_large_folios() - Indicate the file supports large folios. | |
| 181 | + * @mapping: The file. | |
| 182 | + * | |
| 183 | + * The filesystem should call this function in its inode constructor to | |
| 184 | + * indicate that the VFS can use large folios to cache the contents of | |
| 185 | + * the file. | |
| 186 | + * | |
| 187 | + * Context: This should not be called while the inode is active as it | |
| 188 | + * is non-atomic. | |
| 189 | + */ | |
| 190 | +static inline void mapping_set_large_folios(struct address_space *mapping) | |
| 191 | +{ | |
| 192 | + __set_bit(AS_LARGE_FOLIO_SUPPORT, &mapping->flags); | |
| 193 | +} | |
| 194 | + | |
| 195 | +static inline bool mapping_large_folio_support(struct address_space *mapping) | |
| 180 | 196 | { |
| 181 | − return test_bit(AS_THP_SUPPORT, &mapping->flags); | |
| 197 | + return test_bit(AS_LARGE_FOLIO_SUPPORT, &mapping->flags); | |
| 182 | 198 | } |
| 183 | 199 | |
| 184 | 200 | static inline int filemap_nr_thps(struct address_space *mapping) |
| @@ -193,7 +209,7 @@ static inline int filemap_nr_thps(struct address_space *mapping) · 8 unmodified lines | ||
| 193 | 209 | static inline void filemap_nr_thps_inc(struct address_space *mapping) |
| 194 | 210 | { |
| 195 | 211 | #ifdef CONFIG_READ_ONLY_THP_FOR_FS |
| 196 | − if (!mapping_thp_support(mapping)) | |
| 212 | + if (!mapping_large_folio_support(mapping)) | |
| 197 | 213 | atomic_inc(&mapping->nr_thps); |
| 198 | 214 | #else |
| 199 | 215 | WARN_ON_ONCE(1); |
| @@ -203,7 +219,7 @@ static inline void filemap_nr_thps_inc(struct address_space *mapping) · 3 unmodified lines | ||
| 203 | 219 | static inline void filemap_nr_thps_dec(struct address_space *mapping) |
| 204 | 220 | { |
| 205 | 221 | #ifdef CONFIG_READ_ONLY_THP_FOR_FS |
| 206 | − if (!mapping_thp_support(mapping)) | |
| 222 | + if (!mapping_large_folio_support(mapping)) | |
| 207 | 223 | atomic_dec(&mapping->nr_thps); |
| 208 | 224 | #else |
| 209 | 225 | WARN_ON_ONCE(1); |
| @@ -51,9 +51,9 @@ · 50 unmodified lines | ||
| 51 | 51 | #define _LINUX_PERCPU_REFCOUNT_H |
| 52 | 52 | |
| 53 | 53 | #include <linux/atomic.h> |
| 54 | −#include <linux/kernel.h> | |
| 55 | 54 | #include <linux/percpu.h> |
| 56 | 55 | #include <linux/rcupdate.h> |
| 56 | +#include <linux/types.h> | |
| 57 | 57 | #include <linux/gfp.h> |
| 58 | 58 | |
| 59 | 59 | struct percpu_ref; |
| @@ -6,7 +6,6 @@ · 5 unmodified lines | ||
| 6 | 6 | #include <linux/preempt.h> |
| 7 | 7 | #include <linux/smp.h> |
| 8 | 8 | #include <linux/cpumask.h> |
| 9 | −#include <linux/printk.h> | |
| 10 | 9 | #include <linux/pfn.h> |
| 11 | 10 | #include <linux/init.h> |
| 12 | 11 | |
| @@ -538,11 +538,12 @@ struct macsec_ops; · 537 unmodified lines | ||
| 538 | 538 | * @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY |
| 539 | 539 | * @state: State of the PHY for management purposes |
| 540 | 540 | * @dev_flags: Device-specific flags used by the PHY driver. |
| 541 | − * Bits [15:0] are free to use by the PHY driver to communicate | |
| 542 | − * driver specific behavior. | |
| 543 | − * Bits [23:16] are currently reserved for future use. | |
| 544 | − * Bits [31:24] are reserved for defining generic | |
| 545 | − * PHY driver behavior. | |
| 541 | + * | |
| 542 | + * - Bits [15:0] are free to use by the PHY driver to communicate | |
| 543 | + * driver specific behavior. | |
| 544 | + * - Bits [23:16] are currently reserved for future use. | |
| 545 | + * - Bits [31:24] are reserved for defining generic | |
| 546 | + * PHY driver behavior. | |
| 546 | 547 | * @irq: IRQ number of the PHY's interrupt (-1 if none) |
| 547 | 548 | * @phy_timer: The timer for handling the state machine |
| 548 | 549 | * @phylink: Pointer to phylink instance for this PHY |
| @@ -129,7 +129,7 @@ static inline bool pm_runtime_suspended(struct device *dev) · 128 unmodified lines | ||
| 129 | 129 | * pm_runtime_active - Check whether or not a device is runtime-active. |
| 130 | 130 | * @dev: Target device. |
| 131 | 131 | * |
| 132 | − * Return %true if runtime PM is enabled for @dev and its runtime PM status is | |
| 132 | + * Return %true if runtime PM is disabled for @dev or its runtime PM status is | |
| 133 | 133 | * %RPM_ACTIVE, or %false otherwise. |
| 134 | 134 | * |
| 135 | 135 | * Note that the return value of this function can only be trusted if it is |
| @@ -198,6 +198,7 @@ void dump_stack_print_info(const char *log_lvl); · 197 unmodified lines | ||
| 198 | 198 | void show_regs_print_info(const char *log_lvl); |
| 199 | 199 | extern asmlinkage void dump_stack_lvl(const char *log_lvl) __cold; |
| 200 | 200 | extern asmlinkage void dump_stack(void) __cold; |
| 201 | +void printk_trigger_flush(void); | |
| 201 | 202 | #else |
| 202 | 203 | static inline __printf(1, 0) |
| 203 | 204 | int vprintk(const char *s, va_list args) |
| @@ -274,6 +275,9 @@ static inline void dump_stack_lvl(const char *log_lvl) · 70 unmodified lines | ||
| 274 | 275 | static inline void dump_stack(void) |
| 275 | 276 | { |
| 276 | 277 | } |
| 278 | +static inline void printk_trigger_flush(void) | |
| 279 | +{ | |
| 280 | +} | |
| 277 | 281 | #endif |
| 278 | 282 | |
| 279 | 283 | #ifdef CONFIG_SMP |
| @@ -37,6 +37,7 @@ · 36 unmodified lines | ||
| 37 | 37 | #define PTP_MSGTYPE_PDELAY_RESP 0x3 |
| 38 | 38 | |
| 39 | 39 | #define PTP_EV_PORT 319 |
| 40 | +#define PTP_GEN_PORT 320 | |
| 40 | 41 | #define PTP_GEN_BIT 0x08 /* indicates general message, if set in message type */ |
| 41 | 42 | |
| 42 | 43 | #define OFF_PTP_SOURCE_UUID 22 /* PTPv1 only */ |
| @@ -499,7 +499,8 @@ struct regulator_irq_data { · 498 unmodified lines | ||
| 499 | 499 | * best to shut-down regulator(s) or reboot the SOC if error |
| 500 | 500 | * handling is repeatedly failing. If fatal_cnt is given the IRQ |
| 501 | 501 | * handling is aborted if it fails for fatal_cnt times and die() |
| 502 | − * callback (if populated) or BUG() is called to try to prevent | |
| 502 | + * callback (if populated) is called. If die() is not populated | |
| 503 | + * poweroff for the system is attempted in order to prevent any | |
| 503 | 504 | * further damage. |
| 504 | 505 | * @reread_ms: The time which is waited before attempting to re-read status |
| 505 | 506 | * at the worker if IC reading fails. Immediate re-read is done |
| @@ -516,11 +517,12 @@ struct regulator_irq_data { · 10 unmodified lines | ||
| 516 | 517 | * @data: Driver private data pointer which will be passed as such to |
| 517 | 518 | * the renable, map_event and die callbacks in regulator_irq_data. |
| 518 | 519 | * @die: Protection callback. If IC status reading or recovery actions |
| 519 | − * fail fatal_cnt times this callback or BUG() is called. This | |
| 520 | − * callback should implement a final protection attempt like | |
| 521 | − * disabling the regulator. If protection succeeded this may | |
| 522 | − * return 0. If anything else is returned the core assumes final | |
| 523 | − * protection failed and calls BUG() as a last resort. | |
| 520 | + * fail fatal_cnt times this callback is called or system is | |
| 521 | + * powered off. This callback should implement a final protection | |
| 522 | + * attempt like disabling the regulator. If protection succeeded | |
| 523 | + * die() may return 0. If anything else is returned the core | |
| 524 | + * assumes final protection failed and attempts to perform a | |
| 525 | + * poweroff as a last resort. | |
| 524 | 526 | * @map_event: Driver callback to map IRQ status into regulator devices with |
| 525 | 527 | * events / errors. NOTE: callback MUST initialize both the |
| 526 | 528 | * errors and notifs for all rdevs which it signals having |
| @@ -18,15 +18,16 @@ · 17 unmodified lines | ||
| 18 | 18 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ |
| 19 | 19 | |
| 20 | 20 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
| 21 | −extern void task_cputime(struct task_struct *t, | |
| 21 | +extern bool task_cputime(struct task_struct *t, | |
| 22 | 22 | u64 *utime, u64 *stime); |
| 23 | 23 | extern u64 task_gtime(struct task_struct *t); |
| 24 | 24 | #else |
| 25 | −static inline void task_cputime(struct task_struct *t, | |
| 25 | +static inline bool task_cputime(struct task_struct *t, | |
| 26 | 26 | u64 *utime, u64 *stime) |
| 27 | 27 | { |
| 28 | 28 | *utime = t->utime; |
| 29 | 29 | *stime = t->stime; |
| 30 | + return false; | |
| 30 | 31 | } |
| 31 | 32 | |
| 32 | 33 | static inline u64 task_gtime(struct task_struct *t) |
| @@ -352,6 +352,7 @@ extern __must_check bool do_notify_parent(struct task_struct *, int); · 351 unmodified lines | ||
| 352 | 352 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); |
| 353 | 353 | extern void force_sig(int); |
| 354 | 354 | extern void force_fatal_sig(int); |
| 355 | +extern void force_exit_sig(int); | |
| 355 | 356 | extern int send_sig(int, struct task_struct *, int); |
| 356 | 357 | extern int zap_other_threads(struct task_struct *p); |
| 357 | 358 | extern struct sigqueue *sigqueue_alloc(void); |
| @@ -158,7 +158,7 @@ static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t) · 157 unmodified lines | ||
| 158 | 158 | * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring |
| 159 | 159 | * subscriptions and synchronises with wait4(). Also used in procfs. Also |
| 160 | 160 | * pins the final release of task.io_context. Also protects ->cpuset and |
| 161 | − * ->cgroup.subsys[]. And ->vfork_done. | |
| 161 | + * ->cgroup.subsys[]. And ->vfork_done. And ->sysvshm.shm_clist. | |
| 162 | 162 | * |
| 163 | 163 | * Nests both inside and outside of read_lock(&tasklist_lock). |
| 164 | 164 | * It must not be nested with write_lock_irq(&tasklist_lock), |
| @@ -1,160 +0,0 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | −/* | |
| 3 | − * This is the official version 1.1 of sdb.h | |
| 4 | − */ | |
| 5 | −#ifndef __SDB_H__ | |
| 6 | −#define __SDB_H__ | |
| 7 | −#ifdef __KERNEL__ | |
| 8 | −#include <linux/types.h> | |
| 9 | −#else | |
| 10 | −#include <stdint.h> | |
| 11 | −#endif | |
| 12 | − | |
| 13 | −/* | |
| 14 | − * All structures are 64 bytes long and are expected | |
| 15 | − * to live in an array, one for each interconnect. | |
| 16 | − * Most fields of the structures are shared among the | |
| 17 | − * various types, and most-specific fields are at the | |
| 18 | − * beginning (for alignment reasons, and to keep the | |
| 19 | − * magic number at the head of the interconnect record | |
| 20 | − */ | |
| 21 | − | |
| 22 | −/* Product, 40 bytes at offset 24, 8-byte aligned | |
| 23 | − * | |
| 24 | − * device_id is vendor-assigned; version is device-specific, | |
| 25 | − * date is hex (e.g 0x20120501), name is UTF-8, blank-filled | |
| 26 | − * and not terminated with a 0 byte. | |
| 27 | − */ | |
| 28 | −struct sdb_product { | |
| 29 | − uint64_t vendor_id; /* 0x18..0x1f */ | |
| 30 | − uint32_t device_id; /* 0x20..0x23 */ | |
| 31 | − uint32_t version; /* 0x24..0x27 */ | |
| 32 | − uint32_t date; /* 0x28..0x2b */ | |
| 33 | − uint8_t name[19]; /* 0x2c..0x3e */ | |
| 34 | − uint8_t record_type; /* 0x3f */ | |
| 35 | −}; | |
| 36 | − | |
| 37 | −/* | |
| 38 | − * Component, 56 bytes at offset 8, 8-byte aligned | |
| 39 | − * | |
| 40 | − * The address range is first to last, inclusive | |
| 41 | − * (for example 0x100000 - 0x10ffff) | |
| 42 | − */ | |
| 43 | −struct sdb_component { | |
| 44 | − uint64_t addr_first; /* 0x08..0x0f */ | |
| 45 | − uint64_t addr_last; /* 0x10..0x17 */ | |
| 46 | − struct sdb_product product; /* 0x18..0x3f */ | |
| 47 | −}; | |
| 48 | − | |
| 49 | −/* Type of the SDB record */ | |
| 50 | −enum sdb_record_type { | |
| 51 | − sdb_type_interconnect = 0x00, | |
| 52 | − sdb_type_device = 0x01, | |
| 53 | − sdb_type_bridge = 0x02, | |
| 54 | − sdb_type_integration = 0x80, | |
| 55 | − sdb_type_repo_url = 0x81, | |
| 56 | − sdb_type_synthesis = 0x82, | |
| 57 | − sdb_type_empty = 0xFF, | |
| 58 | −}; | |
| 59 | − | |
| 60 | −/* Type 0: interconnect (first of the array) | |
| 61 | − * | |
| 62 | − * sdb_records is the length of the table including this first | |
| 63 | − * record, version is 1. The bus type is enumerated later. | |
| 64 | − */ | |
| 65 | −#define SDB_MAGIC 0x5344422d /* "SDB-" */ | |
| 66 | −struct sdb_interconnect { | |
| 67 | − uint32_t sdb_magic; /* 0x00-0x03 */ | |
| 68 | − uint16_t sdb_records; /* 0x04-0x05 */ | |
| 69 | − uint8_t sdb_version; /* 0x06 */ | |
| 70 | − uint8_t sdb_bus_type; /* 0x07 */ | |
| 71 | − struct sdb_component sdb_component; /* 0x08-0x3f */ | |
| 72 | −}; | |
| 73 | − | |
| 74 | −/* Type 1: device | |
| 75 | − * | |
| 76 | − * class is 0 for "custom device", other values are | |
| 77 | − * to be standardized; ABI version is for the driver, | |
| 78 | − * bus-specific bits are defined by each bus (see below) | |
| 79 | − */ | |
| 80 | −struct sdb_device { | |
| 81 | − uint16_t abi_class; /* 0x00-0x01 */ | |
| 82 | − uint8_t abi_ver_major; /* 0x02 */ | |
| 83 | − uint8_t abi_ver_minor; /* 0x03 */ | |
| 84 | − uint32_t bus_specific; /* 0x04-0x07 */ | |
| 85 | − struct sdb_component sdb_component; /* 0x08-0x3f */ | |
| 86 | −}; | |
| 87 | − | |
| 88 | −/* Type 2: bridge | |
| 89 | − * | |
| 90 | − * child is the address of the nested SDB table | |
| 91 | − */ | |
| 92 | −struct sdb_bridge { | |
| 93 | − uint64_t sdb_child; /* 0x00-0x07 */ | |
| 94 | − struct sdb_component sdb_component; /* 0x08-0x3f */ | |
| 95 | −}; | |
| 96 | − | |
| 97 | −/* Type 0x80: integration | |
| 98 | − * | |
| 99 | − * all types with bit 7 set are meta-information, so | |
| 100 | − * software can ignore the types it doesn't know. Here we | |
| 101 | − * just provide product information for an aggregate device | |
| 102 | − */ | |
| 103 | −struct sdb_integration { | |
| 104 | − uint8_t reserved[24]; /* 0x00-0x17 */ | |
| 105 | − struct sdb_product product; /* 0x08-0x3f */ | |
| 106 | −}; | |
| 107 | − | |
| 108 | −/* Type 0x81: Top module repository url | |
| 109 | − * | |
| 110 | − * again, an informative field that software can ignore | |
| 111 | − */ | |
| 112 | −struct sdb_repo_url { | |
| 113 | − uint8_t repo_url[63]; /* 0x00-0x3e */ | |
| 114 | − uint8_t record_type; /* 0x3f */ | |
| 115 | −}; | |
| 116 | − | |
| 117 | −/* Type 0x82: Synthesis tool information | |
| 118 | − * | |
| 119 | − * this informative record | |
| 120 | − */ | |
| 121 | −struct sdb_synthesis { | |
| 122 | − uint8_t syn_name[16]; /* 0x00-0x0f */ | |
| 123 | − uint8_t commit_id[16]; /* 0x10-0x1f */ | |
| 124 | − uint8_t tool_name[8]; /* 0x20-0x27 */ | |
| 125 | − uint32_t tool_version; /* 0x28-0x2b */ | |
| 126 | − uint32_t date; /* 0x2c-0x2f */ | |
| 127 | − uint8_t user_name[15]; /* 0x30-0x3e */ | |
| 128 | − uint8_t record_type; /* 0x3f */ | |
| 129 | −}; | |
| 130 | − | |
| 131 | −/* Type 0xff: empty | |
| 132 | − * | |
| 133 | − * this allows keeping empty slots during development, | |
| 134 | − * so they can be filled later with minimal efforts and | |
| 135 | − * no misleading description is ever shipped -- hopefully. | |
| 136 | − * It can also be used to pad a table to a desired length. | |
| 137 | − */ | |
| 138 | −struct sdb_empty { | |
| 139 | − uint8_t reserved[63]; /* 0x00-0x3e */ | |
| 140 | − uint8_t record_type; /* 0x3f */ | |
| 141 | −}; | |
| 142 | − | |
| 143 | −/* The type of bus, for bus-specific flags */ | |
| 144 | −enum sdb_bus_type { | |
| 145 | − sdb_wishbone = 0x00, | |
| 146 | − sdb_data = 0x01, | |
| 147 | −}; | |
| 148 | − | |
| 149 | −#define SDB_WB_WIDTH_MASK 0x0f | |
| 150 | −#define SDB_WB_ACCESS8 0x01 | |
| 151 | −#define SDB_WB_ACCESS16 0x02 | |
| 152 | −#define SDB_WB_ACCESS32 0x04 | |
| 153 | −#define SDB_WB_ACCESS64 0x08 | |
| 154 | −#define SDB_WB_LITTLE_ENDIAN 0x80 | |
| 155 | − | |
| 156 | −#define SDB_DATA_READ 0x04 | |
| 157 | −#define SDB_DATA_WRITE 0x02 | |
| 158 | −#define SDB_DATA_EXEC 0x01 | |
| 159 | − | |
| 160 | −#endif /* __SDB_H__ */ | |
| @@ -27,9 +27,7 @@ static inline bool siphash_key_is_zero(const siphash_key_t *key) · 26 unmodified lines | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key); |
| 30 | −#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS | |
| 31 | 30 | u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key); |
| 32 | −#endif | |
| 33 | 31 | |
| 34 | 32 | u64 siphash_1u64(const u64 a, const siphash_key_t *key); |
| 35 | 33 | u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key); |
| @@ -82,10 +80,9 @@ static inline u64 ___siphash_aligned(const __le64 *data, size_t len, · 46 unmodified lines | ||
| 82 | 80 | static inline u64 siphash(const void *data, size_t len, |
| 83 | 81 | const siphash_key_t *key) |
| 84 | 82 | { |
| 85 | −#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS | |
| 86 | − if (!IS_ALIGNED((unsigned long)data, SIPHASH_ALIGNMENT)) | |
| 83 | + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || | |
| 84 | + !IS_ALIGNED((unsigned long)data, SIPHASH_ALIGNMENT)) | |
| 87 | 85 | return __siphash_unaligned(data, len, key); |
| 88 | −#endif | |
| 89 | 86 | return ___siphash_aligned(data, len, key); |
| 90 | 87 | } |
| 91 | 88 | |
| @@ -96,10 +93,8 @@ typedef struct { · 4 unmodified lines | ||
| 96 | 93 | |
| 97 | 94 | u32 __hsiphash_aligned(const void *data, size_t len, |
| 98 | 95 | const hsiphash_key_t *key); |
| 99 | −#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS | |
| 100 | 96 | u32 __hsiphash_unaligned(const void *data, size_t len, |
| 101 | 97 | const hsiphash_key_t *key); |
| 102 | −#endif | |
| 103 | 98 | |
| 104 | 99 | u32 hsiphash_1u32(const u32 a, const hsiphash_key_t *key); |
| 105 | 100 | u32 hsiphash_2u32(const u32 a, const u32 b, const hsiphash_key_t *key); |
| @@ -135,10 +130,9 @@ static inline u32 ___hsiphash_aligned(const __le32 *data, size_t len, · 29 unmodified lines | ||
| 135 | 130 | static inline u32 hsiphash(const void *data, size_t len, |
| 136 | 131 | const hsiphash_key_t *key) |
| 137 | 132 | { |
| 138 | −#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS | |
| 139 | − if (!IS_ALIGNED((unsigned long)data, HSIPHASH_ALIGNMENT)) | |
| 133 | + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || | |
| 134 | + !IS_ALIGNED((unsigned long)data, HSIPHASH_ALIGNMENT)) | |
| 140 | 135 | return __hsiphash_unaligned(data, len, key); |
| 141 | −#endif | |
| 142 | 136 | return ___hsiphash_aligned(data, len, key); |
| 143 | 137 | } |
| 144 | 138 | |
| @@ -4226,7 +4226,7 @@ static inline void skb_remcsum_process(struct sk_buff *skb, void *ptr, · 4225 unmodified lines | ||
| 4226 | 4226 | return; |
| 4227 | 4227 | } |
| 4228 | 4228 | |
| 4229 | − if (unlikely(skb->ip_summed != CHECKSUM_COMPLETE)) { | |
| 4229 | + if (unlikely(skb->ip_summed != CHECKSUM_COMPLETE)) { | |
| 4230 | 4230 | __skb_checksum_complete(skb); |
| 4231 | 4231 | skb_postpull_rcsum(skb, skb->data, ptr - (void *)skb->data); |
| 4232 | 4232 | } |
| @@ -673,7 +673,7 @@ struct trace_event_file { · 672 unmodified lines | ||
| 673 | 673 | |
| 674 | 674 | #define PERF_MAX_TRACE_SIZE 8192 |
| 675 | 675 | |
| 676 | −#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | |
| 676 | +#define MAX_FILTER_STR_VAL 256U /* Should handle KSYM_SYMBOL_LEN */ | |
| 677 | 677 | |
| 678 | 678 | enum event_trigger_type { |
| 679 | 679 | ETT_NONE = (0), |
| @@ -152,7 +152,6 @@ size_t virtio_max_dma_size(struct virtio_device *vdev); · 151 unmodified lines | ||
| 152 | 152 | * @feature_table_size: number of entries in the feature table array. |
| 153 | 153 | * @feature_table_legacy: same as feature_table but when working in legacy mode. |
| 154 | 154 | * @feature_table_size_legacy: number of entries in feature table legacy array. |
| 155 | − * @suppress_used_validation: set to not have core validate used length | |
| 156 | 155 | * @probe: the function to call when a device is found. Returns 0 or -errno. |
| 157 | 156 | * @scan: optional function to call after successful probe; intended |
| 158 | 157 | * for virtio-scsi to invoke a scan. |
| @@ -169,7 +168,6 @@ struct virtio_driver { · 10 unmodified lines | ||
| 169 | 168 | unsigned int feature_table_size; |
| 170 | 169 | const unsigned int *feature_table_legacy; |
| 171 | 170 | unsigned int feature_table_size_legacy; |
| 172 | − bool suppress_used_validation; | |
| 173 | 171 | int (*validate)(struct virtio_device *dev); |
| 174 | 172 | int (*probe)(struct virtio_device *dev); |
| 175 | 173 | void (*scan)(struct virtio_device *dev); |
| @@ -120,10 +120,15 @@ retry: · 119 unmodified lines | ||
| 120 | 120 | |
| 121 | 121 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { |
| 122 | 122 | u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size); |
| 123 | + unsigned int nh_off = p_off; | |
| 123 | 124 | struct skb_shared_info *shinfo = skb_shinfo(skb); |
| 124 | 125 | |
| 126 | + /* UFO may not include transport header in gso_size. */ | |
| 127 | + if (gso_type & SKB_GSO_UDP) | |
| 128 | + nh_off -= thlen; | |
| 129 | + | |
| 125 | 130 | /* Too small packets are not really GSO ones. */ |
| 126 | − if (skb->len - p_off > gso_size) { | |
| 131 | + if (skb->len - nh_off > gso_size) { | |
| 127 | 132 | shinfo->gso_size = gso_size; |
| 128 | 133 | shinfo->gso_type = gso_type; |
| 129 | 134 | |
| @@ -217,6 +217,7 @@ void __wake_up_sync_key(struct wait_queue_head *wq_head, unsigned int mode, void · 216 unmodified lines | ||
| 217 | 217 | void __wake_up_locked_sync_key(struct wait_queue_head *wq_head, unsigned int mode, void *key); |
| 218 | 218 | void __wake_up_locked(struct wait_queue_head *wq_head, unsigned int mode, int nr); |
| 219 | 219 | void __wake_up_sync(struct wait_queue_head *wq_head, unsigned int mode); |
| 220 | +void __wake_up_pollfree(struct wait_queue_head *wq_head); | |
| 220 | 221 | |
| 221 | 222 | #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) |
| 222 | 223 | #define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL) |
| @@ -245,6 +246,31 @@ void __wake_up_sync(struct wait_queue_head *wq_head, unsigned int mode); · 22 unmodified lines | ||
| 245 | 246 | #define wake_up_interruptible_sync_poll_locked(x, m) \ |
| 246 | 247 | __wake_up_locked_sync_key((x), TASK_INTERRUPTIBLE, poll_to_key(m)) |
| 247 | 248 | |
| 249 | +/** | |
| 250 | + * wake_up_pollfree - signal that a polled waitqueue is going away | |
| 251 | + * @wq_head: the wait queue head | |
| 252 | + * | |
| 253 | + * In the very rare cases where a ->poll() implementation uses a waitqueue whose | |
| 254 | + * lifetime is tied to a task rather than to the 'struct file' being polled, | |
| 255 | + * this function must be called before the waitqueue is freed so that | |
| 256 | + * non-blocking polls (e.g. epoll) are notified that the queue is going away. | |
| 257 | + * | |
| 258 | + * The caller must also RCU-delay the freeing of the wait_queue_head, e.g. via | |
| 259 | + * an explicit synchronize_rcu() or call_rcu(), or via SLAB_TYPESAFE_BY_RCU. | |
| 260 | + */ | |
| 261 | +static inline void wake_up_pollfree(struct wait_queue_head *wq_head) | |
| 262 | +{ | |
| 263 | + /* | |
| 264 | + * For performance reasons, we don't always take the queue lock here. | |
| 265 | + * Therefore, we might race with someone removing the last entry from | |
| 266 | + * the queue, and proceed while they still hold the queue lock. | |
| 267 | + * However, rcu_read_lock() is required to be held in such cases, so we | |
| 268 | + * can safely proceed with an RCU-delayed free. | |
| 269 | + */ | |
| 270 | + if (waitqueue_active(wq_head)) | |
| 271 | + __wake_up_pollfree(wq_head); | |
| 272 | +} | |
| 273 | + | |
| 248 | 274 | #define ___wait_cond_timeout(condition) \ |
| 249 | 275 | ({ \ |
| 250 | 276 | bool __cond = (condition); \ |
| @@ -126,7 +126,7 @@ struct tlb_slave_info { · 125 unmodified lines | ||
| 126 | 126 | struct alb_bond_info { |
| 127 | 127 | struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */ |
| 128 | 128 | u32 unbalanced_load; |
| 129 | − int tx_rebalance_counter; | |
| 129 | + atomic_t tx_rebalance_counter; | |
| 130 | 130 | int lp_counter; |
| 131 | 131 | /* -------- rlb parameters -------- */ |
| 132 | 132 | int rlb_enabled; |
| @@ -132,6 +132,19 @@ static inline void sk_mark_napi_id(struct sock *sk, const struct sk_buff *skb) · 131 unmodified lines | ||
| 132 | 132 | #ifdef CONFIG_NET_RX_BUSY_POLL |
| 133 | 133 | if (unlikely(READ_ONCE(sk->sk_napi_id) != skb->napi_id)) |
| 134 | 134 | WRITE_ONCE(sk->sk_napi_id, skb->napi_id); |
| 135 | +#endif | |
| 136 | + sk_rx_queue_update(sk, skb); | |
| 137 | +} | |
| 138 | + | |
| 139 | +/* Variant of sk_mark_napi_id() for passive flow setup, | |
| 140 | + * as sk->sk_napi_id and sk->sk_rx_queue_mapping content | |
| 141 | + * needs to be set. | |
| 142 | + */ | |
| 143 | +static inline void sk_mark_napi_id_set(struct sock *sk, | |
| 144 | + const struct sk_buff *skb) | |
| 145 | +{ | |
| 146 | +#ifdef CONFIG_NET_RX_BUSY_POLL | |
| 147 | + WRITE_ONCE(sk->sk_napi_id, skb->napi_id); | |
| 135 | 148 | #endif |
| 136 | 149 | sk_rx_queue_set(sk, skb); |
| 137 | 150 | } |
| @@ -79,6 +79,17 @@ static inline void dst_cache_reset(struct dst_cache *dst_cache) · 78 unmodified lines | ||
| 79 | 79 | dst_cache->reset_ts = jiffies; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | +/** | |
| 83 | + * dst_cache_reset_now - invalidate the cache contents immediately | |
| 84 | + * @dst_cache: the cache | |
| 85 | + * | |
| 86 | + * The caller must be sure there are no concurrent users, as this frees | |
| 87 | + * all dst_cache users immediately, rather than waiting for the next | |
| 88 | + * per-cpu usage like dst_cache_reset does. Most callers should use the | |
| 89 | + * higher speed lazily-freed dst_cache_reset function instead. | |
| 90 | + */ | |
| 91 | +void dst_cache_reset_now(struct dst_cache *dst_cache); | |
| 92 | + | |
| 82 | 93 | /** |
| 83 | 94 | * dst_cache_init - initialize the cache, allocating the required storage |
| 84 | 95 | * @dst_cache: the cache |
| @@ -69,7 +69,7 @@ struct fib_rules_ops { · 68 unmodified lines | ||
| 69 | 69 | int (*action)(struct fib_rule *, |
| 70 | 70 | struct flowi *, int, |
| 71 | 71 | struct fib_lookup_arg *); |
| 72 | − bool (*suppress)(struct fib_rule *, | |
| 72 | + bool (*suppress)(struct fib_rule *, int, | |
| 73 | 73 | struct fib_lookup_arg *); |
| 74 | 74 | int (*match)(struct fib_rule *, |
| 75 | 75 | struct flowi *, int); |
| @@ -218,7 +218,9 @@ INDIRECT_CALLABLE_DECLARE(int fib4_rule_action(struct fib_rule *rule, · 142 unmodified lines | ||
| 218 | 218 | struct fib_lookup_arg *arg)); |
| 219 | 219 | |
| 220 | 220 | INDIRECT_CALLABLE_DECLARE(bool fib6_rule_suppress(struct fib_rule *rule, |
| 221 | + int flags, | |
| 221 | 222 | struct fib_lookup_arg *arg)); |
| 222 | 223 | INDIRECT_CALLABLE_DECLARE(bool fib4_rule_suppress(struct fib_rule *rule, |
| 224 | + int flags, | |
| 223 | 225 | struct fib_lookup_arg *arg)); |
| 224 | 226 | #endif |
| @@ -485,6 +485,7 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, · 484 unmodified lines | ||
| 485 | 485 | struct fib6_config *cfg, gfp_t gfp_flags, |
| 486 | 486 | struct netlink_ext_ack *extack); |
| 487 | 487 | void fib6_nh_release(struct fib6_nh *fib6_nh); |
| 488 | +void fib6_nh_release_dsts(struct fib6_nh *fib6_nh); | |
| 488 | 489 | |
| 489 | 490 | int call_fib6_entry_notifiers(struct net *net, |
| 490 | 491 | enum fib_event_type event_type, |
| @@ -438,7 +438,7 @@ int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, · 437 unmodified lines | ||
| 438 | 438 | #ifdef CONFIG_IP_ROUTE_CLASSID |
| 439 | 439 | static inline int fib_num_tclassid_users(struct net *net) |
| 440 | 440 | { |
| 441 | − return net->ipv4.fib_num_tclassid_users; | |
| 441 | + return atomic_read(&net->ipv4.fib_num_tclassid_users); | |
| 442 | 442 | } |
| 443 | 443 | #else |
| 444 | 444 | static inline int fib_num_tclassid_users(struct net *net) |
| @@ -47,6 +47,7 @@ struct ipv6_stub { · 46 unmodified lines | ||
| 47 | 47 | struct fib6_config *cfg, gfp_t gfp_flags, |
| 48 | 48 | struct netlink_ext_ack *extack); |
| 49 | 49 | void (*fib6_nh_release)(struct fib6_nh *fib6_nh); |
| 50 | + void (*fib6_nh_release_dsts)(struct fib6_nh *fib6_nh); | |
| 50 | 51 | void (*fib6_update_sernum)(struct net *net, struct fib6_info *rt); |
| 51 | 52 | int (*ip6_del_rt)(struct net *net, struct fib6_info *rt, bool skip_notify); |
| 52 | 53 | void (*fib6_rt_update)(struct net *net, struct fib6_info *rt, |
| @@ -276,14 +276,14 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb) · 275 unmodified lines | ||
| 276 | 276 | /* jiffies until ct expires, 0 if already expired */ |
| 277 | 277 | static inline unsigned long nf_ct_expires(const struct nf_conn *ct) |
| 278 | 278 | { |
| 279 | − s32 timeout = ct->timeout - nfct_time_stamp; | |
| 279 | + s32 timeout = READ_ONCE(ct->timeout) - nfct_time_stamp; | |
| 280 | 280 | |
| 281 | 281 | return timeout > 0 ? timeout : 0; |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | static inline bool nf_ct_is_expired(const struct nf_conn *ct) |
| 285 | 285 | { |
| 286 | − return (__s32)(ct->timeout - nfct_time_stamp) <= 0; | |
| 286 | + return (__s32)(READ_ONCE(ct->timeout) - nfct_time_stamp) <= 0; | |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | /* use after obtaining a reference count */ |
| @@ -302,7 +302,7 @@ static inline bool nf_ct_should_gc(const struct nf_conn *ct) · 12 unmodified lines | ||
| 302 | 302 | static inline void nf_ct_offload_timeout(struct nf_conn *ct) |
| 303 | 303 | { |
| 304 | 304 | if (nf_ct_expires(ct) < NF_CT_DAY / 2) |
| 305 | − ct->timeout = nfct_time_stamp + NF_CT_DAY; | |
| 305 | + WRITE_ONCE(ct->timeout, nfct_time_stamp + NF_CT_DAY); | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | struct kernel_param; |
| @@ -65,7 +65,7 @@ struct netns_ipv4 { · 64 unmodified lines | ||
| 65 | 65 | bool fib_has_custom_local_routes; |
| 66 | 66 | bool fib_offload_disabled; |
| 67 | 67 | #ifdef CONFIG_IP_ROUTE_CLASSID |
| 68 | − int fib_num_tclassid_users; | |
| 68 | + atomic_t fib_num_tclassid_users; | |
| 69 | 69 | #endif |
| 70 | 70 | struct hlist_head *fib_table_hash; |
| 71 | 71 | struct sock *fibnl; |
| @@ -30,6 +30,7 @@ enum nci_flag { · 29 unmodified lines | ||
| 30 | 30 | NCI_UP, |
| 31 | 31 | NCI_DATA_EXCHANGE, |
| 32 | 32 | NCI_DATA_EXCHANGE_TO, |
| 33 | + NCI_UNREG, | |
| 33 | 34 | }; |
| 34 | 35 | |
| 35 | 36 | /* NCI device states */ |
| @@ -19,6 +19,8 @@ · 18 unmodified lines | ||
| 19 | 19 | * |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | +#include <linux/types.h> | |
| 23 | + | |
| 22 | 24 | #define NL802154_GENL_NAME "nl802154" |
| 23 | 25 | |
| 24 | 26 | enum nl802154_commands { |
| @@ -150,10 +152,9 @@ enum nl802154_attrs { · 125 unmodified lines | ||
| 150 | 152 | }; |
| 151 | 153 | |
| 152 | 154 | enum nl802154_iftype { |
| 153 | − /* for backwards compatibility TODO */ | |
| 154 | − NL802154_IFTYPE_UNSPEC = -1, | |
| 155 | + NL802154_IFTYPE_UNSPEC = (~(__u32)0), | |
| 155 | 156 | |
| 156 | − NL802154_IFTYPE_NODE, | |
| 157 | + NL802154_IFTYPE_NODE = 0, | |
| 157 | 158 | NL802154_IFTYPE_MONITOR, |
| 158 | 159 | NL802154_IFTYPE_COORD, |
| 159 | 160 | |
| @@ -216,14 +216,24 @@ static inline void page_pool_recycle_direct(struct page_pool *pool, · 215 unmodified lines | ||
| 216 | 216 | page_pool_put_full_page(pool, page, true); |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | +#define PAGE_POOL_DMA_USE_PP_FRAG_COUNT \ | |
| 220 | + (sizeof(dma_addr_t) > sizeof(unsigned long)) | |
| 221 | + | |
| 219 | 222 | static inline dma_addr_t page_pool_get_dma_addr(struct page *page) |
| 220 | 223 | { |
| 221 | − return page->dma_addr; | |
| 224 | + dma_addr_t ret = page->dma_addr; | |
| 225 | + | |
| 226 | + if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT) | |
| 227 | + ret |= (dma_addr_t)page->dma_addr_upper << 16 << 16; | |
| 228 | + | |
| 229 | + return ret; | |
| 222 | 230 | } |
| 223 | 231 | |
| 224 | 232 | static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr) |
| 225 | 233 | { |
| 226 | 234 | page->dma_addr = addr; |
| 235 | + if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT) | |
| 236 | + page->dma_addr_upper = upper_32_bits(addr); | |
| 227 | 237 | } |
| 228 | 238 | |
| 229 | 239 | static inline void page_pool_set_frag_count(struct page *page, long nr) |
| @@ -1913,18 +1913,31 @@ static inline int sk_tx_queue_get(const struct sock *sk) · 1912 unmodified lines | ||
| 1913 | 1913 | return -1; |
| 1914 | 1914 | } |
| 1915 | 1915 | |
| 1916 | −static inline void sk_rx_queue_set(struct sock *sk, const struct sk_buff *skb) | |
| 1916 | +static inline void __sk_rx_queue_set(struct sock *sk, | |
| 1917 | + const struct sk_buff *skb, | |
| 1918 | + bool force_set) | |
| 1917 | 1919 | { |
| 1918 | 1920 | #ifdef CONFIG_SOCK_RX_QUEUE_MAPPING |
| 1919 | 1921 | if (skb_rx_queue_recorded(skb)) { |
| 1920 | 1922 | u16 rx_queue = skb_get_rx_queue(skb); |
| 1921 | 1923 | |
| 1922 | − if (unlikely(READ_ONCE(sk->sk_rx_queue_mapping) != rx_queue)) | |
| 1924 | + if (force_set || | |
| 1925 | + unlikely(READ_ONCE(sk->sk_rx_queue_mapping) != rx_queue)) | |
| 1923 | 1926 | WRITE_ONCE(sk->sk_rx_queue_mapping, rx_queue); |
| 1924 | 1927 | } |
| 1925 | 1928 | #endif |
| 1926 | 1929 | } |
| 1927 | 1930 | |
| 1931 | +static inline void sk_rx_queue_set(struct sock *sk, const struct sk_buff *skb) | |
| 1932 | +{ | |
| 1933 | + __sk_rx_queue_set(sk, skb, true); | |
| 1934 | +} | |
| 1935 | + | |
| 1936 | +static inline void sk_rx_queue_update(struct sock *sk, const struct sk_buff *skb) | |
| 1937 | +{ | |
| 1938 | + __sk_rx_queue_set(sk, skb, false); | |
| 1939 | +} | |
| 1940 | + | |
| 1928 | 1941 | static inline void sk_rx_queue_clear(struct sock *sk) |
| 1929 | 1942 | { |
| 1930 | 1943 | #ifdef CONFIG_SOCK_RX_QUEUE_MAPPING |
| @@ -2430,19 +2443,22 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) · 499 unmodified lines | ||
| 2430 | 2443 | * @sk: socket |
| 2431 | 2444 | * |
| 2432 | 2445 | * Use the per task page_frag instead of the per socket one for |
| 2433 | − * optimization when we know that we're in the normal context and owns | |
| 2446 | + * optimization when we know that we're in process context and own | |
| 2434 | 2447 | * everything that's associated with %current. |
| 2435 | 2448 | * |
| 2436 | − * gfpflags_allow_blocking() isn't enough here as direct reclaim may nest | |
| 2437 | − * inside other socket operations and end up recursing into sk_page_frag() | |
| 2438 | − * while it's already in use. | |
| 2449 | + * Both direct reclaim and page faults can nest inside other | |
| 2450 | + * socket operations and end up recursing into sk_page_frag() | |
| 2451 | + * while it's already in use: explicitly avoid task page_frag | |
| 2452 | + * usage if the caller is potentially doing any of them. | |
| 2453 | + * This assumes that page fault handlers use the GFP_NOFS flags. | |
| 2439 | 2454 | * |
| 2440 | 2455 | * Return: a per task page_frag if context allows that, |
| 2441 | 2456 | * otherwise a per socket one. |
| 2442 | 2457 | */ |
| 2443 | 2458 | static inline struct page_frag *sk_page_frag(struct sock *sk) |
| 2444 | 2459 | { |
| 2445 | − if (gfpflags_normal_context(sk->sk_allocation)) | |
| 2460 | + if ((sk->sk_allocation & (__GFP_DIRECT_RECLAIM | __GFP_MEMALLOC | __GFP_FS)) == | |
| 2461 | + (__GFP_DIRECT_RECLAIM | __GFP_FS)) | |
| 2446 | 2462 | return ¤t->task_frag; |
| 2447 | 2463 | |
| 2448 | 2464 | return &sk->sk_frag; |
| @@ -30,7 +30,7 @@ enum rdma_nl_flags { · 29 unmodified lines | ||
| 30 | 30 | * constant as well and the compiler checks they are the same. |
| 31 | 31 | */ |
| 32 | 32 | #define MODULE_ALIAS_RDMA_NETLINK(_index, _val) \ |
| 33 | − static inline void __chk_##_index(void) \ | |
| 33 | + static inline void __maybe_unused __chk_##_index(void) \ | |
| 34 | 34 | { \ |
| 35 | 35 | BUILD_BUG_ON(_index != _val); \ |
| 36 | 36 | } \ |
| @@ -703,6 +703,8 @@ int ocelot_vcap_filter_add(struct ocelot *ocelot, · 702 unmodified lines | ||
| 703 | 703 | struct netlink_ext_ack *extack); |
| 704 | 704 | int ocelot_vcap_filter_del(struct ocelot *ocelot, |
| 705 | 705 | struct ocelot_vcap_filter *rule); |
| 706 | +int ocelot_vcap_filter_replace(struct ocelot *ocelot, | |
| 707 | + struct ocelot_vcap_filter *filter); | |
| 706 | 708 | struct ocelot_vcap_filter * |
| 707 | 709 | ocelot_vcap_block_find_filter_by_id(struct ocelot_vcap_block *block, |
| 708 | 710 | unsigned long cookie, bool tc_offload); |
| @@ -147,7 +147,7 @@ struct snd_soc_acpi_link_adr { · 146 unmodified lines | ||
| 147 | 147 | */ |
| 148 | 148 | /* Descriptor for SST ASoC machine driver */ |
| 149 | 149 | struct snd_soc_acpi_mach { |
| 150 | − const u8 id[ACPI_ID_LEN]; | |
| 150 | + u8 id[ACPI_ID_LEN]; | |
| 151 | 151 | const struct snd_soc_acpi_codecs *comp_ids; |
| 152 | 152 | const u32 link_mask; |
| 153 | 153 | const struct snd_soc_acpi_link_adr *links; |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #undef TRACE_SYSTEM |
| 9 | 9 | #define TRACE_SYSTEM rpcgss |
| 10 | 10 | |
| 11 | −#if !defined(_TRACE_RPCRDMA_H) || defined(TRACE_HEADER_MULTI_READ) | |
| 11 | +#if !defined(_TRACE_RPCGSS_H) || defined(TRACE_HEADER_MULTI_READ) | |
| 12 | 12 | #define _TRACE_RPCGSS_H |
| 13 | 13 | |
| 14 | 14 | #include <linux/tracepoint.h> |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | #define POLLRDHUP 0x2000 |
| 30 | 30 | #endif |
| 31 | 31 | |
| 32 | −#define POLLFREE (__force __poll_t)0x4000 /* currently only for epoll */ | |
| 32 | +#define POLLFREE (__force __poll_t)0x4000 | |
| 33 | 33 | |
| 34 | 34 | #define POLL_BUSY_LOOP (__force __poll_t)0x8000 |
| 35 | 35 | |
| @@ -196,6 +196,13 @@ struct drm_virtgpu_context_init { · 195 unmodified lines | ||
| 196 | 196 | __u64 ctx_set_params; |
| 197 | 197 | }; |
| 198 | 198 | |
| 199 | +/* | |
| 200 | + * Event code that's given when VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK is in | |
| 201 | + * effect. The event size is sizeof(drm_event), since there is no additional | |
| 202 | + * payload. | |
| 203 | + */ | |
| 204 | +#define VIRTGPU_EVENT_FENCE_SIGNALED 0x90000000 | |
| 205 | + | |
| 199 | 206 | #define DRM_IOCTL_VIRTGPU_MAP \ |
| 200 | 207 | DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map) |
| 201 | 208 | |
| @@ -117,7 +117,7 @@ · 116 unmodified lines | ||
| 117 | 117 | #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ |
| 118 | 118 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 119 | 119 | |
| 120 | −#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value | |
| 120 | +#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is more than this value | |
| 121 | 121 | * then the frame is Ethernet II. Else it is 802.3 */ |
| 122 | 122 | |
| 123 | 123 | /* |
| @@ -66,10 +66,17 @@ struct rlimit64 { · 65 unmodified lines | ||
| 66 | 66 | #define _STK_LIM (8*1024*1024) |
| 67 | 67 | |
| 68 | 68 | /* |
| 69 | − * GPG2 wants 64kB of mlocked memory, to make sure pass phrases | |
| 70 | − * and other sensitive information are never written to disk. | |
| 69 | + * Limit the amount of locked memory by some sane default: | |
| 70 | + * root can always increase this limit if needed. | |
| 71 | + * | |
| 72 | + * The main use-cases are (1) preventing sensitive memory | |
| 73 | + * from being swapped; (2) real-time operations; (3) via | |
| 74 | + * IOURING_REGISTER_BUFFERS. | |
| 75 | + * | |
| 76 | + * The first two don't need much. The latter will take as | |
| 77 | + * much as it can get. 8MB is a reasonably sane default. | |
| 71 | 78 | */ |
| 72 | −#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) | |
| 79 | +#define MLOCK_LIMIT (8*1024*1024) | |
| 73 | 80 | |
| 74 | 81 | /* |
| 75 | 82 | * Due to binary compatibility, the actual resource numbers |
| @@ -112,6 +112,7 @@ struct xenbus_driver { · 111 unmodified lines | ||
| 112 | 112 | const char *name; /* defaults to ids[0].devicetype */ |
| 113 | 113 | const struct xenbus_device_id *ids; |
| 114 | 114 | bool allow_rebind; /* avoid setting xenstore closed during remove */ |
| 115 | + bool not_essential; /* is not mandatory for boot progress */ | |
| 115 | 116 | int (*probe)(struct xenbus_device *dev, |
| 116 | 117 | const struct xenbus_device_id *id); |
| 117 | 118 | void (*otherend_changed)(struct xenbus_device *dev, |