RE: [PATCH v5 10/12] x86/mtrr/main.c: Ask the first online CPU tosave mtrr

From: Yu, Fenghua
Date: Wed Jan 25 2012 - 14:01:19 EST


On 01/12/2012 04:33 AM, Brian Gerst wrote:
> On Wed, Jan 11, 2012 at 12:04 PM, Fenghua Yu <fenghua.yu@xxxxxxxxx> wrote:
>> From: Fenghua Yu <fenghua.yu@xxxxxxxxx>
>>
>> Ask the first online CPU to save mtrr instead of asking BSP. BSP
could be
>> offline when mtrr_save_state() is called.
>
> If you can use any non-boot cpu to save the MTRRs why not just use the
> current cpu? They should all be in sync anyways.

The current cpu can not be used to save the MTRRs because its MTRRs are not initialized yet at this point. Later on, set_mtrr() will be called to initialize MTRRs on the current CPU (and all booted CPUs).

Thanks.

-Fenghua
¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_