gpu: nvgpu: move ctrl priv tracking to struct nvgpu_os_linux

Move ctrl node priv tracking variables from struct nvgpu_os_linux.ctrl
to struct nvgpu_os_linux.
This will unblock dev node creation without using the static data
structures in struct nvgpu_os_linux.

Jira NVGPU-5648

Change-Id: I57db0c601282534e6e2ea535d3ca27934f86fc2a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2428499
Reviewed-by: automaticguardword <automaticguardword@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:
Deepak Nibade
2020-10-14 16:07:27 +05:30
committed by Alex Waterman
parent 2a6c473fe6
commit 9082bcf3bd
4 changed files with 21 additions and 20 deletions

View File

@@ -88,10 +88,6 @@ struct nvgpu_os_linux {
struct {
struct cdev cdev;
struct device *node;
/* see gk20a_ctrl_priv */
struct nvgpu_list_node privs;
/* guards modifications to the list and its contents */
struct nvgpu_mutex privs_lock;
} ctrl;
struct {
@@ -136,6 +132,11 @@ struct nvgpu_os_linux {
dev_t cdev_region;
/* see gk20a_ctrl_priv */
struct nvgpu_list_node ctrl_privs;
/* guards modifications to the list and its contents */
struct nvgpu_mutex ctrl_privs_lock;
struct devfreq *devfreq;
struct device_dma_parameters dma_parms;