diff options
| -rw-r--r-- | arch/x86/kernel/cpu/mtrr/if.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index a041e094b8b9..d76f13d6d8d6 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c | |||
| @@ -404,11 +404,10 @@ static const struct file_operations mtrr_fops = { | |||
| 404 | static int mtrr_seq_show(struct seq_file *seq, void *offset) | 404 | static int mtrr_seq_show(struct seq_file *seq, void *offset) |
| 405 | { | 405 | { |
| 406 | char factor; | 406 | char factor; |
| 407 | int i, max, len; | 407 | int i, max; |
| 408 | mtrr_type type; | 408 | mtrr_type type; |
| 409 | unsigned long base, size; | 409 | unsigned long base, size; |
| 410 | 410 | ||
| 411 | len = 0; | ||
| 412 | max = num_var_ranges; | 411 | max = num_var_ranges; |
| 413 | for (i = 0; i < max; i++) { | 412 | for (i = 0; i < max; i++) { |
| 414 | mtrr_if->get(i, &base, &size, &type); | 413 | mtrr_if->get(i, &base, &size, &type); |
| @@ -425,11 +424,10 @@ static int mtrr_seq_show(struct seq_file *seq, void *offset) | |||
| 425 | size >>= 20 - PAGE_SHIFT; | 424 | size >>= 20 - PAGE_SHIFT; |
| 426 | } | 425 | } |
| 427 | /* Base can be > 32bit */ | 426 | /* Base can be > 32bit */ |
| 428 | len += seq_printf(seq, "reg%02i: base=0x%06lx000 " | 427 | seq_printf(seq, "reg%02i: base=0x%06lx000 (%5luMB), size=%5lu%cB, count=%d: %s\n", |
| 429 | "(%5luMB), size=%5lu%cB, count=%d: %s\n", | 428 | i, base, base >> (20 - PAGE_SHIFT), |
| 430 | i, base, base >> (20 - PAGE_SHIFT), size, | 429 | size, factor, |
| 431 | factor, mtrr_usage_table[i], | 430 | mtrr_usage_table[i], mtrr_attrib_to_str(type)); |
| 432 | mtrr_attrib_to_str(type)); | ||
| 433 | } | 431 | } |
| 434 | return 0; | 432 | return 0; |
| 435 | } | 433 | } |
