diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2009-07-27 10:21:14 -0400 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2009-09-14 13:01:07 -0400 |
commit | b69b29de65fe4078b125acc9dea34be82f7c362c (patch) | |
tree | 89c4369f9b04e2200e1ef83ed6497fcf150d2d8b /drivers/edac/amd64_edac.c | |
parent | 549d042df240dfb4203bab40ad44f9336751b7d6 (diff) |
EDAC, AMD: carve out MCi_STATUS decoding
The MCi_STATUS registers have most field definitions in common so decode
them in the general path. Do not pass ecc_type along and compute it in
__amd64_decode_bus_error instead.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r-- | drivers/edac/amd64_edac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 2080b1e2e8a2..c81ca2cf8dc7 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -2283,10 +2283,11 @@ static void amd64_handle_ue(struct mem_ctl_info *mci, | |||
2283 | } | 2283 | } |
2284 | 2284 | ||
2285 | static inline void __amd64_decode_bus_error(struct mem_ctl_info *mci, | 2285 | static inline void __amd64_decode_bus_error(struct mem_ctl_info *mci, |
2286 | struct err_regs *info, int ecc_type) | 2286 | struct err_regs *info) |
2287 | { | 2287 | { |
2288 | u32 ec = ERROR_CODE(info->nbsl); | 2288 | u32 ec = ERROR_CODE(info->nbsl); |
2289 | u32 xec = EXT_ERROR_CODE(info->nbsl); | 2289 | u32 xec = EXT_ERROR_CODE(info->nbsl); |
2290 | int ecc_type = info->nbsh & (0x3 << 13); | ||
2290 | 2291 | ||
2291 | pr_emerg(" Transaction type: %s(%s), %s, Cache Level: %s, %s\n", | 2292 | pr_emerg(" Transaction type: %s(%s), %s, Cache Level: %s, %s\n", |
2292 | RRRR_MSG(ec), II_MSG(ec), TO_MSG(ec), LL_MSG(ec), PP_MSG(ec)); | 2293 | RRRR_MSG(ec), II_MSG(ec), TO_MSG(ec), LL_MSG(ec), PP_MSG(ec)); |
@@ -2316,12 +2317,11 @@ static inline void __amd64_decode_bus_error(struct mem_ctl_info *mci, | |||
2316 | edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR "Error Overflow"); | 2317 | edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR "Error Overflow"); |
2317 | } | 2318 | } |
2318 | 2319 | ||
2319 | void amd64_decode_bus_error(int node_id, struct err_regs *regs, | 2320 | void amd64_decode_bus_error(int node_id, struct err_regs *regs) |
2320 | int ecc_type) | ||
2321 | { | 2321 | { |
2322 | struct mem_ctl_info *mci = mci_lookup[node_id]; | 2322 | struct mem_ctl_info *mci = mci_lookup[node_id]; |
2323 | 2323 | ||
2324 | __amd64_decode_bus_error(mci, regs, ecc_type); | 2324 | __amd64_decode_bus_error(mci, regs); |
2325 | 2325 | ||
2326 | /* | 2326 | /* |
2327 | * Check the UE bit of the NB status high register, if set generate some | 2327 | * Check the UE bit of the NB status high register, if set generate some |