From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 48776385841D for ; Thu, 28 Jul 2022 07:42:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 48776385841D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from 5.5.5 (unknown [10.2.5.5]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx39AFO+JizYg+AA--.65490S2; Thu, 28 Jul 2022 15:30:13 +0800 (CST) From: caiyinyu To: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org, i.swmail@xen0n.name Cc: joseph_myers@mentor.com, carlos@redhat.com, xuchenghua@loongson.cn, caiyinyu Subject: [PATCH 0/3] GLIBC LOONGARCH PATCHES Date: Thu, 28 Jul 2022 15:30:06 +0800 Message-Id: <20220728073009.2588790-1-caiyinyu@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9Dx39AFO+JizYg+AA--.65490S2 X-Coremail-Antispam: 1UD129KBjvJXoW3JFy3Gr4kAFW8GF4kXFWUArb_yoWxuFyrpw 4qga18GFy0vFWkZFW2vr1DuryDA34kGF47ZFyftF4YyFyxuw4UtFy3JF98XasxJr47C39r ZF1xZay5Jwn5GrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUka14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK6svPMxAI w28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr 4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxG rwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8Jw CI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY 6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, SUBJ_ALL_CAPS, TXREP autolearn=no 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 07:42:52 -0000 Hi: Considering binutils[1] (2eb132bdfb915) is ready I added vdso support for gettimeofday back. These patches are tested with gcc 12.0.1, Linux-5.19 [2]. I also tested vdso after I corrected the macros VDSO_NAME/VDSO_HASH, and the results[3] are not good compared with Wang xuerui's tests[4]. BTW, there are little difference whether the macros VDSO_NAME/VDSO_HASH are LINUX_5.10/182947696 or not. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/master [2] Glibc test results: XPASS: conform/UNIX98/ndbm.h/linknamespace XPASS: conform/XOPEN2K/ndbm.h/linknamespace XPASS: conform/XOPEN2K8/ndbm.h/linknamespace XPASS: conform/XPG42/ndbm.h/linknamespace UNSUPPORTED: crypt/cert UNSUPPORTED: elf/tst-env-setuid UNSUPPORTED: elf/tst-env-setuid-tunables XPASS: elf/tst-protected1a XPASS: elf/tst-protected1b UNSUPPORTED: elf/tst-valgrind-smoke UNSUPPORTED: misc/tst-adjtimex UNSUPPORTED: misc/tst-clock_adjtime UNSUPPORTED: misc/tst-ntp_adjtime UNSUPPORTED: misc/tst-pkey UNSUPPORTED: misc/tst-rseq UNSUPPORTED: misc/tst-rseq-disable UNSUPPORTED: nptl/test-cond-printers UNSUPPORTED: nptl/test-condattr-printers UNSUPPORTED: nptl/test-mutex-printers UNSUPPORTED: nptl/test-mutexattr-printers UNSUPPORTED: nptl/test-rwlock-printers UNSUPPORTED: nptl/test-rwlockattr-printers UNSUPPORTED: nptl/tst-rseq-nptl UNSUPPORTED: stdlib/tst-secure-getenv UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 4579 PASS 20 UNSUPPORTED 12 XFAIL 6 XPASS [3] vdsotest-bench ( VDSO_NAME/VDSO_HASH -- LINUX_5.10/182947696 ): clock-gettime-monotonic: syscall: 228 nsec/call clock-gettime-monotonic: libc: 243 nsec/call clock-gettime-monotonic: vdso: 239 nsec/call clock-getres-monotonic: syscall: 196 nsec/call clock-getres-monotonic: libc: 8 nsec/call clock-getres-monotonic: vdso: 5 nsec/call clock-gettime-monotonic-coarse: syscall: 218 nsec/call clock-gettime-monotonic-coarse: libc: 25 nsec/call clock-gettime-monotonic-coarse: vdso: 24 nsec/call clock-getres-monotonic-coarse: syscall: 198 nsec/call clock-getres-monotonic-coarse: libc: 8 nsec/call clock-getres-monotonic-coarse: vdso: 4 nsec/call clock-gettime-monotonic-raw: syscall: 228 nsec/call clock-gettime-monotonic-raw: libc: 243 nsec/call clock-gettime-monotonic-raw: vdso: 240 nsec/call clock-getres-monotonic-raw: syscall: 197 nsec/call clock-getres-monotonic-raw: libc: 8 nsec/call clock-getres-monotonic-raw: vdso: 4 nsec/call clock-gettime-tai: syscall: 231 nsec/call clock-gettime-tai: libc: 246 nsec/call clock-gettime-tai: vdso: 242 nsec/call clock-getres-tai: syscall: 197 nsec/call clock-getres-tai: libc: 8 nsec/call clock-getres-tai: vdso: 4 nsec/call clock-gettime-boottime: syscall: 229 nsec/call clock-gettime-boottime: libc: 243 nsec/call clock-gettime-boottime: vdso: 240 nsec/call clock-getres-boottime: syscall: 196 nsec/call clock-getres-boottime: libc: 8 nsec/call clock-getres-boottime: vdso: 4 nsec/call clock-gettime-realtime: syscall: 228 nsec/call clock-gettime-realtime: libc: 242 nsec/call clock-gettime-realtime: vdso: 239 nsec/call clock-getres-realtime: syscall: 197 nsec/call clock-getres-realtime: libc: 8 nsec/call clock-getres-realtime: vdso: 5 nsec/call clock-gettime-realtime-coarse: syscall: 227 nsec/call clock-gettime-realtime-coarse: libc: 25 nsec/call clock-gettime-realtime-coarse: vdso: 24 nsec/call clock-getres-realtime-coarse: syscall: 198 nsec/call clock-getres-realtime-coarse: libc: 7 nsec/call clock-getres-realtime-coarse: vdso: 4 nsec/call getcpu: syscall: 178 nsec/call getcpu: libc: 179 nsec/call getcpu: vdso: not tested Note: vDSO version of getcpu not found gettimeofday: syscall: 215 nsec/call gettimeofday: libc: 226 nsec/call gettimeofday: vdso: 226 nsec/call [4] Wang xuerui's vdsotest results: clock-gettime-monotonic: syscall: 183 nsec/call clock-gettime-monotonic: libc: 44 nsec/call clock-gettime-monotonic: vdso: 34 nsec/call clock-getres-monotonic: syscall: 152 nsec/call clock-getres-monotonic: libc: 19 nsec/call clock-getres-monotonic: vdso: 14 nsec/call clock-gettime-monotonic-coarse: syscall: 172 nsec/call clock-gettime-monotonic-coarse: libc: 39 nsec/call clock-gettime-monotonic-coarse: vdso: 29 nsec/call clock-getres-monotonic-coarse: syscall: 154 nsec/call clock-getres-monotonic-coarse: libc: 18 nsec/call clock-getres-monotonic-coarse: vdso: 14 nsec/call clock-gettime-monotonic-raw: syscall: 181 nsec/call clock-gettime-monotonic-raw: libc: 45 nsec/call clock-gettime-monotonic-raw: vdso: 36 nsec/call clock-getres-monotonic-raw: syscall: 151 nsec/call clock-getres-monotonic-raw: libc: 19 nsec/call clock-getres-monotonic-raw: vdso: 14 nsec/call clock-gettime-tai: syscall: 187 nsec/call clock-gettime-tai: libc: 44 nsec/call clock-gettime-tai: vdso: 34 nsec/call clock-getres-tai: syscall: 151 nsec/call clock-getres-tai: libc: 19 nsec/call clock-getres-tai: vdso: 14 nsec/call clock-gettime-boottime: syscall: 184 nsec/call clock-gettime-boottime: libc: 44 nsec/call clock-gettime-boottime: vdso: 34 nsec/call clock-getres-boottime: syscall: 151 nsec/call clock-getres-boottime: libc: 19 nsec/call clock-getres-boottime: vdso: 14 nsec/call clock-gettime-realtime: syscall: 181 nsec/call clock-gettime-realtime: libc: 44 nsec/call clock-gettime-realtime: vdso: 34 nsec/call clock-getres-realtime: syscall: 151 nsec/call clock-getres-realtime: libc: 19 nsec/call clock-getres-realtime: vdso: 14 nsec/call clock-gettime-realtime-coarse: syscall: 179 nsec/call clock-gettime-realtime-coarse: libc: 40 nsec/call clock-gettime-realtime-coarse: vdso: 29 nsec/call clock-getres-realtime-coarse: syscall: 154 nsec/call clock-getres-realtime-coarse: libc: 18 nsec/call clock-getres-realtime-coarse: vdso: 14 nsec/call getcpu: syscall: 134 nsec/call getcpu: libc: 20 nsec/call getcpu: vdso: 13 nsec/call gettimeofday: syscall: 171 nsec/call gettimeofday: libc: 47 nsec/call gettimeofday: vdso: 33 nsec/call caiyinyu (3): LoongArch: Add vdso support for gettimeofday. LoongArch: Fix VDSO_HASH and VDSO_NAME. LoongArch: Add greg_t and gregset_t. .../unix/sysv/linux/loongarch/gettimeofday.c | 22 +++++++++++++++++++ .../unix/sysv/linux/loongarch/sys/ucontext.h | 3 +++ sysdeps/unix/sysv/linux/loongarch/sysdep.h | 5 +++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/loongarch/gettimeofday.c -- 2.31.1