gpu: nvgpu: mv struct nvgpu_device_list to header

Move the struct nvgpu_device_list from device.c to
device.h, so that unit tests have access to the struct.

Bug 2984984

Change-Id: Ie6ec6c8dd8f40c28b98964f832b92fdbae73169f
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2360308
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Peter Daifuku
2020-06-12 16:16:35 -07:00
committed by Alex Waterman
parent 4b33eaa2d9
commit 9a93dc3c83
2 changed files with 14 additions and 14 deletions

View File

@@ -35,20 +35,6 @@ nvgpu_device_from_dev_list_node(struct nvgpu_list_node *node)
dev_list_node)); dev_list_node));
}; };
struct nvgpu_device_list {
/**
* Array of lists of devices; each list corresponds to one type of
* device. By having this as an array it's trivial to go from device
* enum type in the HW to the relevant devlist.
*/
struct nvgpu_list_node devlist_heads[NVGPU_MAX_DEVTYPE];
/**
* Keep track of how many devices of each type exist.
*/
u32 dev_counts[NVGPU_MAX_DEVTYPE];
};
/* /*
* Faciliate the parsing of the TOP array describing the devices present in the * Faciliate the parsing of the TOP array describing the devices present in the
* GPU. * GPU.

View File

@@ -149,6 +149,20 @@ struct nvgpu_device {
/** @endcond DOXYGEN_SHOULD_SKIP_THIS */ /** @endcond DOXYGEN_SHOULD_SKIP_THIS */
}; };
struct nvgpu_device_list {
/**
* Array of lists of devices; each list corresponds to one type of
* device. By having this as an array it's trivial to go from device
* enum type in the HW to the relevant devlist.
*/
struct nvgpu_list_node devlist_heads[NVGPU_MAX_DEVTYPE];
/**
* Keep track of how many devices of each type exist.
*/
u32 dev_counts[NVGPU_MAX_DEVTYPE];
};
/** /**
* @brief Initialize the SW device list from the HW device list. * @brief Initialize the SW device list from the HW device list.
* *