mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Some functions are not accessing hardware directly but are being called using HAL ops: For example .pmu_init_perfmon = nvgpu_pmu_init_perfmon_rpc, .pmu_perfmon_start_sampling = nvgpu_pmu_perfmon_start_sampling_rpc, .pmu_perfmon_stop_sampling = nvgpu_pmu_perfmon_stop_sampling_rpc, .pmu_perfmon_get_samples_rpc = nvgpu_pmu_perfmon_get_samples_rpc, These were being called by: g->ops.pmu.pmu_init_perfmon, g->ops.pmu.pmu_perfmon_start_sampling, g->ops.pmu.pmu_perfmon_stop_sampling, g->ops.pmu.pmu_perfmon_get_samples_rpc Change the function access by using sw ops, like: Create new functions: int nvgpu_pmu_perfmon_init(struct gk20a *g, struct nvgpu_pmu *pmu, struct nvgpu_pmu_perfmon *perfmon); int nvgpu_pmu_start_sampling_perfmon(struct gk20a *g, struct nvgpu_pmu *pmu, struct nvgpu_pmu_perfmon *perfmon); int nvgpu_pmu_stop_sampling_perfmon(struct gk20a *g, struct nvgpu_pmu *pmu, struct nvgpu_pmu_perfmon *perfmon); int nvgpu_pmu_get_samples_rpc_perfmon(struct gk20a *g, struct nvgpu_pmu *pmu, struct nvgpu_pmu_perfmon *perfmon); and based on hardware chip call the chip specific perfmon sw init function: nvgpu_gv11b_perfmon_sw_init() and nvgpu_gv100_perfmon_sw_init() and assign the sw ops for perfmon JIRA NVGPU-3210 Change-Id: I2470863f87a7969e3c0454fa48761499b08d445c Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2109899 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>