Re: [PATCH -tip] perf_counter/x86: Fix incorrect default branch

From: Ingo Molnar
Date: Tue Jun 09 2009 - 10:25:29 EST



* Yong Wang <yong.y.wang@xxxxxxxxxxxxxxx> wrote:

> On Tue, Jun 09, 2009 at 03:23:13PM +0200, Ingo Molnar wrote:
> >
> > * Yong Wang <yong.y.wang@xxxxxxxxxxxxxxx> wrote:
> >
> > > The event selector and UMASK values of Nehalem do not apply to all
> > > Intel processors.
> >
> > The idea was to offer _some_ sort of table on new CPUs, instead of
> > nothing...
> >
> > Eventually Intel stops changing those model specific index values in
> > future CPUs and puts them into architectural perfmon, for
> > fundamental stats like L1/LLC cache statistics.
> >
> > In that case defaulting to the latest (known) enumeration might work
> > out to be just the thing used by all future CPUs.
> >
> > So this is a subtle hint ;-)
> >
>
> I see what you mean. You talked about future cpus. But what about
> those old ones that are not atom, core2 or nehalem? Forget about
> them?

They dont have X86_FEATURE_ARCH_PERFMON set, right?

I made the switch statement under the assumption that it covers all
existing arch-perfmon CPU models. If not, the 'default:' placement
would indeed be buggy.

Ingo
--
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/