Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1822366lqp; Mon, 15 Apr 2024 20:34:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCd34w5g/dM2OfymF4aTL03cMx3LZ7Rjhf7rqJA3F/Spi7JLarJf0f05zyVILFtHRHdUXycTFlIutcUoMor11zeKvlQC3L8PGX55yZXw== X-Google-Smtp-Source: AGHT+IGsfcX/YHXZB311Eb9WKiMC0Gk+82NKbjPSUufl3sytjR3uBHO+Fg8kZWljgv/5GOEDy3O/ X-Received: by 2002:a17:906:d938:b0:a55:a04:6fbc with SMTP id rn24-20020a170906d93800b00a550a046fbcmr1722486ejb.23.1713238460630; Mon, 15 Apr 2024 20:34:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713238460; cv=pass; d=google.com; s=arc-20160816; b=TH81XAd2ypcTxPKc7xo6SWTYZa8MH4DMyPV9xiSXYDWDGZWb3xVCx2LZHKxsjQ08OL NupF78neDkWkMdpVAtafIE2duCZFwfLrBz7zRjZkB0RQEYrAqEjTz6MVNJLwpewbIWhc 0bCBesR31r7ay+Xd/na6+9uWrA0RH/z/2cIGGS6YmpVMPG00OaJed+gluKTrWOVbYGBZ biLJuNKud+MprsC1PfmVeixi/epooW2xS0YvVcUaOpTzhovq0DWnqpTqD+SaWGJacAW7 akPJTFOsCLKk2BwmxBrNHdevGw4o4/9ZtkTHzN+RdSoLPAm2W2XOFP8tKztr4KlXoXsB pP7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+EWmrrioxcbdhmgLzVDWs0ZmfxosK3ySncICyoT9RVM=; fh=EGK3K852i2DaWpYINzZnZ/xJh30nMzKRjscvKjfOtlM=; b=jonkGhza4OMvY/UoP4bFCDqfMQE8TgR6p4vcX74gUL2k6ySTpFckpdVbRQUnKQRtxU OYxxyqLy+oPix6so5SJwbMydhn4OdgpVch3uI5jY3FiK7rDOluEGTfz4ErRtsR34ghB/ mWJysKeUVuO3kDckku2OZEkiWAyw4+w2FKrUS9CgsLNcQr+wTxhwpyW29BURiYhAwg4G q+s2e1fv7Z3B0fgxG+mCjqjbnDEqAO3wpZr90cROFG0vnACuSeyLNirn92bM1VGGkFXd KXGIJ1GC10QDLHqheBmNBnOzMwpyjMl4NvEztWQWCNs7wsvCEOSAArYSDTN8xbzWmwa5 EVoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=htLgbxQE; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-146178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146178-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 22-20020a170906311600b00a5196a0156dsi5060486ejx.50.2024.04.15.20.34.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 20:34:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=htLgbxQE; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-146178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146178-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2DFBC1F21626 for ; Tue, 16 Apr 2024 03:34:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D7311BF3F; Tue, 16 Apr 2024 03:34:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="htLgbxQE" Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40BB417BA6 for ; Tue, 16 Apr 2024 03:34:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713238451; cv=none; b=gTNamdpHTqnZMTFZOcD+ysadcgTI7pfzLy1ruXpSrMId/0cPdKDRI+tBLUDxrTw2QM7ncxLl44kpMiM2xmoRUF0te7Uo+gMoCJ/myWvuuNhqhodzybzXUnges87jXBgBNzboJS5lU4aelRwF/KITP/Ke0JRLeSsG5XG5128xJrs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713238451; c=relaxed/simple; bh=U4TMxR4A/cSP9bRdDsci+dqTH02fWMDh5jtAouNaMFU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gnZBTA9JCu7tqaNAuneAVkh0QZMGSc0WphyMOSq0tKtE2f8cx8zD3L3v2Q0bMwECSVZedRpWsJ5K/PVlmi1GE5yczMZQtbIhW7Uwhe8KCYiOnKRYUwq70LTrRp8UynC3oF4TV6ve2rW819nOABVfwz9tdGy8NN9EFkLBhFEsuKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=htLgbxQE; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-5d8ddbac4fbso2709180a12.0 for ; Mon, 15 Apr 2024 20:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713238448; x=1713843248; darn=vger.kernel.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=+EWmrrioxcbdhmgLzVDWs0ZmfxosK3ySncICyoT9RVM=; b=htLgbxQEGIF+TfNKXCNC61imbGXjMWrsnpqFXoc0RmXScZflNlbDW+RjW1F1bGTMW9 /r0lyu5QA2OU0DVVvl5WcigJGOg1ggDx7isXPh+VLRILNuPy0EcfZpLRykAwXMJsd7bb Kfpvm59iIAExUQUR6kl6PyEWfsAW77sD5dsb5YjhFoHKtRcT9uGrifAXO/zebh4HUTqA 9vkE9tRsWXXhj/3+jVmizMSUMPls6Rcp3l5ZVkJkFGHLOZuOPJzyIQYRbyUHMpSllJiR k+GDUo5WjyiYJIEasnnVAFLN3MBWZy+lA3WHikQkk6qZsKKsym7OroMHW1Joe7G5hTAn 2JVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713238448; x=1713843248; 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=+EWmrrioxcbdhmgLzVDWs0ZmfxosK3ySncICyoT9RVM=; b=g6Wazg+c5su5h7V5dB6TMlqnBjs5xmCGx7a5pGSxfDKIJ2RWWAhNv9dhW8mfCFEKPI 8gsZslgGISfSfVgMeyxG/A+nYzv6s4vbUKwmgZ24Sjkjdx4JvwIFfOcnRK7PESziosbJ QsQRhfSBdDIGzRUA0hdIReSjAj4NbpZCZ+WGIUaN/1OYwZDZ6aipfD+YFwF7SDqki2YQ n/hdwRvYca+PbwkbEPoyZ/qTDY1I0K+4TsWupMAdiElQSvj5PfOOL1gxliMRmniCsRQJ 3PbuBuYXgubc1gRXvFxbGbJ9dpH1nBhPepEzkmVpoI6htSXSh1r5Lqpps60SL/ChYvaW EH8g== X-Forwarded-Encrypted: i=1; AJvYcCU2UYkE6N54tUmIXW/7jGp+P+FG9GeW8nKuFef6tlv6upebXtak43VlU93d3q/pQV1cX6W9bnnCH4N1nvFtneaqsWwewqQ3jSIddbzw X-Gm-Message-State: AOJu0YwBmSGCrk3RufDsXkUiAcOjWSU8HvDg8lW9WOtiZAPDCv0/0wXL huu5rMF0Z0EfxeUTmAB3ibxrmIqYFxJfsDtFXGosmM7KIna/V8dZxRrb9z9oTng= X-Received: by 2002:a05:6a21:8889:b0:1a5:bc5d:3c0a with SMTP id tb9-20020a056a21888900b001a5bc5d3c0amr15476979pzc.61.1713238448517; Mon, 15 Apr 2024 20:34:08 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:fd:b04f:bfdd:b666]) by smtp.gmail.com with ESMTPSA id i15-20020a170902c94f00b001e25da6f2f2sm8653509pla.68.2024.04.15.20.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 20:34:08 -0700 (PDT) Date: Mon, 15 Apr 2024 20:34:05 -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 02/19] riscv: cpufeature: Fix thead vector hwcap removal 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-2-4af9815ec746@rivosinc.com> <20240412-tuesday-resident-d9d07e75463c@wendy> <20240412-eastcoast-disparity-9c9e7d178df5@spud> <20240412-chemist-haunt-0a30a8f280ca@spud> <20240413-sharper-unlivable-5a65660b19e2@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240413-sharper-unlivable-5a65660b19e2@spud> On Sat, Apr 13, 2024 at 12:40:26AM +0100, Conor Dooley wrote: > On Fri, Apr 12, 2024 at 02:31:42PM -0700, Charlie Jenkins wrote: > > On Fri, Apr 12, 2024 at 10:27:47PM +0100, Conor Dooley wrote: > > > On Fri, Apr 12, 2024 at 01:48:46PM -0700, Charlie Jenkins wrote: > > > > On Fri, Apr 12, 2024 at 07:47:48PM +0100, Conor Dooley wrote: > > > > > On Fri, Apr 12, 2024 at 10:12:20AM -0700, Charlie Jenkins wrote: > > > > > > > This is already falling back on the boot CPU, but that is not a solution > > > > > > that scales. Even though all systems currently have homogenous > > > > > > marchid/mvendorid I am hesitant to assert that all systems are > > > > > > homogenous without providing an option to override this. > > > > > > > > > > There are already is an option. Use the non-deprecated property in your > > > > > new system for describing what extesions you support. We don't need to > > > > > add any more properties (for now at least). > > > > > > > > The issue is that it is not possible to know which vendor extensions are > > > > associated with a vendor. That requires a global namespace where each > > > > extension can be looked up in a table. I have opted to have a > > > > vendor-specific namespace so that vendors don't have to worry about > > > > stepping on other vendor's toes (or the other way around). In order to > > > > support that, the vendorid of the hart needs to be known prior. > > > > > > Nah, I think you're mixing up something like hwprobe and having > > > namespaces there with needing namespacing on the devicetree probing side > > > too. You don't need any vendor namespacing, it's perfectly fine (IMO) > > > for a vendor to implement someone else's extension and I think we should > > > allow probing any vendors extension on any CPU. > > > > I am not mixing it up. Sure a vendor can implement somebody else's > > extension, they just need to add it to their namespace too. > > I didn't mean that you were mixing up how your implementation worked, my > point was that you're mixing up the hwprobe stuff which may need > namespacing for $a{b,p}i_reason and probing from DT which does not. > I don't think that the kernel should need to be changed at all if > someone shows up and implements another vendor's extension - we already > have far too many kernel changes required to display support for > extensions and I don't welcome potential for more. Yes I understand where you are coming from. We do not want it to require very many changes to add an extension. With this framework, there are the same number of changes to add a vendor extension as there is to add a standard extension. There is the upfront cost of creating the struct for the first vendor extension from a vendor, but after that the extension only needs to be added to the associated vendor's file (I am extracting this out to a vendor file in the next version). This is also a very easy task since the fields from a different vendor can be copied and adapted. > > Another thing I just thought of was systems where the SoC vendor > implements some extension that gets communicated in the ISA string but > is not the vendor in mvendorid in their various CPUs. I wouldn't want to > see several different entries in structs (or several different hwprobe > keys, but that's another story) for this situation because you're only > allowing probing what's in the struct matching the vendorid. Since the isa string is a per-hart field, the vendor associated with the hart will be used. - Charlie