Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/ras: make MCA IPID parse global

add a new IPID parse interface for umc, so we can
implement it for each ASIC, and so we can call it
in other blocks

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Gangliang Xie <ganglxie@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tao Zhou and committed by
Alex Deucher
3972f41b b18475fb

+16
+2
drivers/gpu/drm/amd/ras/rascore/ras_umc.h
··· 108 108 struct umc_bank_addr bank_addr, uint64_t *soc_pa); 109 109 int (*soc_pa_to_bank)(struct ras_core_context *ras_core, 110 110 uint64_t soc_pa, struct umc_bank_addr *bank_addr); 111 + void (*mca_ipid_parse)(struct ras_core_context *ras_core, uint64_t ipid, 112 + uint32_t *did, uint32_t *ch, uint32_t *umc_inst, uint32_t *sid); 111 113 }; 112 114 113 115 struct eeprom_store_record {
+14
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c
··· 501 501 return 0; 502 502 } 503 503 504 + static void umc_v12_0_mca_ipid_parse(struct ras_core_context *ras_core, uint64_t ipid, 505 + uint32_t *did, uint32_t *ch, uint32_t *umc_inst, uint32_t *sid) 506 + { 507 + if (did) 508 + *did = ACA_IPID_2_DIE_ID(ipid); 509 + if (ch) 510 + *ch = ACA_IPID_2_UMC_CH(ipid); 511 + if (umc_inst) 512 + *umc_inst = ACA_IPID_2_UMC_INST(ipid); 513 + if (sid) 514 + *sid = ACA_IPID_2_SOCKET_ID(ipid); 515 + } 516 + 504 517 const struct ras_umc_ip_func ras_umc_func_v12_0 = { 505 518 .bank_to_eeprom_record = umc_v12_0_bank_to_eeprom_record, 506 519 .eeprom_record_to_nps_record = umc_v12_0_eeprom_record_to_nps_record, 507 520 .eeprom_record_to_nps_pages = umc_v12_0_eeprom_record_to_nps_pages, 508 521 .bank_to_soc_pa = umc_12_0_bank_to_soc_pa, 509 522 .soc_pa_to_bank = umc_12_0_soc_pa_to_bank, 523 + .mca_ipid_parse = umc_v12_0_mca_ipid_parse, 510 524 }; 511 525