mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Tomasz Nowicki <tomasz.nowicki@linaro.org>,
	Hanjun Guo <hanjun.guo@linaro.org>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	Graeme Gregory <graeme@xora.org.uk>,
	Jake Oshins <jakeo@microsoft.com>
Subject: Re: [PATCH 10/16] acpi/gsi: Add acpi_set_irq_model to initialize the GSI layer
Date: Mon, 12 Oct 2015 22:36:09 +0200	[thread overview]
Message-ID: <3307806.SbgVXOQCOR@vostro.rjw.lan> (raw)
In-Reply-To: <1444152989-31726-11-git-send-email-marc.zyngier@arm.com>

On Tuesday, October 06, 2015 06:36:23 PM Marc Zyngier wrote:
> In order to start embrassing irqdomains at the GSI level, introduce
> a new initializer:
> 
> void acpi_set_irq_model(enum acpi_irq_model_id model,
> 			struct fwnode_handle *fwnode);
> 
> where:
> - model is the value assigned to acpi_irq_model
> - fwnode is the identifier for the irqdomain mapping
>   GSI interrupts
> 
> As nobody calls this code yet, the current code is (mostly)
> left in place.
> 
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> 
> Conflicts:
> 	include/linux/acpi.h
> ---
>  drivers/acpi/gsi.c   | 32 +++++++++++++++++++++++++++-----
>  include/linux/acpi.h |  3 +++
>  2 files changed, 30 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/acpi/gsi.c b/drivers/acpi/gsi.c
> index 2c39fe1..202a8fe 100644
> --- a/drivers/acpi/gsi.c
> +++ b/drivers/acpi/gsi.c
> @@ -75,12 +75,21 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
>  {
>  	unsigned int irq;
>  	unsigned int irq_type = acpi_gsi_get_irq_type(trigger, polarity);
> -	struct irq_domain *d = irq_find_matching_fwnode(acpi_gsi_domain_id,
> -							DOMAIN_BUS_ANY);
>  
> -	irq = irq_create_mapping(d, gsi);
> -	if (!irq)
> -		return -EINVAL;
> +	if (acpi_gsi_domain_id) {
> +		struct irq_fwspec fwspec;
> +
> +		fwspec.fwnode = acpi_gsi_domain_id;
> +		fwspec.param[0] = gsi;
> +		fwspec.param[1] = irq_type;
> +		fwspec.param_count = 2;
> +
> +		return irq_create_fwspec_mapping(&fwspec);
> +	} else {
> +		irq = irq_create_mapping(NULL, gsi);
> +		if (!irq)
> +			return -EINVAL;
> +	}
>  
>  	/* Set irq type if specified and different than the current one */
>  	if (irq_type != IRQ_TYPE_NONE &&
> @@ -103,3 +112,16 @@ void acpi_unregister_gsi(u32 gsi)
>  	irq_dispose_mapping(irq);
>  }
>  EXPORT_SYMBOL_GPL(acpi_unregister_gsi);
> +
> +/**
> + * acpi_set_irq_model - Setup the GSI irqdomain information
> + * @model: the value assigned to acpi_irq_model
> + * @fwnode: the irq_domain identifier for mapping and looking up
> + *          GSI interrupts
> + */
> +void __init acpi_set_irq_model(enum acpi_irq_model_id model,
> +			       struct fwnode_handle *fwnode)
> +{
> +	acpi_irq_model = model;
> +	acpi_gsi_domain_id = fwnode;
> +}
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 43856d1..d863e12 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -201,6 +201,9 @@ int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity
>  int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
>  int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi);
>  
> +void acpi_set_irq_model(enum acpi_irq_model_id model,
> +			struct fwnode_handle *fwnode);
> +
>  #ifdef CONFIG_X86_IO_APIC
>  extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
>  #else
> 


  reply	other threads:[~2015-10-12 20:07 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 17:36 [PATCH 00/16] Divorcing irqdomain and device_node Marc Zyngier
2015-10-06 17:36 ` [PATCH 01/16] irqdomain: Use an accessor for the of_node field Marc Zyngier
2015-10-09 14:24   ` Thomas Gleixner
2015-10-09 14:31     ` Marc Zyngier
2015-10-12  6:04   ` Hanjun Guo
2015-10-12  9:30     ` Marc Zyngier
2015-10-06 17:36 ` [PATCH 02/16] irqdomain: Convert irqdomain->of_node to fwnode Marc Zyngier
2015-10-06 17:36 ` [PATCH 03/16] irqdomain: Allow irq domain lookup by fwnode Marc Zyngier
2015-10-12 18:31   ` Suravee Suthikulpanit
2015-10-13  7:35     ` Marc Zyngier
2015-10-06 17:36 ` [PATCH 04/16] irqdomain: Introduce a firmware-specific IRQ specifier structure Marc Zyngier
2015-10-06 17:36 ` [PATCH 05/16] irqchip: Convert all alloc/xlate users from of_node to fwnode Marc Zyngier
2015-10-12  6:44   ` Hanjun Guo
2015-10-06 17:36 ` [PATCH 06/16] irqdomain: Introduce irq_create_fwspec_mapping Marc Zyngier
2015-10-06 17:36 ` [PATCH 07/16] irqdomain: Introduce irq_domain_create_{linear,tree} Marc Zyngier
2015-10-06 17:36 ` [PATCH 08/16] irqdomain: Add a fwnode_handle allocator Marc Zyngier
2015-10-12 20:32   ` Rafael J. Wysocki
2015-10-06 17:36 ` [PATCH 09/16] acpi/gsi: Always perform an irq domain lookup Marc Zyngier
2015-10-12 20:34   ` Rafael J. Wysocki
2015-10-06 17:36 ` [PATCH 10/16] acpi/gsi: Add acpi_set_irq_model to initialize the GSI layer Marc Zyngier
2015-10-12 20:36   ` Rafael J. Wysocki [this message]
2015-10-06 17:36 ` [PATCH 11/16] irqchip/gic: Get rid of gic_init_bases() Marc Zyngier
2015-10-06 17:36 ` [PATCH 12/16] irqchip/gic: Switch ACPI support to stacked domains Marc Zyngier
2015-10-06 17:36 ` [PATCH 13/16] irqchip/gic: Kill the xlate method Marc Zyngier
2015-10-06 17:36 ` [PATCH 14/16] acpi/gsi: Cleanup acpi_register_gsi Marc Zyngier
2015-10-12 20:37   ` Rafael J. Wysocki
2015-10-06 17:36 ` [PATCH 15/16] irqdomain: Introduce irq_domain_create_hierarchy Marc Zyngier
2015-10-06 17:36 ` [PATCH 16/16] irqdomain/msi: Use fwnode instead of of_node Marc Zyngier
2015-10-11 21:01 ` [PATCH 00/16] Divorcing irqdomain and device_node Thomas Gleixner
2015-10-12  2:40   ` Hanjun Guo
2015-10-12  7:09     ` Hanjun Guo
2015-10-12 10:31   ` Marc Zyngier
2015-10-12 20:38   ` Rafael J. Wysocki
2015-10-13  8:24     ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3307806.SbgVXOQCOR@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=graeme@xora.org.uk \
    --cc=hanjun.guo@linaro.org \
    --cc=jakeo@microsoft.com \
    --cc=jason@lakedaemon.net \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    --cc=tomasz.nowicki@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®