Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2761845ioo; Tue, 24 May 2022 05:32:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzECELueRic3ZYvx1AuSEz51C+qJIPGrFbAt5HDW51Zd7/LoynWUh/kn8YgT4lwHWvkD1dB X-Received: by 2002:a05:6402:1508:b0:42a:b5da:b112 with SMTP id f8-20020a056402150800b0042ab5dab112mr28784094edw.192.1653395521930; Tue, 24 May 2022 05:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653395521; cv=none; d=google.com; s=arc-20160816; b=udZo7NsBYSzjdS8g4M4lcniA2q3OTca/21VW5QEyV98RXryPRritevYHttEEadGYzl olvlybNMPL3gcotgQCrB+S6ymVwOAeKdcleK8QO4KyH/UR4X2XXGqJ6TJw+KE17FGCuX Bez9WY0VsMaSC2NNeMI9BYsjI0XBtTgtE+XUFxIY43zcQNSNlJsGcuBOeRMPjk8ihw4c 6LZIY1klWUinOD+BtxCy7jezEmW6Fv6sfPeH5HDlvwiIEuNXX7E2ww8DL/wGMWyHG96k VtBzlsyF8J9EJdy49MOKRbbpuuiFZc5r7qAnR0XD6hjA/Qtvuaz7VTTMXJTdnCpO96Y5 RkCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yfCYl4aV74lIhtPwwS5Hj7a7JLAdHT5HtAXAEPKuxxw=; b=VyEep6+WUv7ildjGF7L3CKah/dkWfWljr4uamx55unvJ3aj/bpq6h+Y2czfLXdaGRi Nj1h0zGqNcY7tei1bsAyaHvBeJcVWHJ6oD5aYuFqQoXxZkt9LBjkEWIeDIk9SEwtxiJG A6LNCU5cpnbAtCgHBbne+EHNtMY5hZmCv+MMN5UH7DnpoJFlD3L7ieAO4gSVBtxh6eDk Hrlz77+9g+7mV5JnEduE5ERvdOinGb3iYg/chpBENc30G0IInTgL/xpQnINS1CsBYEYR kbkSp9qhhy/X5G8lyIQ1wNAdSz5wrsIPPXSUT7XHxBmmIwkmgirprIm1e5LEcBAuyf0c Ysow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=SkEJCBhd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg3-20020a170907970300b006fe8d330d6esi9977385ejc.374.2022.05.24.05.31.35; Tue, 24 May 2022 05:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=SkEJCBhd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236574AbiEXLYc (ORCPT + 99 others); Tue, 24 May 2022 07:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbiEXLYa (ORCPT ); Tue, 24 May 2022 07:24:30 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA47779381 for ; Tue, 24 May 2022 04:24:29 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id r6-20020a1c2b06000000b00396fee5ebc9so1193623wmr.1 for ; Tue, 24 May 2022 04:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yfCYl4aV74lIhtPwwS5Hj7a7JLAdHT5HtAXAEPKuxxw=; b=SkEJCBhdLlFzmsU79CLKeBLhUBGc21SllCmNz5BJw0D+GbWUAg3Zor9zFl//oWG9OQ 1KqWUyp7inB2ZpNmoLokYAd8tGeJKSoR6AekxiFG2LEQatcPdWNKdIJWK29PLSmaZsB5 JxL1fWSOpTzkKylyxE3ZuvMWFMEstvhrZYDbUuNk/rZ5Zx4zngCqCIbqcQ6YH/vuBi20 VIks0/oZF9dqUp065iC0043Ymy+cQlQwBdgRz00WN4dOlxYm0cxnVAM5rVfDclmsh21e 3fWOrYqDrjvFiqnovynEsyG8xRnUrUKu6yIGDITpsgMjPaUn6Cg+Ts3d7vsLJrCJ2tZH tHfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yfCYl4aV74lIhtPwwS5Hj7a7JLAdHT5HtAXAEPKuxxw=; b=h7PIezRhYRwbEuUe38bgD0YZEJ+7D/6pW0H4VTF8uTYVEEHWQAAiM18FEybpBm26FV 5czbE/W/VvNsNPVD3hQzc+/suDO82XttAO7yOVLv5J1oetsoOsNV5b+GYJVDMJzn3SrB e5f8xoNWNxLACkobQ4mRrI3nSFqNqPkIYnXwW9H2GPOzqX3fn6+TgWIlJzbY6tbAlvVz 461NtOttWCtWuMSA8qCZ1AQfhBSXyi5D/ukexuONkgi/7ELfhMqAqYYCu/Ct3ciqQ0lm qhQLjnlDP3EosWu74Emp5e4S1mmyWmYZa5qQXLMXrjKWVaQlv5ENQtToFFPVROyNNLhi C64w== X-Gm-Message-State: AOAM532ML5Wwvh3pTIu/HOlZe1uoWjdTXZc30s0yApLx5xHh6VYGFMpU TrZ89l91t2arUkVw79qrJ9jCR2HtnTJSEP0uRJIXig== X-Received: by 2002:a05:600c:5112:b0:397:53f5:e15b with SMTP id o18-20020a05600c511200b0039753f5e15bmr3292625wms.93.1653391468187; Tue, 24 May 2022 04:24:28 -0700 (PDT) MIME-Version: 1.0 References: <20220426185245.281182-1-atishp@rivosinc.com> <20220426185245.281182-2-atishp@rivosinc.com> In-Reply-To: <20220426185245.281182-2-atishp@rivosinc.com> From: Anup Patel Date: Tue, 24 May 2022 16:54:16 +0530 Message-ID: Subject: Re: [PATCH v3 1/4] RISC-V: Add SSTC extension CSR details To: Atish Patra Cc: "linux-kernel@vger.kernel.org List" , Atish Patra , Damien Le Moal , DTML , Jisheng Zhang , Krzysztof Kozlowski , KVM General , "open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)" , linux-riscv , Palmer Dabbelt , Paul Walmsley , Rob Herring Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 27, 2022 at 12:23 AM Atish Patra wrote: > > This patch just introduces the required CSR fields related to the > SSTC extension. > > Signed-off-by: Atish Patra Looks good to me. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/include/asm/csr.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h > index e935f27b10fd..10f4e1c36908 100644 > --- a/arch/riscv/include/asm/csr.h > +++ b/arch/riscv/include/asm/csr.h > @@ -227,6 +227,9 @@ > #define CSR_SIP 0x144 > #define CSR_SATP 0x180 > > +#define CSR_STIMECMP 0x14D > +#define CSR_STIMECMPH 0x15D > + > #define CSR_VSSTATUS 0x200 > #define CSR_VSIE 0x204 > #define CSR_VSTVEC 0x205 > @@ -236,6 +239,8 @@ > #define CSR_VSTVAL 0x243 > #define CSR_VSIP 0x244 > #define CSR_VSATP 0x280 > +#define CSR_VSTIMECMP 0x24D > +#define CSR_VSTIMECMPH 0x25D > > #define CSR_HSTATUS 0x600 > #define CSR_HEDELEG 0x602 > @@ -251,6 +256,8 @@ > #define CSR_HTINST 0x64a > #define CSR_HGATP 0x680 > #define CSR_HGEIP 0xe12 > +#define CSR_HENVCFG 0x60A > +#define CSR_HENVCFGH 0x61A > > #define CSR_MSTATUS 0x300 > #define CSR_MISA 0x301 > @@ -312,6 +319,10 @@ > #define IE_TIE (_AC(0x1, UL) << RV_IRQ_TIMER) > #define IE_EIE (_AC(0x1, UL) << RV_IRQ_EXT) > > +/* ENVCFG related bits */ > +#define HENVCFG_STCE 63 > +#define HENVCFGH_STCE 31 > + > #ifndef __ASSEMBLY__ > > #define csr_swap(csr, val) \ > -- > 2.25.1 >