linux/arch/arc
Vineet Gupta cfca4b5abe ARC: entry: use gp to cache task pointer (vs. r25)
The motivation is eventual ABI considerations for ARCv3 but even without
it this change us worthwhile as diffstat reduces 100 net lines

r25 is a callee saved register, normally not saved by entry code in
pt_regs. However because of its usage in CONFIG_ARC_CURR_IN_REG it needs
to be. This in turn requires a whole bunch of special casing when we
need to access r25. Then there is distinction between user mode r25 vs.
kernel mode r25 - hence distinct SAVE_CALLEE_SAVED_{USER,KERNEL}

Instead use gp which is a scratch register and thus saved already in entry
code. This cleans things up significantly and much nocer on eyes:

 - SAVE_CALLEE_SAVED_{USER,KERNEL} are now exactly same
 - no special user_r25 slot in pt_reggs

Note that typical global asm registers are callee-saved (r25), but gp is
not callee-saved thus needs additional -ffixed-<reg> toggle

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
2023-08-17 20:31:59 -07:00
..
boot arc: dts: Harmonize EHCI/OHCI DT nodes name 2022-10-17 16:32:12 -07:00
configs mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED 2023-05-26 19:01:47 +02:00
include ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
kernel ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
lib ARCv2: memset: don't prefetch for len == 0 which happens a alot 2023-08-17 12:40:26 -07:00
mm ARC: boot log: eliminate struct cpuinfo_arc #4: boot log per ISA 2023-08-17 20:31:59 -07:00
plat-axs10x arc: Replace lkml.org links with lore 2021-12-28 19:48:49 -08:00
plat-hsdk arc: Replace lkml.org links with lore 2021-12-28 19:48:49 -08:00
plat-sim ARC: merge HAPS-HS with nSIM-HS configs 2019-10-28 12:12:31 -07:00
plat-tb10x treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile ARC: entry: use gp to cache task pointer (vs. r25) 2023-08-17 20:31:59 -07:00