Received: by 10.213.65.68 with SMTP id h4csp4066471imn; Tue, 10 Apr 2018 08:44:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+UsfWr3OdfhQVEbJcRUtcJbcuwqLs8tWigprDQdEIkc5CcRYRP9IkHLwfpVoM+PkPoZEM2 X-Received: by 2002:a17:902:7b8e:: with SMTP id w14-v6mr1002815pll.52.1523375092034; Tue, 10 Apr 2018 08:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523375091; cv=none; d=google.com; s=arc-20160816; b=RLPB0mcGglvlGXHDzkykcxhYcl3g8a47rnvbmZRnuw2lq88kawFFgTIqasZe/fotR3 52403ytZtu/OLY9G3Ko0I/cJab944vAYN405LkWc/KaFLbjl6oUQi8uxnm05Pg85fBJJ R+Whe9Ei5tIhrP+uJwAqf2+jaV5hiPsB6elP4WOz8aiMM8WEwpqZg7PIEZUH4gap83rv U7PNUvufHXytALqbooIofF4ZXZ0rWwYyiuVfDcbCAbU4h36ms+/tHfm7Grp6ak9EHOHv C1VKeqMUCXK+Q+WcslQbuxFXfyH4/geAwe9zpF6Lwsfj8YRwRTKOcbOuKURlFW03nY5R pUCg== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=8g8/9jxUCkkuIY+PlCBlOrppkCapGgIpprZp+xDX9LA=; b=wwkUL0cGMmcRfOwBlcaWw/cAKXWmQUf984GdZUl1Nmv50KEdXOsh1slmLk8frph1Ml WClFz5iSykzsv0jS5pvtA0p9U16//2VsCWf+nu1XSf0vMyRG3MLig6/yDQe6LatVTltz 9pmOkysKICnsSgLOahm1k5AKAXFMIwc5QXPNJqf28r6NLgR8t3VWpOgJ+K7wavHYeS/O ey1SuDjXkzO77Dk1E2NeUs9w9m9RP6mMrlMHkd+jykGWG6ahJFGUZ5k6xjTPzKBwRpBy wDy4lwrm+wbTXHgDzF44q3MXfMFb0Zopn1DYYLn0at/i9u2z399sc+6bbK7Ppn4Er93I /1NQ== 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 f3si1255172pgr.572.2018.04.10.08.44.14; Tue, 10 Apr 2018 08:44:51 -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 S1752200AbeDJPlY (ORCPT + 99 others); Tue, 10 Apr 2018 11:41:24 -0400 Received: from mail.bootlin.com ([62.4.15.54]:53565 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbeDJPlU (ORCPT ); Tue, 10 Apr 2018 11:41:20 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id F2ADC20722; Tue, 10 Apr 2018 17:41:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from windsurf (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 9E3A020644; Tue, 10 Apr 2018 17:41:18 +0200 (CEST) Date: Tue, 10 Apr 2018 17:41:18 +0200 From: Thomas Petazzoni To: Marc Zyngier Cc: Stephen Boyd , Thomas Gleixner , Jason Cooper , linux-arm-msm@vger.kernel.org, Srinivas Kandagatla , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hanna Hawa , =?UTF-8?B?TWlxdcOobA==?= Raynal Subject: Re: [PATCH] irqchip/gic-v3: Support v2m frame backwards compatibility mode Message-ID: <20180410174118.0aa1d137@windsurf> In-Reply-To: References: <20170320223614.1351-1-sboyd@codeaurora.org> <20180410170155.6e07113d@windsurf> Organization: Bootlin (formerly Free Electrons) X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Thanks for your feedback! On Tue, 10 Apr 2018 16:23:00 +0100, Marc Zyngier wrote: > > In the current Marvell Armada 7K/8K, we have a unit called the ICU > > that turns wired level interrupts on one side of the chip into MSIs, > > signaled to the GIC through a special unit called GICP, which allowed > > to trigger SPIs in the GIC-400 by doing memory writes. See > > irq-mvebu-icu.c and irq-mvebu-gicp.c for the two sides of the story > > (MSI consumer and MSI provider). We have one hack between those two > > drivers: because those interrupts are level-triggered, we need the > > addresses of two registers, while 'struct msi_msg' only allows to pass > > one address, assuming MSIs are edge-triggered. > > So effectively, the GICP/GIC400 combination is a poor-man GICv3 MBI > (Message Based Interrupt -- we love overloaded acronyms) implementation. Yes, that's what it is. I thought it was already clear for you, since you already spent a great deal of time working with me on ICU/GICP back when it was submitted and merged (and thank you for that!). > > Marc, let me know how we can collaborate on this topic. I'm able to > > either test some preliminary patches, or work on such patches if > > necessary (preferably with some initial directions). > > I have a vague idea how to support this. Given that level-triggered MSIs > have to be platform MSIs (because it is just madness otherwise), we can > probably store an extra message in the struct platform_msi_desc for the > "lower the line" write. Is there a problem with extending the msi_msg structure with an additional address ? It could be transparent for existing users of msi_msg, who would continue to use just address_lo/address_hi/data, while users needing level-triggered MSIs would use the new fields in addition to the existing ones. But perhaps I'm missing something. > On activation, you'd get two callbacks, probably with a flag of some > sort to indicate whether this is for the rising or falling edge. What you call "activation" is when ->write_msg() gets called on the MSI consumer side, to configure its HW so that it knows how to trigger its MSIs ? > The thing I'm unclear about so far is how to let the generic MSI layer > know that we're dealing with such an interrupt without make a total > mess of everything. It is probably done by marking the interrupt > level triggered, but there are some corner cases. Certainly me not fully understand the generic MSI layer, but why does it need to be aware of the interrupt being level vs. edge ? > And if that works, the PCI stuff will come for free (it is just a > matter of implementing a new irqdomain on top of the base GICv3 one). I've lost you here :) > I'll try to spend some time on it in the coming couple of weeks, but > will have to rely on you for the testing (as I don't have much in the > way of HW). I can definitely make some tests, I have actual HW to test this. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com