Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1202259imm; Wed, 1 Aug 2018 11:56:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeoBarNpXKBp39ZR32AaRNd7DQSdugvVSO0j04qKDUisXEx9LT2yQq4/nBNVTIdtpC+B22B X-Received: by 2002:a63:d916:: with SMTP id r22-v6mr25214178pgg.381.1533149785789; Wed, 01 Aug 2018 11:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533149785; cv=none; d=google.com; s=arc-20160816; b=xinpjlRV+yqryjtzpdv6uTfbPXTDmzqCFG4sUr47ITeT/XuG7l2c4HsXhL3jL7BnPZ XD8ZARQeqJeyAt9U9xEpUQKeslkXDwlIZgIKsyXzhQSq3H8O0KSpNf8sa3ufNcX9eboa hykfKXZlSbpfkeOIEzXcgF8eSQiNg32WuRdSjfs4MHor3ihzzbeKqfTZjtOmlyWzA0U4 BzMGZp7bns/ve8aBRRfc3QEDgjSIW/SlL8Jr2jTnE0gz6gIiPS2227W63F4ZBB10gmG4 jPE5BJJjNlHZskLmIUK1xaXOD9/a/dKTX2BYnH69cURBwySxmkcVVLRYw34CkmR2OYIf hpEw== 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 :arc-authentication-results; bh=bV2Nfx7ZBIxfzV0bEML+XzMMdkfmuSzmQq+xaC8DZzg=; b=k7fqFl+IctZ79yKaMTcKBaL8cTCyO5WdYZItfzPKhkq6er102th5+8ib3s9MqbjQzv s8YJkQlJgIfIS6fNPrfgln0ZA8paiTE7UpTISfitfOmddBSA4ORnPekN8zXGqNWvwF3i RNEeU958mg/4wR9qQrEKyG3A0jZ0TiNaFK0aXINLYmRmWK5YlFW1s5ps4jaIX9DFWnyQ WFWmDBVQ6+9+MM2p98/AuTc3cncSy6KDNTV810ut3z+2q4pYgXW+LAI5GH32ynSTyWVO 2yxeRNIB3IrYuOyOf3unr7d24SlGbjrOqcvr3Nwo5tBbRQE6Dp4Q+nChNbMSc7S6C2FI bHJw== 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 59-v6si16361408plp.87.2018.08.01.11.56.11; Wed, 01 Aug 2018 11:56:25 -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 S2387440AbeHAUm0 (ORCPT + 99 others); Wed, 1 Aug 2018 16:42:26 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34721 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731836AbeHAUm0 (ORCPT ); Wed, 1 Aug 2018 16:42:26 -0400 Received: from p4fea5a5a.dip0.t-ipconnect.de ([79.234.90.90] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fkwH5-0000Rm-Ha; Wed, 01 Aug 2018 20:55:07 +0200 Date: Wed, 1 Aug 2018 20:55:06 +0200 (CEST) From: Thomas Gleixner To: Christoph Hellwig cc: Marc Zyngier , palmer@sifive.com, jason@lakedaemon.net, 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, Palmer Dabbelt Subject: Re: [PATCH 3/6] irqchip: RISC-V Local Interrupt Controller Driver In-Reply-To: <20180725112457.GA24502@lst.de> Message-ID: References: <20180725093649.32332-1-hch@lst.de> <20180725093649.32332-4-hch@lst.de> <20180725112457.GA24502@lst.de> 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 Wed, 25 Jul 2018, Christoph Hellwig wrote: > On Wed, Jul 25, 2018 at 12:18:39PM +0100, Marc Zyngier wrote: > > This feels odd. It means that you cannot have the following sequence: > > > > local_irq_disable(); > > enable_irq(x); // where x is owned by a remote hart > > > > as smp_call_function_single() requires interrupts to be enabled. > > > > More fundamentally, why are you trying to make these interrupts look > > global while they aren't? arm/arm64 have similar restrictions with GICv2 > > and earlier, and treats these interrupts as per-cpu. > > > > Given that the drivers that deal with drivers connected to the per-hart > > irqchip are themselves likely to be aware of the per-cpu aspect, it > > would make sense to align things (we've been through that same > > discussion about the clocksource driver a few weeks back). > > Right now the only direct consumers are said clocksource, the PLIC > driver later in this series and the RISC-V arch IPI code. None of them > is going to do a manual enable_irq, so I guess the remote case of the > code is simply dead code. I'll take a look at converting them to > per-cpu. I guess the GICv2 driver is the best template? Confused. The timer and the IPI are separate causes and have nothing to do with the per cpu irq domain. That's what the low level interrupt handling code tells me. If I understand correctly then the per cpu irq domain is for device interrupts, right? If so, then this simply cannot work and there is no way to make it work with per cpu interrupts either. Is there some high level documentation about the design (or the lack of) or can someone give a concise explanation how this stuff is supposed to work? Thanks, tglx