Commit 85673646 authored by Michael Ellerman's avatar Michael Ellerman

powerpc/xmon: Deindent the SLB dumping logic

Currently the code that dumps SLB entries uses a double-nested if. This
means the actual dumping logic is a bit squashed. Deindent it by using
continue.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: default avatarRashmica Gupta <rashmica.g@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 9fc84914
...@@ -3157,9 +3157,17 @@ void dump_segments(void) ...@@ -3157,9 +3157,17 @@ void dump_segments(void)
for (i = 0; i < mmu_slb_size; i++) { for (i = 0; i < mmu_slb_size; i++) {
asm volatile("slbmfee %0,%1" : "=r" (esid) : "r" (i)); asm volatile("slbmfee %0,%1" : "=r" (esid) : "r" (i));
asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i)); asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i));
if (esid || vsid) {
if (!esid && !vsid)
continue;
printf("%02d %016lx %016lx", i, esid, vsid); printf("%02d %016lx %016lx", i, esid, vsid);
if (esid & SLB_ESID_V) {
if (!(esid & SLB_ESID_V)) {
printf("\n");
continue;
}
llp = vsid & SLB_VSID_LLP; llp = vsid & SLB_VSID_LLP;
if (vsid & SLB_VSID_B_1T) { if (vsid & SLB_VSID_B_1T) {
printf(" 1T ESID=%9lx VSID=%13lx LLP:%3lx \n", printf(" 1T ESID=%9lx VSID=%13lx LLP:%3lx \n",
...@@ -3172,9 +3180,6 @@ void dump_segments(void) ...@@ -3172,9 +3180,6 @@ void dump_segments(void)
(vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT, (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT,
llp); llp);
} }
} else
printf("\n");
}
} }
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment