projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eea673e
)
LoongArch: Slightly clean up drdtime()
author
Xi Ruoyao
<xry111@xry111.site>
Sat, 9 Dec 2023 07:49:15 +0000
(15:49 +0800)
committer
Huacai Chen
<chenhuacai@loongson.cn>
Sat, 9 Dec 2023 07:49:15 +0000
(15:49 +0800)
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>
arch/loongarch/include/asm/loongarch.h
patch
|
blob
|
history
diff --git
a/arch/loongarch/include/asm/loongarch.h
b/arch/loongarch/include/asm/loongarch.h
index 9b4957cefa8ad24cdd792629240d5cc08bed264a..46366e783c84112f40d965d10793bd14f5d4221e 100644
(file)
--- 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;