summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-09-27 00:30:06 -0700
committerIngo Molnar <mingo@elte.hu>2008-09-27 18:09:35 +0200
commit54d45ff4208836e62536fc40b0141586dbf6641f (patch)
tree3a891fe14fdd4c1e50aa879164ba4c1ea9dd8a1f
parent2313c2793d290a8cc37c428f8622c53f3fe1d6dc (diff)
downloadkernel-crypto-54d45ff4208836e62536fc40b0141586dbf6641f.tar.gz
kernel-crypto-54d45ff4208836e62536fc40b0141586dbf6641f.tar.xz
kernel-crypto-54d45ff4208836e62536fc40b0141586dbf6641f.zip
x86: add mtrr_cleanup_debug command line
add mtrr_cleanup_debug to print out more info about layout Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 93d575ac61a..aff46b99ff0 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -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;
@@ -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);
@@ -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]));
}
@@ -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;
}