Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp185636imm; Thu, 26 Jul 2018 16:39:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeamPaPzjouBmBtYk2eaFPEW/pLIW11FwY/alh+C5CiYrzo2UrpO/AOZc15wjcYjU879Q8s X-Received: by 2002:a17:902:864b:: with SMTP id y11-v6mr3780638plt.335.1532648399385; Thu, 26 Jul 2018 16:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532648399; cv=none; d=google.com; s=arc-20160816; b=bd7S81jLoVfaWrsPk/rIpHBokl4NbKqI0uUflTe/PbduUp3CZfFA1jQ68xrjgVzyfp tNhduJJeHeUugvoGVeg4U9rME88ZxD0u8ryztaIj2QMzdA3V1yZ6PwUr7eX13m8UlAq6 cwCLf5eJ1HZiIb+MqlH69mEYU5VT7kcWfgmeogUyfds4KnEUmfL/9KGWDu6qlviKkD4m 2d7h6Cib9Jq9Gr9VgfR037vZFjdQc3xtItEo7MtKKRQtvHHu6inT67NNGtFehaZlbqZL ZCz2F9jLE0I722nrM4gNiM4iibmA8ySs+P0OGXPnsgLa/WcVEzHr78uk35ZRxxsM/sTx VLrA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=yJRDoyRWQBi6t5Epf2ONdrMW+CKG53W+v4I8ecGWzKg=; b=Mib3yIlL7ibK3ruqdU6PWGMzX/6UDRvHa1BB3lwfy03eYeB8FzUmm7WqQ0+nCm+442 Yq9GYFFwJLOzgtV0MbqOje6NdE42v9E3BO4It1ddn4f7jtuvN8oWctSvfhZXvKeG0V9H I/B0xQWSljPBhyMMb0cf8wSh6K07zodakl12gWXyIN+jTVjahI3zZ+wv+b3Y8esouO6G 1P68ihR75+Aa9E7DAr7hrXNAaYLYT+SjEV289HBA6ERlqaAw11HAom2JTRAZoAXzWUgU 6rV6xh/P/IxYa3Rh2Bnw1+w59rkqtMFgQjFI2SYF0FyLLMfcg9HoiyVQKWbpSmkRyANq //9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=YpMfs8r+; 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 a18-v6si2452814plm.122.2018.07.26.16.39.41; Thu, 26 Jul 2018 16:39:59 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=YpMfs8r+; 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 S1731922AbeG0A5u (ORCPT + 99 others); Thu, 26 Jul 2018 20:57:50 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:41201 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731343AbeG0A5u (ORCPT ); Thu, 26 Jul 2018 20:57:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1532648325; x=1564184325; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=4XAZAlPEVBbj5j7HHl+MxVn/Ww4nIY50tP9qZD4VifA=; b=YpMfs8r+L/2nE2MpOV3H9uQJCFX3LNERUC4Yxd827ZwEw5VHJ7wVNIG5 4wirQM3too/lvhiKQkWBi6UWKuiuCeDtEOZnSiFh1wmWee0hACOV9MqB4 etp3X4ypthM82eHzU2KoK/ifrkqaJ0tuSE7xqUi14PI8N5mP1BwYV6GKe pockqU3uikrJKlhO/MSz9wsIqLAzzyUs3fjfPMJ9kgMWy0Y6UafriEugf V6j+ETNxNxwEmlzw0sJXpCLpTrAm2Zmhzt3CkH3U0J35XE517LScxP/yf 0yo/HdqbWss/+nmxUyr+a4Bc20XZjTiBUmYMGq15G6LoN/PgZyBdY43Dw Q==; X-IronPort-AV: E=Sophos;i="5.51,407,1526313600"; d="scan'208";a="85923717" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 27 Jul 2018 07:38:45 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 26 Jul 2018 16:26:48 -0700 Received: from c02v91rdhtd5.sdcorp.global.sandisk.com (HELO [10.196.159.148]) ([10.196.159.148]) by uls-op-cesaip02.wdc.com with ESMTP; 26 Jul 2018 16:38:43 -0700 Subject: Re: RFC: simplified RISC-V interrupt and clocksource handling To: Christoph Hellwig , "tglx@linutronix.de" , "palmer@sifive.com" , "jason@lakedaemon.net" , "marc.zyngier@arm.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" Cc: "anup@brainfault.org" , "devicetree@vger.kernel.org" , "aou@eecs.berkeley.edu" , "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "shorne@gmail.com" References: <20180726143723.16585-1-hch@lst.de> From: Atish Patra Message-ID: Date: Thu, 26 Jul 2018 16:38:43 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180726143723.16585-1-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/26/18 7:37 AM, Christoph Hellwig wrote: > This series tries adds support for interrupt handling and timers > for the RISC-V architecture. > > The basic per-hart interrupt handling implemented by the scause > and sie CSRs is extremely simple and implemented directly in > arch/riscv/kernel/irq.c. In addition there is a irqchip driver > for the PLIC external interrupt controller, which is called through > the set_handle_irq API, and a clocksource driver that gets its > timer interrupt directly from the low-level interrupt handling. > > Compared to previous iterations this version does not try to use an > irqchip driver for the low-level interrupt handling. This saves > a couple indirect calls and an additional read of the scause CSR > in the hot path, makes the code much simpler and last but not least > avoid the dependency on a device tree for a mandatory architectural > feature. > I agree that this code is much simpler than HLIC code. Few doubts though 1. As per my understanding, timer interrupt now can't be registered as a Linux IRQ now. Thus, /proc/interrupts will not be automatically populated for timer interrupt stats. Am I wrong in my assumption? 2. The future version of local interrupt controller known as Core Level Interrupt Controller aka CLIC. Do we have to change the current design again for CLIC in future? Here are the docs: https://github.com/sifive/clic-spec/blob/master/clic.adoc Regards, Atish > A git tree is available here (contains a few more patches before > the ones in this series) > > git://git.infradead.org/users/hch/riscv.git riscv-irq-simple > > Gitweb: > > http://git.infradead.org/users/hch/riscv.git/shortlog/refs/heads/riscv-irq-simple >