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 ECD1DC433EF for ; Tue, 8 Feb 2022 00:41:57 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pQ6s8XaxyHghOeR3edh/9FeGc1NstI5L2DVvfoR1S70=; b=YJF+FlNIJA91/iidQVmCgDtTrm x+3MAcc21giFa3iI2ODzITWEU9NH6WB6hNk48pFA/V3Vfx9zdL1X6zwckUqUXfiFwNbpcv9atw19I E4UmaA0RIlZyb5WXJ5lUj1nFo3czNfSZIlpfPP1w861Nq7aY0lyPyisS3PMiNTC+et04ottRGtFFe 7FZNnB70pJk8PH9lWnhfBtTn/dt1upCbF2eiGlzPUxwxlgsnbm1f3GHCEsVyMDub4YIticpBUMpf+ 2vstFCpF8SR6IYBV1fBwjs19rgCJ5cfg3kEk6kxv37SduKgglQ8fRODLjyqNeZfGtrLhqYJmORj4Y zJ94TfEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHEYJ-00C4D6-2A; Tue, 08 Feb 2022 00:40:15 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHEYE-00C4Cm-U7 for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 00:40:12 +0000 Received: by mail-io1-xd34.google.com with SMTP id r144so19170999iod.9 for ; Mon, 07 Feb 2022 16:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DXeBvPGPhYY+G0mgsEODvq+5edCNWHsu13flglIZ8UM=; b=PouLRfqDZfaw1BrQsKzh+xn99PLlR1bC33CV3R7yMYhNxvRWiYU/etVWr0UHoioj0L 6g/cfYNtG27eRKW9sUplUKo4Ixiz0JVr1GVnaNCS4RbPY5IVon3GpPzQ36L4NjTu6tOL WCDDTQKmh7tBNLSGVFY4SqUv7dN6QprlpBePQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DXeBvPGPhYY+G0mgsEODvq+5edCNWHsu13flglIZ8UM=; b=KrnahOqh0QIUcJHMW4pGQI+Ej9jhjTuKjoP2XVATmb0LBC1Ntkij+2AHeX8+IPfhQ0 wsf5mPOQSPT2TdWutR6AAmOdTMk+Olv9poJso/zWRlk7Ep+Tu4ApSJ0jxNQgdEsLnwwO jIeAKnoy0SU/N4dtcdC0y0ehZgjHF8uGJ1wtJo93sOt4tDGOv3CXeCNOXYZchwPign4d Jk7jhqGzFY89c3gF5NmKx63n/rHNf3g7iQXKIlGe5c9B0cUTViO6pq2DQPW6kSFKkcri wyXIJb98ZklPUnNcVekhmqKLPhBamUcaluTHpqU21pQRiGNFl2QphTb4NYOkVZnX//i/ pOwQ== X-Gm-Message-State: AOAM530xDAdnAuX3VDqoAb+6Wqe8neX3ALiA4CNYSuiaKp2yCLLXiiBt 2+CznSfmeQC0w1xpIp8bW+aV9A== X-Google-Smtp-Source: ABdhPJzeX0vLAAWRHPBAbA5cgmSlTkcN8+zoFIZE6KO/H/cq6RdFUbzERhuo/trd9mdX5FzHSG3mrw== X-Received: by 2002:a05:6638:14cb:: with SMTP id l11mr1058327jak.292.1644280810350; Mon, 07 Feb 2022 16:40:10 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id m12sm7043930iow.54.2022.02.07.16.40.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Feb 2022 16:40:09 -0800 (PST) Subject: Re: [PATCH v11 34/40] kselftest/arm64: sme: Provide streaming mode SVE stress test To: Mark Brown , Catalin Marinas , Will Deacon , Marc Zyngier , 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, Shuah Khan References: <20220207152109.197566-1-broonie@kernel.org> <20220207152109.197566-35-broonie@kernel.org> From: Shuah Khan Message-ID: <3b173e0e-7651-b820-26c4-37d1cbe94224@linuxfoundation.org> Date: Mon, 7 Feb 2022 17:40:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220207152109.197566-35-broonie@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_164011_038511_5FCF74C2 X-CRM114-Status: GOOD ( 24.34 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/7/22 8:21 AM, Mark Brown wrote: > One of the features of SME is the addition of streaming mode, in which we > have access to a set of streaming mode SVE registers at the SME vector > length. Since these are accessed using the SVE instructions let's reuse > the existing SVE stress test for testing with a compile time option for > controlling the few small differences needed: > > - Enter streaming mode immediately on starting the program. > - In streaming mode FFR is removed so skip reading and writing FFR. > > In order to avoid requiring a cutting edge toolchain with SME support > use the op/CR form for specifying SVCR. A few words or pointer to op/CR form would help as education for people that aren't familiar with the form (self included). > > Signed-off-by: Mark Brown > --- > tools/testing/selftests/arm64/fp/.gitignore | 1 + > tools/testing/selftests/arm64/fp/Makefile | 3 + > tools/testing/selftests/arm64/fp/ssve-stress | 59 ++++++++++++++++++++ > tools/testing/selftests/arm64/fp/sve-test.S | 20 +++++++ > 4 files changed, 83 insertions(+) > create mode 100644 tools/testing/selftests/arm64/fp/ssve-stress > > diff --git a/tools/testing/selftests/arm64/fp/.gitignore b/tools/testing/selftests/arm64/fp/.gitignore > index 6e9a610c5e5d..5729a5b1adfc 100644 > --- a/tools/testing/selftests/arm64/fp/.gitignore > +++ b/tools/testing/selftests/arm64/fp/.gitignore > @@ -5,5 +5,6 @@ rdvl-sve > sve-probe-vls > sve-ptrace > sve-test > +ssve-test > vec-syscfg > vlset > diff --git a/tools/testing/selftests/arm64/fp/Makefile b/tools/testing/selftests/arm64/fp/Makefile > index a224fff8082b..e6643c9b0474 100644 > --- a/tools/testing/selftests/arm64/fp/Makefile > +++ b/tools/testing/selftests/arm64/fp/Makefile > @@ -5,6 +5,7 @@ TEST_GEN_PROGS := sve-ptrace sve-probe-vls vec-syscfg > TEST_PROGS_EXTENDED := fp-pidbench fpsimd-test fpsimd-stress \ > rdvl-sme rdvl-sve \ > sve-test sve-stress \ > + ssve-test ssve-stress \ > vlset > > all: $(TEST_GEN_PROGS) $(TEST_PROGS_EXTENDED) > @@ -19,6 +20,8 @@ sve-ptrace: sve-ptrace.o > sve-probe-vls: sve-probe-vls.o rdvl.o > sve-test: sve-test.o asm-utils.o > $(CC) -nostdlib $^ -o $@ > +ssve-test: sve-test.S asm-utils.o > + $(CC) -DSSVE -nostdlib $^ -o $@ > vec-syscfg: vec-syscfg.o rdvl.o > vlset: vlset.o > > diff --git a/tools/testing/selftests/arm64/fp/ssve-stress b/tools/testing/selftests/arm64/fp/ssve-stress > new file mode 100644 > index 000000000000..e2bd2cc184ad > --- /dev/null > +++ b/tools/testing/selftests/arm64/fp/ssve-stress > @@ -0,0 +1,59 @@ > +#!/bin/bash > +# SPDX-License-Identifier: GPL-2.0-only > +# Copyright (C) 2015-2019 ARM Limited. > +# Original author: Dave Martin > + > +set -ue > + > +NR_CPUS=`nproc` > + > +pids= > +logs= > + > +cleanup () { > + trap - INT TERM CHLD > + set +e > + > + if [ -n "$pids" ]; then > + kill $pids > + wait $pids > + pids= > + fi > + > + if [ -n "$logs" ]; then > + cat $logs > + rm $logs > + logs= > + fi > +} > + > +interrupt () { > + cleanup > + exit 0 > +} > + > +child_died () { > + cleanup > + exit 1 Is this a failure condition? > +} > + With the comments explained or addressed: Reviewed-by: Shuah Khan thanks, -- Shuah _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel