Re: local_irq_disable()

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

 



On 1/13/06, Rajaram Suryanarayanan <rajaram_linux@xxxxxxxxx> wrote:
>
> Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
>
> On 1/12/06, Rajaram Suryanarayanan wrote:
> > My init_module contains just this
> >
> > int init_module(void)
> > {
> > long int flags;
> > printk(KERN_INFO "Hello World \n");
> > local_irq_disable();
> > // disable_irq(169);
> > }
> >
>
<snip>
>
> As far as I can get by looking at the code of both local_irq_disable
> and disable_irq functions I can say that local_irq_disable actually
> disables interrupts on the processor (such that clears interrupt flag
> on processor) but disable_irq actually call the disable routine of
> interrupt controller (which will already be registered for that
> specific irq number) thus disables the interrupt related to the device
> only !
>
> <Raja> Ok. So when insmod finishes, why only disable_irq() has its effect
> correctly ( ie that interrupt is disabled even after insmod ), but
> local_irq_disable() does not have effect ( i.e interrupts are not actually
> disabled after insmod ) ??
> <Raja>
>

I think local_irq_disable (which calls cli command) depends on the
process so after termination of insmod process it automatically
cleared as other process might call local_irq_enable hence enabling
the interrupts .... b/c disabling interrupt must be done for the short
time only (CMIIW)

<snip>
>
> I can't tell this ... by the way its depends that what kind of mouse
> attached .. like USB, PS/2 etc .....
>
> <Raja> I looked in to /proc/interrupts. But could not get any hint on where
> mouse is mentioned <Raja>
>

The mouse will not be mentioned with the name ... rather interrupts
are associated with the controllers and buses ... so you have to
consider that on which bus your mouse is connected, then you can get
the interrupt for that device .... and you also have to look for
shared interrupts (I can't say what to do for it) !

--
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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