mt6753 5.1平台调试敦泰TP申请dam失败
时间:10-02
整理:3721RD
点击:
如题,添加一个敦泰的TP,在probe里面申请DMA buffer时申请失败,导致系统重启。请问下这个会有什么原因造成的?
[ 13.462942]<2>.(2)[1:swapper/0]tpd_power_on 444444444444444444444
[ 13.463699]<2>.(2)[1:swapper/0]tpd_probe 33333333333
[ 13.464318]<2>.(2)[1:swapper/0]------------[ cut here ]------------
[ 13.465112]<2>.(2)[1:swapper/0]WARNING: at /home/qinshengwen/workshop/trunk/kernel-3.10/arch/ARM64/mm/dma-mapping.c:38 __dma_alloc_coherent+0x68/0x74()
[ 13.466801]<2>.(2)[1:swapper/0]Use an actual device structure for DMA allocation
[ 13.467731]<2>.(2)[1:swapper/0]CPU: 2 PID: 1 Comm: swapper/0 Tainted: G W 3.10.65+ #11
[ 13.468824]<2>.(2)[1:swapper/0]Call trace:
[ 13.469343]<2>.(2)[1:swapper/0][<ffffffc00008902c>] dump_backtrace+0x0/0x16c
[ 13.470226]<2>.(2)[1:swapper/0][<ffffffc0000891a8>] show_stack+0x10/0x1c
[ 13.471105]<2>.(2)[1:swapper/0][<ffffffc000a1b964>] dump_stack+0x1c/0x28
[ 13.471945]<2>.(2)[1:swapper/0][<ffffffc00009ab88>] warn_slowpath_common+0x70/0x9c
[ 13.473002]<2>.(2)[1:swapper/0][<ffffffc00009ac1c>] warn_slowpath_fmt+0x3c/0x48
[ 13.473920]<2>.(2)[1:swapper/0][<ffffffc00009412c>] __dma_alloc_coherent+0x64/0x74
[ 13.474868]<2>.(2)[1:swapper/0][<ffffffc000094194>] __dma_alloc_noncoherent+0x58/0x178
[ 13.475859]<2>.(2)[1:swapper/0][<ffffffc000a14ee4>] tpd_probe+0xf8/0x390
[ 13.476699]<2>.(2)[1:swapper/0][<ffffffc00077af30>] I2C_device_probe+0xc0/0x134
[ 13.477615]<2>.(2)[1:swapper/0][<ffffffc000390470>] driver_probe_device+0xa8/0x468
[ 13.478562]<2>.(2)[1:swapper/0][<ffffffc000390924>] __driver_attach+0xa0/0xa8
[ 13.479454]<2>.(2)[1:swapper/0][<ffffffc00038e6cc>] bus_for_each_dev+0x54/0x98
[ 13.480357]<2>.(2)[1:swapper/0][<ffffffc00039035c>] driver_attach+0x1c/0x28
[ 13.481227]<2>.(2)[1:swapper/0][<ffffffc00038f228>] bus_add_driver+0x1cc/0x288
[ 13.482131]<2>.(2)[1:swapper/0][<ffffffc000391160>] driver_register+0x64/0x15c
[ 13.483070]<2>.(2)[1:swapper/0][<ffffffc00077bd20>] i2c_register_driver+0X30/0xe4
[ 13.484009]<2>.(2)[1:swapper/0][<ffffffc0003858b8>] tpd_local_init+0x44/0xc0
[ 13.484891]<2>.(2)[1:swapper/0][<ffffffc000383b74>] tpd_probe+0x21c/0x524
[ 13.485742]<2>.(2)[1:swapper/0][<ffffffc000391cec>] platform_drv_probe+0x18/0x24
[ 13.486667]<2>.(2)[1:swapper/0][<ffffffc000390470>] driver_probe_device+0xa8/0x468
[ 13.487614]<2>.(2)[1:swapper/0][<ffffffc000390924>] __driver_attach+0xa0/0xa8
[ 13.488543]<2>.(2)[1:swapper/0][<ffffffc00038e6cc>] bus_for_each_dev+0x54/0x98
[ 13.489447]<2>.(2)[1:swapper/0][<ffffffc00039035c>] driver_attach+0x1c/0x28
[ 13.490317]<2>.(2)[1:swapper/0][<ffffffc00038f228>] bus_add_driver+0x1cc/0x288
[ 13.491221]<2>.(2)[1:swapper/0][<ffffffc000391160>] driver_register+0x64/0x15c
[ 13.492126]<2>.(2)[1:swapper/0][<ffffffc000392954>] platform_driver_register+0x58/0x64
[ 13.493151]<2>.(2)[1:swapper/0][<ffffffc000e662b8>] tpd_device_init+0x44/0x68
[ 13.494047]<2>.(2)[1:swapper/0][<ffffffc000e428a4>] do_one_initcall+0xd0/0x1fc
[ 13.494953]<2>.(2)[1:swapper/0][<ffffffc000e42b08>] kernel_init_freeable+0x138/0x1e0
[ 13.495925]<2>.(2)[1:swapper/0][<ffffffc000a12178>] kernel_init+0x18/0x154
[ 13.496779]<2>.(2)[1:swapper/0]---[ end trace 1b75b31a2719ed20 ]---
[ 13.497559]<2>.(2)[1:swapper/0]mtk-tpd: [DMA][Error] Allocate DMA I2C Buffer failed!
[ 13.498523]<2>.(2)[1:swapper/0]tpd_probe 444444444444444
[ 13.499194]<2>.(2)[1:swapper/0]Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 13.500407]<2>.(2)[1:swapper/0]pgd = ffffffc00007d000
[ 13.501035][00000000] *pgd=00000000fb81b003, *pmd=00000000fb81c003, *pte=00e0000010221407
[ 13.462942]<2>.(2)[1:swapper/0]tpd_power_on 444444444444444444444
[ 13.463699]<2>.(2)[1:swapper/0]tpd_probe 33333333333
[ 13.464318]<2>.(2)[1:swapper/0]------------[ cut here ]------------
[ 13.465112]<2>.(2)[1:swapper/0]WARNING: at /home/qinshengwen/workshop/trunk/kernel-3.10/arch/ARM64/mm/dma-mapping.c:38 __dma_alloc_coherent+0x68/0x74()
[ 13.466801]<2>.(2)[1:swapper/0]Use an actual device structure for DMA allocation
[ 13.467731]<2>.(2)[1:swapper/0]CPU: 2 PID: 1 Comm: swapper/0 Tainted: G W 3.10.65+ #11
[ 13.468824]<2>.(2)[1:swapper/0]Call trace:
[ 13.469343]<2>.(2)[1:swapper/0][<ffffffc00008902c>] dump_backtrace+0x0/0x16c
[ 13.470226]<2>.(2)[1:swapper/0][<ffffffc0000891a8>] show_stack+0x10/0x1c
[ 13.471105]<2>.(2)[1:swapper/0][<ffffffc000a1b964>] dump_stack+0x1c/0x28
[ 13.471945]<2>.(2)[1:swapper/0][<ffffffc00009ab88>] warn_slowpath_common+0x70/0x9c
[ 13.473002]<2>.(2)[1:swapper/0][<ffffffc00009ac1c>] warn_slowpath_fmt+0x3c/0x48
[ 13.473920]<2>.(2)[1:swapper/0][<ffffffc00009412c>] __dma_alloc_coherent+0x64/0x74
[ 13.474868]<2>.(2)[1:swapper/0][<ffffffc000094194>] __dma_alloc_noncoherent+0x58/0x178
[ 13.475859]<2>.(2)[1:swapper/0][<ffffffc000a14ee4>] tpd_probe+0xf8/0x390
[ 13.476699]<2>.(2)[1:swapper/0][<ffffffc00077af30>] I2C_device_probe+0xc0/0x134
[ 13.477615]<2>.(2)[1:swapper/0][<ffffffc000390470>] driver_probe_device+0xa8/0x468
[ 13.478562]<2>.(2)[1:swapper/0][<ffffffc000390924>] __driver_attach+0xa0/0xa8
[ 13.479454]<2>.(2)[1:swapper/0][<ffffffc00038e6cc>] bus_for_each_dev+0x54/0x98
[ 13.480357]<2>.(2)[1:swapper/0][<ffffffc00039035c>] driver_attach+0x1c/0x28
[ 13.481227]<2>.(2)[1:swapper/0][<ffffffc00038f228>] bus_add_driver+0x1cc/0x288
[ 13.482131]<2>.(2)[1:swapper/0][<ffffffc000391160>] driver_register+0x64/0x15c
[ 13.483070]<2>.(2)[1:swapper/0][<ffffffc00077bd20>] i2c_register_driver+0X30/0xe4
[ 13.484009]<2>.(2)[1:swapper/0][<ffffffc0003858b8>] tpd_local_init+0x44/0xc0
[ 13.484891]<2>.(2)[1:swapper/0][<ffffffc000383b74>] tpd_probe+0x21c/0x524
[ 13.485742]<2>.(2)[1:swapper/0][<ffffffc000391cec>] platform_drv_probe+0x18/0x24
[ 13.486667]<2>.(2)[1:swapper/0][<ffffffc000390470>] driver_probe_device+0xa8/0x468
[ 13.487614]<2>.(2)[1:swapper/0][<ffffffc000390924>] __driver_attach+0xa0/0xa8
[ 13.488543]<2>.(2)[1:swapper/0][<ffffffc00038e6cc>] bus_for_each_dev+0x54/0x98
[ 13.489447]<2>.(2)[1:swapper/0][<ffffffc00039035c>] driver_attach+0x1c/0x28
[ 13.490317]<2>.(2)[1:swapper/0][<ffffffc00038f228>] bus_add_driver+0x1cc/0x288
[ 13.491221]<2>.(2)[1:swapper/0][<ffffffc000391160>] driver_register+0x64/0x15c
[ 13.492126]<2>.(2)[1:swapper/0][<ffffffc000392954>] platform_driver_register+0x58/0x64
[ 13.493151]<2>.(2)[1:swapper/0][<ffffffc000e662b8>] tpd_device_init+0x44/0x68
[ 13.494047]<2>.(2)[1:swapper/0][<ffffffc000e428a4>] do_one_initcall+0xd0/0x1fc
[ 13.494953]<2>.(2)[1:swapper/0][<ffffffc000e42b08>] kernel_init_freeable+0x138/0x1e0
[ 13.495925]<2>.(2)[1:swapper/0][<ffffffc000a12178>] kernel_init+0x18/0x154
[ 13.496779]<2>.(2)[1:swapper/0]---[ end trace 1b75b31a2719ed20 ]---
[ 13.497559]<2>.(2)[1:swapper/0]mtk-tpd: [DMA][Error] Allocate DMA I2C Buffer failed!
[ 13.498523]<2>.(2)[1:swapper/0]tpd_probe 444444444444444
[ 13.499194]<2>.(2)[1:swapper/0]Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 13.500407]<2>.(2)[1:swapper/0]pgd = ffffffc00007d000
[ 13.501035][00000000] *pgd=00000000fb81b003, *pmd=00000000fb81c003, *pte=00e0000010221407
已经解决了,在DMA申请buffer时,没有指定设备,重新指定TP device就可以了