Messages in this thread | | | Date | Wed, 18 Oct 2000 08:51:57 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Clear 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/
| |