lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 24 Jan 2012 17:26:37 -0700
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Rob Herring <robherring2@...il.com>
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	devicetree-discuss@...ts.ozlabs.org,
	Milton Miller <miltonm@....com>, benh@...nel.crashing.org,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFCv2 13/14] irq_domain: Remove 'new' irq_domain in favour of
 the ppc one

On Tue, Jan 24, 2012 at 3:10 PM, Rob Herring <robherring2@...il.com> wrote:
> On 01/23/2012 03:07 PM, Grant Likely wrote:
>> This patch removes the simplistic implementation of irq_domains and enables
>> the powerpc infrastructure for all irq_domain users.  The powerpc
>> infrastructure includes support for complex mappings between Linux and
>> hardware irq numbers, and can manage allocation of irq_descs.
>>
>> This patch also converts the few users of irq_domain_add()/irq_domain_del()
>> to call irq_domain_add_legacy() instead.
>>
>> v2: Fix removal of irq_alloc_descs() call in gic driver
>>
>> Signed-off-by: Grant Likely <grant.likely@...retlab.ca>
>> ---
>>  arch/arm/common/gic.c               |   85 ++++++++-----------
>>  arch/arm/common/vic.c               |   16 +---
>>  arch/arm/include/asm/hardware/gic.h |    4 +-
>>  arch/arm/include/asm/hardware/vic.h |    2 +
>>  arch/arm/mach-exynos/common.c       |    2 +-
>>  arch/arm/mach-versatile/core.c      |    5 +-
>>  drivers/mfd/twl-core.c              |   12 +--
>>  include/linux/irqdomain.h           |   45 +---------
>>  kernel/irq/irqdomain.c              |  159 +++--------------------------------
>>  9 files changed, 69 insertions(+), 261 deletions(-)
>>
>> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
>
> snip
>
>> @@ -716,17 +708,17 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
>>               gic_irqs = 1020;
>>       gic->gic_irqs = gic_irqs;
>>
>> -     domain->nr_irq = gic_irqs - domain->hwirq_base;
>> -     domain->irq_base = irq_alloc_descs(irq_start, 16, domain->nr_irq,
>> -                                        numa_node_id());
>> -     if (IS_ERR_VALUE(domain->irq_base)) {
>> +     irq_base = irq_alloc_descs(irq_start, 16, gic_irqs - hwirq_base,
>> +                                numa_node_id());
>> +     if (IS_ERR_VALUE(irq_base)) {
>>               WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
>>                    irq_start);
>> -             domain->irq_base = irq_start;
>> +             irq_base = irq_start;
>>       }
>> -     domain->host_data = gic;
>> -     domain->ops = &gic_irq_domain_ops;
>> -     irq_domain_add(domain);
>> +     gic->domain = irq_domain_add_legacy(node, gic_irqs, irq_base,
>
> gic_irqs is wrong here. It needs 16 or 32 subtracted off. This patch
> will fix things:

Good catch, I've integrated this into my series.

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

Powered by blists - more mailing lists