From f192c7b16c98839c1945733f1013f75daec5f380 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Mon, 10 Jan 2011 14:24:32 +0100 Subject: amd64_edac: Simplify decoding path Use the struct mce directly instead of copying from it into a custom struct err_regs. No functionality change. Signed-off-by: Borislav Petkov --- drivers/edac/amd64_edac.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers/edac/amd64_edac.h') diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index 04293306bedc..ba16535842ba 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h @@ -397,6 +397,11 @@ static inline u64 get_dram_limit(struct amd64_pvt *pvt, unsigned i) return (((u64)pvt->ranges[i].lim.hi & 0x000000ff) << 40) | lim; } +static inline u16 extract_syndrome(u64 status) +{ + return ((status >> 47) & 0xff) | ((status >> 16) & 0xff00); +} + /* * per-node ECC settings descriptor */ @@ -440,11 +445,10 @@ extern struct mcidev_sysfs_attribute amd64_dbg_attrs[NUM_DBG_ATTRS], struct low_ops { int (*early_channel_count) (struct amd64_pvt *pvt); - u64 (*get_error_address) (struct mem_ctl_info *mci, - struct err_regs *info); + u64 (*get_error_address) (struct mem_ctl_info *mci, struct mce *m); void (*read_dram_ctl_register) (struct amd64_pvt *pvt); - void (*map_sysaddr_to_csrow) (struct mem_ctl_info *mci, - struct err_regs *info, u64 SystemAddr); + void (*map_sysaddr_to_csrow) (struct mem_ctl_info *mci, u64 sys_addr, + u16 syndrome); int (*dbam_to_cs) (struct amd64_pvt *pvt, int cs_mode); int (*read_dct_pci_cfg) (struct amd64_pvt *pvt, int offset, u32 *val, const char *func); -- cgit v1.2.2