lkml.org 
[lkml]   [2000]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Disabling interrupts in 2.4.x
> The only thing I am sure of is that interrupts are simply not disabled.

They are only disabled on the local CPU, they could still occur on other
CPUs. This is not different from 2.2.

>
> I've also looked at some other scsi drivers that are disabling interrupts
> and they appear to be making similar calls to spin_lock_irqsave.
>
> Does anyone have any suggestions for debugging this? Is there a call that
> can be made to find out if interrupts are actually disabled?

unsigned flag;
asm volatile("pushfl ; popfl %0" : "=r" (flag));
printk(KERN_DEBUG "local interrupts are %s\n", (flag & (1<<9)) ? "enabled" : "disabled");

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.052 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site