Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4439360ioa; Wed, 27 Apr 2022 04:02:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNZfF1e40N2UcEBVMT2quceCvhS8jw8ZOs5BUUuxyEQMPRaMo7fl/xcQAK6DLT+UE6sAU+ X-Received: by 2002:a05:6e02:101:b0:2ca:c6d7:b077 with SMTP id t1-20020a056e02010100b002cac6d7b077mr10374357ilm.306.1651057367833; Wed, 27 Apr 2022 04:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651057367; cv=none; d=google.com; s=arc-20160816; b=k5q8XSAwPT7VJab/+gK8iGXkzghCah8KQXKrw25CtpZvDiHYZO2Ok5WQeddeZU3CYL zThAiZlQQn5uOB8AuUQMj4chYmPMl1RXDiDpNu7vxF9wL9JuaK1OvvCQGJJ8uISBJilz 6OQA393sF1gMJ7s7L9IhD9TEQVutQ02zgYyueuNy6KA77bmfCe8IggDCL0hZlfc7mvc6 T76oVp0W9UyXvh7+gilSszQKbZo+4+TitwTyW6Jb7yfwrdbQmx3Q9jBADqXQ2XhAI2FJ lLxS5QR3JqxVHvxHIcnY2zAeCtBI/XvoqyI+RccBnMuv0YuBuiKGrjXwwIWMIzOk2DOL Na4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Abl0bfYYrLlQ27vYh6a3IKNxFiISaIZQZeWkMU0B+HY=; b=pSSUpK3BqkzaKiCl7OCq10+wCfR7VKhY7lS1pncs2BdSUWLKKwOG1nuNWx/wXfnqdF RlvxfWvXIjt0Bqd1ch9pPuwpBhGD0jZXC2H2P4F7zMrQJqD+ROA3FiDwdRlU6yrhcUuG I5yL95mDzASPb3TvxuOFPDyLc8zZ/9cCOTDkcJ31xpnZNp4m/RfjRUeIl7vqta3Dzilv xbJPdwY8niFP5IYi3s325JslaPzJtNaBdw7wFExdzE1OqkseEd6TL2ALQgs8F6E/BW/4 c2YsYjX+XdNTYJ9JfxAVAP82aAzgDCVBRVKw4k0uBtBkE0cw6eXNJla4flNyWwViM/l3 dpDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=vBrOC+cl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q20-20020a027b14000000b003263c9f4421si391304jac.40.2022.04.27.04.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=vBrOC+cl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3DECD4630C1; Wed, 27 Apr 2022 03:11:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353292AbiDZS41 (ORCPT + 99 others); Tue, 26 Apr 2022 14:56:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353093AbiDZS4V (ORCPT ); Tue, 26 Apr 2022 14:56:21 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B5241569E8 for ; Tue, 26 Apr 2022 11:53:09 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id bx5so9667203pjb.3 for ; Tue, 26 Apr 2022 11:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Abl0bfYYrLlQ27vYh6a3IKNxFiISaIZQZeWkMU0B+HY=; b=vBrOC+clk/14uoGOtUn6c44gW3HFg6+QeB4YEt2tbdI3Rg4yeq77I+oddnQCUvlydX iqg0VvE+xjRD4sWxZ1mmoMfRyrVxDPrUtXKkDrNRWGiibUU5SffVNYDCOpqXJjxDdfm+ /rqFvZzeeyDfpQ76ca7H7LzTLOeXPvHCD/pCuz5pOO8kXPjiAwdv46d+k1hN/PFWNd+S LE/PYTA7+dKF64/xYYMYdLWJgicaGpcdpGKTGGfp30OgMWLTSJq6OCxzp2iLWkNNeiSk DE2Xcjq/QTbTVXOE/59QHyVR17aRUr04hI760rCpzv0eJ487aQJHQthEkwcuJ3xj55vm C22Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Abl0bfYYrLlQ27vYh6a3IKNxFiISaIZQZeWkMU0B+HY=; b=pSw0Amm3yIKJEv8A+sRCzuWPhb96/dbKBPVqr4orEX9zMTT7KjBYbKwIqRelekEl06 bq/vo39eNOqm5JS6/OU3GU2iDYo8zSiP5TfCDWNm8NwDx+vZxiEFbYkKfDivuTmx5In4 K+P6KzAnreLRkqzEuFmFJb6W7cWkLFIV2hElNTIJtzrgZNqWtVs8u3T+HWuqDLAWFb/h DNemfQeGnoOQHkeVu29Stlq7qY5xIpg+8Ti1KfW0DfbmTSc1p2MXJ0oEROSG9uPHo2gf kWZfu50lZEhsdB+DvNzPhgPYgqp9r4Rhr2ggSeY0XEqH+7cxlYk6NGFFz41fjSOaDLGa 5dCA== X-Gm-Message-State: AOAM532ydObkXOq540M+A6BjiL3oEK1aG5BeRbmI35mvwO3A5FxQp3rs FnVeORuPXp58ByMCt2FWHXaGZflvvjyeig== X-Received: by 2002:a17:90a:884:b0:1d9:531c:9cd6 with SMTP id v4-20020a17090a088400b001d9531c9cd6mr16498367pjc.211.1650999188661; Tue, 26 Apr 2022 11:53:08 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id cl18-20020a17090af69200b001cd4989ff5asm3839664pjb.33.2022.04.26.11.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:53:08 -0700 (PDT) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Atish Patra , Anup Patel , Damien Le Moal , devicetree@vger.kernel.org, Jisheng Zhang , Krzysztof Kozlowski , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley , Rob Herring Subject: [PATCH v3 1/4] RISC-V: Add SSTC extension CSR details Date: Tue, 26 Apr 2022 11:52:42 -0700 Message-Id: <20220426185245.281182-2-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220426185245.281182-1-atishp@rivosinc.com> References: <20220426185245.281182-1-atishp@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 This patch just introduces the required CSR fields related to the SSTC extension. Signed-off-by: Atish Patra --- 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