Re: [patch] x86, mtrr: avoid MTRR reprogramming on BP during boot on UP platforms

From: Markus Kohm
Date: Thu Feb 03 2011 - 03:05:31 EST


Suresh Siddha wrote on Thursday 03 February 2011:
> diff --git a/arch/x86/kernel/cpu/mtrr/main.c
> b/arch/x86/kernel/cpu/mtrr/main.c index 01c0f3e..4fe5ebc 100644
> --- a/arch/x86/kernel/cpu/mtrr/main.c
> +++ b/arch/x86/kernel/cpu/mtrr/main.c
> @@ -793,13 +793,21 @@ void set_mtrr_aps_delayed_init(void)
> }
>
> /*
> - * MTRR initialization for all AP's
> + * Delayed MTRR initialization for all AP's
> */
> void mtrr_aps_init(void)
> {
> if (!use_intel())
> return;
>
> + /*
> + * Check if someone has requested the delay of AP MTRR
> initialization, + * by doing set_mtrr_aps_delayed_init(), prior to
> this point. If not, + * then we are done.
> + */
> + if (!mtrr_aps_delayed_init)
> + return;
> +
> set_mtrr(~0U, 0, 0, 0);
> mtrr_aps_delayed_init = false;
> }

ACK

I've tested with kernel 2.6.38-rc3. The hard hang regression is fixed.

Thank you very much!
--
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/