diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-09-27 03:30:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-27 12:09:35 -0400 |
commit | 54d45ff4208836e62536fc40b0141586dbf6641f (patch) | |
tree | 3a891fe14fdd4c1e50aa879164ba4c1ea9dd8a1f /arch | |
parent | 2313c2793d290a8cc37c428f8622c53f3fe1d6dc (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 14 |
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 93d575ac61a3..aff46b99ff01 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) | |||
836 | } | 836 | } |
837 | early_param("enble_mtrr_cleanup", enable_mtrr_cleanup_setup); | 837 | early_param("enble_mtrr_cleanup", enable_mtrr_cleanup_setup); |
838 | 838 | ||
839 | static int __init mtrr_cleanup_debug_setup(char *str) | ||
840 | { | ||
841 | debug_print = 1; | ||
842 | return 0; | ||
843 | } | ||
844 | early_param("mtrr_cleanup_debug", mtrr_cleanup_debug_setup); | ||
845 | |||
839 | struct var_mtrr_state { | 846 | struct var_mtrr_state { |
840 | unsigned long range_startk; | 847 | unsigned long range_startk; |
841 | unsigned long range_sizek; | 848 | unsigned long range_sizek; |
@@ -1227,7 +1234,7 @@ static int __init mtrr_cleanup(unsigned address_bits) | |||
1227 | if (mtrr_chunk_size && mtrr_gran_size) { | 1234 | if (mtrr_chunk_size && mtrr_gran_size) { |
1228 | int num_reg; | 1235 | int num_reg; |
1229 | 1236 | ||
1230 | debug_print = 1; | 1237 | debug_print++; |
1231 | /* convert ranges to var ranges state */ | 1238 | /* convert ranges to var ranges state */ |
1232 | num_reg = x86_setup_var_mtrrs(range, nr_range, mtrr_chunk_size, | 1239 | num_reg = x86_setup_var_mtrrs(range, nr_range, mtrr_chunk_size, |
1233 | mtrr_gran_size); | 1240 | mtrr_gran_size); |
@@ -1263,7 +1270,7 @@ static int __init mtrr_cleanup(unsigned address_bits) | |||
1263 | } | 1270 | } |
1264 | printk(KERN_INFO "invalid mtrr_gran_size or mtrr_chunk_size, " | 1271 | printk(KERN_INFO "invalid mtrr_gran_size or mtrr_chunk_size, " |
1265 | "will find optimal one\n"); | 1272 | "will find optimal one\n"); |
1266 | debug_print = 0; | 1273 | debug_print--; |
1267 | memset(result, 0, sizeof(result[0])); | 1274 | memset(result, 0, sizeof(result[0])); |
1268 | } | 1275 | } |
1269 | 1276 | ||
@@ -1366,8 +1373,9 @@ static int __init mtrr_cleanup(unsigned address_bits) | |||
1366 | chunk_size <<= 10; | 1373 | chunk_size <<= 10; |
1367 | gran_size = result[i].gran_sizek; | 1374 | gran_size = result[i].gran_sizek; |
1368 | gran_size <<= 10; | 1375 | gran_size <<= 10; |
1369 | debug_print = 1; | 1376 | debug_print++; |
1370 | x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size); | 1377 | x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size); |
1378 | debug_print--; | ||
1371 | set_var_mtrr_all(address_bits); | 1379 | set_var_mtrr_all(address_bits); |
1372 | return 1; | 1380 | return 1; |
1373 | } | 1381 | } |