Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1851785yba; Sun, 14 Apr 2019 22:52:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrftLf/TbU5tcBskpMDl5pRb4SU1HJ4K5TTZZD98jY2cFUE43mWTYD5y+VNJeazcyLq4G9 X-Received: by 2002:a63:500f:: with SMTP id e15mr70102719pgb.198.1555307554964; Sun, 14 Apr 2019 22:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555307554; cv=none; d=google.com; s=arc-20160816; b=UbbRWBOzqXsM82fHfNehERd4kvjRD1pX4Omk987PiGLjsg30H1Xuat2jfJ1UmAMDeA sl2IJWprR3HUhO8g4W2guF5HVK+PdCeLSj5H6jaJTfvLk0KGC50qPlDe/AGV6xck1NHT UbohdSLSdsy78OFd8IAphdbbearLiZG+R5nX2jrAmR9fI72pmhhe3kkmavoUV3Ue3Vqo h3QK4FWd+cQ4NPg1g7GCW7oza51wY26Tp19AfJWltO5Aq9aW9Tcn2FrzTnIJwkD/Wy7y 8Ufmvzp9zt8tXmsr3/Km7VsQalMQxAnStmekficg/XdNu1/yimSC4p6osjFA91cLjUwm fT0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a1VJTNMW3pQia6PT6i5I9qegHUb/oIDBT98ASKlNgXk=; b=BGmNnsb38VFiuqLd/Khvk5LWgW4WlPpYYoIN3245FPZSo4q/zBS74gN+ZBSqrhz9D6 E324BL25+loZRRW5y+Jt1fvI+UydmAm29hD0WaXPlflO3kTJLINSn6gLnxG/AYdapIC7 XfSZKlHOmGyjfriE62FYyZr9bIkjRel98bE1PDahbDfBkQpcE59as5KVO99smk4TW9IR 08coui5+Yo3ppTWYJGKGK1sqI7lKzbIZB38ELv9yFgmTwW0Ah5POo8aXmxLpR5KI2EDU qwnrnkC5KJgx/aPICHg6MW04rVyt2J1DDgsswaJ2xXGoxuTTRDNkfCePqx3vuPpI85un eTSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XHeHfHSb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e184si37046582pfe.118.2019.04.14.22.52.16; Sun, 14 Apr 2019 22:52:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XHeHfHSb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbfDOFt4 (ORCPT + 99 others); Mon, 15 Apr 2019 01:49:56 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43452 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbfDOFt4 (ORCPT ); Mon, 15 Apr 2019 01:49:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=a1VJTNMW3pQia6PT6i5I9qegHUb/oIDBT98ASKlNgXk=; b=XHeHfHSb09meeOs4O20Ylr+p9 /djbd/DxJggfJ7/Hf/+bIMB6fvxaFV2wJHlo8fptNIpvkFu8V0FBT64sBydLyZpnj1CHWGbRoVJHL RIORrDN2s0zvuCBy2VLwKnjYrteoYUMyAQbH0PMVaf0b2zd+gDAcjbEga5dmGVTRWqKvDXf9pYGi1 b5etWdvDMlmTLh+xkw2rfm7zZ7OnP1uPomlHCKmw3rB4o6iLjEBq/1oHdDfiX3EYpB0m3Wf9w0PJk ZFS0Zpbp/aD8ErQJm+x3O2ZfNzCx+yIVWVyOESWov8jNz4J6udFICuPHUgwu4Ta9btfTg70Czrmmy HopipSCRg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFuV3-000149-68; Mon, 15 Apr 2019 05:49:49 +0000 Date: Sun, 14 Apr 2019 22:49:49 -0700 From: Christoph Hellwig To: Anup Patel Cc: Palmer Dabbelt , Albert Ou , Atish Patra , Paul Walmsley , Christoph Hellwig , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 1/3] RISC-V: Add separate asm/encoding.h for spec related defines Message-ID: <20190415054949.GA9279@infradead.org> References: <20190413153807.116227-1-anup.patel@wdc.com> <20190413153807.116227-2-anup.patel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190413153807.116227-2-anup.patel@wdc.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 13, 2019 at 03:38:35PM +0000, Anup Patel wrote: > It's better to have all RISC-V spec related defines in one place > so this patch adds separate asm/encoding.h for such defines which > can be included in assembly as well as C code. As per the discussion of version 1 on Saturday I disagree with this move. There is both a philosophical and a practical reason for that: a) in RISC-V CSR access is really nicely split out into a separate number space, just accessed through a few special instructions. It has no overlap with the rest of instruction encoding b) is pulled into just about every file build in the kernel though , and So even if you want to later add a new for instruction encoding details later, I'd rather prefer to keep CSR access separate from it.