From nobody Wed Dec 17 12:21:22 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEBE7C4167B for ; Sun, 26 Nov 2023 12:34:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbjKZMSW (ORCPT ); Sun, 26 Nov 2023 07:18:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKZMSU (ORCPT ); Sun, 26 Nov 2023 07:18:20 -0500 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0C1DDE for ; Sun, 26 Nov 2023 04:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1701001106; bh=Pp0VZl6n2le2LRNzVsUDddKmd4rLblALXSs+e/wVaNU=; h=From:To:Cc:Subject:Date:From; b=e19O/nzCGeMeuHB9xEiBiD5Ghr6iOhakbu7rdIEirCFZtleX1bZihbEuQMkx1apRy ATuSC50NTFlY6SKT4fJQK/xQYjxHcmfNaoYQ9vb0Fu8McYJXGN3p1ul6KvO4XJxKgW nO4jy7CLVRJCkqpf4WTRYj9yPjEgfIZWTwudsUlQ= Received: from stargazer.. (unknown [124.115.222.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id B2ED866B39; Sun, 26 Nov 2023 07:18:24 -0500 (EST) From: Xi Ruoyao To: Huacai Chen , WANG Xuerui Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xi Ruoyao Subject: [PATCH] LoongArch: Slightly clean up drdtime Date: Sun, 26 Nov 2023 20:17:28 +0800 Message-ID: <20231126121727.47303-2-xry111@xry111.site> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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/includ= e/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 @@ =20 static __always_inline u64 drdtime(void) { - int rID =3D 0; u64 val =3D 0; =20 __asm__ __volatile__( - "rdtime.d %0, %1 \n\t" - : "=3Dr"(val), "=3Dr"(rID) + "rdtime.d %0, $zero\n\t" + : "=3Dr"(val) : ); return val; --=20 2.43.0