Re: [tip:x86/urgent] x86: Fix bogus warning inapic_noop.apic_write()

From: Cyrill Gorcunov
Date: Mon Dec 07 2009 - 13:04:57 EST


On Mon, Dec 07, 2009 at 05:55:37PM +0100, Thomas Gleixner wrote:
...
> > And, btw if some code is trying to write to apic when
> > it's disabled via boot option -- it means the code is
> > buggy and this is not a false positive but rather proper
> > warning.
> >
> > Thomas, if you've changed this code I suppose you saw some
> > warning triggered, right? Could you pointed me on it?
>
> http://www.kerneloops.org/searchweek.php?search=native_apic_write_dummy
>

Doh!

The most cases show inapropriate usage of apic->write() operation.
set_perf_event_pending() already fixed by
7d42896628202a551ad1107697cd215dc5fca099,
intel_init_thermal() fixed as well with
5ce4243dcefbbc43791ffc36e1be55067ceec916

(all was in -tip).

Though throttling code is just buggy and intel_init_thermal() should
check if cpu_has_apic. So the former code does exactly what
it should -- it catches inapropriate writes.

Thomas, I just don't know -- from my pov, write() is really different
from read(), since it implies that APIC changes it behaviour, it could
be timer setup, vector setup operation or whatever. I even doubt if
enabling IPI in apic-noop is a good idea (since perf code already
implemented to check apic presence by Peter and IPI is not called).

Though I'm not insisting, I simply don't have spare time at moment
to check all apic_writes() again :(

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