mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: improve nvs uapi
- Make the domain scheduler timeslice type nanoseconds to future proof the interface - Return -ENOSYS from ioctls if the nvs code is not initialized - Return the number of domains also when user supplied array is present - Use domain id instead of name for TSG binding - Improve documentation in the uapi headers - Verify that reserved fields are zeroed - Extend some internal logging - Release the sched mutex on alloc error - Add file mode checks in the nvs ioctls. The create and remove ioctls require writable file permissions, while the query does not; this allows filesystem based access control on domain management on the single dev node. Jira NVGPU-6788 Change-Id: I668eb5972a0ed1073e84a4ae30e3069bf0b59e16 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2639017 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
b92e8530fc
commit
55afe1ff4c
@@ -181,7 +181,23 @@ static int nvgpu_tsg_bind_scheduling_domain(struct nvgpu_tsg *tsg,
|
||||
struct nvgpu_tsg_bind_scheduling_domain_args *args)
|
||||
{
|
||||
|
||||
return nvgpu_tsg_bind_domain(tsg, args->domain_name);
|
||||
if (args->reserved[0] != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (args->reserved[1] != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (args->reserved[2] != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (tsg->g->scheduler == NULL) {
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
return nvgpu_tsg_bind_domain(tsg, args->domain_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user