From: "H. Peter Anvin" <hpa@zytor.com>
To: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: tglx@linutronix.de, mingo@elte.hu, macro@linux-mips.org,
yinghai@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 2/2] x86,apic: Use logical OR in noop-write operation
Date: Tue, 08 Dec 2009 12:10:24 -0800 [thread overview]
Message-ID: <4B1EB2B0.4000204@zytor.com> (raw)
In-Reply-To: <20091208155557.326359748@openvz.org>
On 12/08/2009 07:53 AM, Cyrill Gorcunov wrote:
> For apic noop'ified we have to use logical OR statement,
> otherwise any write on systems shipped with 82489DX
> (where apic presence bit can't be retrieved via cpuid)
> will not trigger the warning which is not desired.
>
> In turn noop'ified read operation remains using logical
> AND statement. This will catch _only_ future code bugs
> since:
>
> 1) The old 32bit systems without apic presence bit use
> disable_apic only as a flag that chip was turned off
> via boot option but not due to MP-table (BIOS) bug where
> we may try to re-enable apic via MSR registers. The further
> SMP setup code already prepared for a such situation
> (ie it disables SMP support) and do not issue write
> operations but still needs to issue apic_read. So instead
> of deforming code with "if" we just allow reads until
> SMP support gets disabled. But even then we still need
> apic_read issued on a such machine at shutdown procedure.
>
> 2) x86-64 at moment properly uses cpu_has_apic and turn
> this feature off as only chip is disabled together
> with disable_apic flag.
>
Could you clarify the question I asked yesterday: how is the "or"
different from just warning unconditionally (which would at least be a
lot more clear)? Can the situation that !cpu_has_apic && disable_apic
actually happen and we *still* end up in apic_write?
-hpa
next prev parent reply other threads:[~2009-12-08 20:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 15:53 [patch 0/2] apic snipptes on latest -tip/master Cyrill Gorcunov
2009-12-08 15:53 ` [patch 1/2] x86,mcheck: Thermal monitoring depends on APIC being enabled Cyrill Gorcunov
2009-12-09 14:56 ` Cyrill Gorcunov
2009-12-08 15:53 ` [patch 2/2] x86,apic: Use logical OR in noop-write operation Cyrill Gorcunov
2009-12-08 20:10 ` H. Peter Anvin [this message]
2009-12-08 20:26 ` Cyrill Gorcunov
2009-12-08 20:48 ` Cyrill Gorcunov
2009-12-09 15:50 ` Cyrill Gorcunov
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=4B1EB2B0.4000204@zytor.com \
--to=hpa@zytor.com \
--cc=gorcunov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=yinghai@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