Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110412
b: refs/heads/master
c: 54d45ff
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Sep 27, 2008
1 parent 3faa24b commit 0d434b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2313c2793d290a8cc37c428f8622c53f3fe1d6dc
refs/heads/master: 54d45ff4208836e62536fc40b0141586dbf6641f
14 changes: 11 additions & 3 deletions trunk/arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,13 @@ static int __init enable_mtrr_cleanup_setup(char *str)
}
early_param("enble_mtrr_cleanup", enable_mtrr_cleanup_setup);

static int __init mtrr_cleanup_debug_setup(char *str)
{
debug_print = 1;
return 0;
}
early_param("mtrr_cleanup_debug", mtrr_cleanup_debug_setup);

struct var_mtrr_state {
unsigned long range_startk;
unsigned long range_sizek;
Expand Down Expand Up @@ -1227,7 +1234,7 @@ static int __init mtrr_cleanup(unsigned address_bits)
if (mtrr_chunk_size && mtrr_gran_size) {
int num_reg;

debug_print = 1;
debug_print++;
/* convert ranges to var ranges state */
num_reg = x86_setup_var_mtrrs(range, nr_range, mtrr_chunk_size,
mtrr_gran_size);
Expand Down Expand Up @@ -1263,7 +1270,7 @@ static int __init mtrr_cleanup(unsigned address_bits)
}
printk(KERN_INFO "invalid mtrr_gran_size or mtrr_chunk_size, "
"will find optimal one\n");
debug_print = 0;
debug_print--;
memset(result, 0, sizeof(result[0]));
}

Expand Down Expand Up @@ -1366,8 +1373,9 @@ static int __init mtrr_cleanup(unsigned address_bits)
chunk_size <<= 10;
gran_size = result[i].gran_sizek;
gran_size <<= 10;
debug_print = 1;
debug_print++;
x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size);
debug_print--;
set_var_mtrr_all(address_bits);
return 1;
}
Expand Down

0 comments on commit 0d434b4

Please sign in to comment.