提交 a416dd8d 编写于 作者: M Michael Ellerman 提交者: Paul Mackerras

[PATCH] Do a single one-line printk in bad_page_fault()

bad_page_fault() prints a message telling the user what type of bad
fault we took. The first line of this message is currently implemented
as two separate printks. This has the unfortunate effect that if
several cpus simultaneously take a bad fault, the first and second parts
of the printk get jumbled up, which looks dodge and is hard to read.

So do a single one-line printk for each fault type.
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 66a91e9c
...@@ -426,18 +426,21 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) ...@@ -426,18 +426,21 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
/* kernel has accessed a bad area */ /* kernel has accessed a bad area */
printk(KERN_ALERT "Unable to handle kernel paging request for ");
switch (regs->trap) { switch (regs->trap) {
case 0x300: case 0x300:
case 0x380: case 0x380:
printk("data at address 0x%08lx\n", regs->dar); printk(KERN_ALERT "Unable to handle kernel paging request for "
break; "data at address 0x%08lx\n", regs->dar);
case 0x400: break;
case 0x480: case 0x400:
printk("instruction fetch\n"); case 0x480:
break; printk(KERN_ALERT "Unable to handle kernel paging request for "
default: "instruction fetch\n");
printk("unknown fault\n"); break;
default:
printk(KERN_ALERT "Unable to handle kernel paging request for "
"unknown fault\n");
break;
} }
printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n", printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
regs->nip); regs->nip);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册