OSDN Git Service

powerpc: Print instruction dump on a single line
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 6 Oct 2022 03:20:19 +0000 (14:20 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:48 +0000 (23:31 +1100)
commitd90bb7b4fdaff3f2fa68c7af85de2ce9e70189b1
treecb9f2edc50cab3a3d7936d7a017c5b81b1024cc1
parent3e65412709293d5fb65249408e8e801b23b72635
powerpc: Print instruction dump on a single line

Although the previous commit made the powerpc instruction dump usable
with scripts/decodecode, there are still some problems.

Because the dump is split across multiple lines, the script doesn't cope
with printk timestamps or caller info.

That can be fixed by printing the entire dump on one line, eg:

  [   12.016307][  T112] --- interrupt: c00
  [   12.016605][  T112] Code: 4b7aae15 60000000 3d22016e 3c62ffec 39291160 38639bc0 e8890000 4b7aadf9 60000000 4bfffee8 7c0802a6 60000000 <0fe0000060420000 3c4c008f 384268a0
  [   12.017655][  T112] ---[ end trace 0000000000000000 ]---

That output can then be piped directly into scripts/decodecode and
interpreted correctly.

Printing the dump on a single line does produce a very long line, about
173 characters. That is still shorter than x86, which prints nearly 200
characters even without timestamps etc.

All consoles I'm aware of will wrap the line if it's too long, so the
length should not be a functional problem. If anything it should help on
consoles like VGA by using less vertical space.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221006032019.1128624-2-mpe@ellerman.id.au
arch/powerpc/kernel/process.c