summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 984813a4d5dc..fb8ba502239f 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -39,7 +39,7 @@
#include <linux/uaccess.h>
#include <linux/elf-randomize.h>
#include <linux/pkeys.h>
-#include <linux/seq_buf.h>
+#include <linux/printbuf.h>
#include <asm/interrupt.h>
#include <asm/io.h>
@@ -1399,32 +1399,30 @@ void show_user_instructions(struct pt_regs *regs)
{
unsigned long pc;
int n = NR_INSN_TO_PRINT;
- struct seq_buf s;
char buf[96]; /* enough for 8 times 9 + 2 chars */
+ struct printbuf s = PRINTBUF_EXTERN(buf, sizeof(buf));
pc = regs->nip - (NR_INSN_TO_PRINT * 3 / 4 * sizeof(int));
- seq_buf_init(&s, buf, sizeof(buf));
-
while (n) {
int i;
- seq_buf_clear(&s);
+ printbuf_reset(&s);
for (i = 0; i < 8 && n; i++, n--, pc += sizeof(int)) {
int instr;
if (copy_from_user_nofault(&instr, (void __user *)pc,
sizeof(instr))) {
- seq_buf_printf(&s, "XXXXXXXX ");
+ prt_printf(&s, "XXXXXXXX ");
continue;
}
- seq_buf_printf(&s, regs->nip == pc ? "<%08x> " : "%08x ", instr);
+ prt_printf(&s, regs->nip == pc ? "<%08x> " : "%08x ", instr);
}
- if (!seq_buf_has_overflowed(&s))
+ if (printbuf_remaining(&s))
pr_info("%s[%d]: code: %s\n", current->comm,
- current->pid, s.buffer);
+ current->pid, s.buf);
}
}