Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7576084rwb; Tue, 15 Nov 2022 14:35:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf63GiYYabYJ1UEUoUfLc01hOVQXiXQ2PUUv+fA6yfbgY5gbbYcgRqtLqFVL8puXdRDnWemx X-Received: by 2002:a17:907:cc83:b0:7a9:8d8e:c3df with SMTP id up3-20020a170907cc8300b007a98d8ec3dfmr15600307ejc.519.1668551746290; Tue, 15 Nov 2022 14:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668551746; cv=none; d=google.com; s=arc-20160816; b=R5zse5ouO2WQ5kzemnJ67rl/6KPWKgrALxSg7BlTOA8hAVLt02kxl+i2YXw3OrSW7g 3b5YBIu5amG7lObf8z8uBvo1Hze3HNBjPccz4/11ME5Pkek4tVrcqygNcUVP9s/RRK03 6jeCClDoFzkPWSi9qUvSNVlfdBTBtiOd2FphIs5thUsQuOSmb3ma4bQYTVBv2e35c3YD ZlnsPIP/T4LkneeXdcaMjC300Tyv9R6T6DiQZf4Y/6C/iW56znXKszFYc5afGtO80KZM 2Zy/pZOX61uJ1DnzUZrOl+XhOt2yKf3MsGZtNodmslJRl3dsHGfzxRmSorhvhaI41ZfL N7IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F0qLbXM0Yzy4lB/+DTygFoR5Otmj+3hQe57dVh+QgMA=; b=cVuxPcR0+VMWDeYUE9y0LGzmYM6Gkp7lThp8B6yaxk4nXsCOs0yl6vWwPhC6IbQUSA Bnbr4CyLj7TUbT+oQx6KzXW1aJgaP8t4/01h9fvnYF6Pj7HrK4uptYpQ5LNSe8aAJJOh +MWiKcKNDZtxikb08Rjx85cDspZHUDblHA3hpGdojJmCuBWDAsqyzK4J8q/rUCaPuigP SJ5DPHpW2Bh7UwuGgEZT1aglLm8zXXWDJxQksnpuT/tXaBvMAMuuBE2y7ddzDIhvK2ZY f5vSF8pgBNEmTzN0uQ3UsdGKPCVmuRw7lIRWKpOes6rnF24BQEgkNblmq9OJtqUQ9u4J PMDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pEMH4orD; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd8-20020a1709069b8800b0078bec673145si8539670ejc.519.2022.11.15.14.35.25; Tue, 15 Nov 2022 14:35:46 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=pEMH4orD; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbiKOWRl (ORCPT + 90 others); Tue, 15 Nov 2022 17:17:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbiKOWRf (ORCPT ); Tue, 15 Nov 2022 17:17:35 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C12271F for ; Tue, 15 Nov 2022 14:17:33 -0800 (PST) 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 8632E61522 for ; Tue, 15 Nov 2022 22:17:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D82BC433C1; Tue, 15 Nov 2022 22:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668550652; bh=0hu7rKCEN7EFEfQlBLLzIaScplCM3c5RZS+5NSeqKAY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pEMH4orDzHDiNvbLvQQI0vvUFneS7XXW+lBWsmjjvGTxHw7FthyZ8ACBRJ9ZAafEp 8fXBRcxEjfmu/ZkqgZg6FjJqrL461SNq4SN3KBAlqcrAxI+0UWreMhHdkCZBExDDyg bt9Rofs8zCs3WqEiSDNYCoWQhf9AFb/TpwOIzVmS3LIIViZnio42Z3WQGN2cBNDTV0 o6HWlJ5MmUZ2EQNX1RARcN2M2ronhI1W5ZfCeBYJXiVcR66EwfjDmoWFPtm7daUw3F RoNmU+0HUjSop/wTxPsuJalBuPFAhczLY0W7/1QgXxXRhgSwZ/N/XOwEhZt/0fCxQC xpsduM0buvSrg== Date: Tue, 15 Nov 2022 22:17:27 +0000 From: Conor Dooley To: Vineet Gupta Cc: Conor.Dooley@microchip.com, bjorn@kernel.org, stillson@rivosinc.com, greentime.hu@sifive.com, guoren@linux.alibaba.com, vincent.chen@sifive.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, guoren@kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, ajones@ventanamicro.com Subject: Re: [PATCH v12 04/17] riscv: Add vector feature to compile Message-ID: References: <20220921214439.1491510-1-stillson@rivosinc.com> <20220921214439.1491510-4-stillson@rivosinc.com> <87zgd2d6j1.fsf@all.your.base.are.belong.to.us> <98343aa8-b04d-fe58-8af8-4eeca03106d1@microchip.com> <9cda597c-1d31-4b8b-99ba-deab58975976@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9cda597c-1d31-4b8b-99ba-deab58975976@rivosinc.com> 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 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 On Tue, Nov 15, 2022 at 09:38:53AM -0800, Vineet Gupta wrote: > On 11/13/22 08:16, Conor.Dooley@microchip.com wrote: > > > > +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 > > > "VECTOR" is not really consistent to how the other configs are named; > > > RISCV_ISA_V, RISCV_ISA_VECTOR, RISCV_VECTOR? > > It'd be RISCV_ISA_V to match the others single letter extentions, right? > > Yep. > > > The toolchain dependency check here also seems rather naive. > > Indeed. I can build the code just fine with gcc-11 (and gcc-12), although my > reworked patcheset doesn't include all the orig patches including the > in-kernel xor stuff. By naive here I meant that checking cc alone is probably not a sufficient check for whether the toolchain supports the extension. What about the assembler etc? With Zicbom and Zihintpause we ran into problems with mixed usage, eg binutils 2.35 + gcc 12. In his Zicboz series Drew has gone with insn definitions - but while that's okay for something small like Zicboz, do we want to do that for something with as many instructions as vector? The alternative is cc-option, but that feels a lot less clean than what Drew cooked up here: https://lore.kernel.org/linux-riscv/20221027130247.31634-1-ajones@ventanamicro.com/ I've not checked this because I am lazy, but I am also assuming that whoever put clang-13 in there picked it such that it doesn't require experimental extensions flags. Mostly just writing this to remind myself to check it at some point.