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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B909EC636CC for ; Wed, 15 Feb 2023 09:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233703AbjBOJ53 (ORCPT ); Wed, 15 Feb 2023 04:57:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234099AbjBOJ5O (ORCPT ); Wed, 15 Feb 2023 04:57:14 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FBD0BB9C; Wed, 15 Feb 2023 01:57:11 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E2DD25C00A6; Wed, 15 Feb 2023 04:57:10 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 15 Feb 2023 04:57:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1676455030; x=1676541430; bh=nFeJxTBUgb 5KP8tqA7gwc+SzCIoEFi7EP1xam7CPn6o=; b=R9VV2G0tfo+W5W7Uiqf9dCwN9b vsYcgDxJE703unAhmKnCEqaH71+qjJHLmgCCjaX2W4qs+pPw74ORN1PiduTiH4Qg 0qtvN1kHBbRgueC9lB4Wzbrh6PI7EsIfOCUrgK5lkCXX5ZYIgvowRt0KvCSIlX5P OJb9XikC1JyUNFbjuWhJ0DbreEU9k+AkOoSWSrJ/hj9fQXksTPn0Tl4ZveI8yKsT 8wpYkBE/O75Pg2dXbGgKs24iVGfnQKYfO9YJvspbyBTHLK3kX0tHjGwCAXhqOMGG mS3AfxwndT+qnrEV2CL8yCOTqYZw/iYSznp0LPE4oWUoKzdZ8wkOxPwSkkzw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1676455030; x=1676541430; bh=nFeJxTBUgb5KP8tqA7gwc+SzCIoE Fi7EP1xam7CPn6o=; b=E4a9qktWux3mPni6zVoGt+uu5niuAJB5bINwihUQe86n PBB8NzKFY6AYNg/U8B4QcDVBQl7RsbjGslvf5JvoH6kqfM5w0MXKZQllzee5PMag ml7TSzl9klsGnjE2alLtVmW8QgfygxVMfcdqyzgiE3kUHFOPh3aDs/lJbPl2CEy0 ghy7ghuunNr56uLJcHcu9XsxuybExcsXb+yD+vaea6qPA3biasz/CociMsEjSkoH bStjSeH8rdWP2vaCZ/pBz0iKcWSfS2au+OpppLEF2df8L0gMSWf7snmodcboaFaG iqCd93lU3acCUusPmWjMvh2ivBh7cDfxyeZAXXGuJA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeihedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id E8F24B60086; Wed, 15 Feb 2023 04:57:09 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-156-g081acc5ed5-fm-20230206.001-g081acc5e Mime-Version: 1.0 Message-Id: In-Reply-To: <20230206201455.1790329-3-evan@rivosinc.com> References: <20230206201455.1790329-1-evan@rivosinc.com> <20230206201455.1790329-3-evan@rivosinc.com> Date: Wed, 15 Feb 2023 10:56:51 +0100 From: "Arnd Bergmann" To: "Evan Green" , "Palmer Dabbelt" Cc: "Conor Dooley" , "Vineet Gupta" , =?UTF-8?Q?Heiko_St=C3=BCbner?= , slewis@rivosinc.com, "Albert Ou" , "Andrew Bresticker" , "Andrew Jones" , "Anup Patel" , "Atish Patra" , "Bagas Sanjaya" , "Celeste Liu" , "Conor.Dooley" , "Dao Lu" , guoren , "Jonathan Corbet" , "Palmer Dabbelt" , "Paul Walmsley" , "Randy Dunlap" , "Ruizhe Pan" , "Sunil V L" , "Tobias Klauser" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 2/6] RISC-V: Add a syscall for HW probing Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 6, 2023, at 21:14, Evan Green wrote: > We don't have enough space for these all in ELF_HWCAP{,2} and there's no > system call that quite does this, so let's just provide an arch-specific > one to probe for hardware capabilities. This currently just provides > m{arch,imp,vendor}id, but with the key-value pairs we can pass more in > the future. > > Co-developed-by: Palmer Dabbelt > Signed-off-by: Palmer Dabbelt > Signed-off-by: Evan Green I'm not sure I understand the problem with AT_HWCAP. While the bits in AT_HWCAP and AT_HWCAP2 are limited, I don't see us running out of new AT_* words to use for additional bits. Presumably the kernel would already have to know about the name of each supported HW feature and could assign a unique bit number to them. Arnd