Re: [PATCH 08/57] microblaze_v7: Interrupt handling, timer support,selfmod code

From: Michal Simek
Date: Fri Mar 20 2009 - 10:08:38 EST


Hi Thomas,

> On Thu, 19 Mar 2009, Michal Simek wrote:
>>>> + __do_IRQ(irq);
>>> You use irq chips now and you set the type handlers (edge/level), but
>>> you still call __do_IRQ() the all in one fits nothing handler, which
>>> is going to be deprecated and removed.
>> I know about.
>>> Please call
>>> generic_handle_irq(irq);
>>>
>>> which will call the correct flow handlers.
>> I would like to use it but don't work with edge interrupt.
>> __do_IRQ handle it in right way.
>>
>> I used this implementation but I did some change edge/level handling and I can't
>> use it.
>> http://developer.petalogix.com/git/gitweb.cgi?p=linux-2.6-microblaze.git;a=blob_plain;f=arch/microblaze/kernel/irq.c;hb=3645d887ad6443a262bbeddf384038321172db2b
>>
>> Any hints what could be wrong?
>
> Look at the different handling schemes of __do_IRQ and handle_edge_irq
> vs. the chip functions:
>
> __do_IRQ() does:
> {
> chip->ack();
>
> handle_IRQ_event();
>
> chip->end();
> }
>
> handle_edge_irq() does:
> {
> if ((desc->status & (IRQ_INPROGRESS | IRQ_DISABLED)) ||
> !desc->action)) {
> desc->status |= (IRQ_PENDING | IRQ_MASKED);
> mask_ack_irq(desc, irq);
> goto out_unlock;
> }
>
> chip->ack();
> handle_IRQ_event();
>
> }
>
> I guess the problem is in your chip->xxx functions.

I fixed it. There were one additional line.
+ I set GENERIC_HARDIRQS_NO__DO_IRQ=y.

BTW: Below is full chip description where function enable is unmask
and disable is mask. Do I have keep there enable and disable function pointers?
I commented them and works without them too.


static struct irq_chip intc_dev = {
.name = "Xilinx INTC",
.enable = intc_enable_or_unmask,
.unmask = intc_enable_or_unmask,
.disable = intc_disable_or_mask,
.mask = intc_disable_or_mask,
.ack = intc_ack,
.mask_ack = intc_mask_ack,
.end = intc_end,
};

Thanks,
Michal
--
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/