Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp39829imm; Thu, 2 Aug 2018 13:31:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfMorCsSPd24/rN7f8Aj8/vvVJfNtHukq0ukx75B9/emylVu1LBGWcFitZlGHB3vVx79aT5 X-Received: by 2002:a62:c819:: with SMTP id z25-v6mr1075818pff.44.1533241872376; Thu, 02 Aug 2018 13:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533241872; cv=none; d=google.com; s=arc-20160816; b=XU07AjayqWKEGXQhU+eHGPXoFKtnXkUuCf+KeknhVUovlPCvDKP9MeTEGoksahSxN0 kOyLV17AUYMIfwSvjd/JJDGspnq9tE6QD8r6gvBIKyPe53CQU9lwRQIxsT8LLBGRYoal +uuo/Rscr5wqD8IDsrn/5myA2G+D0K2TetwR0GcSWuz9P2l2oTdPvRQQnSLkI92YI0ml vDywF6pswRih80OX1c4kOmsxTNpUBMQWsveYEc9bRsXUlMaQV3Q6vL7m39onLqqs0kpF quGhoB7dS1Aoa4fVN5BRTefpOKMPLyO40KxrrQYla5Xp8M9k9FGwTeViL+9KoN6zjMz3 st/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature :arc-authentication-results; bh=QDXv2wdMXuedg3f01o9H9KBXqjb+Eo7PJH2Wl4l7d+Y=; b=fb1nx2P9X2T0rzwaOtk/x9moz9b9imPdxQs99Ouj77sRAZoAghPxwIXtzKlLU7B7F9 TnGFzDlzG49NB0WJAvrOVnZ5Wq62zXXz5aaxrEtqFtQaUHR4Bd8w11owOSF4UnDP0/lE 9/O8PI3d2frfNUnt/2OpnHmmCzbgouf1/eASZlmedMbWofh2NxBIgzkjeHi/yyRP9jyc 470NkFww62R74e9rU00QpAdwkixYnt5RxiGhtPtd4U5aa2qL5fUAnAT4maWDLVmn4FQo mc31ji5mXbXpC0dXoP+5jHrDA199fNkb8DMtFScqp1/GBGZVepkJnUOJK07zv4BjIoTh smgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Sq9JwmXl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21-v6si2617660pgn.371.2018.08.02.13.30.57; Thu, 02 Aug 2018 13:31:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Sq9JwmXl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731429AbeHBWWt (ORCPT + 99 others); Thu, 2 Aug 2018 18:22:49 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46735 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727047AbeHBWWs (ORCPT ); Thu, 2 Aug 2018 18:22:48 -0400 Received: by mail-pg1-f195.google.com with SMTP id f14-v6so1216712pgv.13 for ; Thu, 02 Aug 2018 13:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=QDXv2wdMXuedg3f01o9H9KBXqjb+Eo7PJH2Wl4l7d+Y=; b=Sq9JwmXlIGVLFLD+hdsbIj/r5dpx1qG5z4CCmm9LyPFAkI1Qzp49sC3ORVpREInWYo jilooB8mtVuFmq5biJDOb6ImQogZD/XmQ4jc6Iz/G+WWFsyzPaSLxt0FvbIQotY5F3aN IueMkMJgi9RTy8g4VG5zV6mTKuEOkyH2B+WwTAIzaUZLr2gKPo/cX85OWOZx+0FpflXL nLUyBsiNO1UsL21nE2827Oa2SyJWJ0szKdq1Zlo541jRu82MPZBtLW1Nyda3CneZHTBb gYMVgBMCLZe7F6kV8Tpv7kdxwsAjGB+z6zpmy7jquBNi3PEI4/cA/jLKisugZHWgwdyi k7kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=QDXv2wdMXuedg3f01o9H9KBXqjb+Eo7PJH2Wl4l7d+Y=; b=q+uAIKqutfrL+Efy1REMACKHIPrIU3IyRZqNS23ZP+kz8cRcVug4vpfzkzWU/iuNn0 LCsezkriOTN2JifxoJ/S5UpRENSDFdrs+kTJf69B+yDMDwM57kIApUHDgwoHLwbJX61l R+5RNpC7gl3CsGbDwnu14JxXSVqEpWrnRYYvngDrO7Ou64Gv8siL8EBlvw8WfF2VqpM0 plSFU7g+t4dcXo8biJkzSDO3xeTHX1SttdUiePPsrvk+xp7Rh7QFiSbRNTn8cLkPEqCI UnVwHSMCK5BmLVdC3kYU3tNUPBfmWlmphaO5yToLvwBj6UxoxO8JY4PyqVblmhgp4JAH OHvw== X-Gm-Message-State: AOUpUlGlxmhV5zih8NNe6LCNtGZhzq1NymZhChNuo/ZSRrj9uqYR6aDF bZAZgKrB03iFvaa+FU0JAjQCjQ== X-Received: by 2002:a65:6104:: with SMTP id z4-v6mr863801pgu.361.1533241803893; Thu, 02 Aug 2018 13:30:03 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id p3-v6sm3791704pfo.130.2018.08.02.13.30.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 13:30:01 -0700 (PDT) Date: Thu, 02 Aug 2018 13:30:01 -0700 (PDT) X-Google-Original-Date: Thu, 02 Aug 2018 13:15:39 PDT (-0700) Subject: Re: [PATCH 2/3] dt-bindings: interrupt-controller: RISC-V local interrupt controller docs In-Reply-To: <20180625200448.26fvdv2tj3etmtlp@localhost> CC: tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, shorne@gmail.com From: Palmer Dabbelt To: christoph@boehmwalder.at, Christoph Hellwig Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Jun 2018 13:04:48 PDT (-0700), christoph@boehmwalder.at wrote: > On Fri, Jun 22, 2018 at 04:20:05PM -0700, Palmer Dabbelt wrote: >> From: Palmer Dabbelt >> >> This patch adds documentation on the RISC-V local interrupt controller, >> which is a per-hart interrupt controller that manages all interrupts >> entering a RISC-V hart. This interrupt controller is present on all >> RISC-V systems. >> >> Signed-off-by: Palmer Dabbelt >> --- >> .../interrupt-controller/riscv,cpu-intc.txt | 41 ++++++++++++++++++++++ >> 1 file changed, 41 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt >> >> diff --git a/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt >> new file mode 100644 >> index 000000000000..61900e2e3868 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt >> @@ -0,0 +1,41 @@ >> +RISC-V Hart-Level Interrupt Controller (HLIC) >> +--------------------------------------------- >> + >> +RISC-V cores include Control Status Registers (CSRs) which are local to each >> +hart and can be read or written by software. Some of these CSRs are used to >> +control local interrupts connected to the core. Every interrupt is ultimately >> +routed through a hart's HLIC before it interrupts that hart. >> + >> +The RISC-V supervisor ISA manual specifies three interrupt sources that are >> +attached to every HLIC: software interrupts, the timer interrupt, and external >> +interrupts. Software interrupts are used to send IPIs between cores. The >> +timer interrupt comes from an architecturally mandated real-time timer that is >> +controller via SBI calls and CSR reads. External interrupts connect all other >> +device interrupts to the HLIC, which are routed via the platform-level >> +interrupt controller (PLIC). >> + >> +All RISC-V systems that conform to the supervisor ISA specification are >> +required to have a HLIC with these three interrupt sources present. Since the >> +interrupt map is defined by the ISA it's not listed in the HLIC's device tree >> +entry, though external interrupt controllers (like the PLIC, for example) will >> +need to define how their interrupts map to the relevant HLICs. >> + >> +Required properties: >> +- compatible : "riscv,cpu-intc" >> +- #interrupt-cells : should be <1> >> +- interrupt-controller : Identifies the node as an interrupt controller >> + >> +Furthermore, this interrupt-controller MUST be embedded inside the cpu >> +definition of the hart whose CSRs control these local interrupts. >> + >> +An example device tree entry for a HLIC is show below. > > Spotted a typo here, "show" -> "shown". Thanks. It looks like we're actually dropping this binding and integrating this first-level interrupt controller into the core RISC-V arch code as keeping it split out results in too many inefficiencies. >> + >> + cpu1: cpu@1 { >> + compatible = "riscv"; >> + ... >> + cpu1-intc: interrupt-controller { >> + #interrupt-cells = <1>; >> + compatible = "riscv,cpu-intc"; >> + interrupt-controller; >> + }; >> + }; >> -- >> 2.16.4 > > Also, I've noticed that double spaces after punctuation are used pretty > inconsistently throughout the document. Is that intended? No. I noticed this in the PLIC document as well, I'll fix that one up. Thanks!