From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 674A9C28CF5 for ; Wed, 26 Jan 2022 15:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8VC8NwV8Ucm15QPvbHnflhpTFjIxqLhy8BSPfQNADTc=; b=uhn7qI/AQne/BL yXGBQK5MNG/DsN2Mo7ILRc2OVVonNIUkIWa7M9FDBle7ZZxqFVBEqx9opae9fqEL6gX3uU9dXV4xx tWkdIYP7Igd0008S/uIR49Ljo+SsSLYvdnvCCzoLXwDodHmTeajgE1QgDwMl5FCnzWmhluCO+9MnS OVOKDG2qFfhiNFmgEemvlJCq14ew2xExf51eAT8idiA0Rz35Tgqzu16dtRzjunDpxQzBIvl5b/o8K yTV5Nc4dz8A1g2yh8XfYm4hPfNhV9ckmbyuwA+iw5k7tPmubeJs3sSuZTBDL6nYyJ/QSzO4usmNKy RCt5PBwJ3Gw6sbWbm5Iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCkaq-00CQgS-Vo; Wed, 26 Jan 2022 15:52:21 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCjzM-00CBDJ-7S for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 15:13:37 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id C663BB81E3A; Wed, 26 Jan 2022 15:13:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4E78C340E3; Wed, 26 Jan 2022 15:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643210013; bh=P2l5Y5PDPDJcPc6k74icHUD6sRurj6ctKkCgiE7n3uE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FGCKLwFG1LDFc2UKYhHR3wtHYWCSs8ISpVIJ8Y3A2wJViEVWWYOTmYMjF/hkwbXov b63nJSzCG5b2wQimooFAh/zxpPU08oO7ElB/B+DE5Zb8VOrzicn8fXQkcCbSUUDL6z ogylDfChH+30dEn4NLvU3Q953AOtzn4YTKXQIeotsxZelngRCmVk7N8+FN5xcN+eC/ 4vXZzJxgzmFRV6Slr923Lyk9rRslgyTpfRhieoS/EXY2CmgWRja0kmFO8/ZODzmvhq 9enhc/KZPchMitDxvX8vSvsnLBb0/rP4GEbJCnGnSFqn+NBYzNB/8AGUIWzzx+ATUV VYAOi6OO1HFCA== From: Mark Brown To: Catalin Marinas , Will Deacon , Marc Zyngier , Shuah Khan , Shuah Khan Cc: Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , Szabolcs Nagy , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Mark Brown Subject: [PATCH v9 29/40] kselftest/arm64: sme: Add streaming SME support to vlset Date: Wed, 26 Jan 2022 15:11:09 +0000 Message-Id: <20220126151120.3811248-30-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220126151120.3811248-1-broonie@kernel.org> References: <20220126151120.3811248-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1924; h=from:subject; bh=P2l5Y5PDPDJcPc6k74icHUD6sRurj6ctKkCgiE7n3uE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBh8WSNOiCWCuqdEhEwDeB0fuhFIzO/DqyGIULZWFjy SmyMmrCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYfFkjQAKCRAk1otyXVSH0FDQB/ wJl2jDnNO26RagzF9Cq7elJL/aRx6EGGh2FQQ2jVwBFPnFsALroxhghHtBMciIUDTl/CyQdxPCEOPI WHjLnDWxewrmuylT0r9OG6pTjI1sXoVzjQ/uFqa/opmrKVLpKqva3BzCzQKgUt3IHXZObaQTTkTfj7 AYJ+9+meEPsHjVPnVk+p5x3jIZTGMEPknWI+E3b4ZAuzcFyXzDAF0YzKUMb6E6cRoS6ZSMEX82X/oA LgdO3ibrbIzlOPLVmdcL/LboEzy0zBz4FfnV/xiBZ4HqW6rKzlvOLzAyk/ndUEJfR/5DZTcRdK4Szq CusCDpI6GA+TpAnVjJFEqru2ECQb6T X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220126_071336_599567_172E40EE X-CRM114-Status: GOOD ( 14.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Scalable Matrix Extenions (SME) introduces additional register state with configurable vector lengths, similar to SVE but configured separately. Extend vlset to support configuring this state with a --sme or -s command line option. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/vlset.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/vlset.c b/tools/testing/selftests/arm64/fp/vlset.c index 308d27a68226..76912a581a95 100644 --- a/tools/testing/selftests/arm64/fp/vlset.c +++ b/tools/testing/selftests/arm64/fp/vlset.c @@ -22,12 +22,15 @@ static int inherit = 0; static int no_inherit = 0; static int force = 0; static unsigned long vl; +static int set_ctl = PR_SVE_SET_VL; +static int get_ctl = PR_SVE_GET_VL; static const struct option options[] = { { "force", no_argument, NULL, 'f' }, { "inherit", no_argument, NULL, 'i' }, { "max", no_argument, NULL, 'M' }, { "no-inherit", no_argument, &no_inherit, 1 }, + { "sme", no_argument, NULL, 's' }, { "help", no_argument, NULL, '?' }, {} }; @@ -50,6 +53,9 @@ static int parse_options(int argc, char **argv) case 'M': vl = SVE_VL_MAX; break; case 'f': force = 1; break; case 'i': inherit = 1; break; + case 's': set_ctl = PR_SME_SET_VL; + get_ctl = PR_SME_GET_VL; + break; case 0: break; default: goto error; } @@ -125,14 +131,14 @@ int main(int argc, char **argv) if (inherit) flags |= PR_SVE_VL_INHERIT; - t = prctl(PR_SVE_SET_VL, vl | flags); + t = prctl(set_ctl, vl | flags); if (t < 0) { fprintf(stderr, "%s: PR_SVE_SET_VL: %s\n", program_name, strerror(errno)); goto error; } - t = prctl(PR_SVE_GET_VL); + t = prctl(get_ctl); if (t == -1) { fprintf(stderr, "%s: PR_SVE_GET_VL: %s\n", program_name, strerror(errno)); -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel