Re: [PATCH 0/8] tip related: radix tree for spareseirq and logicalflat clean up

From: Yinghai Lu
Date: Sat Feb 13 2010 - 17:38:20 EST


On 02/13/2010 04:26 AM, Eric W. Biederman wrote:

>> Index: linux-2.6/arch/x86/kernel/irqinit.c
>> ===================================================================
>> --- linux-2.6.orig/arch/x86/kernel/irqinit.c
>> +++ linux-2.6/arch/x86/kernel/irqinit.c
>> @@ -83,16 +83,14 @@ static struct irqaction irq2 = {
>> .name = "cascade",
>> };
>>
>> -DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
>> - [0 ... NR_VECTORS - 1] = -1,
>> -};
>> +DEFINE_PER_CPU(vector_desc_t, vector_desc);
>>
>> int vector_used_by_percpu_irq(unsigned int vector)
>> {
>> int cpu;
>>
>> for_each_online_cpu(cpu) {
>> - if (per_cpu(vector_irq, cpu)[vector] != -1)
>> + if (per_cpu(vector_desc, cpu)[vector] != NULL)
>> return 1;
>> }
>>
>> @@ -139,7 +137,7 @@ void __init init_IRQ(void)
>> * irq's migrate etc.
>> */
>> for (i = 0; i < nr_legacy_irqs; i++)
>> - per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
>> + per_cpu(vector_desc, 0)[IRQ0_VECTOR + i] = irq_to_desc(i);
>
> I am not familiar with this hunk (it must be in the x86 tree).
> Are you certain we have allocated the legacy irq desc here?

yes.

early_irq_init() is called before init_IRQ in start_kernel()

it will have irq_desc for legacy ready.

YH

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