powerpc/ptdump: Standardise display of BAT flags
Display BAT flags the same way as page flags: rwx and wimg Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/a07585f353c167b8db9597d83f992a5cb4fbf4c4.1589866984.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
6b30830e20
commit
8961a2a535
|
@ -15,12 +15,12 @@
|
|||
static char *pp_601(int k, int pp)
|
||||
{
|
||||
if (pp == 0)
|
||||
return k ? "NA" : "RWX";
|
||||
return k ? " " : "rwx";
|
||||
if (pp == 1)
|
||||
return k ? "ROX" : "RWX";
|
||||
return k ? "r x" : "rwx";
|
||||
if (pp == 2)
|
||||
return k ? "RWX" : "RWX";
|
||||
return k ? "ROX" : "ROX";
|
||||
return "rwx";
|
||||
return "r x";
|
||||
}
|
||||
|
||||
static void bat_show_601(struct seq_file *m, int idx, u32 lower, u32 upper)
|
||||
|
@ -48,12 +48,9 @@ static void bat_show_601(struct seq_file *m, int idx, u32 lower, u32 upper)
|
|||
|
||||
seq_printf(m, "Kernel %s User %s", pp_601(k & 2, pp), pp_601(k & 1, pp));
|
||||
|
||||
if (lower & _PAGE_WRITETHRU)
|
||||
seq_puts(m, "write through ");
|
||||
if (lower & _PAGE_NO_CACHE)
|
||||
seq_puts(m, "no cache ");
|
||||
if (lower & _PAGE_COHERENT)
|
||||
seq_puts(m, "coherent ");
|
||||
seq_puts(m, lower & _PAGE_WRITETHRU ? "w " : " ");
|
||||
seq_puts(m, lower & _PAGE_NO_CACHE ? "i " : " ");
|
||||
seq_puts(m, lower & _PAGE_COHERENT ? "m " : " ");
|
||||
seq_puts(m, "\n");
|
||||
}
|
||||
|
||||
|
@ -101,20 +98,16 @@ static void bat_show_603(struct seq_file *m, int idx, u32 lower, u32 upper, bool
|
|||
seq_puts(m, "Kernel/User ");
|
||||
|
||||
if (lower & BPP_RX)
|
||||
seq_puts(m, is_d ? "RO " : "EXEC ");
|
||||
seq_puts(m, is_d ? "r " : " x ");
|
||||
else if (lower & BPP_RW)
|
||||
seq_puts(m, is_d ? "RW " : "EXEC ");
|
||||
seq_puts(m, is_d ? "rw " : " x ");
|
||||
else
|
||||
seq_puts(m, is_d ? "NA " : "NX ");
|
||||
seq_puts(m, is_d ? " " : " ");
|
||||
|
||||
if (lower & _PAGE_WRITETHRU)
|
||||
seq_puts(m, "write through ");
|
||||
if (lower & _PAGE_NO_CACHE)
|
||||
seq_puts(m, "no cache ");
|
||||
if (lower & _PAGE_COHERENT)
|
||||
seq_puts(m, "coherent ");
|
||||
if (lower & _PAGE_GUARDED)
|
||||
seq_puts(m, "guarded ");
|
||||
seq_puts(m, lower & _PAGE_WRITETHRU ? "w " : " ");
|
||||
seq_puts(m, lower & _PAGE_NO_CACHE ? "i " : " ");
|
||||
seq_puts(m, lower & _PAGE_COHERENT ? "m " : " ");
|
||||
seq_puts(m, lower & _PAGE_GUARDED ? "g " : " ");
|
||||
seq_puts(m, "\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue