Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp956295lqh; Fri, 29 Mar 2024 02:29:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUX+7g8Evkln9RybI1rYJKz0WtkEVWy18FegSGkoGl33kS2EDY3W2Uveotl+It++6mV5qXxZxzCpPZMQcWJHhDe1Pxr1iCjdVrz7WA1w== X-Google-Smtp-Source: AGHT+IGeYe9eWno+KY1xwVL2Zz34R4Kdz9FTvc6tuGbLhBbYA4Kkr2MZ1TLySSRaErVpxS33kdGs X-Received: by 2002:aa7:888f:0:b0:6ea:afd1:9023 with SMTP id z15-20020aa7888f000000b006eaafd19023mr1948051pfe.0.1711704577381; Fri, 29 Mar 2024 02:29:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711704577; cv=pass; d=google.com; s=arc-20160816; b=rx7cDtherLxjsyX504n2qj67aNOsdyw1hSo+DJSRw3oxAcxrp7F6X3FC4sgFE2sb7e YwFegTQKMTDaXOD9u39JFHPUC2angYjhQqGYuz+fvLfBLPryxiIpztuowq3p+eqEkSFK 0Z9sw1ofAQ0slohdX0TwnjaBdU7RLJ20XcYiN80PMdClhUZ+aCjgK+nw2NCyMHd3y8wA FsxTefNPE+AT4tmnumNF19LmCtStjQtRvQtzmW5NzyOBOgD10imEXNmCP4WGyYgUcJ28 z+22D0wDVgBY4R7o4RBogLCUgS6TRyKdBHqr+82Y71Mo8SE1d2OLqhVR47sjPjJHa9TF 4oUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Z0W2e62vRjypPXRsKNjsPCEnDXDpWajUvlAFErcdHOc=; fh=/V+ZpxPv+qtwHu86VzaDXgba5vDMRzFTD/1YQEb4RmM=; b=z3OrNMUTv2LTOteSL9CeBWK9JWHZhWGBXkRlrjYaP/u8J+bIcgws4h3wzFsP0ZUK8V xz68wk31gi7ecA1tRdeco+/o3TltTCePcnWpNFCRifTdXEi61uVLEIe/VR9GRm2LI3pl OsnnvV5kTG6SWRhbH2/IRZV/HsAqqGqBIIYpF5cuPShT3/jqLYm37oB3H+hh2DRHkIrh TMyB7G9BOlRwv2e9N0qQhs0M+/PeM3N867dMUt7k1CpthNTJL1k91VdIQEslyVTsoEMN nRxE68HGZ2p6+6uk0hUe04RXtE56iUL8OWCjwMdK2t9S4FzvpgC1whn5nhwMhy9bo3Z6 9Z7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=FDKiLbhW; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-124334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u13-20020aa7848d000000b006eac2e5407asi3232398pfn.117.2024.03.29.02.29.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 02:29:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=FDKiLbhW; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-124334-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 792E4B22F44 for ; Fri, 29 Mar 2024 09:28:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5DE6446C5; Fri, 29 Mar 2024 09:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="FDKiLbhW" Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5738751012 for ; Fri, 29 Mar 2024 09:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711704469; cv=none; b=BBjcf/ZYfp5VucHnwukvOf+zibRsAhUbgZOSAM6HFzl6pBSpDEJBFUFzeifC7OwCPUlv2dT8bINz8JkHJNA2MGtOYb4ADHGAX3FcJ51nyiUeOpXp9Y0/WLi08M1R6nMCN+ctd8X3cB/lY1Y8Q+ob3kssLGDmqq6NiRGrmS3A1u0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711704469; c=relaxed/simple; bh=fkcsbGMX7J/mGQ3kvbZ+/zIV5Yfm+uf2j5rr/bXjhvk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RBMdLxu9Pd5B8R6CCZOUG3QB/pBo1uqAsGvt6h+EbjElU1N/u1KDt0nw8flbcOIj4otyYDP+Y1B/rwLalgmdhZRPvfXUHnGGI0d7Jnv6C5TV1Q25NSLuRN7xokNE3TweKSdfWnwG8ebhAfDbm+iSg2plvKApe0pZm0NjZ6vxIws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=FDKiLbhW; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2a21af18037so40211a91.3 for ; Fri, 29 Mar 2024 02:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711704467; x=1712309267; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z0W2e62vRjypPXRsKNjsPCEnDXDpWajUvlAFErcdHOc=; b=FDKiLbhW62r5AuDSXRUZj5O5V3KeL56RpH3jWggpLKpbu7GKnA7nl+0w1rNFqWqCrL bCNU+xqLaMoPdGIm2fXL9sQJOcQSGSb1rDXaSg4xusFdoHHhGShDjOvxqbt3tveJy3AX SlQDBcxdKfr7wO7SmIXrDTOusRs5IT++cTkN6QRFi4nS+968tg36N+p2RA10SHrKeJuy FYxkGlnzCi7Kq5S1W4EuUVGpZmfpYHnldAftYCFD/rmgTmJCyLdJPNF6Y2Hn4ypjNpnz SPhzruXMbp/eSgUgWD3TTj84ZlzS+4vrKUHnDAm46+xl7zEtd6+4kg7wfA6qLP43GDcB 0Y7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711704467; x=1712309267; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z0W2e62vRjypPXRsKNjsPCEnDXDpWajUvlAFErcdHOc=; b=Ptex+km5WwIPtuXrm2Cj6wMbCNZEcyC/7e5klBVQeYZ6DALiP9F9fC9rr4LNyMdSjE 3P8Hw7mj5THpuWKPNxjBR0fymxAIj1o6ZcGYUG/UhM4nIEL8cEEJNTE4wSIye2/Xph49 fxenf+am9aAiElM/9lbZSCpwgSfLJx525fHeU+NVaIT4/GwujuXw/6O4r2ycmkLpfLTJ 7dBGHh6QH8gDF3dAiTLUnVjiCeHuXaM4J59oQFkec/0Q0hpdFdnH5npOw8+BBCdkNbgU AM9FMYCoT2ImECHEILHhMpIcj7631wtzTa7HKeiJNfKH0b+F3qDAAzjhnR6juJSZMACD IiPw== X-Forwarded-Encrypted: i=1; AJvYcCWuVSNPvsq9BXDIizXVZxI5S8/TWWzuxb6C4zVI93dY6Fk0ei1UHjAMLHuZQCeSlLGGWqsEhnKFmCGvZzHqFgLa3tcMK667ieOvh6H4 X-Gm-Message-State: AOJu0YyCJaQjYnvOclZoDHoa5RZZ/9YgXMEHLOSaMAeeTrDKw0T2M1bC p0nkBf/Zs/I/UzkSkMHFsxpcH3POeEvW9ce0Qw+64+OS3iwciw448Ni5upxbR68= X-Received: by 2002:a17:90b:46c6:b0:2a2:176f:fba9 with SMTP id jx6-20020a17090b46c600b002a2176ffba9mr596520pjb.43.1711704467546; Fri, 29 Mar 2024 02:27:47 -0700 (PDT) Received: from [127.0.1.1] (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id cv17-20020a17090afd1100b002a02f8d350fsm2628830pjb.53.2024.03.29.02.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 02:27:47 -0700 (PDT) From: Max Hsu Date: Fri, 29 Mar 2024 17:26:18 +0800 Subject: [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240329-dev-maxh-lin-452-6-9-v1-2-1534f93b94a7@sifive.com> References: <20240329-dev-maxh-lin-452-6-9-v1-0-1534f93b94a7@sifive.com> In-Reply-To: <20240329-dev-maxh-lin-452-6-9-v1-0-1534f93b94a7@sifive.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J. Wysocki" , Pavel Machek , Anup Patel , Atish Patra , Paolo Bonzini , Shuah Khan Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, Max Hsu X-Mailer: b4 0.13.0 The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension, to prevent RW operations to the missing CSRs, which will cause illegal instructions. As a solution, we have proposed the dt format for these CSRs. Signed-off-by: Max Hsu --- Documentation/devicetree/bindings/riscv/cpus.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index d87dd50f1a4b..c713a48c5025 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -137,6 +137,24 @@ properties: DMIPS/MHz, relative to highest capacity-dmips-mhz in the system. + debug: + type: object + properties: + compatible: + const: riscv,debug-v1.0.0 + trigger-module: + type: object + description: | + An indication set of optional CSR existence from + riscv-debug-spec Sdtrig extension + properties: + mcontext-present: + type: boolean + hcontext-present: + type: boolean + scontext-present: + type: boolean + anyOf: - required: - riscv,isa -- 2.43.2