Messages in this thread - First message in thread
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- "Ghannam, Yazen"
- Adam Borowski
- "Ghannam, Yazen"
Patch in this message | | | From | "Ghannam, Yazen" <> | Subject | [PATCH v3 5/8] EDAC/amd64: Decode syndrome before translating address | Date | Thu, 22 Aug 2019 00:00:00 +0000 |
| |
From: Yazen Ghannam <yazen.ghannam@amd.com>
AMD Family 17h systems currently require address translation in order to report the system address of a DRAM ECC error. This is currently done before decoding the syndrome information. The syndrome information does not depend on the address translation, so the proper EDAC csrow/channel reporting can function without the address. However, the syndrome information will not be decoded if the address translation fails.
Decode the syndrome information before doing the address translation. The syndrome information is architecturally defined in MCA_SYND and can be considered robust. The address translation is system-specific and may fail on newer systems without proper updates to the translation algorithm.
Fixes: 713ad54675fd ("EDAC, amd64: Define and register UMC error decode function") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> --- Link: https://lkml.kernel.org/r/20190709215643.171078-6-Yazen.Ghannam@amd.com
v2->v3: * No change.
v1->v2: * No change.
drivers/edac/amd64_edac.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index c4f2d7c59b04..de141de7b2e5 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2574,13 +2574,6 @@ static void decode_umc_error(int node_id, struct mce *m) err.channel = find_umc_channel(m); - if (umc_normaddr_to_sysaddr(m->addr, pvt->mc_node_id, err.channel, &sys_addr)) { - err.err_code = ERR_NORM_ADDR; - goto log_error; - } - - error_address_to_page_and_offset(sys_addr, &err); - if (!(m->status & MCI_STATUS_SYNDV)) { err.err_code = ERR_SYND; goto log_error; @@ -2597,6 +2590,13 @@ static void decode_umc_error(int node_id, struct mce *m) err.csrow = m->synd & 0x7; + if (umc_normaddr_to_sysaddr(m->addr, pvt->mc_node_id, err.channel, &sys_addr)) { + err.err_code = ERR_NORM_ADDR; + goto log_error; + } + + error_address_to_page_and_offset(sys_addr, &err); + log_error: __log_ecc_error(mci, &err, ecc_type); } -- 2.17.1
| |