Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2842193lqp; Mon, 25 Mar 2024 10:42:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXdoTXDVvnbC4Jc6HpuNaXq8Df1A1W8aMqAawLfa9+A4x0yPU06dEBCad/fiHWDsuefnNQL+QBKmFVcZTL1XY/qanIYLnvvZ0q6FIN+Kg== X-Google-Smtp-Source: AGHT+IFmKDzZDgAeAA5QBClxl4ZczUMdOAIQkV07PRElRH16rtGp1+mmODTeo5sTsgqvVBxGx/14 X-Received: by 2002:a05:6512:3124:b0:513:ccda:bc86 with SMTP id p4-20020a056512312400b00513ccdabc86mr4767389lfd.4.1711388568001; Mon, 25 Mar 2024 10:42:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711388567; cv=pass; d=google.com; s=arc-20160816; b=e7mSTEH0DzVelEYeu/FUZVw7wd/13rnt8AxWLRav6Z8RGfYcE22yfmVGAQqDbJTZmI WeG4DVG0LYpALuKYNqzxy/zHVDxl6xCkIqeMXq0WKKqy2GVfbebFZsIEnCdFrVtCK5Z9 l1/SmNpVtQ4UsXhIgGaKd+wSZcKtjVMdWC6v4qzQeRGjdWJkaIokS+Mj2uW77PTnxQmS NkkM9nplq+A8kQqAf9wQDMm7XtErqvgg826dsuXPc2F3GhEfDKgsuh0XSdlZnrxuJL1R M9plp2HCesRCbOIPCXtWsZIf5hrsYvUgK/em61vCdth9ReniPYuffvhC6S3zjaK8PlOB zXUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=+iPMgv/cr8SpkBrA9Ccu/Lx4vqoxiUV1Scz8NFUymLs=; fh=z4mh4yHIkTcZSmZGSZJ4aTrEiEnQKNHwjsnW/bKRHKc=; b=ILIwLhscKScJzLZH2H0koCY9E7ISoXBhfqhfumrkNeES1tnhOYegM24NFDXW5GPr2c QYosxYRM8cy1Q7hgSJqXx9foUPu8VttnbpnhXLKGWm0XoJJXMvxrZKjvEKTU3J3iq/Sd szAKuGgw3aN3QzVrKfMs/KFFjojGNBh2+tTf2a9JnCouKAw7Quc8ceEKCDsOpWgAJvOI A6Rl6mJN7jCFu/xp1vo4+CxcSn8YLBVleXkTMLjF2e4n3sd1MaLzk+KKxrF/Yv78oGIK 97Jvg1AyVGuUvhu5bf6zu0Im9v2tTFpP4LmipHcjikjzp6VLdHYnf4Swzxhm3Fzhn4R9 NiqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vWc348d9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-117503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r5-20020a056402234500b0056c1ccd2dfdsi385566eda.25.2024.03.25.10.42.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vWc348d9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-117503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 574D11F38331 for ; Mon, 25 Mar 2024 17:42:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0907A14C595; Mon, 25 Mar 2024 16:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vWc348d9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eiooIjam" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8799714A4E5; Mon, 25 Mar 2024 16:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385216; cv=none; b=b58s7Yg5yvrRlV7z6granHNgTOdz47RA+QUh8xSwJ2wDEJtFzL+k6OvQAQdtrEPncmlj5cMz86jER2fP3UXcjd9y9taPzC79gSQIFux5ijmnIr1rT0wAwwD17S5E76B3OlAOHKRZ4psIJ25NBW7ECV7ZhSRhquduybYGpIuWS9g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385216; c=relaxed/simple; bh=zn97rJWOTgwJyOjrej7z+I3EcOM7kSHNd5+DDyBRikQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KprvyEeNSaTt9N/eCFMvlDe/PKaf0jNu8jyZSjq2NH7Agzoo9xb9q0z7vi9MsKwEUgkcSH23tAaY9w+IU8t3gPpBDUw3t0zAE8ubXH4PtAUjgpVYvMy2AKWySEQuNh8XgZLGaSak0wLXTg8f3eg9UCTKpZvgZ10ziEQaKURZBZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vWc348d9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eiooIjam; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 25 Mar 2024 16:46:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1711385212; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+iPMgv/cr8SpkBrA9Ccu/Lx4vqoxiUV1Scz8NFUymLs=; b=vWc348d9Vw27FQSNS3nzHbgP54sOe7B8GSCWSbTaA9hIJZGKtZdA3X0EUKel+aiFbYviep /PjVxpARujP1oi9tJqZx8wbgRkqO/GzlYu3A62sLlhRfiNsKc5kSghwpVvpechFEg/+knn U2g+BS004//G7s9BId8wBwfb5fOiCe/WYEnIbt/SGS3Ftx3v10JBOAY+G7WYgMck02C0Dj Y7LaHoatpGs+XNtwgBuDkZEsOFAiVgQPbGIOP9VWY2khFDUOOGKp0eA89Mzn6gWcILBBQ9 2ZDxoi7jhzVu1vBdBDqnegBSsyIHq8gpYLdEcRakqxnOpZuN4lr9rnSZ/rW6bw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1711385212; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+iPMgv/cr8SpkBrA9Ccu/Lx4vqoxiUV1Scz8NFUymLs=; b=eiooIjamQ9pwfgHY4w6YIo38FDCq/YHQ2IVeHepBG+0qygBKfEvGJrMv+ieohp3mSZhrpP NrO6gAWHbFCiJeBA== From: "tip-bot2 for Anup Patel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] dt-bindings: interrupt-controller: Add RISC-V incoming MSI controller Cc: Anup Patel , Thomas Gleixner , bjorn@rivosinc.com, Conor Dooley , Krzysztof Kozlowski , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20240307140307.646078-2-apatel@ventanamicro.com> References: <20240307140307.646078-2-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171138521199.10875.13726138322862089924.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/core branch of tip: Commit-ID: 0151a8db49b0a88f967dca0ea5ae2bee2d67b22a Gitweb: https://git.kernel.org/tip/0151a8db49b0a88f967dca0ea5ae2bee2d6= 7b22a Author: Anup Patel AuthorDate: Thu, 07 Mar 2024 19:32:59 +05:30 Committer: Thomas Gleixner CommitterDate: Mon, 25 Mar 2024 17:38:28 +01:00 dt-bindings: interrupt-controller: Add RISC-V incoming MSI controller Add DT bindings document for the RISC-V incoming MSI controller (IMSIC) defined by the RISC-V advanced interrupt architecture (AIA) specification. Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Tested-by: Bj=C3=B6rn T=C3=B6pel Reviewed-by: Conor Dooley Reviewed-by: Bj=C3=B6rn T=C3=B6pel Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240307140307.646078-2-apatel@ventanamicro.c= om --- Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml | 1= 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 172 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ri= scv,imsics.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/riscv,ims= ics.yaml b/Documentation/devicetree/bindings/interrupt-controller/riscv,imsic= s.yaml new file mode 100644 index 0000000..84976f1 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml @@ -0,0 +1,172 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/riscv,imsics.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RISC-V Incoming MSI Controller (IMSIC) + +maintainers: + - Anup Patel + +description: | + The RISC-V advanced interrupt architecture (AIA) defines a per-CPU incoming + MSI controller (IMSIC) for handling MSIs in a RISC-V platform. The RISC-V + AIA specification can be found at https://github.com/riscv/riscv-aia. + + The IMSIC is a per-CPU (or per-HART) device with separate interrupt file + for each privilege level (machine or supervisor). The configuration of + a IMSIC interrupt file is done using AIA CSRs and it also has a 4KB MMIO + space to receive MSIs from devices. Each IMSIC interrupt file supports a + fixed number of interrupt identities (to distinguish MSIs from devices) + which is same for given privilege level across CPUs (or HARTs). + + The device tree of a RISC-V platform will have one IMSIC device tree node + for each privilege level (machine or supervisor) which collectively descri= be + IMSIC interrupt files at that privilege level across CPUs (or HARTs). + + The arrangement of IMSIC interrupt files in MMIO space of a RISC-V platform + follows a particular scheme defined by the RISC-V AIA specification. A IMS= IC + group is a set of IMSIC interrupt files co-located in MMIO space and we can + have multiple IMSIC groups (i.e. clusters, sockets, chiplets, etc) in a + RISC-V platform. The MSI target address of a IMSIC interrupt file at given + privilege level (machine or supervisor) encodes group index, HART index, + and guest index (shown below). + + XLEN-1 > (HART Index MSB) 12 0 + | | | | + ------------------------------------------------------------- + |xxxxxx|Group Index|xxxxxxxxxxx|HART Index|Guest Index| 0 | + ------------------------------------------------------------- + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + - $ref: /schemas/interrupt-controller/msi-controller.yaml# + +properties: + compatible: + items: + - enum: + - qemu,imsics + - const: riscv,imsics + + reg: + minItems: 1 + maxItems: 16384 + description: + Base address of each IMSIC group. + + interrupt-controller: true + + "#interrupt-cells": + const: 0 + + msi-controller: true + + "#msi-cells": + const: 0 + + interrupts-extended: + minItems: 1 + maxItems: 16384 + description: + This property represents the set of CPUs (or HARTs) for which given + device tree node describes the IMSIC interrupt files. Each node pointed + to should be a riscv,cpu-intc node, which has a CPU node (i.e. RISC-V + HART) as parent. + + riscv,num-ids: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 63 + maximum: 2047 + description: + Number of interrupt identities supported by IMSIC interrupt file. + + riscv,num-guest-ids: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 63 + maximum: 2047 + description: + Number of interrupt identities are supported by IMSIC guest interrupt + file. When not specified it is assumed to be same as specified by the + riscv,num-ids property. + + riscv,guest-index-bits: + minimum: 0 + maximum: 7 + default: 0 + description: + Number of guest index bits in the MSI target address. + + riscv,hart-index-bits: + minimum: 0 + maximum: 15 + description: + Number of HART index bits in the MSI target address. When not + specified it is calculated based on the interrupts-extended property. + + riscv,group-index-bits: + minimum: 0 + maximum: 7 + default: 0 + description: + Number of group index bits in the MSI target address. + + riscv,group-index-shift: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 55 + default: 24 + description: + The least significant bit position of the group index bits in the + MSI target address. + +required: + - compatible + - reg + - interrupt-controller + - msi-controller + - "#msi-cells" + - interrupts-extended + - riscv,num-ids + +unevaluatedProperties: false + +examples: + - | + // Example 1 (Machine-level IMSIC files with just one group): + + interrupt-controller@24000000 { + compatible =3D "qemu,imsics", "riscv,imsics"; + interrupts-extended =3D <&cpu1_intc 11>, + <&cpu2_intc 11>, + <&cpu3_intc 11>, + <&cpu4_intc 11>; + reg =3D <0x28000000 0x4000>; + interrupt-controller; + #interrupt-cells =3D <0>; + msi-controller; + #msi-cells =3D <0>; + riscv,num-ids =3D <127>; + }; + + - | + // Example 2 (Supervisor-level IMSIC files with two groups): + + interrupt-controller@28000000 { + compatible =3D "qemu,imsics", "riscv,imsics"; + interrupts-extended =3D <&cpu1_intc 9>, + <&cpu2_intc 9>, + <&cpu3_intc 9>, + <&cpu4_intc 9>; + reg =3D <0x28000000 0x2000>, /* Group0 IMSICs */ + <0x29000000 0x2000>; /* Group1 IMSICs */ + interrupt-controller; + #interrupt-cells =3D <0>; + msi-controller; + #msi-cells =3D <0>; + riscv,num-ids =3D <127>; + riscv,group-index-bits =3D <1>; + riscv,group-index-shift =3D <24>; + }; +...