From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932650AbbJNP2N (ORCPT ); Wed, 14 Oct 2015 11:28:13 -0400 Received: from foss.arm.com ([217.140.101.70]:59099 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932082AbbJNP2J (ORCPT ); Wed, 14 Oct 2015 11:28:09 -0400 Message-ID: <561E7486.6000803@arm.com> Date: Wed, 14 Oct 2015 16:28:06 +0100 From: Marc Zyngier Organization: ARM Ltd User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Suravee Suthikulanit , Thomas Gleixner , Jason Cooper CC: Duc Dang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] irqchip/gic-v2m: Add support for multiple MSI frames References: <1444822037-16983-1-git-send-email-marc.zyngier@arm.com> <1444822037-16983-3-git-send-email-marc.zyngier@arm.com> <561E6322.6030601@amd.com> In-Reply-To: <561E6322.6030601@amd.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/10/15 15:13, Suravee Suthikulanit wrote: > Hi Marc, > > On 10/14/2015 6:27 AM, Marc Zyngier wrote: >> The GICv2m driver is so far limited to a single MSI frame, but >> nothing prevents an implementation from having several of them. >> >> This patch expands the driver to enumerate all frames, keeping >> the first one as the canonical identifier for the MSI domains. >> >> Tested-by: Duc Dang >> Signed-off-by: Marc Zyngier >> --- >> drivers/irqchip/irq-gic-v2m.c | 124 ++++++++++++++++++++++++++---------------- >> 1 file changed, 78 insertions(+), 46 deletions(-) >> >> diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c >> index bf9b3c0..87f8d10 100644 >> --- a/drivers/irqchip/irq-gic-v2m.c >> +++ b/drivers/irqchip/irq-gic-v2m.c >> @@ -50,8 +50,12 @@ >> /* List of flags for specific v2m implementation */ >> #define GICV2M_NEEDS_SPI_OFFSET 0x00000001 >> >> +static LIST_HEAD(v2m_nodes); >> +static DEFINE_SPINLOCK(v2m_lock); >> + >> struct v2m_data { >> - spinlock_t msi_cnt_lock; >> + struct list_head entry; >> + struct device_node *node; > > Would it be better if we use struct fwnode_handle * here instead. I > noticed that later on, this is also used as of_node_to_fwnode(v2m->node) > in several places. Also, this would need to change anyways when we > introducing ACPI support (see here https://lkml.org/lkml/2015/10/13/846). I was thinking that it would be part of your series adapting it to ACPI. I don't mind either way... Thanks, M. -- Jazz is not dead. It just smells funny...