From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH 05/11] irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init Date: Thu, 11 Jun 2015 21:22:37 +0800 Message-ID: <55798B9D.5050409@linaro.org> References: <1431953961-22706-1-git-send-email-hanjun.guo@linaro.org> <1431953961-22706-6-git-send-email-hanjun.guo@linaro.org> <55786556.1020404@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55786556.1020404@arm.com> Sender: linux-kernel-owner@vger.kernel.org To: Marc Zyngier , Jason Cooper , Will Deacon , Catalin Marinas , "Rafael J. Wysocki" Cc: Jiang Liu , Lorenzo Pieralisi , Arnd Bergmann , Tomasz Nowicki , "grant.likely@linaro.org" , Thomas Gleixner , Olof Johansson , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" List-Id: linux-acpi@vger.kernel.org On 06/11/2015 12:27 AM, Marc Zyngier wrote: > On 18/05/15 13:59, Hanjun Guo wrote: >> Introduce acpi_irq_domain for GICv2 core domain instead of referring >> to the irq_default_domain, based on that, pass gsi as the argument and >> get the gsi in gic_irq_domain_alloc() to add stacked irqdomain support >> for ACPI based GICv2 init. >> >> Signed-off-by: Hanjun Guo >> --- >> drivers/acpi/gsi.c | 28 +++++++++++++--------------- >> drivers/irqchip/irq-gic.c | 32 +++++++++++++++++--------------- >> include/linux/irqchip/arm-gic-acpi.h | 2 ++ >> 3 files changed, 32 insertions(+), 30 deletions(-) >> >> diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c >> index 38208f2..55b5f31 100644 >> --- a/drivers/acpi/gsi.c >> +++ b/drivers/acpi/gsi.c >> @@ -3,6 +3,7 @@ >> * >> * Copyright (C) 2015 ARM Ltd. >> * Author: Lorenzo Pieralisi >> + * Hanjun Guo for stacked irqdomains support >> * >> * This program is free software; you can redistribute it and/or modify >> * it under the terms of the GNU General Public License version 2 as >> @@ -13,6 +14,8 @@ >> #include >> >> enum acpi_irq_model_id acpi_irq_model; >> +/* ACPI core domian pointing to GICv2/3 core domain */ >> +struct irq_domain *acpi_irq_domain __read_mostly; > > How is a single domain pointer going to work when you will have several > domains (GICv2m, ITS)? This acpi_irq_domain is the core domain which is the parent domain of GICv2m or ITS. acpi_irq_domain points to GICv2 or GICv3 domain when the GIC is initialized. > Crucially, how are you going to perform the > matching of a device with its irq domain? since every ITS will have a domain, and there is a mapping from device id to ITS ID in IORT table, then we can match the device with the ITS irq domain, does it make sense? Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbbFKNXB (ORCPT ); Thu, 11 Jun 2015 09:23:01 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:35272 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248AbbFKNWy (ORCPT ); Thu, 11 Jun 2015 09:22:54 -0400 Message-ID: <55798B9D.5050409@linaro.org> Date: Thu, 11 Jun 2015 21:22:37 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Marc Zyngier , Jason Cooper , Will Deacon , Catalin Marinas , "Rafael J. Wysocki" CC: Jiang Liu , Lorenzo Pieralisi , Arnd Bergmann , Tomasz Nowicki , "grant.likely@linaro.org" , Thomas Gleixner , Olof Johansson , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" Subject: Re: [PATCH 05/11] irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init References: <1431953961-22706-1-git-send-email-hanjun.guo@linaro.org> <1431953961-22706-6-git-send-email-hanjun.guo@linaro.org> <55786556.1020404@arm.com> In-Reply-To: <55786556.1020404@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/11/2015 12:27 AM, Marc Zyngier wrote: > On 18/05/15 13:59, Hanjun Guo wrote: >> Introduce acpi_irq_domain for GICv2 core domain instead of referring >> to the irq_default_domain, based on that, pass gsi as the argument and >> get the gsi in gic_irq_domain_alloc() to add stacked irqdomain support >> for ACPI based GICv2 init. >> >> Signed-off-by: Hanjun Guo >> --- >> drivers/acpi/gsi.c | 28 +++++++++++++--------------- >> drivers/irqchip/irq-gic.c | 32 +++++++++++++++++--------------- >> include/linux/irqchip/arm-gic-acpi.h | 2 ++ >> 3 files changed, 32 insertions(+), 30 deletions(-) >> >> diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c >> index 38208f2..55b5f31 100644 >> --- a/drivers/acpi/gsi.c >> +++ b/drivers/acpi/gsi.c >> @@ -3,6 +3,7 @@ >> * >> * Copyright (C) 2015 ARM Ltd. >> * Author: Lorenzo Pieralisi >> + * Hanjun Guo for stacked irqdomains support >> * >> * This program is free software; you can redistribute it and/or modify >> * it under the terms of the GNU General Public License version 2 as >> @@ -13,6 +14,8 @@ >> #include >> >> enum acpi_irq_model_id acpi_irq_model; >> +/* ACPI core domian pointing to GICv2/3 core domain */ >> +struct irq_domain *acpi_irq_domain __read_mostly; > > How is a single domain pointer going to work when you will have several > domains (GICv2m, ITS)? This acpi_irq_domain is the core domain which is the parent domain of GICv2m or ITS. acpi_irq_domain points to GICv2 or GICv3 domain when the GIC is initialized. > Crucially, how are you going to perform the > matching of a device with its irq domain? since every ITS will have a domain, and there is a mapping from device id to ITS ID in IORT table, then we can match the device with the ITS irq domain, does it make sense? Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 From: hanjun.guo@linaro.org (Hanjun Guo) Date: Thu, 11 Jun 2015 21:22:37 +0800 Subject: [PATCH 05/11] irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init In-Reply-To: <55786556.1020404@arm.com> References: <1431953961-22706-1-git-send-email-hanjun.guo@linaro.org> <1431953961-22706-6-git-send-email-hanjun.guo@linaro.org> <55786556.1020404@arm.com> Message-ID: <55798B9D.5050409@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 06/11/2015 12:27 AM, Marc Zyngier wrote: > On 18/05/15 13:59, Hanjun Guo wrote: >> Introduce acpi_irq_domain for GICv2 core domain instead of referring >> to the irq_default_domain, based on that, pass gsi as the argument and >> get the gsi in gic_irq_domain_alloc() to add stacked irqdomain support >> for ACPI based GICv2 init. >> >> Signed-off-by: Hanjun Guo >> --- >> drivers/acpi/gsi.c | 28 +++++++++++++--------------- >> drivers/irqchip/irq-gic.c | 32 +++++++++++++++++--------------- >> include/linux/irqchip/arm-gic-acpi.h | 2 ++ >> 3 files changed, 32 insertions(+), 30 deletions(-) >> >> diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c >> index 38208f2..55b5f31 100644 >> --- a/drivers/acpi/gsi.c >> +++ b/drivers/acpi/gsi.c >> @@ -3,6 +3,7 @@ >> * >> * Copyright (C) 2015 ARM Ltd. >> * Author: Lorenzo Pieralisi >> + * Hanjun Guo for stacked irqdomains support >> * >> * This program is free software; you can redistribute it and/or modify >> * it under the terms of the GNU General Public License version 2 as >> @@ -13,6 +14,8 @@ >> #include >> >> enum acpi_irq_model_id acpi_irq_model; >> +/* ACPI core domian pointing to GICv2/3 core domain */ >> +struct irq_domain *acpi_irq_domain __read_mostly; > > How is a single domain pointer going to work when you will have several > domains (GICv2m, ITS)? This acpi_irq_domain is the core domain which is the parent domain of GICv2m or ITS. acpi_irq_domain points to GICv2 or GICv3 domain when the GIC is initialized. > Crucially, how are you going to perform the > matching of a device with its irq domain? since every ITS will have a domain, and there is a mapping from device id to ITS ID in IORT table, then we can match the device with the ITS irq domain, does it make sense? Thanks Hanjun