mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: save UMC global channel index to eeprom
Save the global channel index returned by RAS TA to eeprom. We can get memory physical address by MCA address and channel index. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -495,10 +495,9 @@ out:
|
||||
int amdgpu_umc_mca_to_addr(struct amdgpu_device *adev,
|
||||
uint64_t err_addr, uint32_t ch, uint32_t umc,
|
||||
uint32_t node, uint32_t socket,
|
||||
uint64_t *addr, bool dump_addr)
|
||||
struct ta_ras_query_address_output *addr_out, bool dump_addr)
|
||||
{
|
||||
struct ta_ras_query_address_input addr_in;
|
||||
struct ta_ras_query_address_output addr_out;
|
||||
int ret;
|
||||
|
||||
memset(&addr_in, 0, sizeof(addr_in));
|
||||
@@ -510,14 +509,12 @@ int amdgpu_umc_mca_to_addr(struct amdgpu_device *adev,
|
||||
|
||||
if (adev->umc.ras && adev->umc.ras->convert_ras_err_addr) {
|
||||
ret = adev->umc.ras->convert_ras_err_addr(adev, NULL, &addr_in,
|
||||
&addr_out, dump_addr);
|
||||
addr_out, dump_addr);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*addr = addr_out.pa.pa;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user