mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: create symbolic link for gpu device under /sys/devices/
In linux kernel v4.14 and below gpu sysfs node is created under
/sys/devices. In linux kernel v5.x it is created under
/sys/devices/platform.
Create symbolic link for the gpu device ("17000000.gv11b") under
/sys/devices/ as various tests and scripts expect it to be there.
Bug 200659872
Change-Id: I071177176d45c6c45d60cf9935dd33a6577dd11d
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2428623
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
04de14215b
commit
5e5ac92aee
@@ -1116,6 +1116,7 @@ void nvgpu_remove_sysfs(struct device *dev)
|
|||||||
parent = container_of((kobj->parent),
|
parent = container_of((kobj->parent),
|
||||||
struct device, kobj);
|
struct device, kobj);
|
||||||
sysfs_remove_link(&parent->kobj, "gpu.0");
|
sysfs_remove_link(&parent->kobj, "gpu.0");
|
||||||
|
sysfs_remove_link(&parent->kobj, dev_name(dev));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1181,6 +1182,8 @@ int nvgpu_create_sysfs(struct device *dev)
|
|||||||
struct device, kobj);
|
struct device, kobj);
|
||||||
error |= sysfs_create_link(&parent->kobj,
|
error |= sysfs_create_link(&parent->kobj,
|
||||||
&dev->kobj, "gpu.0");
|
&dev->kobj, "gpu.0");
|
||||||
|
error |= sysfs_create_link(&parent->kobj,
|
||||||
|
&dev->kobj, dev_name(dev));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user