Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6664918iob; Wed, 11 May 2022 02:38:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyvS1COK3mLB6Sprm2rVcXa82ctGU+ETSfxFuVFeFqPm4GHDLMllZ8stlvCOytX6PHOw/W X-Received: by 2002:a05:6a00:a94:b0:4fd:c14b:21cb with SMTP id b20-20020a056a000a9400b004fdc14b21cbmr24223929pfl.53.1652261922841; Wed, 11 May 2022 02:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652261922; cv=none; d=google.com; s=arc-20160816; b=bCdcba55sxfX47wLJdvcF0dVfNKD95/IoXXVgV+AcPO8SWZIBTDeJhGZ5Qsg4lAMU9 siwNF0w0v1kmN98foM8yArw7YghMwbdgHhvNBJuFPdBo1NFYOynr/1zAYDzodT7DjJw2 twYcbVrbr/gLs1qESrM/b8eAPJxiBq3oY9AIxSzYc02IlqljAXXDy8dxEp3CZhovl25A Iuy9PzlJBuPXPSe0lw4M7TmzDmxD/oUlmGaHEEP9xe69EfzekHGyL80ge9j7F+EDZSSZ CrZsMXyokXIIHrc4WWBl4TfX+dTLHFwoNtT47yPPlAfMGv5HXWOJoCg75/2u9nwcjdk1 DOGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=vOP9ZS/vxkzOlI/l+cYdq2hR42ZqOFcbpjPtOsjjFaA=; b=iILR2ZEi+wMkOV5Mwlma2Ow5TEEJVOayGHohk1zWXq48csDigTqDS7gx2LhCpXL/31 Tx9VV60X2X5vJWkFX+//tap7kNJpdIn/is1/Mw8aiIu9p+90AJEHKHpKRHJMhC7tlZYn 2NeRV7HIir5HfIN4QPr3v2sIVQp+8fKNH1s78yPiaB8qD14E9BhzzKFRxAw1jG9lgnyZ 0amjq7xMvxYg5X61HLWmQi5Op/a5frIVouI4OWwcYGZD7lgPM99ecmQj7PoMhWGA3LE1 HLPdYgzd6uWF3cic1FB/ip+Ob6Uv1OVs06snFihpUFGUelHqxHrU7E5UunlcB9fyJfKD vGNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="f/GBF7F+"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q187-20020a632ac4000000b003c6bf875c80si2242864pgq.679.2022.05.11.02.38.29; Wed, 11 May 2022 02:38:42 -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=@sifive.com header.s=google header.b="f/GBF7F+"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243927AbiEKIc1 (ORCPT + 99 others); Wed, 11 May 2022 04:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243815AbiEKIbq (ORCPT ); Wed, 11 May 2022 04:31:46 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 597A13525C for ; Wed, 11 May 2022 01:31:36 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d22so1183588plr.9 for ; Wed, 11 May 2022 01:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:in-reply-to :references; bh=vOP9ZS/vxkzOlI/l+cYdq2hR42ZqOFcbpjPtOsjjFaA=; b=f/GBF7F+MFK3EAYxoYQRrccahir05NtthLiHYzXGNTNWj3phkyDZ2fKkhIvoEhMKex GFha3bwBcWHrhhkSK7v/OBVw7NoZItkcqrRCD7K8PUQDf897gbKw8a7aaNpYm/HzIUt5 ug3QcVV4xJ7gZw71SUTKUsLxKtD0rHn9SG7HJxEEtqm2ZpVQLdsDqma4TVsMEiIVrEo8 E19T2gxzZrFQcfhx+qYSHH4PgZ8VhbFqiISaXwOJe2jUnp+qcTS+zwMcOjFMYGOPEU11 mQEaVkOo5xqgqVDA9l5sPh1NpI7Cwv84vnYKUr0jICaWf9sQ3/Jj2f6ToVVjM7cwMKmH pIWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=vOP9ZS/vxkzOlI/l+cYdq2hR42ZqOFcbpjPtOsjjFaA=; b=QvWtBG5bJ5/+0yz2pLx2qBZeskBzzl3mDv5droLCzW47NeHhi4bj+APgjIB+NSScPF O2KsU+iMKwmez6/W1Pa4UZ7bViJ9iaWa6EtvyQWaz7tLSS2rfg+dqZ1SwbFnBp1+gVVB V1V17zCCh4fNZEfQa4hHL8gnYF4W3nRvOOuEasSTgFb4FPEQymYFxYtowKvBvYH6vlvg +moOWHa8LiRSPBzzV3KUNelRbFRTc0sJ+OiakNqDvMyUW3eZNRd8mSbgjMevZsigPTm4 393TiEmXXfNG2ljEVG99Kc7qLs/LcLhz29FnrDU4OJJxc27oFmp7OeUNqglRePr3M53U YYsA== X-Gm-Message-State: AOAM532ccUhacpJIjeTi0AI3CTH/FWa9X8BE4WnwcXVxg0g8xJ84XCpp 5mxY97d86xOi6jt6rFnZOw7+TQ== X-Received: by 2002:a17:902:b48f:b0:15e:da68:8f12 with SMTP id y15-20020a170902b48f00b0015eda688f12mr24076205plr.27.1652257895794; Wed, 11 May 2022 01:31:35 -0700 (PDT) Received: from localhost.localdomain (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id m10-20020aa7900a000000b0050dc7628170sm1020202pfo.74.2022.05.11.01.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 01:31:35 -0700 (PDT) From: Greentime Hu To: palmer@dabbelt.com, paul.walmsley@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu Subject: [PATCH v10 04/16] riscv: Add vector feature to compile Date: Wed, 11 May 2022 08:31:14 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: Guo Ren This patch adds a new config option which could enable assembler's vector feature. Signed-off-by: Guo Ren Co-developed-by: Greentime Hu Signed-off-by: Greentime Hu --- arch/riscv/Kconfig | 10 ++++++++++ arch/riscv/Makefile | 1 + 2 files changed, 11 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 00fd9c548f26..f54f37cc746b 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -343,6 +343,16 @@ config FPU If you don't know what to do here, say Y. +config VECTOR + bool "VECTOR support" + depends on GCC_VERSION >= 120000 || CLANG_VERSION >= 130000 + default n + help + Say N here if you want to disable all vector related procedure + in the kernel. + + If you don't know what to do here, say Y. + endmenu menu "Kernel features" diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 7d81102cffd4..1f19bdac6767 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -50,6 +50,7 @@ riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c +riscv-march-$(CONFIG_VECTOR) := $(riscv-march-y)v # Newer binutils versions default to ISA spec version 20191213 which moves some # instructions from the I extension to the Zicsr and Zifencei extensions. -- 2.17.1