Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5983816rwr; Tue, 9 May 2023 08:43:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50X05ngt3sufJVTEDb3VAkoX1GJagMI4kHgh2DesU1ZAfn0NlwcmI7phLqrGDzIEGxJUjk X-Received: by 2002:a17:902:b907:b0:1ac:84dd:6d1f with SMTP id bf7-20020a170902b90700b001ac84dd6d1fmr5604617plb.1.1683647014430; Tue, 09 May 2023 08:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683647014; cv=none; d=google.com; s=arc-20160816; b=kBwWH26jqHVgnuIWKy7T574d2wyBI8QgqJ/NuoSrWnl/WtBk7z4tvvsqg4sRNAx725 psCphuDVsFbeLzun3/v4OY5RD2aZpM4a7eJL+LpUVXCZd2I9rjOagKKYDwCZMk+gm3ne RJbEgMYq2/8LvNzpfR2Ond9uX6s1DgwpsQb3RKOS92JHU0lr3IaawwiBx5m+HBnnKaQP 6/+k7PSU/y5ZkKE4PbI8kqwkjdI8lYtHJvnm4bGACwo0VD9ETQtUVkZa14SddbbZNWa6 c2JtrTDACLOPOinf28ZwiHWpp4RILsY5KmktqNFviuWueVSgqoq9DwIKWdwMO27bIUFv gJ4w== 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; bh=BPWqirbH4yEeDqRHBENwltrJbQNfMlmuvlJtUn9IcG4=; b=haoUzVtz/Bf+/4T6qKdVsriBGJuiLyf9df42Dz/lIq/JT8kQmM6yAt2ANAGPd/77uV MxrdWFKJRqfYW1/Np1/Zu0KvrWDqkxOT4KD6fDkNWIB/gr63QUsgVoAJ/d3Z+DP6MS1E FcOruOYPHaB4mMAS0GCgUtBLMVNrmrS+dUCj/hiKCOh60hG4gg87ZRI3kVzl0DFHUGiF HWwMlYnis2wPggLNmu2/feIixH1qMig4HA4DDqvP4Hbp3SleLcf6f5/6+iYicQi+mXhH RDrt+gY5jf8DAOMkr3mqbLoOghWCmZ+NLqgKt+Qur5HH1g3BMg7YBiGcVHHlf1ZPT94V S1uA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a170903230f00b001ac2e64ba12si1942268plh.0.2023.05.09.08.43.21; Tue, 09 May 2023 08:43:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235886AbjEIOYX (ORCPT + 99 others); Tue, 9 May 2023 10:24:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235869AbjEIOYV (ORCPT ); Tue, 9 May 2023 10:24:21 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E5A364EF2 for ; Tue, 9 May 2023 07:23:54 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5EF831063; Tue, 9 May 2023 07:24:30 -0700 (PDT) Received: from e126864.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D3BEA3F663; Tue, 9 May 2023 07:23:43 -0700 (PDT) From: Kristina Martsenko To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Mark Brown , Luis Machado , Vladimir Murzin , linux-kernel@vger.kernel.org Subject: [PATCH v2 10/11] arm64: mops: allow disabling MOPS from the kernel command line Date: Tue, 9 May 2023 15:22:34 +0100 Message-Id: <20230509142235.3284028-11-kristina.martsenko@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230509142235.3284028-1-kristina.martsenko@arm.com> References: <20230509142235.3284028-1-kristina.martsenko@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 Make it possible to disable the MOPS extension at runtime using the kernel command line. This can be useful for testing or working around hardware issues. For example it could be used to test new memory copy routines that do not use MOPS instructions (e.g. from Arm Optimized Routines). Reviewed-by: Catalin Marinas Signed-off-by: Kristina Martsenko --- Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/arm64/kernel/idreg-override.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 9e5bab29685f..e01fbfd78ae9 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -429,6 +429,9 @@ arm64.nosme [ARM64] Unconditionally disable Scalable Matrix Extension support + arm64.nomops [ARM64] Unconditionally disable Memory Copy and Memory + Set instructions support + ataflop= [HW,M68k] atarimouse= [HW,MOUSE] Atari Mouse diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c index 370ab84fd06e..8439248c21d3 100644 --- a/arch/arm64/kernel/idreg-override.c +++ b/arch/arm64/kernel/idreg-override.c @@ -123,6 +123,7 @@ static const struct ftr_set_desc isar2 __initconst = { .fields = { FIELD("gpa3", ID_AA64ISAR2_EL1_GPA3_SHIFT, NULL), FIELD("apa3", ID_AA64ISAR2_EL1_APA3_SHIFT, NULL), + FIELD("mops", ID_AA64ISAR2_EL1_MOPS_SHIFT, NULL), {} }, }; @@ -174,6 +175,7 @@ static const struct { "id_aa64isar1.gpi=0 id_aa64isar1.gpa=0 " "id_aa64isar1.api=0 id_aa64isar1.apa=0 " "id_aa64isar2.gpa3=0 id_aa64isar2.apa3=0" }, + { "arm64.nomops", "id_aa64isar2.mops=0" }, { "arm64.nomte", "id_aa64pfr1.mte=0" }, { "nokaslr", "kaslr.disabled=1" }, }; -- 2.25.1