lkml.org 
[lkml]   [2005]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Patch to fix race between the NMI code and the CMOS clock
Andrew Morton wrote:

>Corey Minyard <minyard@acm.org> wrote:
>
>
>>This patch fixes a race between the CMOS clock setting and the NMI
>> code. The NMI code indiscriminatly sets index registers and values
>> in the same place the CMOS clock is set. If you are setting the
>> CMOS clock and an NMI occurs, Bad values could be written to or
>> read from the CMOS RAM, or the NMI operation might not occur
>> correctly.
>>
>> Fixing this requires creating a special lock so the NMI code can
>> know its CPU owns the lock an "do the right thing" in that case.
>>
>>
>
>hm, tricky patch. I can't see any holes in it. The volatile variable is
>awkward but should be OK on x86 and I can see the need for it.
>
>
It took some thought and I couldn't think of anything simpler. I posted
in on lkml a little while ago, and some people tried but nobody else
found a simpler solution that worked with SMP.

>There's a preposterous amount of inlining happening in this code. Hence
>your patch took the size of drivers/char/rtc.o from
>
> text data bss dec hex filename
> 3657 540 8 4205 106d drivers/char/rtc.o
>to
> 5419 540 8 5967 174f drivers/char/rtc.o
>
>Do you think you could take a look at uninlining everything sometime?
>
>
Certainly. I'll try to have it sometime today.

Thanks,

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

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