mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
Add ptimer register offsets to regops allowlist for testing. New allowlist restricts regops only to reserved resources, this makes it difficult to test the interface since only HWPM registers can be accessed and that could have side effects on system. Having ptimer registers as test offsets has advantage that the offsets do not change across chips, registers are read-only, and values are always incrementing so a test can verify read regops and test various flags of interface. Add gops.ptimer.get_timer_reg_offsets() HAL to return timer offsets. Add static function add_test_range_to_map() that adds timer offsets to allowlist always. In nvgpu_profiler_validate_regops_allowlist() return success if timer offsets are hit in range search. Bug 2510974 Jira NVGPU-5360 Change-Id: I8b51bb92e43e8b1bbe903c874a429341659ef603 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2460002 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
33 lines
1.4 KiB
C
33 lines
1.4 KiB
C
/*
|
|
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
#ifndef PTIMER_GV11B_H
|
|
#define PTIMER_GV11B_H
|
|
|
|
#ifdef CONFIG_NVGPU_PROFILER
|
|
|
|
#include <nvgpu/types.h>
|
|
|
|
void gv11b_ptimer_get_timer_reg_offsets(u32 *timer0_offset, u32 *timer1_offset);
|
|
|
|
#endif /* CONFIG_NVGPU_PROFILER */
|
|
#endif /* PTIMER_GV11B_H */
|