Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1191594

Re: [PATCH v2 4/7] acpi: gsi: Always perform an irq domain lookup

From Hanjun Guo <hanjun.guo@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/7] acpi: gsi: Always perform an irq domain lookup
Date 2015-07-24 10:40 +0200
Message-ID <pPGGl-oT-1@gated-at.bofh.it> (permalink)
References <pPoq5-7Bj-3@gated-at.bofh.it> <pPoq7-7Bj-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <marc.zyngier@arm.com>
> ---
>   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 <hanjun.guo@linaro.org>

Thanks
Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/7] Making the generic ACPI GSI layer irqdomain aware Marc Zyngier <marc.zyngier@arm.com> - 2015-07-23 15:10 +0200
  [PATCH v2 4/7] acpi: gsi: Always perform an irq domain lookup Marc Zyngier <marc.zyngier@arm.com> - 2015-07-23 15:10 +0200
    Re: [PATCH v2 4/7] acpi: gsi: Always perform an irq domain lookup Hanjun Guo <hanjun.guo@linaro.org> - 2015-07-24 10:40 +0200
  Re: [PATCH v2 0/7] Making the generic ACPI GSI layer irqdomain aware Hanjun Guo <hanjun.guo@linaro.org> - 2015-07-24 10:30 +0200

csiph-web