linux-stable/arch/arm64/kernel
Mark Rutland 86bcbafcb7 arm64: Mark __switch_to() as __sched
Unlike most architectures (and only in keeping with powerpc), arm64 has
a non __sched() function on the path to our cpu_switch_to() assembly
function.

It is expected that for a blocked task, in_sched_functions() can be used
to skip all functions between the raw context switch assembly and the
scheduler functions that call into __switch_to(). This is the behaviour
expected by stack_trace_consume_entry_nosched(), and the behaviour we'd
like to have such that we an simplify arm64's __get_wchan()
implementation to use arch_stack_walk().

This patch mark's arm64's __switch_to as __sched. This *will not* change
the behaviour of arm64's current __get_wchan() implementation, which
always performs an initial unwind step which skips __switch_to(). This
*will* change the behaviour of stack_trace_consume_entry_nosched() and
stack_trace_save_tsk() to match their expected behaviour on blocked
tasks, skipping all scheduler-internal functions including
__switch_to().

Other than the above, there should be no functional change as a result
of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Madhavan T. Venkataraman <madvenka@linux.microsoft.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211129142849.3056714-4-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2021-12-10 14:06:03 +00:00
..
probes arm64: kprobes: Make a frame pointer on __kretprobe_trampoline 2021-10-22 12:16:53 -04:00
vdso arm64: vdso: remove -nostdlib compiler flag 2021-11-08 10:02:57 +00:00
vdso32 arm64: vdso: remove -nostdlib compiler flag 2021-11-08 10:02:57 +00:00
.gitignore
acpi.c Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
acpi_numa.c
acpi_parking_protocol.c arm64: use function_nocfi with __pa_symbol 2021-04-08 16:04:22 -07:00
alternative.c arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
armv8_deprecated.c arm64: extable: add a dedicated uaccess handler 2021-10-21 10:45:22 +01:00
asm-offsets.c cpu-to-thread_info update for v5.16-rc1 2021-11-01 17:00:05 -07:00
cacheinfo.c drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() 2021-09-01 10:29:10 +02:00
cpu-reset.S arm64: kexec: remove cpu-reset.h 2021-10-01 13:31:00 +01:00
cpu_errata.c arm64: errata: Add detection for TRBE write to out-of-range 2021-10-21 17:49:17 +01:00
cpu_ops.c
cpufeature.c Char/Misc fix for 5.16-rc1 2021-11-11 09:44:29 -08:00
cpuidle.c arm64: kernel: Update the stale comment 2021-05-06 12:26:26 +01:00
cpuinfo.c arm64: Add HWCAP for self-synchronising virtual counter 2021-10-19 10:56:20 +01:00
crash_core.c
crash_dump.c
debug-monitors.c
efi-entry.S arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
efi-header.S
efi-rt-wrapper.S
efi.c arm64: efi: Export screen_info 2021-08-04 16:54:36 +00:00
entry-common.c irq: arm64: perform irqentry in entry code 2021-10-26 10:12:53 +01:00
entry-fpsimd.S arm64/sve: Explicitly load vector length when restoring SVE state 2021-10-21 10:18:17 +01:00
entry-ftrace.S
entry.S arm64: kasan: mte: move GCR_EL1 switch to task switch when KASAN disabled 2021-09-29 17:18:57 +01:00
fpsimd.c arm64/sve: Fix warnings when SVE is disabled 2021-10-26 10:15:46 +01:00
ftrace.c arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR 2021-11-16 09:47:54 +00:00
head.S sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y 2021-09-30 16:13:10 +02:00
hibernate-asm.S arm64: kexec: install a copy of the linear-map 2021-10-01 13:31:00 +01:00
hibernate.c arm64: hibernate: abstract ttrb0 setup function 2021-10-01 13:30:59 +01:00
hw_breakpoint.c
hyp-stub.S Merge remote-tracking branch 'arm64/for-next/vhe-only' into kvmarm-master/next 2021-04-13 15:42:40 +01:00
idle.c Merge branch 'for-next/entry' into for-next/core 2021-06-24 14:01:55 +01:00
idreg-override.c arm64/cpufeature: Optionally disable MTE via command-line 2021-08-03 15:48:01 +01:00
image-vars.h arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
image.h
io.c
irq.c
jump_label.c arm64: insn: decouple patching from insn code 2021-06-11 11:19:27 +01:00
kaslr.c arm64: fix the doc of RANDOMIZE_MODULE_REGION_FULL 2021-08-03 10:36:42 +01:00
kexec_image.c
kgdb.c arm64: insn: decouple patching from insn code 2021-06-11 11:19:27 +01:00
kuser32.S
machine_kexec.c arm64: kexec: remove cpu-reset.h 2021-10-01 13:31:00 +01:00
machine_kexec_file.c
Makefile kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
module-plts.c
module.c
mte.c arm64: mte: Add asymmetric mode support 2021-10-07 09:30:24 +01:00
paravirt.c
patching.c Merge branch 'for-next/insn' into for-next/core 2021-06-24 14:03:24 +01:00
pci.c arm64: PCI: Support root bridge preparation for Hyper-V 2021-08-23 10:59:26 +01:00
perf_callchain.c arm64: stacktrace: Relax frame record alignment requirement to 8 bytes 2021-05-26 20:01:17 +01:00
perf_event.c arm64/perf: Replace '0xf' instances with ID_AA64DFR0_PMUVER_IMP_DEF 2021-08-11 11:02:12 +01:00
perf_regs.c
pointer_auth.c arm64: move preemption disablement to prctl handlers 2021-07-28 18:33:49 +01:00
process.c arm64: Mark __switch_to() as __sched 2021-12-10 14:06:03 +00:00
proton-pack.c
psci.c arm64: use function_nocfi with __pa_symbol 2021-04-08 16:04:22 -07:00
ptrace.c arm64/sve: Put system wide vector length information into structs 2021-10-21 10:18:17 +01:00
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S arm64: kexec: keep MMU enabled during kexec relocation 2021-10-01 13:31:00 +01:00
return_address.c
sdei.c arm64: kernel: add helper for booted at EL2 and not VHE 2021-10-01 13:30:59 +01:00
setup.c arm64: convert to setup_initial_init_mm() 2021-07-08 11:48:21 -07:00
signal.c arm64/sve: Put system wide vector length information into structs 2021-10-21 10:18:17 +01:00
signal32.c arm64 updates for 5.15: 2021-09-01 15:04:29 -07:00
sigreturn32.S
sleep.S kasan: remove redundant config option 2021-04-16 16:10:36 -07:00
smccc-call.S arm64: smccc: Save lr before calling __arm_smccc_sve_check() 2021-07-21 11:23:25 +01:00
smp.c Devicetree updates for v5.16: 2021-11-02 22:22:13 -07:00
smp_spin_table.c arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
stacktrace.c arch: Make ARCH_STACKWALK independent of STACKTRACE 2021-12-10 14:06:03 +00:00
suspend.c arm64: kasan: mte: use a constant kernel GCR_EL1 value 2021-08-02 18:14:21 +01:00
sys.c
sys32.c
sys_compat.c arm64: Rename arm64-internal cache maintenance functions 2021-05-25 19:27:49 +01:00
syscall.c arm64: fix compat syscall return truncation 2021-08-03 10:35:03 +01:00
time.c
topology.c topology: Represent clusters of CPUs within a die 2021-10-15 11:25:15 +02:00
trace-events-emulation.h
traps.c Merge branch 'for-next/misc' into for-next/core 2021-10-29 12:24:59 +01:00
vdso-wrap.S
vdso.c Merge branches 'for-next/misc', 'for-next/kselftest', 'for-next/xntable', 'for-next/vdso', 'for-next/fiq', 'for-next/epan', 'for-next/kasan-vmalloc', 'for-next/fgt-boot-init', 'for-next/vhe-only' and 'for-next/neon-softirqs-disabled', remote-tracking branch 'arm64/for-next/perf' into for-next/core 2021-04-15 14:00:38 +01:00
vdso32-wrap.S
vmlinux.lds.S Merge branch 'for-next/kexec' into for-next/core 2021-10-29 12:24:47 +01:00