Hi folks,

When I am writing  qtest  cases for an interrupt controller,  I encounter some problems.

*1) Can't intercept both the irq in and irq out for the same device.*

It's a necessary feature for an interrupt controller qtest. However, as you can see  from qtest.c,  when a device has intercepted irq out or irq in, it can't intercept another.

" if (irq_intercept_dev) {

            qtest_send_prefix(chr);

            if (irq_intercept_dev != dev) {

                qtest_send(chr, "FAIL IRQ intercept already enabled\n");

            } else {

                qtest_send(chr, "OK\n");

            }

            return; }

"

In my opinion,  this code in qtest is protecting from intercepting irqs repeatedly. But irq in and out are different directions, they should be intercepted simultaneously. Is it right?

*2) Can't get  the right IRQ num.*

If  I  intercept an IRQ out,  I can get the num of IRQ if the IRQ raises, .  But the really IRQ I want to get is the IRQ that the interrupt controller selected out. However I can't get this IRQ from qtest_irq_handler.

Are there already some methods to surmount these problems?  Any advice is well appreciated. Thanks very much.

Zhiwei


Reply via email to