The design is basically the same.

        entInt (understand the type of the irq, actually I am only
         |      concerned about the device interrupts)
        \|/
        alpha_mv.device_interrupt (discover the number of the irq)
         |
        \|/
        handle_irq (mainstream irq handler that uses the irq_desc[irq]
         |          and the irq_controller_lock spinlock, to take care
         |          of autoprobing, avoiding entering irqs in parallel
         |          in multiple cpus or by recursing on the interrupt,
         |          it does the pending handling to rerun the irq handler
         |          for shared irqs with edge level triggered irqs,
         |          serialize accesses to the irq controller controller
         |          and drive the irq controller using the registered
         |          callbacks, etc...)
        \|/
        handle_IRQ_event() (account the fact that we are running an irq
         |                  and spin if the global_irq_lock is locked)
        \|/
        device driver irq handler

The real difference is inside the completly new handle_irq(). We must
implementing the correct irq controller callbacks that handle_irq will use
to handle the irq. The rest should be just fine because the rest is
basically common code, the very architecture code is the one that sets and
implements the callbacks instead.

This is an early patch. Hope it's readable enough. It doesn't work yet and
it only compiles using:

CONFIG_ALPHA_TSUNAMI=y
CONFIG_ALPHA_SRM=y

I prefer to make first the tsunami arch to work fine and then to update
the rest.

I get an halt after I enable the timer irq (incidentally ;). How can I
produce a stack trace hugh? The srm_printk doesn't work (strange). I also
tried to copy the aboot printf in place of the srm_printk but it doesn't
work too.  And my old SRM_printf trick doesn't work after paging is been
disabled because I am calling stuff that wants to run at 0x20000000 (well
maybe I'll end removing some bit from paging_init if there I won't find a
better way soon ;).

The diff is here:

        
ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.3/2.3.30pre6/alpha-2-to-3.gz

It's against 2.3.30pre6+alpha-1.gz+alpha-1-to-2.gz that you can download
from the same directory where alpha-2-to-3.gz is placed. NOTE: only
alpha-2-to-3.gz is interesting w.r.t. irq handling (the rest are the
patches you just seen). I believe it's very more readable to have only the
irq changes in a separate patch that's why it's all incremental.

If you have any hint about bugs you are welcome!

Thanks.

Andrea

Reply via email to