diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-12-09 15:49:15 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2023-12-09 15:49:15 +0800 |
commit | 8146c5b349074da7732f1d45eb4a5f9fd192c7c1 (patch) | |
tree | ac1776d676406392143a5fa41d26b113bbf0ef29 /arch | |
parent | eea673e9d5ea994c60b550ffb684413d3759b3f4 (diff) |
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.h | 5 |
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; |