linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 02/13] irqchip: GICv3: Convert to domain hierarchy
Date: Wed, 19 Nov 2014 07:37:33 +0000	[thread overview]
Message-ID: <86h9xv8wua.fsf@arm.com> (raw)
In-Reply-To: <546BED38.9030707@linux.intel.com> (Jiang Liu's message of "Wed, 19 Nov 2014 01:07:04 +0000")

On Wed, Nov 19 2014 at 01:07:04 AM, Jiang Liu <jiang.liu@linux.intel.com> wrote:
> On 2014/11/19 2:52, Marc Zyngier wrote:
>> In order to start supporting stacked domains, convert the GICv3
>> code base to the new domain hierarchy framework, which mostly
>> amounts to supporting the new alloc/free callbacks.
>> 
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>>  drivers/irqchip/Kconfig      |  1 +
>>  drivers/irqchip/irq-gic-v3.c | 42 +++++++++++++++++++++++++++++++++++++-----
>>  2 files changed, 38 insertions(+), 5 deletions(-)
>> 
>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
>> index b21f12f..4631685 100644
>> --- a/drivers/irqchip/Kconfig
>> +++ b/drivers/irqchip/Kconfig
>> @@ -14,6 +14,7 @@ config ARM_GIC_V3
>>  	bool
>>  	select IRQ_DOMAIN
>>  	select MULTI_IRQ_HANDLER
>> +	select IRQ_DOMAIN_HIERARCHY
>>  
>>  config ARM_NVIC
>>  	bool
>> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
>> index aa17ae8..aef4b9e 100644
>> --- a/drivers/irqchip/irq-gic-v3.c
>> +++ b/drivers/irqchip/irq-gic-v3.c

[...]

>> @@ -633,9 +633,41 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
>>  	return 0;
>>  }
>>  
>> +static int gic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
>> +				unsigned int nr_irqs, void *arg)
>> +{
>> +	int i, ret;
>> +	irq_hw_number_t hwirq;
>> +	unsigned int type = IRQ_TYPE_NONE;
>> +	struct of_phandle_args *irq_data = arg;
>> +
>> +	ret = gic_irq_domain_xlate(domain, irq_data->np, irq_data->args,
>> +				   irq_data->args_count, &hwirq, &type);
>> +	if (ret)
>> +		return ret;
>> +
>> +	for (i = 0; i < nr_irqs; i++)
>> +		gic_irq_domain_map(domain, virq + i, hwirq + i);
>> +
>> +	return 0;
>> +}
>> +
>> +static void gic_irq_domain_free(struct irq_domain *domain, unsigned int virq,
>> +				unsigned int nr_irqs)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < nr_irqs; i++) {
>> +		irq_set_handler(virq + i, NULL);
>> +		irq_domain_set_hwirq_and_chip(domain, virq + i, 0, NULL, NULL);
> Please try irq_domain_reset_irq_data() :)

Ah, nice shortcut. I'll update this for v3.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

  reply	other threads:[~2014-11-19  7:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 18:52 [PATCH v2 00/13] arm64: PCI/MSI: GICv3 ITS support (stacked domain edition) Marc Zyngier
2014-11-18 18:52 ` [PATCH v2 01/13] arm64: PCI/MSI: Use asm-generic/msi.h Marc Zyngier
2014-11-19 10:35   ` Will Deacon
2014-11-18 18:52 ` [PATCH v2 02/13] irqchip: GICv3: Convert to domain hierarchy Marc Zyngier
2014-11-19  1:07   ` Jiang Liu
2014-11-19  7:37     ` Marc Zyngier [this message]
2014-11-18 18:52 ` [PATCH v2 03/13] irqchip: GICv3: rework redistributor structure Marc Zyngier
2014-11-18 18:52 ` [PATCH v2 04/13] irqchip: GICv3: ITS command queue Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 05/13] irqchip: GICv3: ITS: irqchip implementation Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 06/13] irqchip: GICv3: ITS: LPI allocator Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 07/13] irqchip: GICv3: ITS: tables allocators Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 08/13] irqchip: GICv3: ITS: device allocation and configuration Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 09/13] irqchip: GICv3: ITS: MSI support Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 10/13] irqchip: GICv3: ITS: DT probing and initialization Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 11/13] irqchip: GICv3: ITS: plug ITS init into main GICv3 code Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 12/13] irqchip: GICv3: ITS: enable compilation of the ITS driver Marc Zyngier
2014-11-18 18:53 ` [PATCH v2 13/13] irqchip: GICv3: Binding updates for ITS 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=86h9xv8wua.fsf@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).