mirror of https://gitee.com/openkylin/linux.git
x86, debug: mtrr_cleanup print out var mtrr before change it
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
834836ee6a
commit
8bb39311bf
|
@ -1211,13 +1211,14 @@ static unsigned long __initdata min_loss_pfn[RANGE_NUM];
|
||||||
static int __init mtrr_cleanup(unsigned address_bits)
|
static int __init mtrr_cleanup(unsigned address_bits)
|
||||||
{
|
{
|
||||||
unsigned long extra_remove_base, extra_remove_size;
|
unsigned long extra_remove_base, extra_remove_size;
|
||||||
unsigned long i, base, size, def, dummy;
|
unsigned long base, size, def, dummy;
|
||||||
mtrr_type type;
|
mtrr_type type;
|
||||||
int nr_range, nr_range_new;
|
int nr_range, nr_range_new;
|
||||||
u64 chunk_size, gran_size;
|
u64 chunk_size, gran_size;
|
||||||
unsigned long range_sums, range_sums_new;
|
unsigned long range_sums, range_sums_new;
|
||||||
int index_good;
|
int index_good;
|
||||||
int num_reg_good;
|
int num_reg_good;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* extra one for all 0 */
|
/* extra one for all 0 */
|
||||||
int num[MTRR_NUM_TYPES + 1];
|
int num[MTRR_NUM_TYPES + 1];
|
||||||
|
@ -1259,6 +1260,28 @@ static int __init mtrr_cleanup(unsigned address_bits)
|
||||||
num_var_ranges - num[MTRR_NUM_TYPES])
|
num_var_ranges - num[MTRR_NUM_TYPES])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* print original var MTRRs at first, for debugging: */
|
||||||
|
printk(KERN_DEBUG "original variable MTRRs\n");
|
||||||
|
for (i = 0; i < num_var_ranges; i++) {
|
||||||
|
char start_factor = 'K', size_factor = 'K';
|
||||||
|
unsigned long start_base, size_base;
|
||||||
|
|
||||||
|
size_base = range_state[i].size_pfn << (PAGE_SHIFT - 10);
|
||||||
|
if (!size_base)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
size_base = to_size_factor(size_base, &size_factor),
|
||||||
|
start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
|
||||||
|
start_base = to_size_factor(start_base, &start_factor),
|
||||||
|
|
||||||
|
printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
|
||||||
|
i, start_base, start_factor,
|
||||||
|
size_base, size_factor,
|
||||||
|
(type == MTRR_TYPE_UNCACHABLE) ? "UC" :
|
||||||
|
((type == MTRR_TYPE_WRBACK) ? "WB" : "Other")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
memset(range, 0, sizeof(range));
|
memset(range, 0, sizeof(range));
|
||||||
extra_remove_size = 0;
|
extra_remove_size = 0;
|
||||||
if (mtrr_tom2) {
|
if (mtrr_tom2) {
|
||||||
|
|
Loading…
Reference in New Issue