From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1037BC4345F for ; Fri, 12 Apr 2024 21:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jc8cYqHtvMPlg6Z7OSFF9SStDKNFyrhucReoQVjg858=; b=SQ8aCEBj6OMEdi qOI87iHO1qd5Hp05UuFeQIhQTm+fcBPfDRd+rgx9txGWQcoICB8tMGQ02nN4CtG3gulph3CazjmA5 Rac41A4GX1KjPgBv4s1Pl1lenY/9NloHG4GrPX8pVa1DLgt1PmnTt7KJbA0jwpARoJs2rza33j78a 7+LiHhnmJGdjOfqw8juo3nXyrfemINMqOjK7Tpj7BTT75HPMxSQPygn5Zsr4CPxW75JFzwD6Wd5mU zpeleEBFI9G0v84/4vkxtzyvo0mySx7uEFUsULpBm8m8VQRZeU4zyC6PoSD9R+nXCDAsrfc0KeKMZ /yPX5lZ+90SJw4ZMJA2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvO3x-00000001JBQ-2DJR; Fri, 12 Apr 2024 21:03:57 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvO3v-00000001JAb-0TVq for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 21:03:56 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5d3907ff128so1024258a12.3 for ; Fri, 12 Apr 2024 14:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712955833; x=1713560633; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aSqmAxropEDfNCG6GQv7daH4xVtfVuXJw9jJz7os0WU=; b=cCMjfg7DFBHjRHWNJhJStfoj12yaes7LdxBnypoMzbSlLgAhzyP1i3CfU72N+Nr9jk fPXGzkztFuVXAPjDmh3WVqwRz4QPbqmbEMamYSyiHrggSTK6YM0O7AFvzLyUYci02s3o zB/wvwOpGRn7XplIeh9wI2JiBeWD6tRmxCZwsNkfKsOJUper0JfIDxp/QGS3Iceh6O3I 8ieRRd0h+BsGaZVrtrd32VKXwOq8FLYQUb3htVgVuEFbKZb06AlYtYrCXDQBL4+lkS5L 8REkmInu5qL5/Cw4jfyTqAdXJkeGzUd666CDQNNDJsF1/MYA8ABVYsxUCwcYNkMTtzzA QYTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712955833; x=1713560633; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aSqmAxropEDfNCG6GQv7daH4xVtfVuXJw9jJz7os0WU=; b=roHOW+LJAcfWc6l1UjmT4xydd7+JngLJJgMjPXpEiQSCarEghxbpPYFEZqPaetEkqg 4yZq3MnHJj/SvJGKC1+kRcopZNDBn+mgFR8QXuX5812O4CW38dQopO01J8/OpBxLzP9O EbSBMtfAstWAjHHjMZsJbaFktaPoNkIzC1OVNkv7sBrje++VpwqPq0hPhj0p/FPuJslU KeqIQXUcEg3jYrOA7ojoTQS43aEbf69uHrt523Ud/Ydi1zTNH7DUuOv2j/6DO9yXvThY cVQB6zNRwEs2I1T+nTwA+1vRFM6Ai1ZmdnuUVKFjiQ8EUp1Wbxx++l/VPjmwUm/u31uz cUoQ== X-Forwarded-Encrypted: i=1; AJvYcCVmQ3JVeMnC/DzXTFiZ1Mr7R5GAqbmU+fUjyw1aVky54hFSkIUnhwyQShNUKbWwMdFGMomccJ4YfP843fVlFVVSKfHxzgD0ZwiDnogggKG+Y47nhwU= X-Gm-Message-State: AOJu0Yw7me7TkGaDCnNo7nw939uM4tjDrf7F7syyDOXRqWvD0Vaab1l4 cILI0VNNE6jC4cnaVYrKYZVxepzDWbSeoj8shLagtz1HpTVg6fon+HkpA73NYbY= X-Google-Smtp-Source: AGHT+IEOtfsrGOvmFZobDx+oZIyIEnB1hXJRroDDmgDp9zSXNOuvWX12AXzBQuPGec6sDnDDhBi5CQ== X-Received: by 2002:a17:902:e5c6:b0:1e2:adce:9139 with SMTP id u6-20020a170902e5c600b001e2adce9139mr5386874plf.44.1712955833353; Fri, 12 Apr 2024 14:03:53 -0700 (PDT) Received: from ghost ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id f18-20020a170902ce9200b001e511acfd0esm3424844plg.140.2024.04.12.14.03.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 14:03:52 -0700 (PDT) Date: Fri, 12 Apr 2024 14:03:48 -0700 From: Charlie Jenkins To: Conor Dooley Cc: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Jonathan Corbet , Shuah Khan , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 08/19] riscv: Introduce vendor variants of extension helpers Message-ID: References: <20240411-dev-charlie-support_thead_vector_6_9-v1-0-4af9815ec746@rivosinc.com> <20240411-dev-charlie-support_thead_vector_6_9-v1-8-4af9815ec746@rivosinc.com> <20240412-dwarf-shower-5a7300fcd283@wendy> <20240412-drab-french-55d8ff2c8cfa@spud> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240412-drab-french-55d8ff2c8cfa@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_140355_254134_537DF5C2 X-CRM114-Status: GOOD ( 32.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 12, 2024 at 09:40:03PM +0100, Conor Dooley wrote: > On Fri, Apr 12, 2024 at 10:43:02AM -0700, Charlie Jenkins wrote: > > On Fri, Apr 12, 2024 at 12:49:57PM +0100, Conor Dooley wrote: > > > On Thu, Apr 11, 2024 at 09:11:14PM -0700, Charlie Jenkins wrote: > > > > Create vendor variants of the existing extension helpers. If the > > > > existing functions were instead modified to support vendor extensions, a > > > > branch based on the ext value being greater than > > > > RISCV_ISA_VENDOR_EXT_BASE would have to be introduced. This additional > > > > branch would have an unnecessary performance impact. > > > > > > > > Signed-off-by: Charlie Jenkins > > > > > > I've not looked at the "main" patch in the series that adds all of the > > > probing and structures for representing this info yet beyond a cursory > > > glance, but it feels like we're duplicating a bunch of infrastructure > > > here before it is necessary. The IDs are all internal to Linux, so I'd > > > rather we kept everything in the same structure until we have more than > > > a handful of vendor extensions. With this patch (and the theadpmu stuff) > > > we will have three vendor extensions which feels like a drop in the > > > bucket compared to the standard ones. > > > > It is not duplicating infrastructure. If we merge this into the existing > > infrastructure, we would be littering if (ext > RISCV_ISA_VENDOR_EXT_BASE) > > in __riscv_isa_extension_available. This is particularily important > > exactly because we have so few vendor extensions currently so this check > > would be irrelevant in the vast majority of cases. > > That's only because of your implementation. The existing vendor extension > works fine without this littering. That's another thing actually, you > forgot to convert over the user we already have :) Oh right, I will convert them over. The fundemental goal of this patch is to allow a way for vendors to support their own extensions without needing to populate riscv_isa_ext. This is to create separation between vendors so they do not impact each other. xlinuxenvcfg does not fit into this scheme however. This scheme assumes that a hart cannot have multiple vendors which that extension breaks. xlinuxenvcfg is really filling a hole in the standard isa that is applicible to all vendors and does not appear in the device tree so it is okay for that to live outside this scheme. > > > It is also unecessary to push off the refactoring until we have some > > "sufficient" amount of vendor extensions to deem changing the > > infrastructure when I already have the patch available here. This does > > not introduce any extra overhead to existing functions and will be able > > to support vendors into the future. > > Yeah, maybe that's true but this was my gut reaction before reading the > other patch in detail (which I've still yet to do). - Charlie _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel