Hello, thnks!
Is it correct that you run that code on SMP system?
I have ONE proceossor onlyl also the kernel is not SMP: uname -a Linux netvision 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux So I am still confused at this point. Regards, john On 7/5/06, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi John... Not an expert by myself, just giving ideas... > when I try , in the same place , (init_module() method) to call > local_irq_disable() (instead of disable_irq(11) ) the nic DOES > ping !! and also the keyboard continues to respond ! why is it so ? > aren't all interrupts (NIC, keyboard and > others) should be disabled in such a case ? I think that's because you use local_irq_disable on multiprocessor or multi core system (SMP). Is it correct that you run that code on SMP system? In SMP system, disabling local IRQ (via local_irq_disable) only makes certain CPU denies to process an interrupt, but not globally. On the other hand, disable_irq() IIRC disables irqs globally, thus affecting all CPUs >In the kernel log I see, > in the second case, the following: > Debug: sleeping function called from invalid context at > include/asm/semaphore.h:102 > in_atomic():0, irqs_disabled():1 > [<c01483b2>] sys_init_module+0xd0/0x1b5 > <c0103a51>] syscall_call+0x7/0xb Hm. not sure. You call a sleeping function that is not supposed to be called inside atomic/interrupt handler? Or because you did disable irq, thus kernel assumes you are in atomic context, then it thinks that any calls to sleeping function is "illegal". regards, Mulyadi
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/