Skip to content

Commit 0bca3ec

Browse files
Matthew Wilcox (Oracle)ctmarinas
authored andcommitted
arm64: Show three registers per line
Displaying two registers per line takes 15 lines. That improves to just 10 lines if we display three registers per line, which reduces the amount of information lost when oopses are cut off. It stays within 80 columns and matches x86-64. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 4139cf9 commit 0bca3ec

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arch/arm64/kernel/process.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,10 @@ void __show_regs(struct pt_regs *regs)
292292
i = top_reg;
293293

294294
while (i >= 0) {
295-
printk("x%-2d: %016llx ", i, regs->regs[i]);
296-
i--;
295+
printk("x%-2d: %016llx", i, regs->regs[i]);
297296

298-
if (i % 2 == 0) {
299-
pr_cont("x%-2d: %016llx ", i, regs->regs[i]);
300-
i--;
301-
}
297+
while (i-- % 3)
298+
pr_cont(" x%-2d: %016llx", i, regs->regs[i]);
302299

303300
pr_cont("\n");
304301
}

0 commit comments

Comments
 (0)