Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
misc: xilinx-ai-engine: split grouped sysfs init
The current implementation creates sysfs entries for both tiles and partitions in the partition create. This patch separates the functionality by creating sysfs entries when the tile and partition is initially created. This patch also leverages the non-device managed api calls for creating the sysfs group. This change is because we need fine control over the creation and removal of the files from the system. We cannot leave it up to the kernel since it will do it incorrectly. Let Me Explain: One issue that I'm seeing is when the device_del() is called. It will execute the cleanup on a device which includes kobject_del(). This in turn results in the kernel cleaning up the sysfs entries. The issue is the sysfs group is managed by dev res. When the refcount on the device hits 0, the kernel tries to clean up the sysfs files again. This time the system will error because the files do not exist resulting in an error. This patch is a workaround but is needed to enable insertion/removal of the kernel driver. I think more research into why there is a race condition is needed. Maybe I did something wrong in my refcounting but this is where I'm at. Signed-off-by: Daniel Steger <daniel.steger@xilinx.com> Reviewed-by: Wendy Liang <wendy.liang@xilinx.com>
- Loading branch information
Daniel Steger
authored and
Michal Simek
committed
Aug 5, 2021
1 parent
cdb94bf
commit 094b2cae394e417cb14a83878cf0c817b73bb239
Showing
3 changed files
with
71 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters