Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp308711yba; Sat, 13 Apr 2019 01:18:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbouTDnC3DH4ob8h9uU0GcmSolzZAGAt+VCJ/Pf9kS7Ckh0zLeufZdOKwkVFfp1N0rSJFy X-Received: by 2002:a63:31ce:: with SMTP id x197mr57095390pgx.69.1555143519263; Sat, 13 Apr 2019 01:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555143519; cv=none; d=google.com; s=arc-20160816; b=CQTLc9IcREeodZ8jdn875MKTQHTW7GrLliOWhUgo+/RG7SFp1vsB9jE00vpQymDB// E1f3jAc+ohBaasKwytADHIhJ7wXMturvjdFvTMaD8m1+uDEAzHs1S/K+QVvQevIMUK3B A0D2lf24hq40+x6f46hzAfdKjWJEHFxgwgjpygPQYxPFR6Q/Qy/fBKsa2mmaBvD7V72J /fdEurMiY04hAaNo8mmrJBCRH4r8zQ0M7bkv4Oz/QQHWUAf67qA/8RmQjcBIOfb/n34s G1wEXHs+O3OZnctpRdsUtW7y4TLjdRAYPrXbIesgr12AzTkOeI0Gfu0iOyZRChYWkzDQ W4Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sGAqxRlimZcOm/Xnh2p9ngnwXcLC61Kd6elJxjX23VM=; b=XgrAOYgXXNn0epwk1/qO/dPk5hQHpbwF4dhbCCTplFB/v0rwVvN+FsEYnwurZEQ7EA K95/aZ+yl9BbAsJNaKHzlLYaugyJ0lcKw36Ku9H7Z+s4+1R78uVGZpiCAjcZTrJGFE3c 22HMnsjWHfT3JdRhzxc4Xy1sMWtgDj2suc6pLovl0yX1Z2hpq5ESFGEEALIvsZAVS8BX JqMo3gzhZv3X7/ZDbDZn4sZo1nE/MR0L2GoeNnR5CKEbIa1qM2/1r+ebDBc98rx3S3Ia ABYtzAwmWZzvPZJ2uTVnlqlSIoNChOacNuLrNyCbo8QuTCnQtRJcAo6ZD0/l+E+eUCI9 fdFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=zsgFh4ii; 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 137si20737375pge.63.2019.04.13.01.18.23; Sat, 13 Apr 2019 01:18:39 -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=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=zsgFh4ii; 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 S1727241AbfDMIPU (ORCPT + 99 others); Sat, 13 Apr 2019 04:15:20 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34488 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfDMIPU (ORCPT ); Sat, 13 Apr 2019 04:15:20 -0400 Received: by mail-wm1-f68.google.com with SMTP id r186so2055051wmf.1 for ; Sat, 13 Apr 2019 01:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sGAqxRlimZcOm/Xnh2p9ngnwXcLC61Kd6elJxjX23VM=; b=zsgFh4iiVEwsELbHacinBUU3Cnmzy1mXBMRvQJPYvIInH4pi4yjZ+WtapkeRGZcYws oTVMNZNBiz0c9aRuaHcPOmJ2lToCZGL8GD3dHk2IdY1hB5DUa6qqk+j8ajt/dc7p0wqP k2/0FTtqFuak7qUrPpcJcrb/r9jJSyvpLOqxd4UJD/Sb/YxaKJNUyN9j4kc6EYgb6pAJ 0Pq2nuzH3dc+q74dGuq2t/ZnNhAoUb6+q0m3ZmIxxySKhH0N06gP5yznnfaLb3zEDnZc 7zBKMJAqMbojJDRwVu9TC4CCiy0XeViK6j1F9PyX1u3f8r5WG3rjqXRzR2+X9AiA47BV 9Idg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sGAqxRlimZcOm/Xnh2p9ngnwXcLC61Kd6elJxjX23VM=; b=dxSJOT4FOYULbNbhjeBiYIYu4mbFM6OFtH6fVijYeilxEcfyDIkrsGt91WlXTtj0gi QourVOmlw2/8nMGwhU3LKHCrHLvcIIbkb/qMPiLldJIUOy7QdHXDLR7wdcxi+Q6YwYjo nETr5KTo+GAMxUJf+IDWiPTraf+3lFxjZEHshHNGPv+6y1i5g5Na7uIvW9QBO56uojp/ u1FSWeq3qpLoh2I4h+11ck8JwqXIg4/lsvyaIkuNOcCOdLk0h8GDZiM1WwZiUYhyMjvY +GgwKGX8+aGuv0NAe3ztO7Z0rvFZOKS9rC6VPl0CcZ/yzwn1uPU6xZ48JEWaqqze12GX 5PJg== X-Gm-Message-State: APjAAAU6R5rHeJLtVWY6Gge0dOiWo8lmXAkRpXMuHkEDNwC84sqQ6EUf 6x4c++5/IOyjwlcuu+y0zD+DQWvBYN9qvPoyc3q+HA== X-Received: by 2002:a1c:544f:: with SMTP id p15mr13683726wmi.65.1555143318269; Sat, 13 Apr 2019 01:15:18 -0700 (PDT) MIME-Version: 1.0 References: <20190413073906.53676-1-anup.patel@wdc.com> <20190413073906.53676-4-anup.patel@wdc.com> <20190413075548.GC30428@infradead.org> In-Reply-To: <20190413075548.GC30428@infradead.org> From: Anup Patel Date: Sat, 13 Apr 2019 13:45:07 +0530 Message-ID: Subject: Re: [PATCH 3/3] RISC-V: Access CSRs using CSR numbers To: Christoph Hellwig Cc: Anup Patel , Palmer Dabbelt , Albert Ou , "linux-kernel@vger.kernel.org" , Atish Patra , Paul Walmsley , "linux-riscv@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" 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 1:25 PM Christoph Hellwig wrote: > > On Sat, Apr 13, 2019 at 07:39:44AM +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. > > This looks mostly fine, but also please remove all the comments > regarding using sptbr instead of satp now that they are not true > anymore. Sure, will do. Regards, Anup