Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1710039rda; Tue, 24 Oct 2023 00:18:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0b2HtcvRGsM3j/Bkr5qJvoD1IoKTQiaBuiOlGMEfMVqpGhtTBr4xQenDNH5z5H/IkOORY X-Received: by 2002:a05:6808:2c8:b0:3b2:ef9c:d1b1 with SMTP id a8-20020a05680802c800b003b2ef9cd1b1mr11505415oid.6.1698131926118; Tue, 24 Oct 2023 00:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698131926; cv=none; d=google.com; s=arc-20160816; b=0xm6bHrk9eS7c9wyEoB/HhtOMTSIe8UU84L/SR3burJL32eo9ecJ3QnbixCkrZ+q2U IF7HBuQ55VpAe5+yYALpyACMMcJg6MWed34hmSgiD5dlp1ue1P070f0PrDYUo67Sd1uo Yi7Z9t8WWcxiGtpZluc6kYcB9ZFF0njz7eAVbXngQ/5ZlZ59xf5OE0jya+rkhq1e2YwZ io/TqE5+xyRlZfUwyBKcwKNI0Nv96RMql0zdfgwnxAfqsDepQSaHSQ/U8RTbHDkEO+aA IpiDjg6RofbgbAz9oxakgAL23EOQGl0hegDyfZMJFC+rLyvHBVfu0ZEhZwHA3LifGB3k eBLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KRIlhtIeb1YFd4JwPYh+w2xPq7Nr26Cx3E5/ZUd7zEA=; fh=MZraISKRGtn7mfZE8jYb/9iK+fB7exE1eGpWnJ3LLzc=; b=tD8qBH+lQ91RMPHOOk/O3DgahTbTI+E61e6tWNOQLvsqlIZ/S5cKXvis4TCCU/L+Gm /8L/4CAFhd9VuFKjpwfKbfgQoCvoXGSp+5HSUd8Q3Q47nYYuXWEb8oIsYQhpoK3f74Nu UwgHkSFboqSRNXoX90HU2myv4XES0jnkIZRZouzvr6IPJb8pv4feaEsKLyQetz0uC/uo x1eQx7IKBFvbzLq+mI6MhdgPR/izVE03HqbE7cv0qT+5JIT8Zl0F1JEv6jZbg1seduE4 XlGa99hmT1NnrC9l44wb1gIodWLJ8Fnf/o3fzTmxLllqJZqCQCPXYnU1Pu2bsHNUd7HP SjHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=jqHhOdEI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id o67-20020a634146000000b005ab46595d5dsi7703751pga.471.2023.10.24.00.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 00:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=jqHhOdEI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D16A5808A954; Tue, 24 Oct 2023 00:18:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232561AbjJXHSh (ORCPT + 99 others); Tue, 24 Oct 2023 03:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232420AbjJXHSg (ORCPT ); Tue, 24 Oct 2023 03:18:36 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C31A83 for ; Tue, 24 Oct 2023 00:18:34 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c508e76eb4so8934471fa.0 for ; Tue, 24 Oct 2023 00:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698131912; x=1698736712; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KRIlhtIeb1YFd4JwPYh+w2xPq7Nr26Cx3E5/ZUd7zEA=; b=jqHhOdEIuadN41MJVGii+Nssy5T7Ll9nxoxV4NeMj2wgKlOJfZt9W8zMxeaAoI8Ffa yknFvVzEuabK5oJQd75u1YXB6jfwM5Sy80LWLI6AlXRlj/sJ1N8weQIcQ/UhmPdploeQ GfItyqDuLDQnZEoR2CIB8hZpEVUtix/76FqlUrbasg0t9MzHSbdGqYADDWZRwn/tRai6 xEoGZt6wNQiqCXn6+p3GQ3fC9gwaEwrQTGV3yZAfayXbkmU5N/UUGpENLThP78vzyBKc qipUBCoanXnNmAQwBFJDlZLJDDvNvbZnau/XixIZj78iJPfaSawEkc/DmtML7Zs9UvSA +JWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698131912; x=1698736712; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KRIlhtIeb1YFd4JwPYh+w2xPq7Nr26Cx3E5/ZUd7zEA=; b=phWbhjOi4P99lI4YBl6KYYDIxj6kCGtV3ZCMNpeDfwZsrUAOzrQZe2ZyKjBV3XtB3V nM0yz/xPJ3pe1YE3moC8HF63GPuEp49i8BO9CNEbCyV2BrMzntmrPOAUK6rOqu6wgmrK wssq1u/hisivzyQl053EYIqnhC3fQV9xMtQrSgg+z6bj4TuKEnxfEb67rOaTJAlXG0w/ BZnX+0Gf959J218pbL9jjqGZhfxaSuWIKjyxBe9uem8nUupbh9rKh11dEjx4OpjeuZwu Pndewj6NRYdddgM5bCVqfTHdnaECqi6VZbZ5NucNhMxxq9s4jKTviihlOYYzIB2/vArd VzoQ== X-Gm-Message-State: AOJu0YznBeXU+OEF1XNYBpu7PKfGONKu68mjLonS1JNnG07TU1hzBidY /AgEBGj2zMtm9yoKJW2x4P4Gyg== X-Received: by 2002:a2e:91c1:0:b0:2c5:18a0:6c2e with SMTP id u1-20020a2e91c1000000b002c518a06c2emr8406164ljg.0.1698131912513; Tue, 24 Oct 2023 00:18:32 -0700 (PDT) Received: from ?IPV6:2a01:e0a:999:a3a0:9f43:3ca4:162c:d540? ([2a01:e0a:999:a3a0:9f43:3ca4:162c:d540]) by smtp.gmail.com with ESMTPSA id p7-20020a5d4587000000b0032db430fb9bsm9278279wrq.68.2023.10.24.00.18.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 00:18:32 -0700 (PDT) Message-ID: Date: Tue, 24 Oct 2023 09:18:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 02/19] riscv: add ISA extension parsing for scalar crypto Content-Language: en-US To: Evan Green Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Conor Dooley , Samuel Ortiz , Conor Dooley References: <20231017131456.2053396-1-cleger@rivosinc.com> <20231017131456.2053396-3-cleger@rivosinc.com> From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 00:18:44 -0700 (PDT) On 23/10/2023 18:21, Evan Green wrote: > On Tue, Oct 17, 2023 at 6:15 AM Clément Léger wrote: >> >> From: Evan Green >> >> The Scalar Crypto specification defines Zk as a shorthand for the >> Zkn, Zkr and Zkt extensions. The same follows for both Zkn, Zks and Zbk, >> which are all shorthands for various other extensions. The detailed >> breakdown can be found in their dt-binding entries. >> >> Since Zkn also implies the Zbkb, Zbkc and Zbkx extensions, simply passing >> "zk" through a DT should enable all of Zbkb, Zbkc, Zbkx, Zkn, Zkr and Zkt. >> For example, setting the "riscv,isa" DT property to "rv64imafdc_zk" >> should generate the following cpuinfo output: >> "rv64imafdc_zicntr_zicsr_zifencei_zihpm_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zkt" >> >> riscv_isa_ext_data grows a pair of new members, to permit setting the >> relevant bits for "bundled" extensions, both while parsing the ISA string >> and the new dedicated extension properties >> >> Co-developed-by: Conor Dooley >> Signed-off-by: Conor Dooley >> Signed-off-by: Evan Green >> Signed-off-by: Clément Léger > > My tree might be out of sync, but in my search for riscv_isa_ext, I > also found a use in print_isa() (cpu.c) where we're reaching into > riscv_isa_ext[].id and assuming it's always valid. If that's still in > there we'll want to fix up that spot too, since now with bundles .id > may or may not be valid. Oh indeed, the array is visible outside of this compilation unit :/. I'll check that before sending V3. Clément > > -Evan