From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754752AbbCEJHM (ORCPT ); Thu, 5 Mar 2015 04:07:12 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:38487 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754663AbbCEJHE (ORCPT ); Thu, 5 Mar 2015 04:07:04 -0500 Message-ID: <54F81C9A.6040502@huawei.com> Date: Thu, 5 Mar 2015 17:06:34 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: "Rafael J. Wysocki" , Hanjun Guo CC: Catalin Marinas , Will Deacon , Olof Johansson , Grant Likely , Lorenzo Pieralisi , Arnd Bergmann , Mark Rutland , "Graeme Gregory" , Sudeep Holla , "Jon Masters" , Marc Zyngier , Mark Brown , Robert Richter , Timur Tabi , Ashwin Chaugule , , , , , , Tomasz Nowicki , Jason Cooper , Thomas Gleixner Subject: Re: [PATCH v9 16/21] irqchip: Add GICv2 specific ACPI boot support References: <1424853601-6675-1-git-send-email-hanjun.guo@linaro.org> <1424853601-6675-17-git-send-email-hanjun.guo@linaro.org> <5921774.hkUTDjxi3A@vostro.rjw.lan> In-Reply-To: <5921774.hkUTDjxi3A@vostro.rjw.lan> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.54F81CA9.00FF,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 20f51b153ec27372bc23928dccfe6927 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/3/5 6:50, Rafael J. Wysocki wrote: > On Wednesday, February 25, 2015 04:39:56 PM Hanjun Guo wrote: >> From: Tomasz Nowicki >> >> ACPI kernel uses MADT table for proper GIC initialization. It needs to >> parse GIC related subtables, collect CPU interface and distributor >> addresses and call driver initialization function (which is hardware >> abstraction agnostic). In a similar way, FDT initialize GICv1/2. >> >> NOTE: This commit allow to initialize GICv1/2 basic functionality. >> While now simple GICv2 init call is used, any further GIC features >> require generic infrastructure for proper ACPI irqchip initialization. >> That mechanism and stacked irqdomains to support GICv2 MSI/virtualization >> extension, GICv3/4 and its ITS are considered as next steps. [...] >> diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c >> index 0fe2f71..5855240 100644 >> --- a/drivers/irqchip/irqchip.c >> +++ b/drivers/irqchip/irqchip.c >> @@ -8,6 +8,7 @@ >> * warranty of any kind, whether express or implied. >> */ >> >> +#include >> #include >> #include >> #include >> @@ -26,4 +27,6 @@ extern struct of_device_id __irqchip_of_table[]; >> void __init irqchip_init(void) >> { >> of_irq_init(__irqchip_of_table); >> + >> + acpi_irq_init(); >> } >> diff --git a/include/linux/acpi.h b/include/linux/acpi.h >> index c03d8d1..e27117a 100644 >> --- a/include/linux/acpi.h >> +++ b/include/linux/acpi.h >> @@ -557,6 +557,20 @@ static inline int acpi_device_modalias(struct device *dev, >> >> #endif /* !CONFIG_ACPI */ >> >> +#if defined(CONFIG_ACPI) && defined(CONFIG_ARM64) >> +static inline void acpi_irq_init(void) >> +{ >> + /* >> + * Hardcode ACPI IRQ chip initialization to GICv2 for now. >> + * Proper irqchip infrastructure will be implemented along with >> + * incoming GICv2m|GICv3|ITS bits. >> + */ >> + acpi_gic_init(); >> +} >> +#else >> +static inline void acpi_irq_init(void) { } >> +#endif > I don't want this in a common header. This is because of irqchip_init(void) in drivers/irqchip/irqchip.c will be called by PowerPC too, so we need to put it in a common head file, I will discuss with Tomasz to see if we have any further solution. Thanks Hanjun