Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp311483rwd; Mon, 12 Jun 2023 14:02:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5I2bXRG8l6Uxyc+xrjmtxCP+OaAKoKUE1vJsYevhaPOhrmnseL/l3CksfVjDEXk+/MemvX X-Received: by 2002:a05:6a00:1898:b0:64d:277c:4ab2 with SMTP id x24-20020a056a00189800b0064d277c4ab2mr13508203pfh.24.1686603744305; Mon, 12 Jun 2023 14:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686603744; cv=none; d=google.com; s=arc-20160816; b=yZmpfnBtcoJnSAn0VNoIibY5tMV68I9ToQfRwDN7t4rKS+14FpsrgIqiQlsz1apkS+ vBOifJR2NcfW9gt7JLHJIKd+fIPgg7V3s85mzj9+8/mhoBdV5Ppmu+nygLPyO2WieTVn yvIDcQIzbwLfb41y0VwWlx7kXWFxg3nrF/e1IMFozl6fBlzdKoPxMehIHvGuEdHqzhAH ajvOCQkoSKhQM11SZAY8xrjWkIkn06CTqtvbRZPVFO0KY0D48pCQ3LcBhutgkCAhrezL 56YkBwT6dG7clX1WQ+DZTRBBAcq59PCoiQ+6FPgxOYZ+B3zpKZwq7zQWCO6TozQ4ELEq 5L6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i+719R2BGQEvIRIM4LUKozaKQMLLSVtqLc0F6NA/dtE=; b=U0R0TCsp0ufnlGx1MZU7Zwx0volYxTSxMRRQf/Y10celKcgA6SZ0Wdk5t81qIE5EOT oS/5EoBSsiJilUFLuCrMWZ45jc6N3ctOPH7ecz1LvWlnEyjCB5FuDtpO1nM0T7tjqzhV C9Dxztigs95uiXnWw2oX8KzelYSbi/RdtQYS/h+VYgAL1O2oVlBoBUugSFiU8nqAqeor UQ7d1zJjEpF8nwPXDpqSyWFOVedhhLP7zpI02LvoZEmUJFuAMpNMi9a0BAGOeHlYTvFA CQ0VUplyYZU/7MSAqcvsHfDAgNgHwo89C1s48HfM2xQ2RCj7xiprZEl8QRKDfOcHMV9f vyqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=de0Ij0Ms; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a625103000000b006531ba094f9si3918290pfb.135.2023.06.12.14.01.47; Mon, 12 Jun 2023 14:02:24 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=de0Ij0Ms; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238332AbjFLUu5 (ORCPT + 99 others); Mon, 12 Jun 2023 16:50:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232117AbjFLUsR (ORCPT ); Mon, 12 Jun 2023 16:48:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABBF919B3 for ; Mon, 12 Jun 2023 13:46:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D792762F20 for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58847C43333; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602717; bh=ujkkeF6CcwcL8JLlTc5iUkI9cAxPzJGXzBROQQtoy1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=de0Ij0MsBENh8xMB3pYY6EZViEWela8BfBAsysvMNUIvg2yZhKeyFYZiEwkXrWuv8 ge54p3sKsyTZWknh/NpW1yHg1sDETCOQBOwBAg0uGI76I5P01s3iDiVJmvo35uHbYr BUHxY8RsIUEFNtb5TxIo29lr2IvvxkXad9ALk67kKZ4jxZMWjjf4JEa+VLgQ4ARP1g oISwYta3Dk97PsSA6mikU55RwTZejoLyv7KavLt2CgP7IP52bdAuaHW9u/f6hC4vfR C5xin0VMtowPRnosRed+L+rryBO7+ii5Ozt3dcriHIqL8bgWKzmUWHCdedGZUwRu4c Az5SzCrPvrIOw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 20401CE3A90; Mon, 12 Jun 2023 13:45:16 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, Zhangjin Wu , Arnd Bergmann , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 47/53] tools/nolibc: arm: add missing my_syscall6 Date: Mon, 12 Jun 2023 13:45:08 -0700 Message-Id: <20230612204514.292087-47-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Zhangjin Wu This is required by the coming removal of the oldselect and newselect support. pselect6/pselect6_time64 will be used unconditionally, they have 6 arguments. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/linux-riscv/bf3e07c1-75f5-425b-9124-f3f2b230e63a@app.fastmail.com/ Signed-off-by: Zhangjin Wu Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/include/nolibc/arch-arm.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc/arch-arm.h index 45b89ffe8247..ca4c66987497 100644 --- a/tools/include/nolibc/arch-arm.h +++ b/tools/include/nolibc/arch-arm.h @@ -198,6 +198,29 @@ struct sys_stat_struct { _arg1; \ }) +#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6) \ +({ \ + register long _num __asm__(_NOLIBC_SYSCALL_REG) = (num); \ + register long _arg1 __asm__ ("r0") = (long)(arg1); \ + register long _arg2 __asm__ ("r1") = (long)(arg2); \ + register long _arg3 __asm__ ("r2") = (long)(arg3); \ + register long _arg4 __asm__ ("r3") = (long)(arg4); \ + register long _arg5 __asm__ ("r4") = (long)(arg5); \ + register long _arg6 __asm__ ("r5") = (long)(arg6); \ + \ + __asm__ volatile ( \ + _NOLIBC_THUMB_SET_R7 \ + "svc #0\n" \ + _NOLIBC_THUMB_RESTORE_R7 \ + : "=r"(_arg1), "=r" (_num) \ + : "r"(_arg1), "r"(_arg2), "r"(_arg3), "r"(_arg4), "r"(_arg5), \ + "r"(_arg6), "r"(_num) \ + : "memory", "cc", "lr" \ + ); \ + _arg1; \ +}) + + char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak)); -- 2.40.1