Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6175807rwd; Wed, 24 May 2023 11:50:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4OcfKGsWJ1vq2KaspHJ3k6nxV+5aYvV7YsaMbJQI4rhO/8WgxXBdfz8VLZO/Xdb/5WRKuV X-Received: by 2002:a05:6a20:a126:b0:10c:c407:92e5 with SMTP id q38-20020a056a20a12600b0010cc40792e5mr5832980pzk.22.1684954209989; Wed, 24 May 2023 11:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684954209; cv=none; d=google.com; s=arc-20160816; b=ZJZZ3ZhnneJoIZOB5Li/WSbkGy9DcaMNyR3q6/1Mig5vvgRUmTfRTG/vkCd3zCTmuw c05N+FrKvBeiO2xw+7bIkz5uQa+Kj1T7mjHdkxugzE5xvojFpXB55o1o1I9LVlJq5XzZ A5L2zbQLtNsWqQU3I5G2d72USbtAUgKEKcxYdE2QAPs+7ggzspxpVDbGALYVeVqiN73z aBeI8eAvCBHe2MgI5ahan+qAH9vzWY2bpiTqo2nCn/ZHKFBGlnhrBiNBmo9As1cwooyb vY/di11OnucNW/CakL93zL4Z0MwzplTGqpPuhcwoZHzEO4qZ+D+1n9Q/NtzyitFHMK1K g1bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=23Ps52NYVgZIKovG02fA9IvbOt8y9/Ls6WSLlaOYgsI=; b=S0cJtW1jbCwnhkIzWTOySnUYsHECSeU5Whg8qpBUql65vqexhoB2UjF+pafmIX8R1q 2/0yIp+6GzCTE6u1/SwNxntSg1c1NpNmEwVJoeqgpgorsuRdNAoWDl4/od6PaAeS1sXX TeD3cMC0vMqg3R8H8OWmMVsFCq1RtV51aSmGDNzFQ8cNrtp2yYsFxqdQ84P26z5cWlTg Y8Z0Rv8A2k2j+FHq2iB5vNonR6SycyleMuinsNnwk+OiNMBtwcIPNr4XpouO3zPUZHnB 95atGneOh3eV4cip2Zo8HfuOgEl2m93UeLeyIk4q9mi4KNB3xfO0ZggXgRUc6Rotjh5p Yg8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t65-20020a637844000000b0051820b42b57si8852407pgc.619.2023.05.24.11.49.57; Wed, 24 May 2023 11:50:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236127AbjEXSBT (ORCPT + 99 others); Wed, 24 May 2023 14:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbjEXSBR (ORCPT ); Wed, 24 May 2023 14:01:17 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6610898; Wed, 24 May 2023 11:01:14 -0700 (PDT) X-QQ-mid: bizesmtp75t1684951269t67ndppu Received: from linux-lab-host.localdomain ( [116.30.125.36]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 25 May 2023 02:01:08 +0800 (CST) X-QQ-SSF: 01200000000000D0V000B00A0000000 X-QQ-FEAT: hoArX50alxHX1mYOrihcB1iZGA+cMKRF18+VTtXY99N55mVqxxcNdy0jsu7Jz AcFGpT9by4v33/v8k6d71SGSNut3w5M1Y55V4QKFnuqDFz4e83jelIWCnwnh7ZZM/sT3E7F z6uTpi+OMP1Z7jyvBEXLGAs4F6CizZ4L8XY7TfsyP2p/AFUjdFPl7T1OArgl97XQgJkh/6Y UFvN8POwUkaWKQhBkorPnFG0okEi1/pIjfr9VCs/vFUjAG/lqDuM5K9BE9462Br2voypj0+ KqU2y/d9dGgUBYc8VJyjXbBM9c6PjzUS1OidPVawQduEJIza/o8yXXFRHqHoIzmrt3APMEb gsgqua+2O/NyW4ZeCqKXTDW6FjzPqNY0tBIaYOff9EXpYK8gO+mip2Uh9tHJw== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4020491424755662603 From: Zhangjin Wu To: w@1wt.eu Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com, thomas@t-8ch.de Subject: [PATCH 11/13] tools/nolibc: sys_select: riscv: use __NR_pselect6_time64 for rv32 Date: Thu, 25 May 2023 01:59:55 +0800 Message-Id: <9359ab11b52ef7c1799337f475e1e27c0cb00e3b.1684949268.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rv32 uses the generic include/uapi/asm-generic/unistd.h and it has no __NR_pselect6 after kernel commit d4c08b9776b3 ("riscv: Use latest system call ABI"), use __NR_pselect6_time64 instead. Signed-off-by: Zhangjin Wu --- tools/include/nolibc/sys.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index c0335a84f880..00c7197dcd50 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -1041,8 +1041,13 @@ int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeva struct timeval *t; } arg = { .n = nfds, .r = rfds, .w = wfds, .e = efds, .t = timeout }; return my_syscall1(__NR_select, &arg); -#elif defined(__ARCH_WANT_SYS_PSELECT6) && defined(__NR_pselect6) +#elif defined(__ARCH_WANT_SYS_PSELECT6) && (defined(__NR_pselect6) || defined(__NR_pselect6_time64)) +#ifdef __NR_pselect6 struct timespec t; +#else + struct timespec64 t; +#define __NR_pselect6 __NR_pselect6_time64 +#endif if (timeout) { t.tv_sec = timeout->tv_sec; -- 2.25.1