Skip to content

Commit

Permalink
x86: mtrr_cleanup safe to get more spare regs now
Browse files Browse the repository at this point in the history
Delay exit to make sure we can actually get the optimal result in as
many cases as possible.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Sep 30, 2008
1 parent 8f0afaa commit 73436a1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 73436a1

Please sign in to comment.