mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
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>
This commit is contained in:
parent
eea673e9d5
commit
8146c5b349
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user