Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1608848rdb; Sat, 23 Dec 2023 14:05:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8Rsm/u3GLD4fvtSQLxH6vlWCO8PI8H2wMyJkI2S+1w8oWKnZUdEPwEYapFp5WFc7q7x8a X-Received: by 2002:a0c:f04f:0:b0:67f:ae69:331e with SMTP id b15-20020a0cf04f000000b0067fae69331emr1640838qvl.72.1703369141839; Sat, 23 Dec 2023 14:05:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703369141; cv=none; d=google.com; s=arc-20160816; b=yS3EdIAXYxj2QpetRQlcP41ySZyERZT4o81Q7lSISk5kxIhTXDVTUXasWE1skeFYyI xIgLqRK8YO+XJIjHpnw9+7LP8jZPv/ojMWyB88VycuimJJXTYJKn7xlVKembOw2rvtI6 tPk+D+Orxl4LytH3gHv6ochsldbhfSuio2H5EC8i7Ktnkiz0FAt87grYZO1JIZwNljd+ wisfr33Ed5KAPDfx7DN41PKIyxrU84il5qujYCtoYWZkI+/TtIMwXoNcypzOZMKDatsi q4p/Yk/LdaoUBqPY0irq2d1kODeETTZxdSkxg7VyqIWds3HuxLnmtNOM5rH5IZUMdvZ+ XRMg== ARC-Message-Signature: i=1; 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=Pa3ApTh2291HuN6VJLaZ7oQupKfwFELwRXXAOf90HEM=; fh=PGvyHv8Q9UJKOiOmlGhj6rFxspHgEwMjuI+T1OfQAF4=; b=mohEEKwhG0cut9ktoFRyUZMFt+RNer4YOAUrhESTwdxRuJaYyaM1G/oUGdatj5ObX+ LyD2Tw/gZWgu0O+h3B0P3SaanERcmoXQiYbIYfT1fOvD1mw35WKLIMA8FXOFSNyXoFIV aytmDyBWFaaJE4S8yneb/FNuRsaz9BYAmefQHJRFConow6KwuMAD7CxXXT8xR9NuzLO1 r49NwqpG0BafBwTiMDLCYafyy4Y/JKKAbh6iobZ3m6zDeSZglPiPE4eOMq/G96xyE9LS dzECLs42ptbti3UTYHyq/omq/wFWvrL4kI3kzPgiy/L2y1m8mZyeFZfjLGDazKUQbt3s eVhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rmpsLpec; spf=pass (google.com: domain of linux-kernel+bounces-10591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h18-20020a0cf412000000b0067a93cf954bsi7717473qvl.266.2023.12.23.14.05.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 14:05:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rmpsLpec; spf=pass (google.com: domain of linux-kernel+bounces-10591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10591-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F2991C215A1 for ; Sat, 23 Dec 2023 22:05:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 630D1179A9; Sat, 23 Dec 2023 22:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rmpsLpec" X-Original-To: linux-kernel@vger.kernel.org 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 8988F171A7 for ; Sat, 23 Dec 2023 22:05:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CABAC433C8; Sat, 23 Dec 2023 22:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703369133; bh=tQ9mHBh0idipynQKJvhuVlCANWRLkmPWhm22rqwDcbs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rmpsLpecULGXLZZ38UqHJnck/LFawAwRsWD3i92NblJzrG0z0yMfO5dr/kQ0XBBrd OMIYGAbEhitkfMRNov17nF6oeRm11rEviYP9kr3I08F7ZOFU/X9XVtzxsyqpoNKLTQ I6aXxwA4NPkZP/lfUvNNEIzVIYqCiH1jV8EuYGhDuH/ic0G/jlbXHw1zn0CdhppCFb j+t15ZqbQsPVJpTc3kBoulatIv5aPwjtBLU7Hz5p3qnm1441iYl7O+WNkNPFp93ixZ QE/3sWZIfGEoEv7rmP23Qpcuh3BIRJSpBt+HwnxLB1I353MSxSwtUkeUu17MFsZEpv m1GvTOLyyXpcQ== Date: Sat, 23 Dec 2023 16:05:27 -0600 From: Eric Biggers To: Jisheng Zhang Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Qingfang DENG , Charlie Jenkins Subject: Re: [PATCH v3 1/2] riscv: introduce RISCV_EFFICIENT_UNALIGNED_ACCESS Message-ID: <20231223220527.GA19298@quark.localdomain> References: <20231223155226.4050-1-jszhang@kernel.org> <20231223155226.4050-2-jszhang@kernel.org> 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: <20231223155226.4050-2-jszhang@kernel.org> On Sat, Dec 23, 2023 at 11:52:25PM +0800, Jisheng Zhang wrote: > +config RISCV_EFFICIENT_UNALIGNED_ACCESS > + bool "Use unaligned access for some functions" How about: bool "Assume the CPU supports fast unaligned memory accesses" > + depends on NONPORTABLE > + select HAVE_EFFICIENT_UNALIGNED_ACCESS > + default n There's no need to explicitly list "default n", since n is already the default. > + help > + Say Y here if you want the kernel only run on hardware platforms which > + support efficient unaligned access, then unaligned access will be used > + in some functions for optimized performance. How about: Say Y here if you want the kernel to assume that the CPU supports efficient unaligned memory accesses. When enabled, this option improves the performance of the kernel on such CPUs. However, the kernel will run much more slowly, or will not be able to run at all, on CPUs that do not support efficient unaligned memory accesses. - Eric