mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: update nvgpu_pte_dbg_print function
Currently, nvgpu_pte_dbg_print() overwrites ctag string "ctag=" and only prints ctag number. For example, nvgpu_pte_dbg_print:104 [DBG] vm=3 PTE: i=0 size=8 | GPU 0x1efc000000 phys 0x115a50000 pgsz: 4kb perm=RW kind=0x8 APT=SYSTEM C--V- 1 [0x08000010, 0x115a5007] Update nvgpu_pte_dbg_print function to include ctag string. nvgpu_pte_dbg_print:104 [DBG] vm=3 PTE: i=0 size=8 | GPU 0x1efc000000 phys 0x115a50000 pgsz: 4kb perm=RW kind=0x8 APT=SYSTEM C--V- ctag=1 [0x08000010, 0x115a5007] Jira NVGPU-5489 Change-Id: I2f84f89da685ad6a84534c0bb51e3ca1244b3497 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2354182 Reviewed-by: Seema Khowala <seemaj@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> 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: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: Seema Khowala <seemaj@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
160669a7bb
commit
2d24298af0
@@ -79,10 +79,24 @@ void nvgpu_pte_dbg_print(struct gk20a *g,
|
||||
const char *aperture_str = nvgpu_aperture_str(attrs->aperture);
|
||||
const char *perm_str = nvgpu_gmmu_perm_str(attrs->rw_flag);
|
||||
#ifdef CONFIG_NVGPU_COMPRESSION
|
||||
u32 ctag = nvgpu_safe_cast_u64_to_u32(attrs->ctag /
|
||||
u64 ctag_tmp = attrs->ctag;
|
||||
u32 str_len = 0U;
|
||||
u32 ctag_num = 0U;
|
||||
|
||||
/*
|
||||
* attrs->ctag is incremented to count current page size as well.
|
||||
* Subtract to get this page's ctag line number.
|
||||
*/
|
||||
if (ctag_tmp != 0ULL) {
|
||||
ctag_tmp = nvgpu_safe_sub_u64(ctag_tmp, page_size);
|
||||
}
|
||||
|
||||
ctag_num = nvgpu_safe_cast_u64_to_u32(ctag_tmp /
|
||||
g->ops.fb.compression_page_size(g));
|
||||
(void)strcpy(ctag_str, "ctag=0x");
|
||||
(void)nvgpu_strnadd_u32(ctag_str, ctag, (u32)strlen(ctag_str), 10U);
|
||||
(void)strcpy(ctag_str, "ctag=0x\0");
|
||||
str_len = (u32)strlen(ctag_str);
|
||||
(void)nvgpu_strnadd_u32(ctag_str + str_len, ctag_num,
|
||||
nvgpu_safe_sub_u32(31U, str_len), 16U);
|
||||
#endif
|
||||
(void)map_attrs_to_str(attrs_str, attrs);
|
||||
pte_dbg(g, attrs,
|
||||
|
||||
Reference in New Issue
Block a user