LS1043A PCIe Driver: kobject: '(null)' (ffff8000344a7cf8): is not initialized, ...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1043A PCIe Driver: kobject: '(null)' (ffff8000344a7cf8): is not initialized, ...

Jump to solution
1,194 Views
tapyang
Contributor III

Hello, Experts:

I am developping my custom LS1043A board, and LS1043A is connected with a FPGA(V7).

When debugging the driver of PCIe, I encountered a problem, the log is as followed:

update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting OpenBSD Secure Shell server: sshd
generating ssh RSA key...
generating ssh ECDSA key...
generating ssh DSA key...
generating ssh ED25519 key...
done.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
install modules...
[ 7.411439] v7_init init
[ 7.414028] v7_probe Enter
[ 7.416781] dev->irq 0
[ 7.419140] pci_msix_vec_count ret 1
[ 7.422851] pci_enable_msi_range 1 ok
[ 7.426521] dev->irq 73
[ 7.428975] legacy 0 msi_en 1
[ 7.431987] BAR(0) (0x5040000000, 0x504007ffff, 0x40200, 0x80000, 0xffff00000b480000)
[ 7.439852] VENDORID=0x702210ee, DEVICEID=0x100006
[ 7.444650] FPGA VERSION=0x1a19277e
[ 7.448392] dma_alloc_coherent(1048576) 0xffff800032a00000 0xb2a00000
[ 7.454841] phy(0xlb2a00000, 0xlb2a00000), virt(0xffff800032a00000, 0xffff800032a00000)
[ 7.462920] v7_ioctl_init
[ 7.465651] create v7_class
[ 7.468550] create device
[ 7.471167] success: cdev_add kobj.state_initialized = 1
[ 7.474142] module init ok ...
mknod: /dev/v7: File exists
config the ip address...
[ 9.485889] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
Init my board...
5
4
3
2
1

Enter vxp memery[   18.510349] kobject: '(null)' (ffff8000344a7cf8): is not initialized, yet kobject_get() is being called.

[   18.521298] ------------[ cut here ]------------


V7_mmapAddr = [ 18.527094] WARNING: CPU: 1 PID: 2715 at /home/hu/flexbuild/packages/linux/linux/lib/kobject.c:597 kobject_get+0x80/0x88
0x94bf9000
K7[ 18.539342] Modules linked in:_mmapAddr = 0x94 v7_pcie828000
NVRAM_
mmapAddr = 0x940[ 18.547259]
86000

[ 18.550133] CPU: 1 PID: 2715 Comm: a.out Not tainted 4.9.62-dirty #39
[ 18.557348] Hardware name: LS1043A RDB Board (DT)
[ 18.562049] task: ffff8000359f4540 task.stack: ffff800034748000

[ 18.567968] PC is at kobject_get+0x80/0x88
[ 18.572061] LR is at kobject_get+0x80/0x88
[ 18.576154] pc : [<ffff000008518b80>] lr : [<ffff000008518b80>] pstate: 00000145
[ 18.583549] sp : ffff80003474bae0
[ 18.586858] x29: ffff80003474bae0 x28: ffff0000081f35c8
[ 18.592174] x27: 0000000000000000 x26: ffff8000344a7cf8
[ 18.597489] x25: 000000000ed00000 x24: ffff80003474bbdc
[ 18.602804] x23: 00000000000000ed x22: ffff8000361bb800
[ 18.608118] x21: 000000000ed00000 x20: ffff8000344a7cf8
[ 18.613434] x19: ffff8000344a7cf8 x18: 0000000000000010
[ 18.618749] x17: 0000ffff956ea610 x16: ffff0000081ed9f8
[ 18.624064] x15: ffff0000892d8ec7 x14: 65675f7463656a62
[ 18.629378] x13: 6f6b20746579202c x12: 64657a696c616974
[ 18.634693] x11: 696e6920746f6e20 x10: 000000000000018c
[ 18.640008] x9 : 3761343433303030 x8 : 6c616320676e6965
[ 18.645321] x7 : 6220736920292874 x6 : ffff0000092d8f33
[ 18.650636] x5 : 0000000000000000 x4 : 0000000000000000
[ 18.655950] x3 : 0000000000000000 x2 : ffff80003bd896b8
[ 18.661264] x1 : ffff8000359f4540 x0 : 000000000000005c

[ 18.666578]
[ 18.668061] ---[ end trace c871dee492adc783 ]---
[ 18.672675] Call trace:
[ 18.675117] Exception stack(0xffff80003474b910 to 0xffff80003474ba40)
[ 18.681558] b900: ffff8000344a7cf8 0001000000000000
[ 18.689391] b920: ffff80003474bae0 ffff000008518b80 ffff80003474ba10 0000000000000004
[ 18.697223] b940: ffff0000092db2ea 000000000000005c ffff0000092d8000 ffff000008f33238
[ 18.705055] b960: ffff80003474ba00 ffff00000810bdf8 ffff8000344a7cf8 ffff8000344a7cf8
[ 18.712887] b980: 000000000ed00000 ffff8000361bb800 00000000000000ed ffff80003474bbdc
[ 18.720718] b9a0: 000000000ed00000 ffff8000344a7cf8 000000000000005c ffff8000359f4540
[ 18.728550] b9c0: ffff80003bd896b8 0000000000000000 0000000000000000 0000000000000000
[ 18.736381] b9e0: ffff0000092d8f33 6220736920292874 6c616320676e6965 3761343433303030
[ 18.744213] ba00: 000000000000018c 696e6920746f6e20 64657a696c616974 6f6b20746579202c
[ 18.752045] ba20: 65675f7463656a62 ffff0000892d8ec7 ffff0000081ed9f8 0000ffff956ea610

[   18.759877] [<ffff000008518b80>] kobject_get+0x80/0x88

[   18.765016] [<ffff0000081f3ad8>] cdev_get+0x30/0x58

[   18.769893] [<ffff0000081f3b10>] exact_lock+0x10/0x20

[   18.774945] [<ffff0000086d1f2c>] kobj_lookup+0xcc/0x150

[   18.780168] [<ffff0000081f3f40>] chrdev_open+0xf8/0x1a0

[   18.785393] [<ffff0000081ec124>] do_dentry_open+0x214/0x318

[   18.790965] [<ffff0000081ed4c8>] vfs_open+0x48/0x80

[   18.795842] [<ffff0000081fdd84>] path_openat+0x51c/0xff8

[   18.801153] [<ffff0000081ff914>] do_filp_open+0x5c/0xd8

The Detail is shown in attachment.

It does not always appear, but happens occasionally.

I look for my driver, and did not find the NULL pointer, and I have already initialized the kobject struct...

What is the problem? Or What have I neglected?

Expecting for your reply.

Yours' Yang

Labels (1)
0 Kudos
1 Solution
930 Views
tapyang
Contributor III

Hi, Experts:

I have solved this problem. It is caused by my driver, and I rewrite my driver.

Thanks all the same!

View solution in original post

0 Kudos
1 Reply
931 Views
tapyang
Contributor III

Hi, Experts:

I have solved this problem. It is caused by my driver, and I rewrite my driver.

Thanks all the same!

0 Kudos