linux/arch/arc/kernel
Vineet Gupta b060b7d0c1 ARC: __switch_to: asm with dwarf ops (vs. inline asm)
__switch_to() is final step of context switch, swapping kernel modes
stack (and callee regs) of outgoing task with next task.

It is also the starting point of stack unwinging of a sleeping task and
captures SP, FP, BLINK and the corresponding dwarf info. Back when
dinosaurs still roamed around, ARC gas didn't support CFI pseudo ops and
gcc was responsible for generating dwarf info. Thus it had to be written
in "C" with inline asm to do the hand crafting of stack. The function
prologue (and crucial saving of blink etc) was still gcc generated but
not visible in code. Likewise dwarf info was missing.

Now with modern tools, we can make things more obvious by writing the
code in asm and adding approproate dwarf cfi pseudo ops.

This is mostly non functional change, except for slight chnages to asm

 - ARCompact doesn't support MOV_S fp, sp, so we use MOV

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
2023-08-17 20:31:59 -07:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
arc_hostlink.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
arcksyms.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
asm-offsets.c ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
ctx_sw_asm.S ARC: __switch_to: asm with dwarf ops (vs. inline asm) 2023-08-17 20:31:59 -07:00
devtree.c ARC: -Wmissing-prototype warning fixes 2023-08-13 16:53:02 -07:00
disasm.c ARC: disasm: handle ARCv2 case in kprobe get/set functions 2022-04-26 09:34:42 -07:00
entry-arcv2.S ARC: mm: move MMU specific bits out of entry code ... 2021-08-24 14:25:48 -07:00
entry-compact.S ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause 2019-07-08 09:24:44 +01:00
entry.S ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
fpu.c ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch 2021-08-03 18:58:33 -07:00
head.S ARC: [plat-hsdk] Remap CCMs super early in asm boot trampoline 2020-11-02 11:45:09 -08:00
intc-arcv2.c ARC: -Wmissing-prototype warning fixes 2023-08-13 16:53:02 -07:00
intc-compact.c arch/arc/kernel/: fix misspellings using codespell tool 2021-08-24 14:25:46 -07:00
irq.c irq: arc: avoid CONFIG_HANDLE_DOMAIN_IRQ 2021-10-25 10:05:28 +01:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kgdb.c ARC: kgdb: add 'fallthrough' to prevent a warning 2021-05-10 12:38:59 -07:00
kprobes.c kprobes: treewide: Make it harder to refer kretprobe_trampoline directly 2021-09-30 21:24:06 -04:00
Makefile ARC: __switch_to: asm with dwarf ops (vs. inline asm) 2023-08-17 20:31:59 -07:00
mcip.c ARC: boot log: eliminate struct cpuinfo_arc #3: don't export 2023-08-17 20:31:59 -07:00
module.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
perf_event.c arc: perf: Move static structs to where they're really used 2021-12-28 19:48:49 -08:00
process.c ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
ptrace.c ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
reset.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
setup.c ARC: boot log: eliminate struct cpuinfo_arc #4: boot log per ISA 2023-08-17 20:31:59 -07:00
signal.c ARC: -Wmissing-prototype warning fixes 2023-08-13 16:53:02 -07:00
smp.c ARC: -Wmissing-prototype warning fixes 2023-08-13 16:53:02 -07:00
stacktrace.c ARC: -Wmissing-prototype warning fixes 2023-08-13 16:53:02 -07:00
sys.c ARC: wireup clone3 syscall 2020-01-15 16:08:12 -08:00
traps.c ARC: -Wmissing-prototype warning fixes 2023-08-13 16:53:02 -07:00
troubleshoot.c arch/arc/kernel/troubleshoot: use vma_lookup() instead of find_vma() 2021-06-29 10:53:51 -07:00
unaligned.c ARC: fix typos in comments 2022-04-18 12:20:23 -07:00
unwind.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00