Message ID | 20220419112247.711548-23-broonie@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | d45d7ff7047f7f6c3221b0f028fade640812f931 |
Headers | show
Return-Path: <linux-kselftest-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3B5BC433F5 for <linux-kselftest@archiver.kernel.org>; Tue, 19 Apr 2022 11:25:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349965AbiDSL2Q (ORCPT <rfc822;linux-kselftest@archiver.kernel.org>); Tue, 19 Apr 2022 07:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351353AbiDSL1m (ORCPT <rfc822;linux-kselftest@vger.kernel.org>); Tue, 19 Apr 2022 07:27:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9240712ABE for <linux-kselftest@vger.kernel.org>; Tue, 19 Apr 2022 04:25:00 -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 ams.source.kernel.org (Postfix) with ESMTPS id 44592B81846 for <linux-kselftest@vger.kernel.org>; Tue, 19 Apr 2022 11:24:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59E9FC385A5; Tue, 19 Apr 2022 11:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650367497; bh=hKEqxVq3qIYNyJ3Q5Mx9hTOo2XjAx/mVC4NFmLZ1diw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OtdXNzNGNqIEpXHSfEQAcoqLQA0OwnOcKDqUUOsEK30/CwM/vmZM55bFDdRdVgate FIqnXzaLYHO6Uh/guVYztKPCO4PoqTKx2JhLdMpBbS6Z1tLMM0hbc3QuItEsnaseMe idZi3Dogm7SVDh0YiZO3vJoAm/SXLVXOmusumws0EHuPEYhE4R4sMl4b/iGu8eAo5P MJs8hrCwE4uSP4+NNdguB3ju4hmOmvFdK+gTlOqPq//zvOFbIFS0wxW/GmN+CXD7Vz shVizrxaqmq6xGDR0qxFzz78MiqeGSTYCUEE+jaE6SaR0mBG7h5gF5iCU4zwMAeIfA ultWbR4Ehl4tg== From: Mark Brown <broonie@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Shuah Khan <skhan@linuxfoundation.org>, Shuah Khan <shuah@kernel.org> Cc: Alan Hayward <alan.hayward@arm.com>, Luis Machado <luis.machado@arm.com>, Salil Akerkar <Salil.Akerkar@arm.com>, Basant Kumar Dwivedi <Basant.KumarDwivedi@arm.com>, Szabolcs Nagy <szabolcs.nagy@arm.com>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Luca Salabrino <luca.scalabrino@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Mark Brown <broonie@kernel.org> Subject: [PATCH v14 22/39] arm64/sme: Disable streaming mode and ZA when flushing CPU state Date: Tue, 19 Apr 2022 12:22:30 +0100 Message-Id: <20220419112247.711548-23-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220419112247.711548-1-broonie@kernel.org> References: <20220419112247.711548-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1184; h=from:subject; bh=hKEqxVq3qIYNyJ3Q5Mx9hTOo2XjAx/mVC4NFmLZ1diw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiXpt5bayPRAObOqjq+ZBzKh1FKgvLLGsBQ3TgiJDo PC1NiqOJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYl6beQAKCRAk1otyXVSH0HsjB/ 99t6AWS0KoiDaWwA1DqLBTFqSSLoaO0NK6a/uwv+HSzr8GMop4VZ4Jx+wxMhIFhR3ZQTNnGhdadvR+ 33Ozd+ypw9AO57hbRuNZX1/Vt9Au6jm3irZzve/q5nrjy86I4wnyl114GsOwjTUaB+g2Zn2tSPoDLo 2YuS73oV0vFDm3aTswWCgxcF+SA10fDBiIotXrR8ADPZA2DotX58GxC19jFaNdhHC7qLzbNw+biCAu RiUjOMub4MO3jeWg+ooKKn6TWhVv8tg5k7G5GlwDpO1sVhoErSG6LXOq7ZR/90i/ZVPSZCewptyPfy Xl3RcId+7mqhbe5HN2xu31t7cvmNnF X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org |
Series |
arm64/sme: Initial support for the Scalable Matrix Extension
|
expand
|
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 94f06e9d37cf..9592cdd7d635 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -1759,6 +1759,15 @@ static void fpsimd_flush_cpu_state(void) { WARN_ON(!system_supports_fpsimd()); __this_cpu_write(fpsimd_last_state.st, NULL); + + /* + * Leaving streaming mode enabled will cause issues for any kernel + * NEON and leaving streaming mode or ZA enabled may increase power + * consumption. + */ + if (system_supports_sme()) + sme_smstop(); + set_thread_flag(TIF_FOREIGN_FPSTATE); }