[lkml]   [2001]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Question about rtc_lock
At 10:40 AM -0400 2001-10-06, Thomas Hood wrote:
>On Sat, 2001-10-06 at 09:13, Alan Cox wrote:
>> > No, but what if the rtc interrupts while the lock is held in this
>> > bit of code?
>> Thats fine. It wont take the lock
>But the first line of irq_interrupt() is:
> spin_lock (&rtc_lock);
>If one has a multi-processor machine, and CPUx is going through
>the bootflag code, which takes the rtc_lock, and that CPU is
>interrupted and enters rtc_interrupt(), which tries to take the
>rtc_lock, won't it deadlock?
>If not, then I'm missing some clue about how these spinlocks work.

rtc_interrupt(), you mean.

Even if there weren't current interrupt code doing CMOS accesses, it
would seem prudent to assume that there might be eventually, the
RTC/NVRAM being a multi-purpose shared resource.
/Jonathan Lundell.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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