From patchwork Thu Apr 18 14:26:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13634996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9493DC04FF8 for ; Thu, 18 Apr 2024 15:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fknYDcSHZFw+964Sq+ow+exQlWaTW7e+pptNA5fgid0=; b=xsveh4pFe8Uqho j0Mak96EmxBYavhcP8H913SrYyPxXvtnGOxHURhtL3Qo8RkBWoXSxMQX+1zkx/0T0hQBC9JJPLaiP /CAuc+KFqILsabFz4wJ/FufJZceJRpyxO+BaZ4Or7wAhmxDVU+x51nMbVTvOoQeWD2EpTj9s6mGot ySKJpVF816/+utcfFOfrrcw/aNYHUASwZ3RwptxBq4ZWwSLaX2URYy4vM0cnBd0yMdaLd2Lpw2je4 h5JeAnjr2lYZui5r7Y2QZqCOXedk5WoF1ufhCrTFgqXWX+fdhMIUmb2iZT7+aVyrZrAvpB101Y6S3 C/XxaevYs1i+g5OAN/7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxTjl-00000002nun-0cQM; Thu, 18 Apr 2024 15:31:45 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxSjL-00000002cVh-09Qf for linux-riscv@lists.infradead.org; Thu, 18 Apr 2024 14:27:17 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-346407b8c9aso257186f8f.0 for ; Thu, 18 Apr 2024 07:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713450433; x=1714055233; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2hh6e2GF78oUYrxH7UeTADA8qs5jCuVhRAdsmr48k94=; b=oZYLE9zHIWJJo9jBN0XS0b5MXA84NO43k6hseAS2sV99vDG0unecJ+ou04YD67DdnT ydKPXsW6Cy3st8HiqjgdszZ30xOKO7Wxlz0B3nV8J3cUZzuSrnlsa9ClL5U4v52SJmfO PaNbQy3X5hxM6OP5u5yxot1MHp5rwvaRfxpOe7aRsqWBFdYQpdvfn/6lsaQo2nGXBq1T LqgFqCV7T0ee3O6t5wUY43Rv/zjaqEFZgpo4aV6xUXZGFQZOt4zdKyPyp1fC74nGKMVV gFhRxtnecguWCuX2nnCTKyXyEO0TVEVocrFymvEo9doKHWXpBrDfWTgV6BpuWgNvIyIB 1zrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713450433; x=1714055233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2hh6e2GF78oUYrxH7UeTADA8qs5jCuVhRAdsmr48k94=; b=QLZwnnTuQAVZjUjYglwTCdQFCsqIxi7d0QdLEemzfA9ItTVgiQGol465cfIdpNL3cw arIxNSqJfQYkNQPquqM4d6Qy4r+/1lg2P/uTxZgEEj838OyDiWk7A0PAHdxGbpkqmbsx tO7ErGCugblc3urKGYjKl/y7c5//cm6sF6rIisJblPQH2lsheHo96zLfvGcsZfLfm2tl /fFJfJ2TdxfSZk6NDFB4tPLiw9oc9gbavNgWSf40OYdjG5nwMP+StwgucjCFrz1acoWa JBKu34WpBkgGccCrw2geP5jSH6NPWJHG9KxZgYc8Flg7r53+Fe+Sylrc2ymIJSrE5/72 xfdQ== X-Forwarded-Encrypted: i=1; AJvYcCWLLtTbn1d7euHjJt7fF0heEII36JjwXIIszxP7rM1aFln5ELsEK72Rgyw0k3XQHkO0mI5Cz21wbhhZCNI7F+bcM7VatJWJtjUj6DtHU6I8 X-Gm-Message-State: AOJu0YyQCqzDOszjaeSJbLjKJKAfxuL0MTZ+B+3yQvjxbrnhOvyukwxQ IR/CpCJBsQFjulCGH/fTiLwI2ep94E+QZi+PlbFWCU/ZJsTesPMyTWGPw+pqqK4= X-Google-Smtp-Source: AGHT+IHtDtcO4AoiryjW0Pig9lF2J1fPpYbAE7uetQUD4j2yMmH3o1hOU+m/bZxddoy6PQKmq3VrHg== X-Received: by 2002:a05:600c:55d7:b0:418:ef65:4b5f with SMTP id jq23-20020a05600c55d700b00418ef654b5fmr1037961wmb.3.1713450433361; Thu, 18 Apr 2024 07:27:13 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:7b64:4d1d:16d8:e38b]) by smtp.gmail.com with ESMTPSA id v10-20020a05600c470a00b00418a386c059sm2873645wmo.42.2024.04.18.07.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:27:12 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Ved Shanbhogue Subject: [RFC PATCH 3/7] riscv: add Ssdbltrp ISA extension parsing Date: Thu, 18 Apr 2024 16:26:42 +0200 Message-ID: <20240418142701.1493091-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240418142701.1493091-1-cleger@rivosinc.com> References: <20240418142701.1493091-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240418_072715_117601_D30F52FB X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Handle Ssdbltrp extension at isa parsing level. Signed-off-by: Clément Léger --- arch/riscv/include/asm/csr.h | 1 + arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 510014051f5d..5528159b3d5d 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -102,6 +102,7 @@ #define EXC_INST_PAGE_FAULT 12 #define EXC_LOAD_PAGE_FAULT 13 #define EXC_STORE_PAGE_FAULT 15 +#define EXC_DOUBLE_TRAP 16 #define EXC_INST_GUEST_PAGE_FAULT 20 #define EXC_LOAD_GUEST_PAGE_FAULT 21 #define EXC_VIRTUAL_INST_FAULT 22 diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 5340f818746b..16d2ad7ca9b2 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -80,6 +80,7 @@ #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 #define RISCV_ISA_EXT_ZACAS 73 +#define RISCV_ISA_EXT_SSDBLTRP 74 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 89920f84d0a3..5cff21adf2c4 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -303,6 +303,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(smstateen, RISCV_ISA_EXT_SMSTATEEN), __RISCV_ISA_EXT_DATA(ssaia, RISCV_ISA_EXT_SSAIA), __RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF), + __RISCV_ISA_EXT_DATA(ssdbltrp, RISCV_ISA_EXT_SSDBLTRP), __RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC), __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL), __RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT),