From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 342DD2AF0A for ; Fri, 3 Jan 2025 00:31:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735864318; cv=none; b=E27EHs4D8WZ9rtrlNHzOOSjf11mDXZ7FlTrgwGWCDWBfCwgGzsbYimYMSbCMY7CDC/E4lJRPYuwO11rELBaG7/ZYfde2MopurPvaNqajLMVkn07Cva3utpKBlprpvYo9KFdHr2SlUWc7EdFY8MKEMaFA38qqmYm1GTIcShA0T9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735864318; c=relaxed/simple; bh=XWWz2gNSlHPW3qEftgjhocxHT9bVTFg20H6GyqzyFrE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NDgFZaV5ZyL9BcbI2zTNxKkJcuxbeO+eZLf9IrK/pO3ofQ02RpOgl61jBYepuvGnfZEcX+H/HPu8hc5nJRyHOS5HYAh+oJDKwiCyi0BrL7pxFJQdSQzkEqdlglU76aGgfsTyNUOwlh8w+4B+03BP4vGoDSLvQbw/hQJZdIe68CE= 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=owfoopI1; arc=none smtp.client-ip=209.85.216.52 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 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="owfoopI1" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2ef6c56032eso12138236a91.2 for ; Thu, 02 Jan 2025 16:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1735864315; x=1736469115; 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=p60ohEC0lcMDc5+vsoccSHrGFVlwexFhvL+evZT42iQ=; b=owfoopI1UKLvSk9zPEvjXWYAed8VqtVOjuuu82krPJiphoWQ8Xr5F/urfAfFS1Re/+ EhtkZVyPrIZMwBYTPZz3ktML7JRBZl961lVMYULXQDaFUJEn+CQeWLLUJv4HjZLr+iGV 6pOZaYFXyamuBtYawLQHWzL10XNOj7b1JWVfqWvPjrTVC6EcwEoVa/dnp7XQpkv6x8lv 2ddQYhvgXYInTg32tJ42ggC9B9hb5f0OO2veapWGLtY9yy8MB9neyhlxnblsgp4ySGa9 cfBdlF6dTmY8AnUgHfFlknhoq39/Wtsr8ezal9RObar8EhVPjAFbi3r2/3uML7sPl86q /9Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735864315; x=1736469115; 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=p60ohEC0lcMDc5+vsoccSHrGFVlwexFhvL+evZT42iQ=; b=GOxZ9e0dcdwZivyYUR25e7UrbK0XXPAOmrIqAQRliYZ/I2mzII3n8qFTTRY4wOCWnw +76MH5rN4czwYkYfZcSZcXIINVADAZhpZtcAlZEVK/GNkxO9ipJJzGycWy4Hm9DMAGLg +0XbsCxFQoczQg5CRqFAhPLF/JecrU6sU1T0GQPldUXAp12V3NvqX+D+U1laJZZKxDm1 iMzGqiZwjEGgzImJPGn6S86MMbvL2yjHd6UhZD7h1aGHqKF8h4EPxKRrHFpdBGkw2oT1 1WnjDapcvQbaLCx80bxcw+BpNC0LQcJP/Y0khABw9vleCEhHhLWQQ1mDdQMBPdX+HlOM NIxg== X-Forwarded-Encrypted: i=1; AJvYcCVaDU81eEVzjyCY/gpqfHr947TfaFe06z9IBqJSiBqUk8vd6+lxf61qludSLSkd+vb1Sju2+PxhfcRIruQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyBfMa/a2ounJHtQ6MXf2vOF7N4URek4ue3zz+EPg5jY1pLh5i0 +zaFyOV548hxSBDumX815pEX/a4L9862JmWEFIk6h2kdoKJugPT25Ovji5Jo2cvaQDKid8mjm4O U X-Gm-Gg: ASbGnctcyzCNgNMjkYpQZjqRJFqUeNqN4mZiIvt3Gq8ZbeRoO8n46fQQTW/88ivNO74 Pw1RNBmuNT2vFMJCmuMhH9eXrS+o5oLUU3ofZSaPHSrYlI8+WLiOrq28iZV43BMhHusyTKZE26C r27WBik8CeYACx92Kjm2pw7YKDmetqz4fT5jELgdomhDTDx2O8HPcVPuy65yMtl0i2IMf+Uh4cN S86g71k/E+mCVAwjfUZsYcuFDRBKEf8MRI+c3DF1cK4Lr1BsfKd X-Google-Smtp-Source: AGHT+IGKGAeDhUlzYbvQRqd8UylgnFkCkYWQF4YyiX8Kt33xlyrfV+H8wMqxdbtsRoigqCVOJqH/bg== X-Received: by 2002:a17:90b:54d0:b0:2ee:c918:cd60 with SMTP id 98e67ed59e1d1-2f452e4a7f6mr72948222a91.20.1735864315357; Thu, 02 Jan 2025 16:31:55 -0800 (PST) Received: from ghost ([2601:647:6700:64d0:e7aa:b727:e049:3265]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ed0d8bb2sm28947179a91.0.2025.01.02.16.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2025 16:31:54 -0800 (PST) Date: Thu, 2 Jan 2025 16:31:52 -0800 From: Charlie Jenkins To: Conor Dooley Cc: linux-riscv@lists.infradead.org, Conor Dooley , xiao.w.wang@intel.com, Andrew Jones , pulehui@huawei.com, Paul Walmsley , Palmer Dabbelt , linux-kernel@vger.kernel.org, Samuel Holland , Pu Lehui , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= Subject: Re: [PATCH v4 1/2] RISC-V: clarify what some RISCV_ISA* config options do Message-ID: References: <20241024-aspire-rectify-9982da6943e5@spud> <20241024-overdue-slogan-0b0f69d3da91@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: <20241024-overdue-slogan-0b0f69d3da91@spud> On Thu, Oct 24, 2024 at 11:19:40AM +0100, Conor Dooley wrote: > From: Conor Dooley > > During some discussion on IRC yesterday and on Pu's bpf patch [1] > I noticed that these RISCV_ISA* Kconfig options are not really clear > about their implications. Many of these options have no impact on what > userspace is allowed to do, for example an application can use Zbb > regardless of whether or not the kernel does. Change the help text to > try and clarify whether or not an option affects just the kernel, or > also userspace. None of these options actually control whether or not an > extension is detected dynamically as that's done regardless of Kconfig > options, so drop any text that implies the option is required for > dynamic detection, rewording them as "do x when y is detected". > > Link: https://lore.kernel.org/linux-riscv/20240328-ferocity-repose-c554f75a676c@spud/ [1] > Reviewed-by: Andrew Jones This has been sitting around for a while but is a good change. Reviewed-by: Charlie Jenkins > Signed-off-by: Conor Dooley > --- > arch/riscv/Kconfig | 36 +++++++++++++++++++----------------- > 1 file changed, 19 insertions(+), 17 deletions(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 62545946ecf43..278a38c94c5a6 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -527,7 +527,8 @@ config RISCV_ISA_C > help > Adds "C" to the ISA subsets that the toolchain is allowed to emit > when building Linux, which results in compressed instructions in the > - Linux binary. > + Linux binary. This option produces a kernel that will not run on > + systems that do not support compressed instructions. > > If you don't know what to do here, say Y. > > @@ -537,8 +538,8 @@ config RISCV_ISA_SVNAPOT > depends on RISCV_ALTERNATIVE > default y > help > - Allow kernel to detect the Svnapot ISA-extension dynamically at boot > - time and enable its usage. > + Enable support for the Svnapot ISA-extension when it is detected > + at boot. > > The Svnapot extension is used to mark contiguous PTEs as a range > of contiguous virtual-to-physical translations for a naturally > @@ -556,9 +557,8 @@ config RISCV_ISA_SVPBMT > depends on RISCV_ALTERNATIVE > default y > help > - Adds support to dynamically detect the presence of the Svpbmt > - ISA-extension (Supervisor-mode: page-based memory types) and > - enable its usage. > + Add support for the Svpbmt ISA-extension (Supervisor-mode: > + page-based memory types) in the kernel when it is detected at boot. > > The memory type for a page contains a combination of attributes > that indicate the cacheability, idempotency, and ordering > @@ -577,14 +577,15 @@ config TOOLCHAIN_HAS_V > depends on AS_HAS_OPTION_ARCH > > config RISCV_ISA_V > - bool "VECTOR extension support" > + bool "Vector extension support" > depends on TOOLCHAIN_HAS_V > depends on FPU > select DYNAMIC_SIGFRAME > default y > help > - Say N here if you want to disable all vector related procedure > - in the kernel. > + Add support for the Vector extension when it is detected at boot. > + When this option is disabled, neither the kernel nor userspace may > + use vector procedures. > > If you don't know what to do here, say Y. > > @@ -667,8 +668,8 @@ config RISCV_ISA_ZBB > depends on RISCV_ALTERNATIVE > default y > help > - Adds support to dynamically detect the presence of the ZBB > - extension (basic bit manipulation) and enable its usage. > + Add support for enabling optimisations in the kernel when the > + Zbb extension is detected at boot. > > The Zbb extension provides instructions to accelerate a number > of bit-specific operations (count bit population, sign extending, > @@ -707,9 +708,9 @@ config RISCV_ISA_ZICBOM > select RISCV_DMA_NONCOHERENT > select DMA_DIRECT_REMAP > help > - Adds support to dynamically detect the presence of the ZICBOM > - extension (Cache Block Management Operations) and enable its > - usage. > + Add support for the Zicbom extension (Cache Block Management > + Operations) and enable its use in the kernel when it is detected > + at boot. > > The Zicbom extension can be used to handle for example > non-coherent DMA support on devices that need it. > @@ -722,7 +723,7 @@ config RISCV_ISA_ZICBOZ > default y > help > Enable the use of the Zicboz extension (cbo.zero instruction) > - when available. > + in the kernel when it is detected at boot. > > The Zicboz extension is used for faster zeroing of memory. > > @@ -760,8 +761,9 @@ config FPU > bool "FPU support" > default y > help > - Say N here if you want to disable all floating-point related procedure > - in the kernel. > + Add support for floating point operations when an FPU is detected at > + boot. When this option is disabled, neither the kernel nor userspace > + may use the floating point unit. > > If you don't know what to do here, say Y. > > -- > 2.45.2 >