diff options
author | WANG Xuerui <git@xen0n.name> | 2022-07-26 18:57:16 +0300 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-07-29 13:22:32 +0300 |
commit | d8e7f201a4cf148c3801cdc9603963061d28d64f (patch) | |
tree | 5bbe5881044a3dcb4ad37fc59a49f9c9e815c3db /arch/loongarch/include/asm/thread_info.h | |
parent | e0dccc3b76fb35bb257b4118367a883073d7390e (diff) | |
download | linux-d8e7f201a4cf148c3801cdc9603963061d28d64f.tar.xz |
LoongArch: Use ABI names of registers where appropriate
Some of the assembly in the LoongArch port seem to come from a
prehistoric time, when the assembler didn't even have support for the
ABI names we all come to know and love, thus used raw register numbers
which hampered readability.
The usages are found with a regex match inside arch/loongarch, then
manually adjusted for those non-definitions.
Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/thread_info.h')
-rw-r--r-- | arch/loongarch/include/asm/thread_info.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/loongarch/include/asm/thread_info.h b/arch/loongarch/include/asm/thread_info.h index 99beb11c2fa8..b7dd9f19a5a9 100644 --- a/arch/loongarch/include/asm/thread_info.h +++ b/arch/loongarch/include/asm/thread_info.h @@ -44,14 +44,14 @@ struct thread_info { } /* How to get the thread information struct from C. */ -register struct thread_info *__current_thread_info __asm__("$r2"); +register struct thread_info *__current_thread_info __asm__("$tp"); static inline struct thread_info *current_thread_info(void) { return __current_thread_info; } -register unsigned long current_stack_pointer __asm__("$r3"); +register unsigned long current_stack_pointer __asm__("$sp"); #endif /* !__ASSEMBLY__ */ |