From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 3432F385800B for ; Thu, 28 Jul 2022 12:58:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3432F385800B Received: by mail-oi1-x229.google.com with SMTP id u9so2284852oiv.12 for ; Thu, 28 Jul 2022 05:58:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=nFMcehPpjVaGntNV7XNBLULdw/F0ghwO6u/mgsgR3RQ=; b=GaH8/eFzfLT7HI7lPiPVirgGmP18CLxAOUnELv88Pq9BrtroMFWkJFMP+FuoDMaTTx w0JmQCiX4/DrRNx7SLt1VrCYvpref5O2o1x1SjhdflvNsyHaSefLhAVkgYBUYfmLLuph ctPttaqbswdzrEMBkUBVEqqO/A1whts+li6qA+vcP92eg25RqIEL+ULnogKessl91ny+ XlXeMaG20KlGcq+F9CeePYsJiMyhb2TWVb6iWnlmTnfgl3oop3KKVNYLW9FmLKrNdC8E nCBAFCSOR5AHc4ZMsd7EgGqWYFYne1P2Ngx6OGBFTqIGcwasyGMWPmNfsTQf8qES4csF lM5g== X-Gm-Message-State: AJIora+i1ulFqOIaIXeaYh3jwjd48QPUrhAMNx1lD1PXaAYV2z0dxlIN nvR5sSlCiiOOPMiaWt5t6P1goA== X-Google-Smtp-Source: AGRyM1uKMpD3B09QjQwFn84T9G2m6VdsSejJNF6dbXhJ1WyvuKDLwHwR6ynBj/OzJ74Eh759Ns6wJA== X-Received: by 2002:a54:488d:0:b0:33a:af6b:643c with SMTP id r13-20020a54488d000000b0033aaf6b643cmr3833237oic.192.1659013105442; Thu, 28 Jul 2022 05:58:25 -0700 (PDT) Received: from [192.168.15.32] ([179.113.53.9]) by smtp.gmail.com with ESMTPSA id x8-20020a05683000c800b00616d25dc933sm230707oto.69.2022.07.28.05.58.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Jul 2022 05:58:25 -0700 (PDT) Message-ID: <397fae36-6577-58d9-17cd-b27ab2dce02b@linaro.org> Date: Thu, 28 Jul 2022 09:58:19 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH 1/3] LoongArch: Add vdso support for gettimeofday. Content-Language: en-US To: caiyinyu , libc-alpha@sourceware.org, i.swmail@xen0n.name Cc: joseph_myers@mentor.com, carlos@redhat.com, xuchenghua@loongson.cn References: <20220728073009.2588790-1-caiyinyu@loongson.cn> <20220728073009.2588790-2-caiyinyu@loongson.cn> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20220728073009.2588790-2-caiyinyu@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2022 12:58:27 -0000 I think we should postpone it to 2.37, it is an optimization and we can backport it if required. The patch looks ok though. On 28/07/22 04:30, caiyinyu wrote: > --- > .../unix/sysv/linux/loongarch/gettimeofday.c | 22 +++++++++++++++++++ > sysdeps/unix/sysv/linux/loongarch/sysdep.h | 1 + > 2 files changed, 23 insertions(+) > create mode 100644 sysdeps/unix/sysv/linux/loongarch/gettimeofday.c > > diff --git a/sysdeps/unix/sysv/linux/loongarch/gettimeofday.c b/sysdeps/unix/sysv/linux/loongarch/gettimeofday.c > new file mode 100644 > index 0000000000..ee35a08650 > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/loongarch/gettimeofday.c > @@ -0,0 +1,22 @@ > +/* gettimeofday -- Get the current time of day. > + Copyright (C) 2022 Free Software Foundation, Inc. > + > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library. If not, see > + . */ > + > + > +#define USE_IFUNC_GETTIMEOFDAY > +#include > diff --git a/sysdeps/unix/sysv/linux/loongarch/sysdep.h b/sysdeps/unix/sysv/linux/loongarch/sysdep.h > index c586df819c..306e0af3a3 100644 > --- a/sysdeps/unix/sysv/linux/loongarch/sysdep.h > +++ b/sysdeps/unix/sysv/linux/loongarch/sysdep.h > @@ -116,6 +116,7 @@ > /* List of system calls which are supported as vsyscalls. */ > #define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres" > #define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime" > +#define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" > #define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" > > #define HAVE_CLONE3_WRAPPER 1