Re: how the interrupt handler(ISR) knows the source of interrupt ?

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

 





On 3/29/07, Rajat Jain <rajat.noida.india@xxxxxxxxx> wrote:
On 3/29/07, Mansha Linux <mansha.linux@xxxxxxxxx> wrote:
> hi all,
>
> When the external hardware device  raise the interrupt the corresponding ISR
> will be executed.
> but how this ISR will come to know about the source of interrupt. i mean the
> ISR will identify with respect to device id ..but when this device id is
> passed to the ISR  and as well as IRQ number?

Hi Mansha,

The ISR itself has the responsibility of detecting whether the device
it serves, has raised the interrupt or not. Now how it confirms this
from the device is quite device specific and may vary. But most of the
devices have a status register kind of thing that you can test to see
if it generated the interrupt.

Also, getting the device ID of the device is also the resposibility of
the ISR. But the most common approach is that when registering the
ISR, you also pass the device ID to request_irq(). So the ISR will
also get the device ID as parameter when it is called.

Thanks,

Rajat

 
Thanks for ur reply..
 
The ISR itself has the responsibility of detecting whether the device
it serves, has raised the interrupt or not. Now how it confirms this
from the device is quite device specific and may vary. But most of the
devices have a status register kind of thing that you can test to see
if it generated the interrupt.
Also, getting the device ID of the device is also the resposibility of
the ISR. But the most common approach is that when registering the
ISR, you also pass the device ID to request_irq(). So the ISR will
also get the device ID as parameter when it is called.
 

-> ya, while registering the IRQ we will specify the divice id. but i wanted to know how the ISR will confirms the device id because we are not passing any divice id while interrupt is issued.


--
regards,
Mansha

[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