[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B1EB2B0.4000204@zytor.com>
Date: Tue, 08 Dec 2009 12:10:24 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Cyrill Gorcunov <gorcunov@...nvz.org>
CC: tglx@...utronix.de, mingo@...e.hu, macro@...ux-mips.org,
yinghai@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 2/2] x86,apic: Use logical OR in noop-write operation
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists