mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 09:12:05 +03:00
48e85a9c07ee8f8ed0b427bb23b62d5151d36074
HWPM driver uses nested structures and arrays of structures. The IP structure setup logic allocates pointer arrays based on dynamic list of IPs and aperture addresses. This dynamic list is required to search given regops address in less amount of time. However, there is a chance that the number of pointers computed dynamically is huge. And huge amount of memory will be required for the dynamic pointers array, which is impractical. This, this patch modifies ip structure setup and address to aperture conversion logic to use static indexes if the pointer array size is huge. This patch modifies relevant functions to always use static arrays to access instance and aperture structures. If dynamic pointers array is allocated, the patch adds logic to translate dynamic index to static index using inst_index_mask for instances and new added aperture_index for element level structures. Add/update few log message to improve relayed information. Bug 4707244 Change-Id: Ib4847e6575f82b628a3ce838ad69196a4bc08fed Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3186843 Reviewed-by: Vasuki Shankar <vasukis@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Description
No description provided