Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2980454imm; Mon, 10 Sep 2018 09:09:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdagthHba2VlhrZhKlax7HEM9dNSNk2/5bOcj7shQsWKfObp3Fs74jQYBGgnrJZzIFWl61nt X-Received: by 2002:a62:9042:: with SMTP id a63-v6mr24671666pfe.52.1536595788642; Mon, 10 Sep 2018 09:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536595788; cv=none; d=google.com; s=arc-20160816; b=hpgGjAVSra/U+bkMFi1CCEFGepll36oYhxzU31AS+UOdSEBdhGYbNszyXZYsStT81C 4pLKtCGYMxGH29ASBNKMHgnw2TXSni6m7pLTENXINWk/Riyx9bEQfmYsiKDucpw0o8Cq bi4uvw9f/qS8BRvSfnX2/6XElt+jxtPqAF+AsfScla6DTBWL6XnTE1AGMi9xMGqSAVsb +lbuEgT9Cl0APccNEhpjNpyu0DxrCWH2HaNWSmo1+tt218SvAVfbmCsIKEc6WJ85FabC pH4XdgiAD6ExeLMwB2dh2U4qxWmgDlIADTJmKxnIWxJhl2/m40T9BvYKgtcywmxwd8IT kkbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=pKwgYZUTmlo47gMMY6GVNgkKn440IZbjyLn5gtkT4/0=; b=tno+wTez57cUFSbr6AEdg7VW4+mXKMEAuR3DEGzFNaUknbauMZKwNKbpxNiqvOwFue /f/ABBJnPNkkXUOInXi+QXmmQ2k1lyU2/f/N1CyF27q9vHMe3E4dUufTtTIJQeq2AdIx a0KvMIMxXTCqYywi5VF7IXi7DFmIbERspCEqBpiLHt1YkdXAEWwXPYKcGWuuTtU7eIbN ARZBowxQ9Il6Q3MIawem6xg17OQCJs+ISDs3d8bF0ycVuVD51SYfHznLqHLtrhJiXvB3 5CaOH2iSZZnlIGgUyMHpH3swR+KCFWWaTBwUCdIi7IMHwIdQXQtMFVjzzGfv3t2fVSj/ JN6w== ARC-Authentication-Results: i=1; mx.google.com; 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 x23-v6si18656431pfk.25.2018.09.10.09.09.32; Mon, 10 Sep 2018 09:09:48 -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; 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 S1728666AbeIJVCJ (ORCPT + 99 others); Mon, 10 Sep 2018 17:02:09 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:39914 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbeIJVCJ (ORCPT ); Mon, 10 Sep 2018 17:02:09 -0400 Received: from p4fea45ac.dip0.t-ipconnect.de ([79.234.69.172] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fzOiW-0004F8-QO; Mon, 10 Sep 2018 18:07:12 +0200 Date: Mon, 10 Sep 2018 18:07:12 +0200 (CEST) From: Thomas Gleixner To: Anup Patel cc: Christoph Hellwig , Palmer Dabbelt , Jason Cooper , Marc Zyngier , Daniel Lezcano , "linux-kernel@vger.kernel.org List" , Atish Patra , Albert Ou , Palmer Dabbelt , linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 3/5] irqchip: RISC-V Local Interrupt Controller Driver In-Reply-To: Message-ID: References: <20180906123651.28500-1-anup@brainfault.org> <20180906123651.28500-4-anup@brainfault.org> <20180906140628.GA10580@infradead.org> <20180910132924.GA6987@infradead.org> <20180910133902.GB21593@infradead.org> <20180910134915.GB30774@infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Sep 2018, Anup Patel wrote: > On Mon, Sep 10, 2018 at 7:19 PM, Christoph Hellwig wrote: > > On Mon, Sep 10, 2018 at 03:45:42PM +0200, Thomas Gleixner wrote: > >> > He has an irqchip that is called from the RISC-V exception handler > >> > when the interrupt flag is set in scause and then dispatches to one > >> > of: IPI, timer, actual irqchip. > >> > >> So the per cpu timer is the only per cpu interrupt and that thing is used > >> unconditionally, right? > > > > Yes. external is chained and IPI is still handled explicitly. > > On riscv64, there are 64 local interrupts (i.e. per-CPU interrupts). > > Three of these local interrupts have clearly defined use: > 1. Software interrupt (inter-processor interrupt) > 2. External interrupt (interrupt from PLIC) > 3. Timer interrupt (interrupt from per-CPU timer) > > Other local interrupts are available for future use. > > Taking inspiration from ARM world, I had give quite a few > examples how these RISC-V local interrupts can be used > for other purposes: > 1. per-CPU interrupt for per-HART performance monitoring unit > 2. interrupt controller virtualizaton extension can use per-CPU > interrupts for managing resources (just like ARM GICv2/v3 virt > extensions) > 3. bus errors can be reported as per-CPU interrupts > > Considering above, it is better to have a distinct irqchip and > irq_domain for all local interrupts (just like this patch). If that's the future usage and that's what my impression was, under which I changed my mind, yes, then having a domain model is certainly of advantage especially when those things end up being different per SoC. Thanks, tglx