cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
213 Views
Registered: ‎10-04-2017

duplicate filename '/class/xlnk' from XILINX_APF kernel driver when using PYNQ

Jump to solution

Hello,

  I've been using the PYNQ python module on my systems because it does some really nice things with parsing bd.tcl/hwh file and creating all the mappings and interrupt and other nice stuff.

  In 2018.3 I added the pynq yocto layer to my build and on an Ultra96 this worked fine.  I've moved to a Trenz some and 2020.1 and was happy to find pynq support is now in petalinux.   I discovered that I needed to enable XILINX_APF in the kernel so that the pynq pl_server will start and I can create a pynq object.  I don't need/use what this driver provides but pynq doesn't know that so expect to find /dev/xlnk.

 However, when booting I get the following message:

[ 13.791090] sysfs: cannot create duplicate filename '/class/xlnk'
[ 13.797197] CPU: 2 PID: 588 Comm: cat Tainted: G O 5.4.0-xilinx-v2020.1 #1
[ 13.805355] Hardware name: xlnx,zynqmp (DT)
[ 13.809522] Call trace:
[ 13.811958] dump_backtrace+0x0/0x178
[ 13.815608] show_stack+0x14/0x20
[ 13.818909] dump_stack+0xac/0xd0
[ 13.822215] sysfs_warn_dup+0x5c/0x78
[ 13.825868] sysfs_create_dir_ns+0xd8/0xf0
[ 13.829948] kobject_add_internal+0xc8/0x358
[ 13.834200] kset_register+0x54/0x80
[ 13.837761] __class_register+0xc8/0x190
[ 13.841674] __class_create+0x4c/0x90
[ 13.845321] xlnk_probe+0xa4/0x290
[ 13.848705] platform_drv_probe+0x50/0xa0
[ 13.852697] really_probe+0xec/0x428
[ 13.856256] driver_probe_device+0x64/0x130
[ 13.860423] __device_attach_driver+0x98/0x110
[ 13.864850] bus_for_each_drv+0x74/0xc0
[ 13.868669] __device_attach+0xdc/0x160
[ 13.872488] device_initial_probe+0x10/0x18
[ 13.876654] bus_probe_device+0x90/0x98
[ 13.880473] device_add+0x340/0x620
[ 13.883946] of_device_add+0x4c/0x58
[ 13.887505] of_platform_device_create_pdata+0xb4/0x120
[ 13.892713] of_platform_notify+0xd4/0x168
[ 13.896793] notifier_call_chain+0x58/0x98
[ 13.900871] blocking_notifier_call_chain+0x54/0x78
[ 13.905734] __of_changeset_entry_notify+0xd0/0x100
[ 13.910594] __of_changeset_apply_notify+0x54/0xd0
[ 13.915367] of_overlay_fdt_apply+0x774/0xad8
[ 13.919707] create_overlay+0x24/0x60
[ 13.923353] cfs_overlay_item_dtbo_write+0x54/0xa8
[ 13.928128] configfs_release_bin_file+0x88/0xd0
[ 13.932728] __fput+0x88/0x208
[ 13.935765] ____fput+0xc/0x18
[ 13.938804] task_work_run+0xc8/0xf8
[ 13.942363] do_exit+0x2ac/0x9b8
[ 13.945574] do_group_exit+0x40/0xa8
[ 13.949132] __arm64_sys_exit_group+0x14/0x18
[ 13.953474] el0_svc_common.constprop.0+0x68/0x160
[ 13.958247] el0_svc_handler+0x6c/0x88
[ 13.961979] el0_svc+0x8/0xc
[ 13.964860] kobject_add_internal failed for xlnk with -EEXIST, don't try to register things with the same name in the same directory.
[ 13.976848] xlnk xlnk: xlnk_probe: Error creating xlnk class
Unable to start, see /var/log/pl_server.log and /var/log/pl_serve[ 13.990116] random: python3: uninitialized urandom read (24 bytes read)
r.err

 

I'm not sure why/what is causing the driver to probe again, I can see these messages earlier in the boot log the indicates the driver has already successfully loaded:

[ 10.714774] xlnk xlnk: Major 247
[ 10.717813] xlnk xlnk: xlnk driver loaded
[ 10.721714] xlnk xlnk: xlnk_pdev is not null

I can still create a pynq object but I get more stack traces as I create/destroy it and it seems to lock up my console although the system is still alive.  

Any ideas on what is happening?

thanks,

jeff

 

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Explorer
Explorer
127 Views
Registered: ‎10-04-2017

Peter in the PYNQ forum gave me the solution to this problem:

"Can you check your device tree? The meta-pynq layer in Petalinux loads xlnk via a device-tree overlay post-boot and I’m guessing this is conflicting with an entry that is statically defined somewhere. Do you have an xlnk entry in your system-user.dtsi?"

And yes, I had added the node to my system-user.dtsi base on my 2.4 images; however, it looks like in newer releases of PYNQ the pl_server is still loading a dtbo which also has an xlnk node.

jeff

View solution in original post

0 Kudos
Reply
1 Reply
Explorer
Explorer
128 Views
Registered: ‎10-04-2017

Peter in the PYNQ forum gave me the solution to this problem:

"Can you check your device tree? The meta-pynq layer in Petalinux loads xlnk via a device-tree overlay post-boot and I’m guessing this is conflicting with an entry that is statically defined somewhere. Do you have an xlnk entry in your system-user.dtsi?"

And yes, I had added the node to my system-user.dtsi base on my 2.4 images; however, it looks like in newer releases of PYNQ the pl_server is still loading a dtbo which also has an xlnk node.

jeff

View solution in original post

0 Kudos
Reply