summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-12-09 08:49:15 +0100
committerHuacai Chen <chenhuacai@loongson.cn>2023-12-09 08:49:15 +0100
commit8146c5b349074da7732f1d45eb4a5f9fd192c7c1 (patch)
treeac1776d676406392143a5fa41d26b113bbf0ef29 /arch
parentLoongArch: Apply dynamic relocations for LLD (diff)
downloadlinux-8146c5b349074da7732f1d45eb4a5f9fd192c7c1.tar.xz
linux-8146c5b349074da7732f1d45eb4a5f9fd192c7c1.zip
LoongArch: Slightly clean up drdtime()
As we are just discarding the stable clock ID, simply write it into $zero instead of allocating a temporary register. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch')
-rw-r--r--arch/loongarch/include/asm/loongarch.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/loongarch/include/asm/loongarch.h b/arch/loongarch/include/asm/loongarch.h
index 9b4957cefa8a..46366e783c84 100644
--- a/arch/loongarch/include/asm/loongarch.h
+++ b/arch/loongarch/include/asm/loongarch.h
@@ -1098,12 +1098,11 @@
static __always_inline u64 drdtime(void)
{
- int rID = 0;
u64 val = 0;
__asm__ __volatile__(
- "rdtime.d %0, %1 \n\t"
- : "=r"(val), "=r"(rID)
+ "rdtime.d %0, $zero\n\t"
+ : "=r"(val)
:
);
return val;