From: Corey Minyard <minyard@acm.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Patch to fix race between the NMI code and the CMOS clock
Date: Sun, 23 Jan 2005 09:49:02 -0600 [thread overview]
Message-ID: <41F3C76E.7000904@acm.org> (raw)
In-Reply-To: <20050123001806.53140e54.akpm@osdl.org>
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
next prev parent reply other threads:[~2005-01-23 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-21 23:03 Patch to fix race between the NMI code and the CMOS clock Corey Minyard
2005-01-23 8:18 ` Andrew Morton
2005-01-23 15:49 ` Corey Minyard [this message]
2005-01-24 2:47 ` Corey Minyard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41F3C76E.7000904@acm.org \
--to=minyard@acm.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox