mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
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:
committed by
Alex Waterman
parent
4b33eaa2d9
commit
9a93dc3c83
@@ -35,20 +35,6 @@ nvgpu_device_from_dev_list_node(struct nvgpu_list_node *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
|
||||
* GPU.
|
||||
|
||||
@@ -149,6 +149,20 @@ struct nvgpu_device {
|
||||
/** @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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user