mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: Disabling interrupts in 2.4.x
@ 2000-12-18 20:24 Boerner, Brian
  0 siblings, 0 replies; 4+ messages in thread
From: Boerner, Brian @ 2000-12-18 20:24 UTC (permalink / raw)
  To: 'Andi Kleen', Boerner, Brian
  Cc: 'linux-kernel@vger.redhat.com'

It's a UP configured system.

-bmb-


> -----Original Message-----
> From: Andi Kleen [mailto:ak@suse.de]
> Sent: Monday, December 18, 2000 3:18 PM
> To: Boerner, Brian
> Cc: 'linux-kernel@vger.redhat.com'
> Subject: Re: 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Disabling interrupts in 2.4.x
@ 2000-12-18 19:57 Boerner, Brian
  2000-12-18 20:17 ` Andi Kleen
  2000-12-18 21:39 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Boerner, Brian @ 2000-12-18 19:57 UTC (permalink / raw)
  To: 'linux-kernel@vger.redhat.com'

I'm still trying to get the aacraid driver up and running on 2.4 and have
worked it down to this final problem. It appears that interrupts are not
being disabled properly using spin_lock_irqsave. I'm using 2.4.0-test11.

I make this call:
	spin_lock_irqsave ( &(SpinLock->spin_lock), SpinLock->cpu_flags);

where SpinLock is of type pointer to an OS_SPINLOCK structure defined as:

typedef _OS_SPINLOCK {
	spinlock_t	spin_lock;
	unsigned 	cpu_lock_count[NR_CPUS];
	long 		cpu_flag;
	long		lockout_count;
} OS_SPINLOCK;


This is the same call that I was making in 2.2.x kernel and don't have any
problems.

I would expect this function to disable interrupts, but given the scale of
change between 2.2.x spinlock.h and 2.4.x spinlock.h I'm just not sure
anymore. 

The only thing I am sure of is that interrupts are simply not disabled.

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?

Brian M. Boerner
System Software Developer
Adaptec, Inc.
Nashua, NH 03060

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-12-18 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-18 20:24 Disabling interrupts in 2.4.x Boerner, Brian
  -- strict thread matches above, loose matches on Subject: below --
2000-12-18 19:57 Boerner, Brian
2000-12-18 20:17 ` Andi Kleen
2000-12-18 21:39 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®