mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Huacai Chen <chenhuacai@kernel.org>, WANG Xuerui <kernel@xen0n.name>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Ping: [PATCH] LoongArch: Slightly clean up drdtime
Date: Tue, 05 Dec 2023 16:01:11 +0800	[thread overview]
Message-ID: <369bce8101f2db6685c0e2446976eb7ea16510eb.camel@xry111.site> (raw)
In-Reply-To: <20231126121727.47303-2-xry111@xry111.site>

Ping.

On Sun, 2023-11-26 at 20:17 +0800, Xi Ruoyao wrote:
> 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>
> ---
>  arch/loongarch/include/asm/loongarch.h | 5 ++---
>  1 file 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;

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-12-05  8:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26 12:17 Xi Ruoyao
2023-12-05  8:01 ` Xi Ruoyao [this message]
2023-12-05  8:07   ` Ping: " Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=369bce8101f2db6685c0e2446976eb7ea16510eb.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®