Re: [PATCH 1/2] x86: fix keeping track of AMD C1E

From: H. Peter Anvin
Date: Fri Jul 16 2010 - 18:29:16 EST


On 07/16/2010 09:25 AM, Borislav Petkov wrote:
>
> I don't see the need for two things denoting C1E for the very simple
> reason: when C1E gets enabled on a machine, one of the bits gets set in
> the MSR on each core simultaneously. So if one core sees one of the bits
> set, all the remaining cores are seeing them too. The first core that
> sees one of the bits in the MSR, sets c1e_detected.
>
> So next time any core does cpu_idle() => c1e_idle(), it switches to
> timer broadcast on it since it might go into C1E if all the others
> follow.
>
> Frankly, I can't think of a case where we'd need to two things - I
> could be missing something. But this workaround is a couple of years
> old, maybe Thomas might give us more insight into whether there's a
> particular reason for the cpuid flag and the c1e_detected variable.
> Thomas?
>

I'm not saying there should be two things (and that's clearly wrong no
matter what), but rather it's not clear to me that the one thing should
be a variable.

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