Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp229832yba; Tue, 23 Apr 2019 23:34:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfy7qloHMvpQ+VV6nraLFKPcl+mRkBU6btqVm+duYKShTRiCuhUU1nzSneLkKO5O3MAJOn X-Received: by 2002:aa7:8ac8:: with SMTP id b8mr31255041pfd.234.1556087666202; Tue, 23 Apr 2019 23:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556087666; cv=none; d=google.com; s=arc-20160816; b=zi4BVqIFOxz0Pu5wm7uIEgM1PSFbKdhFoqtZHGo8BX/0nPm2mLPiW2sue59ZHijOzy bfFo7XK8dShJlsLGvw0V+aV7j51SkWYUiQJUYbEI+7xRIE+Zrw+/MAaVxTXKa2Y5o4fM kdAMm7YJf/s22vhsNfOQYOwxLQAfzJzpcmjc6ThKuAG4TanNCNAfBhEgnR0Yd/lDntEc rkDGHR4KXzjgFGWpBVsvtDJ0m5cFUVMT5KUid0wRozQ5F0tIL95teCszakaldLFyTtlv bYfUHzL9mKYl6+ytgxl9bwaz8xAQutbqOoptVjBz1kIDYBeDNS96Urm4hmslzIYycQwh 7vTg== 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=W0W7O6aRWbCzplvHPiCIuaGIKRttZTWW50k6hXjkt3E=; b=KeZtfzWsgqxxrr55mlP3cKriC1pHcelj59Cy3irZyjKgWxhc11TdzBL/4AwCBL25Sl +54nJ/x+TcFf+c4skBHC2DMiIkbYiGh/U6KuwCJu/csXiXcK4od0x/Iur5dTr+udy0kU 3FpJqVxfOB8EAKWhtOj2a7B7gCnFECEAsF3YoVXfuormTy9+V3Ccqt5vfxclYytrpnVn gAUOUeqqQY8CTzaO3IOtJZ6BNXlCHzLykzUc+lV/B9zM1tRO3VRNaDB9vFefGzsBDGPG wGqMkAdqSn9ggBIHhq9dMbDZT5L4DSDIUnvfMVAX7wbn5hCbD+mJdFjMnNYXTSUsWXjs iLGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TwLjjNsn; 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 59si4360014plp.139.2019.04.23.23.34.10; Tue, 23 Apr 2019 23:34:26 -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=TwLjjNsn; 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 S1729805AbfDXGaq (ORCPT + 99 others); Wed, 24 Apr 2019 02:30:46 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50102 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfDXGaq (ORCPT ); Wed, 24 Apr 2019 02:30:46 -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=W0W7O6aRWbCzplvHPiCIuaGIKRttZTWW50k6hXjkt3E=; b=TwLjjNsnYG7kd+a+li6Vsa3E8 h8UUuh7RFjdPOvDscXfGvA0DGHYewZkTRMqYVrn8S8ggwqGXTN2KZiuas4eRy7mmmixk32MOkyzq7 8RXg/rYQgQH+oCRJEcxOVd4iNVxcmMdLRfzukmjreDNKQM2ZbFr92kz0P8sVU0KSJ2firqTmGskqj 61FDNLdkniF56ynKOtchQ8gssPk6f0x29aQm+08o3OnmjNLkrfdWXFbKTuUe9RwMbn4eE5iSGODUe YTgHAJYehMI6o1Ptvwt5iZ3LSwlDB8fDvFsfB5dztOuyYawvCeqe+McAqqlZhT0biL86JhkaZORLW TBa6e5UWQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJBQb-0006IR-LQ; Wed, 24 Apr 2019 06:30:45 +0000 Date: Tue, 23 Apr 2019 23:30:45 -0700 From: Christoph Hellwig To: Anup Patel Cc: Palmer Dabbelt , Albert Ou , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Atish Patra , Paul Walmsley , "linux-riscv@lists.infradead.org" Subject: Re: [PATCH v3 3/3] RISC-V: Access CSRs using CSR numbers Message-ID: <20190424063045.GC10400@infradead.org> References: <20190415093648.7525-1-anup.patel@wdc.com> <20190415093648.7525-4-anup.patel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190415093648.7525-4-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 Mon, Apr 15, 2019 at 09:37:27AM +0000, Anup Patel wrote: > We should prefer accessing CSRs using their CSR numbers because: > 1. It compiles fine with older toolchains. > 2. We can use latest CSR names in #define macro names of CSR numbers > as-per RISC-V spec. > 3. We can access newly added CSRs even if toolchain does not recognize > newly addes CSRs by name. > > Signed-off-by: Anup Patel Looks fine: Reviewed-by: Christoph Hellwig