Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3273295rwb; Mon, 15 Aug 2022 22:57:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ePE4g8kOFrszIe1zMQ2P/ENOPP50HWxOPM2ZAGXiOzcohgswh3ahUJJgIKxPeRKBDHhqu X-Received: by 2002:a17:907:2722:b0:731:2aeb:7942 with SMTP id d2-20020a170907272200b007312aeb7942mr12218768ejl.734.1660629439188; Mon, 15 Aug 2022 22:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660629439; cv=none; d=google.com; s=arc-20160816; b=gKDF+/p4TAoyLTq3SpJ+E5LsTxoNk1qPbZu6yEuSSWYNjgkyEc3XMkmv9J2qfm9qeb jL2b/fJ2m7VApezcN84Mam9QQamHzmjtt6LYIfjKl2c19Z4CKvj8vmAzEc6gibdG3R5V OweXyrv1VbyqhjZK8q7TeMI4fwN0vJ1nkn62xxOCvel+m99rfA+urydGJCbFfoND+eaT wspM1TepxxmbrejPeOXEd8p9C9JiYCt5nTFfXPEiQ1F9jfLURbqwR1cqRCkEJv86VxJF ez/sdIdJshVHaF1hOIBq4ijHAWIH41si3dbXziSW3DX3HHvkTDiLSjPGFd3xc6YeSmw4 he6Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IPYUAy6DNAYri+3u9ShQTJJi7SJYrkLBx28Cxmpebis=; b=mKstihefqWLItyU89WUw0VTzHuaEJB8gGsvntqhLxGq4NHwgsf/iDKzSZOKgf19tbS DprIpWQ/wtCnOBJfgRS8AC20lHLySs8HEJ4qFaTHwz6FentOwcy8tQV8Z87bAJb1//Gs 2uCP4ehZ2JBjDE42grcA/V5vGNsVXBvY2rFAK6FCu03PbUQKekPslu5a1ozpL8MA2MmR 1I1YJuFOskbKOlXJO/6JE+LOLV/RTo3aDQ/BqWKsg65Q8Eama20TBCN5hHySsH/XjcA3 toet63necj9iG3RxNYLZZF2HwDG1CB/OSAh5SgjI6+AoQG+ts378k5bbhq2MHWQAncEz +utg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OvPMB9NY; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a170906495900b007311135dc53si7846642ejt.809.2022.08.15.22.56.53; Mon, 15 Aug 2022 22:57:19 -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=@linuxfoundation.org header.s=korg header.b=OvPMB9NY; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233238AbiHPEur (ORCPT + 99 others); Tue, 16 Aug 2022 00:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232228AbiHPEqu (ORCPT ); Tue, 16 Aug 2022 00:46:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2AFBAF0FB; Mon, 15 Aug 2022 13:43:09 -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 721F560F60; Mon, 15 Aug 2022 20:43:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6350DC433D6; Mon, 15 Aug 2022 20:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596188; bh=XxnMfiIn8ZZYp5o420FI+PUdTBG8lET6FLr1Ryvn9bQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OvPMB9NYNFuxM3riZcDbq67DWN/Gfe99l/xsNJFVkrgriB5MYTSZiOlOwDuL5NBxE KaL/iTHCXIGeMOSUqGgl46IjI6OqXhKmgVWfYKLxWFy+mifGyphkwTb7DfJCRqK5N7 mRN2z8Ekm6mU/D+EZ2ht3GfUmpZNnoX6ACN+QWiE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rashmica Gupta , Michael Ellerman , Sasha Levin Subject: [PATCH 5.19 1000/1157] selftests/powerpc: Fix matrix multiply assist test Date: Mon, 15 Aug 2022 20:05:56 +0200 Message-Id: <20220815180519.784939569@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 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: Rashmica Gupta [ Upstream commit cd1e64935f79e31d666172c52c951ca97152b783 ] The ISA states: "when ACC[i] contains defined data, the contents of VSRs 4×i to 4×i+3 are undefined until either a VSX Move From ACC instruction is used to copy the contents of ACC[i] to VSRs 4×i to 4×i+3 or some other instruction directly writes to one of these VSRs." We aren't doing this. This test only works on Power10 because the hardware implementation happens to map ACC0 to VSRs 0-3, but will fail on any other implementation that doesn't do this. So add xxmfacc between writing to the accumulator and accessing the VSRs. Fixes: 3527e1ab9a79 ("selftests/powerpc: Add matrix multiply assist (MMA) test") Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220617043935.428083-1-rashmica@linux.ibm.com Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/math/mma.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/powerpc/math/mma.S b/tools/testing/selftests/powerpc/math/mma.S index 8528c9849565..61cc88b1b26b 100644 --- a/tools/testing/selftests/powerpc/math/mma.S +++ b/tools/testing/selftests/powerpc/math/mma.S @@ -20,6 +20,9 @@ test_mma: /* xvi16ger2s */ .long 0xec042958 + /* Deprime the accumulator - xxmfacc 0 */ + .long 0x7c000162 + /* Store result in image passed in r5 */ stxvw4x 0,0,5 addi 5,5,16 -- 2.35.1