Re: ISR argument

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

 



El Sun, May 25, 2008 at 06:12:33PM +0530 srimugunthan dhandapani ha dit:

> I read that
> "ISR can't have arguments because actually there is no caller in the
> case of interrupts  who passes the arguments.
> But linux has interrupt handler arguments, by way of some assembler
> trick ,assigning a bit of code to every possible interrupt."
> 
> Reading from theory,I have some questions(may be dumb) regarding that.
> 
> Assuming i have an IRQ number shared by 2 drivers, who registered it
> with 2 different handlers and 2 different dev_id pointer
> Now when the interrupt occurs , how will the kernel know the correct
> dev_id pointer to pass to the interrupt handler?

the kernel calls all registered handlers and it's the handlers
responsability to figure out whether the interrupt has been generated
by its device. the kernel expects the handler to return IRQ_HANDLED if
the handlers device caused the interrupt and IRQ_NONE if not..

-- 
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona

       The yellow ships hung in the air just like bricks dont do
                 (The Hitch-Hiker's Guide to the Galaxy)
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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