Skip to content

Commit 42fde7a

Browse files
yhluH. Peter Anvin
authored andcommitted
x86: mtrr_cleanup: print out correct type v2
Print out the correct type when the Write Protected (WP) type is seen. Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 8bb3931 commit 42fde7a

File tree

1 file changed

+3
-1
lines changed
  • arch/x86/kernel/cpu/mtrr

1 file changed

+3
-1
lines changed

arch/x86/kernel/cpu/mtrr/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,12 +1273,14 @@ static int __init mtrr_cleanup(unsigned address_bits)
12731273
size_base = to_size_factor(size_base, &size_factor),
12741274
start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
12751275
start_base = to_size_factor(start_base, &start_factor),
1276+
type = range_state[i].type;
12761277

12771278
printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
12781279
i, start_base, start_factor,
12791280
size_base, size_factor,
12801281
(type == MTRR_TYPE_UNCACHABLE) ? "UC" :
1281-
((type == MTRR_TYPE_WRBACK) ? "WB" : "Other")
1282+
((type == MTRR_TYPE_WRPROT) ? "WP" :
1283+
((type == MTRR_TYPE_WRBACK) ? "WB" : "Other"))
12821284
);
12831285
}
12841286

0 commit comments

Comments
 (0)