Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp32176lqt; Thu, 18 Apr 2024 07:45:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRgL7cyGx+HmhmrgYblrDdEyCPD62Cq2bK6uDOrIuXUGDbrI3KvkkN+ufkiMF379daJPwNc0OVKZ7/YF+08ofcXleYAROjNt+pKLQYqA== X-Google-Smtp-Source: AGHT+IHL3rTYUEgBxEFImL1zLSRIi2ET5a28YEn16nvOwaXhaN9PKyfA6H8PLNuG+mFdcTYjdbgq X-Received: by 2002:a05:6a20:d80c:b0:1aa:a473:3edd with SMTP id iv12-20020a056a20d80c00b001aaa4733eddmr1908573pzb.21.1713451542030; Thu, 18 Apr 2024 07:45:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713451542; cv=pass; d=google.com; s=arc-20160816; b=kjBu/VKxIcDQnelr/9ta3apSEeqARmgK+Qrg4csxZo/T8dctaAW6gxf5av/lrnPIkK eBVbbn+kqjRG5oK1JHAwGb/mZzKb3yn8sM2eGY+3kF5Bk0XyzRQnKh3qtcOg8mpfTQve zrg4WypKWFvQCXCALxK1/LU5jwM8ZAFCodDLvIvzH00k/veFi4RHFDIgdWwebNN3/GkF qc0bGAdUvts+hDQoVZ/X5dxxUk8CXnGGkysFtwJpejVmGtgaMLBlooKdNTz0feip7XIC QJS/TXdUwuMv+J5gBhlLmco6mVoQP4hmLzejHi2qwd/LZ+SOQqznCrSciAePdxNiT8Aj F7TA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=mDC5vL+wPuQ4ZwE6hVyp0SM/qlv2ty7JpQvvzoPS37I=; fh=tY+6bWuguuvO+t8Omzrp1WMBWm2rKfdIgeDt9KOW0eU=; b=x5CdYrDZkylJnfgOEmFs7xQtqUFG5dgN9aHEediQmRZqEzVaD/k52VmN6YR+MIUCJV lGund40qS7qpj6wCPm3jBjkoUpVnVk0g90pFrNoem60QNmmdTvyn/JIisDNo/MbUZdbZ eLUHwRFiXpJ7E25iEp3Wdv97DecsX1OpagKuXzQ2Zq5HFMuW4bvdz++MoE458HJwEo5P SbVwNi8ZZphxr77+9mHy514naGkG8NZ1mdGpIqzP1KdS0Z+ssz4KfM4bArrnco/8iYl+ ns2DcVhXfPnrTnHPHUDlu9v8ZGRQYL2zWH9IfLNg1NF1fe0AbwjtZkcYQFvNSkp3GNgI Og4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OOtcW97s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150295-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c38-20020a630d26000000b005cf0abea01dsi1431770pgl.114.2024.04.18.07.45.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OOtcW97s; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150295-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 34360B27E28 for ; Thu, 18 Apr 2024 14:25:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C07C116D31C; Thu, 18 Apr 2024 14:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OOtcW97s" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4ECB16D314 for ; Thu, 18 Apr 2024 14:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450092; cv=none; b=ctTG/+cXSnav6G36+zxU5URmxMYYGetLX9rQEcL022wmZp8a1VIY4quKLwHYkcF+/1/Mo4dalT5Yr3xMmBRDWAMgKGV0kX6L/htyaA/z87xIW43JeT5eJAJFXxC6E4SZq4eyzzgQlw+7hHYXHtGa/h/wups1dj+obSNDNUR6NQw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450092; c=relaxed/simple; bh=aUM0Xf17pxFUy6Cr+9PH1jkH+tLH18RFiiZ8wiEHNyg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=BzdXIrkfM3wbP/mHoT44hB6H6+XdG95xQTRqFutseVgCVGw9Z0bC7yJbQps17V+64R1Lgh+M4Ev0tf3BG/t4xt747fAAopfHGhnXMbEBElZ6/Dzh7+suDeCoOwILzPXL/eRqfMOtx8r89ocXNbvMs3drBTAmX/7ixiIDhkE0LX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OOtcW97s; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BF75C113CC; Thu, 18 Apr 2024 14:21:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713450092; bh=aUM0Xf17pxFUy6Cr+9PH1jkH+tLH18RFiiZ8wiEHNyg=; h=From:To:Cc:Subject:Date:From; b=OOtcW97s6gnerm+tffJItV7ew9zy1ZhSrvMo02RgX0ZKyCqH6YI5v/LvsHbYyrfBB gHtxJJeMGexhCWow0EK+VYT+ar3LU591BkU1ndoautpWZxkuXlKYO6a6BUSZR8nLNY POIswoimSwvsP6a5nlfoLxsakWhfbzrnOwBitY9ssyuNsPEuDltVnVxtvuI/hMq76N vG/Uog8auWPLN8QpGxPIG7zFvcyW2UetfjQrfTYAWTtqll7jYLh/vxxM/BWCRXH8p3 zonPVmBcl85quvEQ/cXPfaZpLHhOE3Qz1qUPbCkp1E8hTUmM/IomwlLI8XYgv/u34w RXKqNFZFD87wA== From: Conor Dooley To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Samuel Holland , Pu Lehui , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Paul Walmsley , Palmer Dabbelt , linux-kernel@vger.kernel.org Subject: [PATCH v1] RISC-V: clarify what some RISCV_ISA* config options do Date: Thu, 18 Apr 2024 15:21:01 +0100 Message-ID: <20240418-stable-railway-7cce07e1e440@spud> X-Mailer: git-send-email 2.43.0 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=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=4357; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=mdQDYpXoXxz/xowCTUoQTmMv0Y172vMgP0KsAfRXkKE=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGmKOj7ijzraWDadNrNUnVy24Kh8zi7FjO0bDi6oktvrm 1VoIn+wo5SFQYyDQVZMkSXxdl+L1Po/Ljuce97CzGFlAhnCwMUpABN5rMrwP41vk132s/6tRlWP jm7l3xzx+OFFI/PLlVKaTpwHQ/jvHmNk+KKwUNf42umu6KN3PkjVHz4RkOm/J42Ro/B5Q/jHCXW XuQE= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit 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: Björn Töpel Signed-off-by: Conor Dooley --- Vector copy-paste-o fixed, correct spelling of optimisations kept. CC: Samuel Holland CC: Pu Lehui CC: Björn Töpel CC: Paul Walmsley CC: Palmer Dabbelt CC: linux-riscv@lists.infradead.org CC: linux-kernel@vger.kernel.org --- arch/riscv/Kconfig | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 6d64888134ba..c3a7793b0a7c 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -503,8 +503,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. + Add support for the Svnapot ISA-extension when it is detected by + the kernel at boot. The Svnapot extension is used to mark contiguous PTEs as a range of contiguous virtual-to-physical translations for a naturally @@ -522,9 +522,9 @@ 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) when it is detected by the kernel at + boot. The memory type for a page contains a combination of attributes that indicate the cacheability, idempotency, and ordering @@ -543,14 +543,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. + in the kernel. Without this option enabled, neither the kernel nor + userspace may use vector. If you don't know what to do here, say Y. @@ -608,8 +609,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, @@ -625,9 +626,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. @@ -686,7 +687,8 @@ config FPU default y help Say N here if you want to disable all floating-point related procedure - in the kernel. + in the kernel. Without this option enabled, neither the kernel nor + userspace may use floating-point procedures. If you don't know what to do here, say Y. -- 2.43.0