From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B4F7C352A1 for ; Thu, 24 Nov 2022 17:20:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3C8C6B0074; Thu, 24 Nov 2022 12:20:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EEC606B0075; Thu, 24 Nov 2022 12:20:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB4126B0078; Thu, 24 Nov 2022 12:20:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CD59C6B0074 for ; Thu, 24 Nov 2022 12:20:47 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 80FBAAAF44 for ; Thu, 24 Nov 2022 17:20:47 +0000 (UTC) X-FDA: 80169000534.24.FF28868 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf26.hostedemail.com (Postfix) with ESMTP id E818114000C for ; Thu, 24 Nov 2022 17:20:45 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D9030B828AB; Thu, 24 Nov 2022 17:20:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FAC8C433D6; Thu, 24 Nov 2022 17:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669310442; bh=JB9qZrrqFpGk0H4HPOvs80vQdLVw7i9EscGuUefH0pw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Te3QID+ipAkEEoYZvSJdkNSnHQLGbt/iXdSeIexqtPiAqge3n6lTbM2ez8F36oWo9 DAUB8gGiDWzKTPCw0LKE+8IdQtJyYPR6F4WuWze3SACJkk0tzk86X5ZsDiauQpwqD4 kbVAnWlfJUU1+YXSkluKcG2D/8z+wjQFa/jh0RRk28slpFQxcvIGPkl9Hu8pTVbnmy lUUyeN4W5MdWVUjGFCqsbj7nRB3JgOQNheBDhTtitp0a/jGv4gVkpLwtlfFc4Nkgci siyIVR5zSFU//GHaxH4ABmzrZZAQ24Z4jhfbypnJ6L23LyTmmLVlYaT6okfkTh2/AW R7wakXTCE3pWw== Message-ID: Date: Thu, 24 Nov 2022 17:20:37 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v3 2/3] RISC-V: uapi: add HWCAP for Bitmanip/Scalar Crypto To: Samuel Ortiz Cc: "Hongren (Zenithal) Zheng" , Palmer Dabbelt , Paul Walmsley , Albert Ou , Atish Patra , Anup Patel , Eric Biederman , Kees Cook , linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Michael Kerrisk , linux-man@vger.kernel.org, Jiatai He , Heiko Stuebner References: Content-Language: en-US From: Conor Dooley In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Te3QID+i; spf=pass (imf26.hostedemail.com: domain of conor@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=conor@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669310446; a=rsa-sha256; cv=none; b=vbVjRpx/39w//hzcWvz+H5uGZcNAwZ1SWCb0haEGF80nJSlcJtpqLOWGXEYxG6wKe3BkfC O0J/FuH6qPZeVIgEfZ9UAWDkSvf/pKGVe+N2GODfK1iRL0ILNbeI2YeGG/0/sEX1qXgvA5 xiscJVWmyqpQ65G9s1e5qRfMQafZhBw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669310446; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4AN3e1Uk0J57y/BTDV8HYAgDmakKSEOQX0hQTdfqo7M=; b=i/vhRgprpQmBFHM82OIw3tt5gwShdOkN1jms7sW9IMMPjvWNeHSQJ0TLxRUtHbONpH6iuP f0yExgEY8gqF/K9RxcbxtupVynYUppKPf42GJ1mSSZj+o5kn4tJ6cvt+fnQXjUfy2RHw8C jIRWill5DUQmBvKL3Bm4BvuI9V/FWLM= X-Stat-Signature: 4o3teiactzz7oispk9wnr9b4938q5qra X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E818114000C Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Te3QID+i; spf=pass (imf26.hostedemail.com: domain of conor@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=conor@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-HE-Tag: 1669310445-91055 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 24/11/2022 17:12, Samuel Ortiz wrote: > [You don't often get email from sameo@rivosinc.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On Thu, Nov 24, 2022 at 11:55:01AM +0000, Conor Dooley wrote: >> On Thu, Nov 24, 2022 at 11:47:30AM +0100, Samuel Ortiz wrote: >> >>> Patch #1 is definitely needed regardless of which interface we pick for >>> exposing the ISA strings to userspace. >> >> I took another look at #1, and I feel more confused about what >> constitutes canonical order than I did before! If you know better than >> I, and you probably do since you're interested in these 6 month old >> patches, some insight would be appreciated! > > Assuming we don't go with hwcap, I dont think the order of the > riscv_isa_ext_id enum matters that much? The chief put it in canonical order so that's good enough for me! > > iiuc we're building the cpuinfo string from the riscv_isa_ext_data > array, and I think the current code is incorrect: > > static struct riscv_isa_ext_data isa_ext_arr[] = { > __RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF), > __RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC), > __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL), > __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT), > __RISCV_ISA_EXT_DATA(zicbom, RISCV_ISA_EXT_ZICBOM), > __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), > __RISCV_ISA_EXT_DATA("", RISCV_ISA_EXT_MAX), > }; > > zicbom and zihintpause should come before supervisor level extensions. > I'm going to send a patch for that. idk, Palmer explicitly re-ordered this: https://lore.kernel.org/linux-riscv/20220920204518.10988-1-palmer@rivosinc.com/ By my reading of the isa manual, what Palmer did is correct as those are not "Additional Standard Extensions". /shrug > > And the Zb/Zk ones should come after the Zi ones, and before the > supervisor level ones (The I category comes before the B or the K one). This I agree with though.