Oops on olpc_bat_init with 2.6.25 kernel

Denver Gingerich denver at ossguy.com
Sun Apr 27 23:05:01 EDT 2008


I get the following kernel oops (and resulting panic) when starting my
G1G1 XO with the 2.6.25-20080426.1.olpc.6f666d7c2ba504e kernel:

[3.216948] IP: [<c04d6c1a>] strcmp+0x7/0x19
[3.227071] *pde = 00000000
[3.237005] Oops: 0000 [#1] PREEMPT
[3.246865] Modules linked in:
[3.246865]
[3.246865] Pid: 1, comm: swapper Not tainted
(2.6.25-20080426.1.olpc.6f666d7c2ba504e #1)
[3.246865] EIP: 0060:[<c04d6c1a>] EFLAGS: 00010282 CPU: 0
[3.246865] EIP is at strcmp+0x7/0x19
... (register values)
[3.246865] Process swapper (pid: 1, ti=ce816000 task=ce81f410 task.ti=ce816000)
[3.246865] Stack: ...
...
[3.246865] Call Trace:
[3.246865]  [<c0487e57>] sysfs_find_dirent+0x13/0x23
[3.246865]  [<c0487e78>] sysfs_add_one+0x11/0x79
[3.246865]  [<c0487a08>] sysfs_add_file+0x42/0x69
[3.246865]  [<c055f01e>] power_supply_create_attrs+0x3b/0x91
[3.246865]  [<c055ee54>] power_supply_register+0x4c/0x7c
[3.246865]  [<c06fdba7>] olpc_bat_init+0x9b/0xe5
[3.246865]  [<c06eb608>] kernel_init+0xa5/0x1df
[3.246865]  [<c04105e0>] schedule_tail+0xe/0x39
[3.246865]  [<c040369a>] ret_from_fork+0x6/0x1c
[3.246865]  [<c06eb563>] kernel_init+0x0/0x1df
[3.246865]  [<c06eb563>] kernel_init+0x0/0x1df
[3.246865]  [<c0403a47>] kernel_thread_helper+0x7/0x10
[3.246865]  =======================
[3.246865] Code: ...
[3.246865] EIP: [<c04d6c1a>] strcmp+0x7/0x19 SS:ESP 0068:ce816f28
[3.247181] ---[ end trace 50e6ffdeacb66947 ]---
[3.256939] Kernel panic - not syncing: Attempted to kill init!

As you can see from the timestamps, this happens very early in the
boot cycle.  The last message that paused long enough for me to read
before the oops was "rtc0: alarms up to one year, y3k".  From the call
trace, it appears that the problem is related to something in the
olpc_bat_init function, perhaps in data it sends to
power_supply_register at lines 421 or 427 in
drivers/power/olpc_battery.c.  I briefly scanned the code and couldn't
see any obvious problems.

This kernel was booted off an SD card using the following options: "
ro root=/dev/mmcblk0p1 rootdelay=1 console=ttyS0,115200 console=tty0
fbcon=font:SUN12x22".  I installed the kernel by extracting the RPM
from http://dev.laptop.org/~dilinger/master/ and symlinking
/boot/vmlinuz to the kernel binary.

I have booted the following kernels without issue using the same
options and configuration (changing only the /boot/vmlinuz symlink):
2.6.22-20071121.7.olpc.af3dd731d18bc39
2.6.22-20080123.4.olpc.c2fb2ff45da8412

My SD card has Ubuntu installed according to the instructions at
http://wiki.laptop.org/go/Ubuntu_On_OLPC_XO.  I am using firmware
version Q2D07.

If you suspect my setup is at fault, please let me know what
additional information I can provide to help with investigating that
possibility.  I can run additional tests if you like.  However, I
don't have a kernel build environment setup so please send me a kernel
binary if you want me to test different kernel options.

Denver



More information about the Devel mailing list