diff options
author | Vineet Gupta <vgupta@kernel.org> | 2020-05-13 07:18:08 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@kernel.org> | 2023-08-18 05:31:59 +0200 |
commit | cfca4b5abe0cc13f9d9f45f760efd8260e31200f (patch) | |
tree | bac7d51b9a322dbb17a9428c87aeae26aa5678ef /arch/arc/Kconfig | |
parent | ARC: boot log: eliminate struct cpuinfo_arc #4: boot log per ISA (diff) | |
download | linux-cfca4b5abe0cc13f9d9f45f760efd8260e31200f.tar.xz linux-cfca4b5abe0cc13f9d9f45f760efd8260e31200f.zip |
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>
Diffstat (limited to 'arch/arc/Kconfig')
-rw-r--r-- | arch/arc/Kconfig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 47b4acc7d0c9..c92bacc1ff4c 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -492,11 +492,11 @@ config ARC_KVADDR_SIZE kernel-user gutter) config ARC_CURR_IN_REG - bool "Dedicate Register r25 for current_task pointer" + bool "cache current task pointer in gp" default y help - This reserved Register R25 to point to Current Task in - kernel mode. This saves memory access for each such access + This reserves gp register to point to Current Task in + kernel mode eliding memory access for each access config ARC_EMUL_UNALIGNED |