Backmerge 5.9-rc4 as there is a nasty qxl conflict that needs to be resolved.
Showing the changes to kernel (34 of 1709 files). Show all
Unified · Split
| @@ -681,7 +681,7 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule) · 680 unmodified lines | ||
| 681 | 681 | data->values[i] = AUDIT_UID_UNSET; |
| 682 | 682 | break; |
| 683 | 683 | } |
| 684 | − /* fall through - if set */ | |
| 684 | + fallthrough; /* if set */ | |
| 685 | 685 | default: |
| 686 | 686 | data->values[i] = f->val; |
| 687 | 687 | } |
| @@ -1794,7 +1794,7 @@ static bool cg_sockopt_is_valid_access(int off, int size, · 1793 unmodified lines | ||
| 1794 | 1794 | return prog->expected_attach_type == |
| 1795 | 1795 | BPF_CGROUP_GETSOCKOPT; |
| 1796 | 1796 | case offsetof(struct bpf_sockopt, optname): |
| 1797 | − /* fallthrough */ | |
| 1797 | + fallthrough; | |
| 1798 | 1798 | case offsetof(struct bpf_sockopt, level): |
| 1799 | 1799 | if (size != size_default) |
| 1800 | 1800 | return false; |
| @@ -279,7 +279,7 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu, · 278 unmodified lines | ||
| 279 | 279 | break; |
| 280 | 280 | default: |
| 281 | 281 | bpf_warn_invalid_xdp_action(act); |
| 282 | − /* fallthrough */ | |
| 282 | + fallthrough; | |
| 283 | 283 | case XDP_DROP: |
| 284 | 284 | xdp_return_frame(xdpf); |
| 285 | 285 | stats->drop++; |
| @@ -2029,7 +2029,7 @@ bpf_prog_load_check_attach(enum bpf_prog_type prog_type, · 2028 unmodified lines | ||
| 2029 | 2029 | case BPF_PROG_TYPE_EXT: |
| 2030 | 2030 | if (expected_attach_type) |
| 2031 | 2031 | return -EINVAL; |
| 2032 | − /* fallthrough */ | |
| 2032 | + fallthrough; | |
| 2033 | 2033 | default: |
| 2034 | 2034 | return 0; |
| 2035 | 2035 | } |
| @@ -2634,7 +2634,7 @@ static int bpf_raw_tp_link_fill_link_info(const struct bpf_link *link, · 598 unmodified lines | ||
| 2634 | 2634 | u32 ulen = info->raw_tracepoint.tp_name_len; |
| 2635 | 2635 | size_t tp_len = strlen(tp_name); |
| 2636 | 2636 | |
| 2637 | − if (ulen && !ubuf) | |
| 2637 | + if (!ulen ^ !ubuf) | |
| 2638 | 2638 | return -EINVAL; |
| 2639 | 2639 | |
| 2640 | 2640 | info->raw_tracepoint.tp_name_len = tp_len + 1; |
| @@ -5236,7 +5236,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, · 5235 unmodified lines | ||
| 5236 | 5236 | off_reg == dst_reg ? dst : src); |
| 5237 | 5237 | return -EACCES; |
| 5238 | 5238 | } |
| 5239 | − /* fall-through */ | |
| 5239 | + fallthrough; | |
| 5240 | 5240 | default: |
| 5241 | 5241 | break; |
| 5242 | 5242 | } |
| @@ -10988,7 +10988,7 @@ static int check_attach_btf_id(struct bpf_verifier_env *env) · 5745 unmodified lines | ||
| 10988 | 10988 | default: |
| 10989 | 10989 | if (!prog_extension) |
| 10990 | 10990 | return -EINVAL; |
| 10991 | − /* fallthrough */ | |
| 10991 | + fallthrough; | |
| 10992 | 10992 | case BPF_MODIFY_RETURN: |
| 10993 | 10993 | case BPF_LSM_MAC: |
| 10994 | 10994 | case BPF_TRACE_FENTRY: |
| @@ -93,7 +93,7 @@ static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy) · 92 unmodified lines | ||
| 93 | 93 | break; |
| 94 | 94 | case _LINUX_CAPABILITY_VERSION_2: |
| 95 | 95 | warn_deprecated_v2(); |
| 96 | − /* fall through - v3 is otherwise equivalent to v2. */ | |
| 96 | + fallthrough; /* v3 is otherwise equivalent to v2 */ | |
| 97 | 97 | case _LINUX_CAPABILITY_VERSION_3: |
| 98 | 98 | *tocopy = _LINUX_CAPABILITY_U32S_3; |
| 99 | 99 | break; |
| @@ -255,11 +255,11 @@ get_compat_sigset(sigset_t *set, const compat_sigset_t __user *compat) · 254 unmodified lines | ||
| 255 | 255 | return -EFAULT; |
| 256 | 256 | switch (_NSIG_WORDS) { |
| 257 | 257 | case 4: set->sig[3] = v.sig[6] | (((long)v.sig[7]) << 32 ); |
| 258 | − /* fall through */ | |
| 258 | + fallthrough; | |
| 259 | 259 | case 3: set->sig[2] = v.sig[4] | (((long)v.sig[5]) << 32 ); |
| 260 | − /* fall through */ | |
| 260 | + fallthrough; | |
| 261 | 261 | case 2: set->sig[1] = v.sig[2] | (((long)v.sig[3]) << 32 ); |
| 262 | − /* fall through */ | |
| 262 | + fallthrough; | |
| 263 | 263 | case 1: set->sig[0] = v.sig[0] | (((long)v.sig[1]) << 32 ); |
| 264 | 264 | } |
| 265 | 265 | #else |
| @@ -1046,14 +1046,14 @@ int gdb_serial_stub(struct kgdb_state *ks) · 1045 unmodified lines | ||
| 1046 | 1046 | return DBG_PASS_EVENT; |
| 1047 | 1047 | } |
| 1048 | 1048 | #endif |
| 1049 | − /* Fall through */ | |
| 1049 | + fallthrough; | |
| 1050 | 1050 | case 'C': /* Exception passing */ |
| 1051 | 1051 | tmp = gdb_cmd_exception_pass(ks); |
| 1052 | 1052 | if (tmp > 0) |
| 1053 | 1053 | goto default_handle; |
| 1054 | 1054 | if (tmp == 0) |
| 1055 | 1055 | break; |
| 1056 | − /* Fall through - on tmp < 0 */ | |
| 1056 | + fallthrough; /* on tmp < 0 */ | |
| 1057 | 1057 | case 'c': /* Continue packet */ |
| 1058 | 1058 | case 's': /* Single step packet */ |
| 1059 | 1059 | if (kgdb_contthread && kgdb_contthread != current) { |
| @@ -1062,7 +1062,7 @@ int gdb_serial_stub(struct kgdb_state *ks) · 2 unmodified lines | ||
| 1062 | 1062 | break; |
| 1063 | 1063 | } |
| 1064 | 1064 | dbg_activate_sw_breakpoints(); |
| 1065 | − /* Fall through - to default processing */ | |
| 1065 | + fallthrough; /* to default processing */ | |
| 1066 | 1066 | default: |
| 1067 | 1067 | default_handle: |
| 1068 | 1068 | error = kgdb_arch_handle_exception(ks->ex_vector, |
| @@ -173,11 +173,11 @@ int kdb_get_kbd_char(void) · 172 unmodified lines | ||
| 173 | 173 | case KT_LATIN: |
| 174 | 174 | if (isprint(keychar)) |
| 175 | 175 | break; /* printable characters */ |
| 176 | − /* fall through */ | |
| 176 | + fallthrough; | |
| 177 | 177 | case KT_SPEC: |
| 178 | 178 | if (keychar == K_ENTER) |
| 179 | 179 | break; |
| 180 | − /* fall through */ | |
| 180 | + fallthrough; | |
| 181 | 181 | default: |
| 182 | 182 | return -1; /* ignore unprintables */ |
| 183 | 183 | } |
| @@ -432,7 +432,7 @@ int kdb_getphysword(unsigned long *word, unsigned long addr, size_t size) · 431 unmodified lines | ||
| 432 | 432 | *word = w8; |
| 433 | 433 | break; |
| 434 | 434 | } |
| 435 | − /* fall through */ | |
| 435 | + fallthrough; | |
| 436 | 436 | default: |
| 437 | 437 | diag = KDB_BADWIDTH; |
| 438 | 438 | kdb_printf("kdb_getphysword: bad width %ld\n", (long) size); |
| @@ -481,7 +481,7 @@ int kdb_getword(unsigned long *word, unsigned long addr, size_t size) · 42 unmodified lines | ||
| 481 | 481 | *word = w8; |
| 482 | 482 | break; |
| 483 | 483 | } |
| 484 | − /* fall through */ | |
| 484 | + fallthrough; | |
| 485 | 485 | default: |
| 486 | 486 | diag = KDB_BADWIDTH; |
| 487 | 487 | kdb_printf("kdb_getword: bad width %ld\n", (long) size); |
| @@ -525,7 +525,7 @@ int kdb_putword(unsigned long addr, unsigned long word, size_t size) · 37 unmodified lines | ||
| 525 | 525 | diag = kdb_putarea(addr, w8); |
| 526 | 526 | break; |
| 527 | 527 | } |
| 528 | − /* fall through */ | |
| 528 | + fallthrough; | |
| 529 | 529 | default: |
| 530 | 530 | diag = KDB_BADWIDTH; |
| 531 | 531 | kdb_printf("kdb_putword: bad width %ld\n", (long) size); |
| @@ -84,7 +84,7 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size, · 83 unmodified lines | ||
| 84 | 84 | gfp_t gfp) |
| 85 | 85 | { |
| 86 | 86 | unsigned int order; |
| 87 | − struct page *page; | |
| 87 | + struct page *page = NULL; | |
| 88 | 88 | void *addr; |
| 89 | 89 | int ret = -ENOMEM; |
| 90 | 90 | |
| @@ -69,22 +69,45 @@ static long syscall_trace_enter(struct pt_regs *regs, long syscall, · 68 unmodified lines | ||
| 69 | 69 | return ret ? : syscall_get_nr(current, regs); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | −noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) | |
| 72 | +static __always_inline long | |
| 73 | +__syscall_enter_from_user_work(struct pt_regs *regs, long syscall) | |
| 73 | 74 | { |
| 74 | 75 | unsigned long ti_work; |
| 75 | 76 | |
| 76 | − enter_from_user_mode(regs); | |
| 77 | − instrumentation_begin(); | |
| 78 | − | |
| 79 | − local_irq_enable(); | |
| 80 | 77 | ti_work = READ_ONCE(current_thread_info()->flags); |
| 81 | 78 | if (ti_work & SYSCALL_ENTER_WORK) |
| 82 | 79 | syscall = syscall_trace_enter(regs, syscall, ti_work); |
| 83 | − instrumentation_end(); | |
| 84 | 80 | |
| 85 | 81 | return syscall; |
| 86 | 82 | } |
| 87 | 83 | |
| 84 | +long syscall_enter_from_user_mode_work(struct pt_regs *regs, long syscall) | |
| 85 | +{ | |
| 86 | + return __syscall_enter_from_user_work(regs, syscall); | |
| 87 | +} | |
| 88 | + | |
| 89 | +noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) | |
| 90 | +{ | |
| 91 | + long ret; | |
| 92 | + | |
| 93 | + enter_from_user_mode(regs); | |
| 94 | + | |
| 95 | + instrumentation_begin(); | |
| 96 | + local_irq_enable(); | |
| 97 | + ret = __syscall_enter_from_user_work(regs, syscall); | |
| 98 | + instrumentation_end(); | |
| 99 | + | |
| 100 | + return ret; | |
| 101 | +} | |
| 102 | + | |
| 103 | +noinstr void syscall_enter_from_user_mode_prepare(struct pt_regs *regs) | |
| 104 | +{ | |
| 105 | + enter_from_user_mode(regs); | |
| 106 | + instrumentation_begin(); | |
| 107 | + local_irq_enable(); | |
| 108 | + instrumentation_end(); | |
| 109 | +} | |
| 110 | + | |
| 88 | 111 | /** |
| 89 | 112 | * exit_to_user_mode - Fixup state when exiting to user mode |
| 90 | 113 | * |
| @@ -10034,7 +10034,7 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr, · 10033 unmodified lines | ||
| 10034 | 10034 | case IF_SRC_KERNELADDR: |
| 10035 | 10035 | case IF_SRC_KERNEL: |
| 10036 | 10036 | kernel = 1; |
| 10037 | − /* fall through */ | |
| 10037 | + fallthrough; | |
| 10038 | 10038 | |
| 10039 | 10039 | case IF_SRC_FILEADDR: |
| 10040 | 10040 | case IF_SRC_FILE: |
| @@ -3014,7 +3014,7 @@ int unshare_files(struct files_struct **displaced) · 3013 unmodified lines | ||
| 3014 | 3014 | } |
| 3015 | 3015 | |
| 3016 | 3016 | int sysctl_max_threads(struct ctl_table *table, int write, |
| 3017 | − void __user *buffer, size_t *lenp, loff_t *ppos) | |
| 3017 | + void *buffer, size_t *lenp, loff_t *ppos) | |
| 3018 | 3018 | { |
| 3019 | 3019 | struct ctl_table t; |
| 3020 | 3020 | int ret; |
| @@ -4,6 +4,7 @@ menu "GCOV-based kernel profiling" · 3 unmodified lines | ||
| 4 | 4 | config GCOV_KERNEL |
| 5 | 5 | bool "Enable gcov-based kernel profiling" |
| 6 | 6 | depends on DEBUG_FS |
| 7 | + depends on !CC_IS_GCC || GCC_VERSION < 100000 | |
| 7 | 8 | select CONSTRUCTORS if !UML |
| 8 | 9 | default n |
| 9 | 10 | help |
| @@ -173,7 +173,7 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags · 172 unmodified lines | ||
| 173 | 173 | |
| 174 | 174 | __irq_wake_thread(desc, action); |
| 175 | 175 | |
| 176 | − /* Fall through - to add to randomness */ | |
| 176 | + fallthrough; /* to add to randomness */ | |
| 177 | 177 | case IRQ_HANDLED: |
| 178 | 178 | *flags |= action->flags; |
| 179 | 179 | break; |
| @@ -271,7 +271,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, · 270 unmodified lines | ||
| 271 | 271 | case IRQ_SET_MASK_OK: |
| 272 | 272 | case IRQ_SET_MASK_OK_DONE: |
| 273 | 273 | cpumask_copy(desc->irq_common_data.affinity, mask); |
| 274 | − /* fall through */ | |
| 274 | + fallthrough; | |
| 275 | 275 | case IRQ_SET_MASK_OK_NOCOPY: |
| 276 | 276 | irq_validate_effective_affinity(data); |
| 277 | 277 | irq_set_thread_affinity(desc); |
| @@ -868,7 +868,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned long flags) · 590 unmodified lines | ||
| 868 | 868 | case IRQ_SET_MASK_OK_DONE: |
| 869 | 869 | irqd_clear(&desc->irq_data, IRQD_TRIGGER_MASK); |
| 870 | 870 | irqd_set(&desc->irq_data, flags); |
| 871 | − /* fall through */ | |
| 871 | + fallthrough; | |
| 872 | 872 | |
| 873 | 873 | case IRQ_SET_MASK_OK_NOCOPY: |
| 874 | 874 | flags = irqd_get_trigger_type(&desc->irq_data); |
| @@ -380,6 +380,13 @@ int irq_matrix_alloc(struct irq_matrix *m, const struct cpumask *msk, · 379 unmodified lines | ||
| 380 | 380 | unsigned int cpu, bit; |
| 381 | 381 | struct cpumap *cm; |
| 382 | 382 | |
| 383 | + /* | |
| 384 | + * Not required in theory, but matrix_find_best_cpu() uses | |
| 385 | + * for_each_cpu() which ignores the cpumask on UP . | |
| 386 | + */ | |
| 387 | + if (cpumask_empty(msk)) | |
| 388 | + return -EINVAL; | |
| 389 | + | |
| 383 | 390 | cpu = matrix_find_best_cpu(m, msk); |
| 384 | 391 | if (cpu == UINT_MAX) |
| 385 | 392 | return -ENOSPC; |
| @@ -684,12 +684,12 @@ bool kallsyms_show_value(const struct cred *cred) · 683 unmodified lines | ||
| 684 | 684 | case 0: |
| 685 | 685 | if (kallsyms_for_perf()) |
| 686 | 686 | return true; |
| 687 | − /* fallthrough */ | |
| 687 | + fallthrough; | |
| 688 | 688 | case 1: |
| 689 | 689 | if (security_capable(cred, &init_user_ns, CAP_SYSLOG, |
| 690 | 690 | CAP_OPT_NOAUDIT) == 0) |
| 691 | 691 | return true; |
| 692 | − /* fallthrough */ | |
| 692 | + fallthrough; | |
| 693 | 693 | default: |
| 694 | 694 | return false; |
| 695 | 695 | } |
| @@ -3756,7 +3756,7 @@ void noinstr lockdep_hardirqs_on(unsigned long ip) · 3755 unmodified lines | ||
| 3756 | 3756 | |
| 3757 | 3757 | skip_checks: |
| 3758 | 3758 | /* we'll do an OFF -> ON transition: */ |
| 3759 | − this_cpu_write(hardirqs_enabled, 1); | |
| 3759 | + __this_cpu_write(hardirqs_enabled, 1); | |
| 3760 | 3760 | trace->hardirq_enable_ip = ip; |
| 3761 | 3761 | trace->hardirq_enable_event = ++trace->irq_events; |
| 3762 | 3762 | debug_atomic_inc(hardirqs_on_events); |
| @@ -3795,7 +3795,7 @@ void noinstr lockdep_hardirqs_off(unsigned long ip) · 32 unmodified lines | ||
| 3795 | 3795 | /* |
| 3796 | 3796 | * We have done an ON -> OFF transition: |
| 3797 | 3797 | */ |
| 3798 | − this_cpu_write(hardirqs_enabled, 0); | |
| 3798 | + __this_cpu_write(hardirqs_enabled, 0); | |
| 3799 | 3799 | trace->hardirq_disable_ip = ip; |
| 3800 | 3800 | trace->hardirq_disable_event = ++trace->irq_events; |
| 3801 | 3801 | debug_atomic_inc(hardirqs_off_events); |
| @@ -4977,6 +4977,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, · 1175 unmodified lines | ||
| 4977 | 4977 | { |
| 4978 | 4978 | unsigned long flags; |
| 4979 | 4979 | |
| 4980 | + trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip); | |
| 4981 | + | |
| 4980 | 4982 | if (unlikely(current->lockdep_recursion)) { |
| 4981 | 4983 | /* XXX allow trylock from NMI ?!? */ |
| 4982 | 4984 | if (lockdep_nmi() && !trylock) { |
| @@ -5001,7 +5003,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, · 18 unmodified lines | ||
| 5001 | 5003 | check_flags(flags); |
| 5002 | 5004 | |
| 5003 | 5005 | current->lockdep_recursion++; |
| 5004 | − trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip); | |
| 5005 | 5006 | __lock_acquire(lock, subclass, trylock, read, check, |
| 5006 | 5007 | irqs_disabled_flags(flags), nest_lock, ip, 0, 0); |
| 5007 | 5008 | lockdep_recursion_finish(); |
| @@ -5013,13 +5014,15 @@ void lock_release(struct lockdep_map *lock, unsigned long ip) · 5 unmodified lines | ||
| 5013 | 5014 | { |
| 5014 | 5015 | unsigned long flags; |
| 5015 | 5016 | |
| 5017 | + trace_lock_release(lock, ip); | |
| 5018 | + | |
| 5016 | 5019 | if (unlikely(current->lockdep_recursion)) |
| 5017 | 5020 | return; |
| 5018 | 5021 | |
| 5019 | 5022 | raw_local_irq_save(flags); |
| 5020 | 5023 | check_flags(flags); |
| 5024 | + | |
| 5021 | 5025 | current->lockdep_recursion++; |
| 5022 | − trace_lock_release(lock, ip); | |
| 5023 | 5026 | if (__lock_release(lock, ip)) |
| 5024 | 5027 | check_chain_key(current); |
| 5025 | 5028 | lockdep_recursion_finish(); |
| @@ -5205,8 +5208,6 @@ __lock_acquired(struct lockdep_map *lock, unsigned long ip) · 179 unmodified lines | ||
| 5205 | 5208 | hlock->holdtime_stamp = now; |
| 5206 | 5209 | } |
| 5207 | 5210 | |
| 5208 | − trace_lock_acquired(lock, ip); | |
| 5209 | − | |
| 5210 | 5211 | stats = get_lock_stats(hlock_class(hlock)); |
| 5211 | 5212 | if (waittime) { |
| 5212 | 5213 | if (hlock->read) |
| @@ -5225,6 +5226,8 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip) · 12 unmodified lines | ||
| 5225 | 5226 | { |
| 5226 | 5227 | unsigned long flags; |
| 5227 | 5228 | |
| 5229 | + trace_lock_acquired(lock, ip); | |
| 5230 | + | |
| 5228 | 5231 | if (unlikely(!lock_stat || !debug_locks)) |
| 5229 | 5232 | return; |
| 5230 | 5233 | |
| @@ -5234,7 +5237,6 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip) · 3 unmodified lines | ||
| 5234 | 5237 | raw_local_irq_save(flags); |
| 5235 | 5238 | check_flags(flags); |
| 5236 | 5239 | current->lockdep_recursion++; |
| 5237 | − trace_lock_contended(lock, ip); | |
| 5238 | 5240 | __lock_contended(lock, ip); |
| 5239 | 5241 | lockdep_recursion_finish(); |
| 5240 | 5242 | raw_local_irq_restore(flags); |
| @@ -5245,6 +5247,8 @@ void lock_acquired(struct lockdep_map *lock, unsigned long ip) · 4 unmodified lines | ||
| 5245 | 5247 | { |
| 5246 | 5248 | unsigned long flags; |
| 5247 | 5249 | |
| 5250 | + trace_lock_contended(lock, ip); | |
| 5251 | + | |
| 5248 | 5252 | if (unlikely(!lock_stat || !debug_locks)) |
| 5249 | 5253 | return; |
| 5250 | 5254 | |
| @@ -659,7 +659,7 @@ static void power_down(void) · 658 unmodified lines | ||
| 659 | 659 | break; |
| 660 | 660 | case HIBERNATION_PLATFORM: |
| 661 | 661 | hibernation_platform_enter(); |
| 662 | − /* Fall through */ | |
| 662 | + fallthrough; | |
| 663 | 663 | case HIBERNATION_SHUTDOWN: |
| 664 | 664 | if (pm_power_off) |
| 665 | 665 | kernel_power_off(); |
| @@ -119,7 +119,7 @@ int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node, · 118 unmodified lines | ||
| 119 | 119 | * and add, then see if the aggregate has changed. |
| 120 | 120 | */ |
| 121 | 121 | plist_del(node, &c->list); |
| 122 | − /* fall through */ | |
| 122 | + fallthrough; | |
| 123 | 123 | case PM_QOS_ADD_REQ: |
| 124 | 124 | plist_node_init(node, new_value); |
| 125 | 125 | plist_add(node, &c->list); |
| @@ -188,7 +188,7 @@ bool pm_qos_update_flags(struct pm_qos_flags *pqf, · 62 unmodified lines | ||
| 188 | 188 | break; |
| 189 | 189 | case PM_QOS_UPDATE_REQ: |
| 190 | 190 | pm_qos_flags_remove_req(pqf, req); |
| 191 | − /* fall through */ | |
| 191 | + fallthrough; | |
| 192 | 192 | case PM_QOS_ADD_REQ: |
| 193 | 193 | req->flags = val; |
| 194 | 194 | INIT_LIST_HEAD(&req->node); |
| @@ -2320,7 +2320,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p) · 2319 unmodified lines | ||
| 2320 | 2320 | state = possible; |
| 2321 | 2321 | break; |
| 2322 | 2322 | } |
| 2323 | − /* Fall-through */ | |
| 2323 | + fallthrough; | |
| 2324 | 2324 | case possible: |
| 2325 | 2325 | do_set_cpus_allowed(p, cpu_possible_mask); |
| 2326 | 2326 | state = fail; |
| @@ -54,17 +54,18 @@ __setup("hlt", cpu_idle_nopoll_setup); · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 55 | static noinline int __cpuidle cpu_idle_poll(void) |
| 56 | 56 | { |
| 57 | + trace_cpu_idle(0, smp_processor_id()); | |
| 58 | + stop_critical_timings(); | |
| 57 | 59 | rcu_idle_enter(); |
| 58 | − trace_cpu_idle_rcuidle(0, smp_processor_id()); | |
| 59 | 60 | local_irq_enable(); |
| 60 | − stop_critical_timings(); | |
| 61 | 61 | |
| 62 | 62 | while (!tif_need_resched() && |
| 63 | − (cpu_idle_force_poll || tick_check_broadcast_expired())) | |
| 63 | + (cpu_idle_force_poll || tick_check_broadcast_expired())) | |
| 64 | 64 | cpu_relax(); |
| 65 | − start_critical_timings(); | |
| 66 | − trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); | |
| 65 | + | |
| 67 | 66 | rcu_idle_exit(); |
| 67 | + start_critical_timings(); | |
| 68 | + trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | |
| 68 | 69 | |
| 69 | 70 | return 1; |
| 70 | 71 | } |
| @@ -90,9 +91,14 @@ void __cpuidle default_idle_call(void) · 19 unmodified lines | ||
| 90 | 91 | if (current_clr_polling_and_test()) { |
| 91 | 92 | local_irq_enable(); |
| 92 | 93 | } else { |
| 94 | + | |
| 95 | + trace_cpu_idle(1, smp_processor_id()); | |
| 93 | 96 | stop_critical_timings(); |
| 97 | + rcu_idle_enter(); | |
| 94 | 98 | arch_cpu_idle(); |
| 99 | + rcu_idle_exit(); | |
| 95 | 100 | start_critical_timings(); |
| 101 | + trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | |
| 96 | 102 | } |
| 97 | 103 | } |
| 98 | 104 | |
| @@ -158,7 +164,6 @@ static void cpuidle_idle_call(void) · 59 unmodified lines | ||
| 158 | 164 | |
| 159 | 165 | if (cpuidle_not_available(drv, dev)) { |
| 160 | 166 | tick_nohz_idle_stop_tick(); |
| 161 | − rcu_idle_enter(); | |
| 162 | 167 | |
| 163 | 168 | default_idle_call(); |
| 164 | 169 | goto exit_idle; |
| @@ -178,21 +183,17 @@ static void cpuidle_idle_call(void) · 13 unmodified lines | ||
| 178 | 183 | u64 max_latency_ns; |
| 179 | 184 | |
| 180 | 185 | if (idle_should_enter_s2idle()) { |
| 181 | − rcu_idle_enter(); | |
| 182 | 186 | |
| 183 | 187 | entered_state = call_cpuidle_s2idle(drv, dev); |
| 184 | 188 | if (entered_state > 0) |
| 185 | 189 | goto exit_idle; |
| 186 | 190 | |
| 187 | − rcu_idle_exit(); | |
| 188 | − | |
| 189 | 191 | max_latency_ns = U64_MAX; |
| 190 | 192 | } else { |
| 191 | 193 | max_latency_ns = dev->forced_idle_latency_limit_ns; |
| 192 | 194 | } |
| 193 | 195 | |
| 194 | 196 | tick_nohz_idle_stop_tick(); |
| 195 | − rcu_idle_enter(); | |
| 196 | 197 | |
| 197 | 198 | next_state = cpuidle_find_deepest_state(drv, dev, max_latency_ns); |
| 198 | 199 | call_cpuidle(drv, dev, next_state); |
| @@ -209,8 +210,6 @@ static void cpuidle_idle_call(void) · 10 unmodified lines | ||
| 209 | 210 | else |
| 210 | 211 | tick_nohz_idle_retain_tick(); |
| 211 | 212 | |
| 212 | − rcu_idle_enter(); | |
| 213 | − | |
| 214 | 213 | entered_state = call_cpuidle(drv, dev, next_state); |
| 215 | 214 | /* |
| 216 | 215 | * Give the governor an opportunity to reflect on the outcome |
| @@ -226,8 +225,6 @@ exit_idle: · 9 unmodified lines | ||
| 226 | 225 | */ |
| 227 | 226 | if (WARN_ON_ONCE(irqs_disabled())) |
| 228 | 227 | local_irq_enable(); |
| 229 | − | |
| 230 | − rcu_idle_exit(); | |
| 231 | 228 | } |
| 232 | 229 | |
| 233 | 230 | /* |
| @@ -1219,13 +1219,13 @@ static void __free_domain_allocs(struct s_data *d, enum s_alloc what, · 1218 unmodified lines | ||
| 1219 | 1219 | case sa_rootdomain: |
| 1220 | 1220 | if (!atomic_read(&d->rd->refcount)) |
| 1221 | 1221 | free_rootdomain(&d->rd->rcu); |
| 1222 | − /* Fall through */ | |
| 1222 | + fallthrough; | |
| 1223 | 1223 | case sa_sd: |
| 1224 | 1224 | free_percpu(d->sd); |
| 1225 | − /* Fall through */ | |
| 1225 | + fallthrough; | |
| 1226 | 1226 | case sa_sd_storage: |
| 1227 | 1227 | __sdt_free(cpu_map); |
| 1228 | − /* Fall through */ | |
| 1228 | + fallthrough; | |
| 1229 | 1229 | case sa_none: |
| 1230 | 1230 | break; |
| 1231 | 1231 | } |
| @@ -851,7 +851,7 @@ static int check_kill_permission(int sig, struct kernel_siginfo *info, · 850 unmodified lines | ||
| 851 | 851 | */ |
| 852 | 852 | if (!sid || sid == task_session(current)) |
| 853 | 853 | break; |
| 854 | − /* fall through */ | |
| 854 | + fallthrough; | |
| 855 | 855 | default: |
| 856 | 856 | return -EPERM; |
| 857 | 857 | } |
| @@ -1753,7 +1753,7 @@ void getrusage(struct task_struct *p, int who, struct rusage *r) · 1752 unmodified lines | ||
| 1753 | 1753 | |
| 1754 | 1754 | if (who == RUSAGE_CHILDREN) |
| 1755 | 1755 | break; |
| 1756 | − /* fall through */ | |
| 1756 | + fallthrough; | |
| 1757 | 1757 | |
| 1758 | 1758 | case RUSAGE_SELF: |
| 1759 | 1759 | thread_group_cputime_adjusted(p, &tgutime, &tgstime); |
| @@ -204,8 +204,7 @@ static int max_extfrag_threshold = 1000; · 203 unmodified lines | ||
| 204 | 204 | |
| 205 | 205 | #if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL) |
| 206 | 206 | static int bpf_stats_handler(struct ctl_table *table, int write, |
| 207 | − void __user *buffer, size_t *lenp, | |
| 208 | − loff_t *ppos) | |
| 207 | + void *buffer, size_t *lenp, loff_t *ppos) | |
| 209 | 208 | { |
| 210 | 209 | struct static_key *key = (struct static_key *)table->data; |
| 211 | 210 | static int saved_val; |
| @@ -377,7 +377,7 @@ static bool hrtimer_fixup_activate(void *addr, enum debug_obj_state state) · 376 unmodified lines | ||
| 377 | 377 | switch (state) { |
| 378 | 378 | case ODEBUG_STATE_ACTIVE: |
| 379 | 379 | WARN_ON(1); |
| 380 | − /* fall through */ | |
| 380 | + fallthrough; | |
| 381 | 381 | default: |
| 382 | 382 | return false; |
| 383 | 383 | } |
| @@ -439,12 +439,12 @@ static struct pid *good_sigevent(sigevent_t * event) · 438 unmodified lines | ||
| 439 | 439 | rtn = pid_task(pid, PIDTYPE_PID); |
| 440 | 440 | if (!rtn || !same_thread_group(rtn, current)) |
| 441 | 441 | return NULL; |
| 442 | − /* FALLTHRU */ | |
| 442 | + fallthrough; | |
| 443 | 443 | case SIGEV_SIGNAL: |
| 444 | 444 | case SIGEV_THREAD: |
| 445 | 445 | if (event->sigev_signo <= 0 || event->sigev_signo > SIGRTMAX) |
| 446 | 446 | return NULL; |
| 447 | − /* FALLTHRU */ | |
| 447 | + fallthrough; | |
| 448 | 448 | case SIGEV_NONE: |
| 449 | 449 | return pid; |
| 450 | 450 | default: |
| @@ -381,7 +381,7 @@ void tick_broadcast_control(enum tick_broadcast_mode mode) · 380 unmodified lines | ||
| 381 | 381 | switch (mode) { |
| 382 | 382 | case TICK_BROADCAST_FORCE: |
| 383 | 383 | tick_broadcast_forced = 1; |
| 384 | − /* fall through */ | |
| 384 | + fallthrough; | |
| 385 | 385 | case TICK_BROADCAST_ON: |
| 386 | 386 | cpumask_set_cpu(cpu, tick_broadcast_on); |
| 387 | 387 | if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) { |
| @@ -666,7 +666,7 @@ static bool timer_fixup_activate(void *addr, enum debug_obj_state state) · 665 unmodified lines | ||
| 666 | 666 | |
| 667 | 667 | case ODEBUG_STATE_ACTIVE: |
| 668 | 668 | WARN_ON(1); |
| 669 | − /* fall through */ | |
| 669 | + fallthrough; | |
| 670 | 670 | default: |
| 671 | 671 | return false; |
| 672 | 672 | } |
| @@ -745,7 +745,7 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) · 744 unmodified lines | ||
| 745 | 745 | #endif |
| 746 | 746 | case BLKTRACESTART: |
| 747 | 747 | start = 1; |
| 748 | − /* fall through */ | |
| 748 | + fallthrough; | |
| 749 | 749 | case BLKTRACESTOP: |
| 750 | 750 | ret = __blk_trace_startstop(q, start); |
| 751 | 751 | break; |
| @@ -499,7 +499,7 @@ predicate_parse(const char *str, int nr_parens, int nr_preds, · 498 unmodified lines | ||
| 499 | 499 | ptr++; |
| 500 | 500 | break; |
| 501 | 501 | } |
| 502 | − /* fall through */ | |
| 502 | + fallthrough; | |
| 503 | 503 | default: |
| 504 | 504 | parse_error(pe, FILT_ERR_TOO_MANY_PREDS, |
| 505 | 505 | next - str); |
| @@ -1273,7 +1273,7 @@ static int parse_pred(const char *str, void *data, · 767 unmodified lines | ||
| 1273 | 1273 | switch (op) { |
| 1274 | 1274 | case OP_NE: |
| 1275 | 1275 | pred->not = 1; |
| 1276 | − /* Fall through */ | |
| 1276 | + fallthrough; | |
| 1277 | 1277 | case OP_GLOB: |
| 1278 | 1278 | case OP_EQ: |
| 1279 | 1279 | break; |