Thread (11 messages) 11 messages, 6 authors, 2012-10-20

Finding the interrupt vector of a given IRQ

From: Arun KS <hidden>
Date: 2012-10-19 05:04:45

Hi Anish,

On Mon, May 28, 2012 at 9:16 AM, anish singh [off-list ref]wrote:
On Mon, May 28, 2012 at 2:57 AM, richard -rw- weinberger
[off-list ref] wrote:
quoted
On Sun, May 27, 2012 at 2:02 AM, Mark Farnell [off-list ref]
wrote:
quoted
quoted
In the kernel, how can I find out the interrupt vector number of a
given IRQ (for example, IRQ7)?

Within the kernel module, I would like to manually set the IRQ using
the assembly code:

asm("int $<irq vector>");

and let the IRQ handler installed by a different module catch that
interrupt.
quoted
quoted
Is this possible?
No really because not all IRQ have an interrupt line to the CPU.
Linux can multiplex and emulate them. Think of GPIO drivers with
interrupt support.
Can you please describe this in detail?It would really help a lot of
people like me.Does multiplex mean that all numbers starting from
0,1,2,3,...... TOTAL-interrupt will have interrupt lines associated with it
eventhough all interrupt numbers are not linear?
GPIOs are grouped as banks. Let?s say 32 gpios are in a bank.
There will be only single interrupt line to interrupt controller for a bank.


Consider that you have configured gpio1 and gpio16 as interrupts.
Even if interrupt happens on gpio 1 or gpio 16, the same interrupt line
will be triggered to

Interrupt controller.


Now the gpio driver has to figure out reading the Interrupt status

Register of GPIO to find which interrupt (gpio1 or gpio16) has really fired.

So in this case a single interrupt line is multiplex for 32 gpio interrupts.

HTH.

Thanks,
Arun

quoted
Anyway, why to you think you need to trigger the raw IRQ manually?
This sounds really odd...


--
Thanks,
//richard

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121019/f9379164/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help