Re: Finding the interrupt vector of a given IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Finally got it working.......

First, at the kernel source, you need to go to:

arch/x86/include/asm/irq_vectors.h

to find out which interrupt vector your IRQ is mapped to (replace x86
with your architechure, but for this purpose, amd64 also falls into
x86).


Then within the kernel space (i.e. in a kernel module function such as
ioctl()), make an assembly call:

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

to set the interrupt.  In this case, IRQ7 is mapped to 55 for
x86/amd64 architecture.

Cheers,

Mark





On Mon, May 28, 2012 at 3:46 PM, anish singh
<anish198519851985@xxxxxxxxx> wrote:
> On Mon, May 28, 2012 at 2:57 AM, richard -rw- weinberger
> <richard.weinberger@xxxxxxxxx> wrote:
>> On Sun, May 27, 2012 at 2:02 AM, Mark Farnell <mark.farnell@xxxxxxxxx> wrote:
>>> 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.
>>>
>>> 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?
>> Anyway, why to you think you need to trigger the raw IRQ manually?
>> This sounds really odd...
>>
>>
>> --
>> Thanks,
>> //richard
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies@xxxxxxxxxxxxxxxxx
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux