diff options
-rw-r--r-- | arch/x86/mm/dump_pagetables.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 95a427e57887..6c2ca03a5346 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c | |||
@@ -126,7 +126,7 @@ static void printk_prot(struct seq_file *m, pgprot_t prot, int level, bool dmsg) | |||
126 | 126 | ||
127 | if (!pgprot_val(prot)) { | 127 | if (!pgprot_val(prot)) { |
128 | /* Not present */ | 128 | /* Not present */ |
129 | pt_dump_cont_printf(m, dmsg, " "); | 129 | pt_dump_cont_printf(m, dmsg, " "); |
130 | } else { | 130 | } else { |
131 | if (pr & _PAGE_USER) | 131 | if (pr & _PAGE_USER) |
132 | pt_dump_cont_printf(m, dmsg, "USR "); | 132 | pt_dump_cont_printf(m, dmsg, "USR "); |
@@ -145,18 +145,16 @@ static void printk_prot(struct seq_file *m, pgprot_t prot, int level, bool dmsg) | |||
145 | else | 145 | else |
146 | pt_dump_cont_printf(m, dmsg, " "); | 146 | pt_dump_cont_printf(m, dmsg, " "); |
147 | 147 | ||
148 | /* Bit 9 has a different meaning on level 3 vs 4 */ | 148 | /* Bit 7 has a different meaning on level 3 vs 4 */ |
149 | if (level <= 3) { | 149 | if (level <= 3 && pr & _PAGE_PSE) |
150 | if (pr & _PAGE_PSE) | 150 | pt_dump_cont_printf(m, dmsg, "PSE "); |
151 | pt_dump_cont_printf(m, dmsg, "PSE "); | 151 | else |
152 | else | 152 | pt_dump_cont_printf(m, dmsg, " "); |
153 | pt_dump_cont_printf(m, dmsg, " "); | 153 | if ((level == 4 && pr & _PAGE_PAT) || |
154 | } else { | 154 | ((level == 3 || level == 2) && pr & _PAGE_PAT_LARGE)) |
155 | if (pr & _PAGE_PAT) | 155 | pt_dump_cont_printf(m, dmsg, "pat "); |
156 | pt_dump_cont_printf(m, dmsg, "pat "); | 156 | else |
157 | else | 157 | pt_dump_cont_printf(m, dmsg, " "); |
158 | pt_dump_cont_printf(m, dmsg, " "); | ||
159 | } | ||
160 | if (pr & _PAGE_GLOBAL) | 158 | if (pr & _PAGE_GLOBAL) |
161 | pt_dump_cont_printf(m, dmsg, "GLB "); | 159 | pt_dump_cont_printf(m, dmsg, "GLB "); |
162 | else | 160 | else |