summaryrefslogtreecommitdiff
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2011-01-10 14:24:32 +0100
committerBorislav Petkov <borislav.petkov@amd.com>2011-03-17 14:46:19 +0100
commitf192c7b16c98839c1945733f1013f75daec5f380 (patch)
tree5b1559606678b417dc4331c00f94aa1b3e6f16be /drivers/edac/amd64_edac.h
parent7d20d14da1bf24199add02cf4293871c277a4bda (diff)
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 <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h12
1 files changed, 8 insertions, 4 deletions
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);