nvsciipc: Add nvsciipc_ioctl_get_db_by_idx

- Added nvsciipc_ioctl_get_db_by_idx to retrieve
the endpoint DB entry using index

JIRA: NVIPC-2818
Change-Id: I5651cf29b11dad0ff505f5f497a896572b893e94
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297838
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Suneel Kumar Pemmineti
2024-09-09 13:05:35 +00:00
committed by Jon Hunter
parent 789e70d35e
commit 63a1d3e6e0
2 changed files with 45 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef __NVSCIIPC_IOCTL_H__
@@ -56,6 +56,11 @@ struct nvsciipc_get_db_by_vuid {
uint32_t idx;
};
struct nvsciipc_get_db_by_idx {
struct nvsciipc_config_entry entry;
uint32_t idx;
};
/* for userspace level test, debugging purpose only */
struct nvsciipc_validate_auth_token {
uint32_t auth_token;
@@ -104,6 +109,9 @@ struct nvsciipc_map_vuid {
#define NVSCIIPC_IOCTL_GET_VMID \
_IOWR(NVSCIIPC_IOCTL_MAGIC, 8, uint32_t)
#define NVSCIIPC_IOCTL_NUMBER_MAX 8
#define NVSCIIPC_IOCTL_GET_DB_BY_IDX \
_IOWR(NVSCIIPC_IOCTL_MAGIC, 9, struct nvsciipc_get_db_by_idx)
#define NVSCIIPC_IOCTL_NUMBER_MAX 9
#endif /* __NVSCIIPC_IOCTL_H__ */