lkml.org 
[lkml]   [2000]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectClear interrupts on a SMP machine?

Hello,

I need to clear the interrupts on a SMP machine!
Before everybody jumps up and says 'idiot', let me
assure you that I know about spin locks. Here's the
problem:

spin_lock_irqsave(&local_lock, flags);
Muck_With_The_RTC_Chip();
spin_unlock_irqrestore(&local_lock, flags);

This protects only the local procedure. In the meantime, somebody
else, using another CPU is mucking with the same RTC Chip. The
result being that the index register gets set by somebody else
before my procedure, having set the index register, gets to read
the data register. The "somebody else" is a realtime-clock ISR.

Now, a temporary hack was to disable the realtime clock timer
function during my access. If this machine used the old interrupt
controllers, I could just mask the first controller during my access
and put the old mask back after I was through. However, these both
seem to be a hack because the procedure(s) have to know about hardware
that they were not written to access.

So, how do I clear the interrupts on a SMP machine?


Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
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:41    [W:0.096 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site