From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH V3 03/10] irqchip,GICv3,ACPI: Add redistributor support via GICC structures. Date: Wed, 10 Feb 2016 10:16:31 +0000 Message-ID: <56BB0DFF.1040802@arm.com> References: <1453209083-3358-1-git-send-email-tn@semihalf.com> <1453209083-3358-4-git-send-email-tn@semihalf.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from foss.arm.com ([217.140.101.70]:45886 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757350AbcBJKQg (ORCPT ); Wed, 10 Feb 2016 05:16:36 -0500 In-Reply-To: <1453209083-3358-4-git-send-email-tn@semihalf.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Tomasz Nowicki , tglx@linutronix.de, jason@lakedaemon.net, rjw@rjwysocki.net, lorenzo.pieralisi@arm.com, robert.richter@caviumnetworks.com, shijie.huang@arm.com, guohanjun@huawei.com, Suravee.Suthikulpanit@amd.com Cc: mw@semihalf.com, graeme.gregory@linaro.org, Catalin.Marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, hanjun.guo@linaro.org, linux-arm-kernel@lists.infradead.org, ddaney.cavm@gmail.com On 19/01/16 13:11, Tomasz Nowicki wrote: > Following ACPI spec: > On systems supporting GICv3 and above, GICR Base Address in MADT GICC > structure holds the 64-bit physical address of the associated Redistributor. > If all of the GIC Redistributors are in the always-on power domain, > GICR structures should be used to describe the Redistributors instead, > and this field must be set to 0. > > It means that we have two ways to initialize registirbutors map. > 1. via GICD structure which can accommodate many redistributors as a region > 2. via GICC which is able to describe single redistributor > > This patch is going to add support for second option. > Considering redistributors, GICD and GICC subtables have be mutually > exclusive. While discovering and mapping redistributor, we need to know > its size in advance. For the GICC case, redistributor can be in > a power-domain that is off, thus we cannot relay on GICR TYPER register. > Therefore, we get GIC version from distributor register and map 2xSZ_64K > for GICv3 and 4xSZ_64K for GICv4. > > Signed-off-by: Hanjun Guo > Signed-off-by: Tomasz Nowicki This is incredibly convoluted, but I'm not sure there is a better way given the current ACPI API. Still, it hurts. Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Wed, 10 Feb 2016 10:16:31 +0000 Subject: [PATCH V3 03/10] irqchip,GICv3,ACPI: Add redistributor support via GICC structures. In-Reply-To: <1453209083-3358-4-git-send-email-tn@semihalf.com> References: <1453209083-3358-1-git-send-email-tn@semihalf.com> <1453209083-3358-4-git-send-email-tn@semihalf.com> Message-ID: <56BB0DFF.1040802@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 19/01/16 13:11, Tomasz Nowicki wrote: > Following ACPI spec: > On systems supporting GICv3 and above, GICR Base Address in MADT GICC > structure holds the 64-bit physical address of the associated Redistributor. > If all of the GIC Redistributors are in the always-on power domain, > GICR structures should be used to describe the Redistributors instead, > and this field must be set to 0. > > It means that we have two ways to initialize registirbutors map. > 1. via GICD structure which can accommodate many redistributors as a region > 2. via GICC which is able to describe single redistributor > > This patch is going to add support for second option. > Considering redistributors, GICD and GICC subtables have be mutually > exclusive. While discovering and mapping redistributor, we need to know > its size in advance. For the GICC case, redistributor can be in > a power-domain that is off, thus we cannot relay on GICR TYPER register. > Therefore, we get GIC version from distributor register and map 2xSZ_64K > for GICv3 and 4xSZ_64K for GICv4. > > Signed-off-by: Hanjun Guo > Signed-off-by: Tomasz Nowicki This is incredibly convoluted, but I'm not sure there is a better way given the current ACPI API. Still, it hurts. Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...