@@ -126,7 +126,7 @@ static void printk_prot(struct seq_file *m, pgprot_t prot, int level, bool dmsg)
126
126
127
127
if (!pgprot_val (prot )) {
128
128
/* Not present */
129
- pt_dump_cont_printf (m , dmsg , " " );
129
+ pt_dump_cont_printf (m , dmsg , " " );
130
130
} else {
131
131
if (pr & _PAGE_USER )
132
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
145
else
146
146
pt_dump_cont_printf (m , dmsg , " " );
147
147
148
- /* Bit 9 has a different meaning on level 3 vs 4 */
149
- if (level <= 3 ) {
150
- if (pr & _PAGE_PSE )
151
- pt_dump_cont_printf (m , dmsg , "PSE " );
152
- else
153
- pt_dump_cont_printf (m , dmsg , " " );
154
- } else {
155
- if (pr & _PAGE_PAT )
156
- pt_dump_cont_printf (m , dmsg , "pat " );
157
- else
158
- pt_dump_cont_printf (m , dmsg , " " );
159
- }
148
+ /* Bit 7 has a different meaning on level 3 vs 4 */
149
+ if (level <= 3 && pr & _PAGE_PSE )
150
+ pt_dump_cont_printf (m , dmsg , "PSE " );
151
+ else
152
+ pt_dump_cont_printf (m , dmsg , " " );
153
+ if ((level == 4 && pr & _PAGE_PAT ) ||
154
+ ((level == 3 || level == 2 ) && pr & _PAGE_PAT_LARGE ))
155
+ pt_dump_cont_printf (m , dmsg , "pat " );
156
+ else
157
+ pt_dump_cont_printf (m , dmsg , " " );
160
158
if (pr & _PAGE_GLOBAL )
161
159
pt_dump_cont_printf (m , dmsg , "GLB " );
162
160
else
0 commit comments