[PATCH 062/109] drm/amd/ras: overlap VF RAS_CMD buffer and legacy RAS telemetry memory regions
Alex Deucher <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
From: Jiahao Li <[email protected]> Share memory region between VF RAS_CMD buffer and legacy RAS telemetry as they are mutually exclusive based on UniRAS state Signed-off-by: Jiahao Li <[email protected]> Reviewed-by: YiPeng Chai <[email protected]> Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h index 33421ccdff04d..8cd26ba55e6c6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h @@ -507,12 +507,6 @@ struct amd_sriov_ras_chk_criti { uint32_t hit; }; -union amd_sriov_ras_host_push { - struct amd_sriov_ras_telemetry_error_count error_count; - struct amd_sriov_ras_cper_dump cper_dump; - struct amd_sriov_ras_chk_criti chk_criti; -}; - #define AMD_SRIOV_UNIRAS_BLOCKS_BUF_SIZE 4096 #define AMD_SRIOV_UNIRAS_CMD_MAX_SIZE (4096 * 13) struct amd_sriov_uniras_shared_mem { @@ -521,9 +515,19 @@ struct amd_sriov_uniras_shared_mem { }; struct amdsriov_ras_telemetry { - struct amd_sriov_ras_telemetry_header header; - union amd_sriov_ras_host_push body; - struct amd_sriov_uniras_shared_mem uniras_shared_mem; + union { + struct { + struct amd_sriov_ras_telemetry_header header; + + union { + struct amd_sriov_ras_telemetry_error_count error_count; + struct amd_sriov_ras_cper_dump cper_dump; + struct amd_sriov_ras_chk_criti chk_criti; + } body; + }; + + struct amd_sriov_uniras_shared_mem uniras_shared_mem; + }; }; /* version data stored in MAILBOX_MSGBUF_RCV_DW1 for future expansion */ -- 2.55.0