Embedded Linux Reboot Crash

0

I'm working with Linux 2.6.23 on an embedded device and am receiving the following error executing the reboot command.

~ # reboot
~ # Syncing hardware clock to system time
hwclock: Could not access RTC: No such file or directory
Stopping inetd: 
Unmounting filesystems
The system is going down NOW !!
Sending SIGTERM to all processes.
Please stand by while rebooting the system.
Restarting system.
------------[ cut here ]------------
Badness at c0011fd4 [verbose debug info unavailable]
NIP: c0011fd4 LR: c001229c CTR: 00000000
REGS: c0659cf0 TRAP: 0700   Not tainted  (2.6.23)
MSR: 00021032 <ME,IR,DR>  CR: 24008222  XER: 20000000
TASK = eff867a0[1000] 'init' THREAD: c0658000 CPU: 0
GPR00: 00000001 c0659da0 eff867a0 c00122c4 00000000 00000001 00000000 c0659df8 
GPR08: c0747240 c00122c4 00000000 c0659df0 24008222 100ac880 0fffc900 ffffffff 
GPR16: 00000000 007fff00 effc3f68 c0440000 c04d0000 7fefafda 00000003 00000001 
GPR24: 7fefaf04 00000001 100b0008 00000001 00000000 01234567 c0659df8 00000000 
NIP [c0011fd4] smp_call_function_map+0x2c/0x2d4
LR [c001229c] smp_call_function+0x20/0x30
Call Trace:
[c0659da0] [c0500000] irq_desc+0x6de0/0xc000 (unreliable)
[c0659df0] [c001229c] smp_call_function+0x20/0x30
[c0659e00] [c00105b4] machine_restart+0x38/0x54
[c0659e10] [c003670c] kernel_restart+0x84/0x98
[c0659e20] [c0037970] sys_reboot+0x1a4/0x1c8
[c0659f40] [c0010d80] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xfe540c4
    LR = 0x100254dc
Instruction dump:
4e800020 9421ffb0 7c0802a6 7c691b78 7d800026 bf210034 7cfe3b78 90010054 
91810030 7c0000a6 68008000 54008ffe <0f000000> 3fa0c050 3860ffff 801d7194 
System Halted, OK to turn off power

Not sure what additional information would be relevant to provide here. Does anyone have any ideas on what could be causing an error like this?

Thanks,

linsek

Posted 2011-05-04T18:36:05.917

Reputation: 115

Try asking on the linux-kernel mailing list.

– None – 2011-05-05T01:31:13.243

Answers

1

It's not unusual to have problems in the reboot path on custom hardware, since that code usually doesn't get tested much. machine_restart one of the last functions called to reboot a PPC machine, and that "System Halted..." message will only be displayed if the machine-specific restart() function is not configured or doesn't actually perform the reboot. You're doing nothing wrong; both of those possibilities are kernel bugs, and should be fixed by whoever customized the kernel for your board.

Dan

Posted 2011-05-04T18:36:05.917

Reputation: 26

You are correct. I was able to isolate the problem to the smp_call_function_map() that is called from machine_restart(). The error occurs as a result of this call: WARN_ON(irqs_disabled());. I am still working on the reset issue with the board, but this was the cause of this error. Thanks – linsek – 2011-05-11T17:18:46.950

0

Is your kernel possibly overwriting the boot loader in any way after boot? On my guru plug it's possible if you are not careful to overwrite the first mb of ram where the boot loader lives and soft restarts are then a no-no.

LawrenceC

Posted 2011-05-04T18:36:05.917

Reputation: 63 487