From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754252AbbGXIew (ORCPT ); Fri, 24 Jul 2015 04:34:52 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:33878 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbbGXIer (ORCPT ); Fri, 24 Jul 2015 04:34:47 -0400 Message-ID: <55B1F89A.6020801@linaro.org> Date: Fri, 24 Jul 2015 16:34:34 +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 , Thomas Gleixner , Jiang Liu , Jason Cooper CC: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Tomasz Nowicki , "Rafael J. Wysocki" , Suravee Suthikulpanit , Graeme Gregory Subject: Re: [PATCH v2 4/7] acpi: gsi: Always perform an irq domain lookup References: <1437656713-9677-1-git-send-email-marc.zyngier@arm.com> <1437656713-9677-5-git-send-email-marc.zyngier@arm.com> In-Reply-To: <1437656713-9677-5-git-send-email-marc.zyngier@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 07/23/2015 09:05 PM, Marc Zyngier wrote: > Instead of directly passing NULL to the various irq_domain functions, > start by looking up the domain with a domain_token. > > As domain_token is permanently set to NULL, the lookup function will > return the same value (no domain found) and the default will be used, > preserving the current behaviour. > > Signed-off-by: Marc Zyngier > --- > drivers/acpi/gsi.c | 22 +++++++++------------- > 1 file changed, 9 insertions(+), 13 deletions(-) > > diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c > index 38208f2..a745880 100644 > --- a/drivers/acpi/gsi.c > +++ b/drivers/acpi/gsi.c > @@ -14,6 +14,8 @@ > > enum acpi_irq_model_id acpi_irq_model; > > +static void *acpi_gsi_domain_token; > + > static unsigned int acpi_gsi_get_irq_type(int trigger, int polarity) > { > switch (polarity) { > @@ -45,12 +47,9 @@ static unsigned int acpi_gsi_get_irq_type(int trigger, int polarity) > */ > int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) > { > - /* > - * Only default domain is supported at present, always find > - * the mapping corresponding to default domain by passing NULL > - * as irq_domain parameter > - */ > - *irq = irq_find_mapping(NULL, gsi); > + struct irq_domain *d = irq_find_matching_host(acpi_gsi_domain_token); Typo, should be irq_find_host() or irq_find_matching_host(acpi_gsi_domain_token, DOMAIN_BUS_ANY), it removed in later patch, so no compile error happened when whole patch set applied. Other than that, Reviewed-by: Hanjun Guo Thanks Hanjun