| 1 | From 107b76e67aa0447fc4ea5594823f8ffd2699fbc7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Gabor Juhos <juhosg@openwrt.org> |
| 3 | Date: Thu, 20 Dec 2012 14:22:38 +0100 |
| 4 | Subject: [PATCH] powerpc: add missing NULL terminator to avoid boot panic on |
| 5 | PPC40x |
| 6 | |
| 7 | The missing NULL terminator can cause a panic on |
| 8 | PPC405 boards during boot: |
| 9 | |
| 10 | Linux/PowerPC load: console=ttyS0,115200 root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd init=/etc/preinit |
| 11 | Finalizing device tree... flat tree at 0x6a5160 |
| 12 | bootconsole [udbg0] enabled |
| 13 | Page fault in user mode with in_atomic() = 1 mm = (null) |
| 14 | NIP = c0275f50 MSR = fffffffe |
| 15 | Oops: Weird page fault, sig: 11 [#1] |
| 16 | PowerPC 40x Platform |
| 17 | Modules linked in: |
| 18 | NIP: c0275f50 LR: c0275f60 CTR: c0280000 |
| 19 | REGS: c0275eb0 TRAP: 636f7265 Not tainted (3.7.1) |
| 20 | MSR: fffffffe <VEC,VSX,EE,PR,FP,ME,SE,BE,IR,DR,PMM,RI> CR: c06a6190 XER: 00000001 |
| 21 | TASK = c02662a8[0] 'swapper' THREAD: c0274000 |
| 22 | GPR00: c0275ec0 c000c658 c027c4bf 00000000 c0275ee0 c000a0ec c020a1a8 c020a1f0 |
| 23 | GPR08: c020f631 c020f404 c025f078 c025f080 c0275f10 |
| 24 | Call Trace: |
| 25 | ---[ end trace 31fd0ba7d8756001 ]--- |
| 26 | |
| 27 | Kernel panic - not syncing: Attempted to kill the idle task! |
| 28 | |
| 29 | The panic happens since commit 9597abe00c1bab2aedce6b49866bf6d1e81c9eed |
| 30 | (sections: fix section conflicts in arch/powerpc), however the root |
| 31 | cause of this is that the NULL terminator were not added in commit |
| 32 | a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c (of/flattree: Add of_flat_dt_match() |
| 33 | helper function). |
| 34 | |
| 35 | Cc: Grant Likely <grant.likely@secretlab.ca> |
| 36 | Cc: <stable@vger.kernel.org> |
| 37 | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> |
| 38 | --- |
| 39 | arch/powerpc/platforms/40x/ppc40x_simple.c | 3 ++- |
| 40 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 41 | |
| 42 | --- a/arch/powerpc/platforms/40x/ppc40x_simple.c |
| 43 | +++ b/arch/powerpc/platforms/40x/ppc40x_simple.c |
| 44 | @@ -57,7 +57,8 @@ static const char *board[] __initdata = |
| 45 | "amcc,makalu", |
| 46 | "apm,klondike", |
| 47 | "est,hotfoot", |
| 48 | - "plathome,obs600" |
| 49 | + "plathome,obs600", |
| 50 | + NULL |
| 51 | }; |
| 52 | |
| 53 | static int __init ppc40x_probe(void) |
| 54 | |