Re: local_irq_disable()

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

 



Resending to kernelnewbies due to error !

---------- Forwarded message ----------
From: Fawad Lateef <fawadlateef@xxxxxxxxx>
Date: Jan 12, 2006 8:47 PM
Subject: Re: local_irq_disable()
To: Rajaram Suryanarayanan <rajaram_linux@xxxxxxxxx>
Cc: Nauman Tahir <nauman.tahir@xxxxxxxxx>, Anupam Kapoor
<anupam.kapoor@xxxxxxxxx>, Gaurav Dhiman <gaurav4lkg@xxxxxxxxx>,
kernelnewbies@xxxxxxxxxxxx


On 1/12/06, Rajaram Suryanarayanan <rajaram_linux@xxxxxxxxx> 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);
>  }
>

I don't think its a good idea of disabling irqs while inserting module
:) It might be good for learning/testing puposes only :)  (CMIIW)

>  When I inserted this module, nothing happened. But when I tried
> disable_irq(169),  the eth0 network card stopped sending/receiving packets.
> So it means disable_irq() worked. But not local_irq_disable(). Why ?

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 !

>  Is it like when insmod process finishes, the kernel automatically reenables
> the interrupts ? If so why not for disable_irq() ?

I can't say that after insmod completion kernel enabled irq on the
processor, but the disable_irq as I mentioned disables the
controller/device interrupt so the device won't by it-self enables
interrupt.

>  Also can anybody let me know what is the IRQ number of the mouse ?
>

I can't tell this ... by the way its depends that what kind of mouse
attached .. like USB, PS/2 etc .....

--
Fawad Lateef


--
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