From: Yinghai Lu Date: Mon, 29 Sep 2008 20:39:17 +0000 (-0700) Subject: x86: mtrr_cleanup safe to get more spare regs now X-Git-Tag: v2.6.28-rc1~734^2^13~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=73436a1d2501575f9c2e6ddb26889145e23cefd8;p=linux-2.6-omap-h63xx.git x86: mtrr_cleanup safe to get more spare regs now Delay exit to make sure we can actually get the optimal result in as many cases as possible. Signed-off-by: Yinghai Lu Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index bccf57f5b61..ae0ca97e20b 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -1353,10 +1353,8 @@ static int __init mtrr_cleanup(unsigned address_bits) nr_mtrr_spare_reg = num_var_ranges - 1; num_reg_good = -1; for (i = num_var_ranges - nr_mtrr_spare_reg; i > 0; i--) { - if (!min_loss_pfn[i]) { + if (!min_loss_pfn[i]) num_reg_good = i; - break; - } } index_good = -1;