Skip to contentSkip to conversation

powerpc: Add plain English description for alignment exception oopses

PATCH Applied Anton Blanchard 2 participants 2 messages Jul 2, 2015 – Jul 7, 2015 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Add plain English description for alignment exception oopses

If we take an alignment exception which we cannot fix, the oops currently prints:

Unable to handle kernel paging request for unknown fault

Lets print something more useful:

Unable to handle kernel paging request for unaligned access at address 0xc0000000f77bba8f
---
 arch/powerpc/mm/fault.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/powerpc/mm/fault.c +4 -0
index b396868..661ba0a 100644
@@ -528,6 +528,10 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
 		printk(KERN_ALERT "Unable to handle kernel paging request for "
 			"instruction fetch\n");
 		break;
+	case 0x600:
+		printk(KERN_ALERT "Unable to handle kernel paging request for "
+			"unaligned access at address 0x%08lx\n", regs->dar);
+		break;
 	default:
 		printk(KERN_ALERT "Unable to handle kernel paging request for "
 			"unknown fault\n");
Signature · 1 line
2.1.4
reviewer Applied
#1 lore raw
Quoted 10 lines · Anton Blanchard

If we take an alignment exception which we cannot fix, the oops currently prints:

Unable to handle kernel paging request for unknown fault

Lets print something more useful:

Unable to handle kernel paging request for unaligned access at address 0xc0000000f77bba8f

Applied to powerpc fixes, thanks.

https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?h=fixes&id=eab861a7a52208868637f47a92caa926ddadd9c7

cheers