[ltp] Re: [ANN] tp_smapi - a new Linux SMAPI driver
Jiang Qian
linux-thinkpad@linux-thinkpad.org
Sun, 4 Dec 2005 19:15:30 -0500
Thanks a lot Shem. Now it compiles but doesn't work.
Machine:
Vendor: IBM
Version: 1YET47WW (1.08 )
Release Date: 06/09/2005
Address: 0xDC000
Runtime Size: 144 kB
ROM Size: 1024 kB
DMI type 1, 25 bytes.
System Information
Manufacturer: IBM
Product Name: 2668W12
Version: ThinkPad T43
when
cat /sys/devices/platform/smapi/*_charge_thresh
Shows nothing and
echo 40 > /sys/devices/platform/smapi/start_charge_thresh
make the root bash shell seg fault! No good:(
dmesg
Unable to handle kernel NULL pointer dereference at virtual address
00000003
printing eip:
c01bba82
*pde = 00000000
Oops: 0000 [#1]
EFLAGS: 00010202 (2.6.12.4)
EIP is at vsscanf+0x22/0x520
eax: 00000000 ebx: cc379348 ecx: f8bd5141 edx: f8bd4600
esi: 00000003 edi: c3ca7fa4 ebp: c3ca7f14 esp: c3ca7ecc
ds: 007b es: 007b ss: 0068
Process bash (pid: 10934, threadinfo=c3ca6000 task=cc618a60)
Stack: 00000002 c3ca7f58 c15e8500 c02f2504 00000000 00000000 000080d0
cc379348
f8bd61c8 c3ca7fa4 080edc08 c01bbf9f 00000003 f8bd5141 c3ca7f14
f8bd4620
00000003 f8bd5141 c3ca7f1c ef428000 c01bca76 c021f36a cc379348
ef428000
Call Trace:
[<c01bbf9f>] sscanf+0x1f/0x30
[<f8bd4620>] start_charge_thresh_store+0x20/0xd0 [tp_smapi]
[<c01bca76>] copy_from_user+0x46/0x80
[<c021f36a>] dev_attr_store+0x3a/0x40
[<c01a03de>] flush_write_buffer+0x3e/0x50
[<c01a0444>] sysfs_write_file+0x54/0x80
[<c015e155>] vfs_write+0xe5/0x160
[<c015e2a1>] sys_write+0x51/0x80
[<c01031fb>] sysenter_past_esp+0x54/0x75
Code: ff 83 c4 10 c3 8d 74 26 00 55 31 c0 57 56 53 83 ec 1c 8b 4c 24 34
89 44 24 14 8b 6c 24 38 8b 74 24 30 80 39 00 0f 84 7e 00 00 00 <80> 3e
00 74 79 0f b6 01 f6 80 00 79 2f c0 20 74 4d 8d 51 01 8d
Jiang
On Mon, Dec 05, 2005 at 01:47:22AM +0200, Shem Multinymous wrote:
> Hi,
>
> On 12/5/05, Jiang Qian <qian2@fas.harvard.edu> wrote:
> > This is a T43 with ubuntu hoary 5.04 and kernel 2.6.12. I can't seem to
> > get it compiled: error messages:
> > make[1]: Entering directory `/usr/src/linux-2.6.12.4'
> > CC [M] /home/qian2/download/ibm-acpi/tp_smapi-0.02/tp_smapi.o
> > /home/qian2/download/ibm-acpi/tp_smapi-0.02/tp_smapi.c:268: warning:
> > `struct device_attribute' declared inside parameter list
>
> Try adding
> #include <linux/device.h>
> at the top of tp_smapi.c. I'll fix that in the next release.
>
> Shem
> --
> The linux-thinkpad mailing list home page is at:
> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad