diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-01-10 08:24:32 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 09:46:19 -0400 |
commit | f192c7b16c98839c1945733f1013f75daec5f380 (patch) | |
tree | 5b1559606678b417dc4331c00f94aa1b3e6f16be /drivers/edac/amd64_edac.h | |
parent | 7d20d14da1bf24199add02cf4293871c277a4bda (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.h | 12 |
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) | |||
397 | return (((u64)pvt->ranges[i].lim.hi & 0x000000ff) << 40) | lim; | 397 | return (((u64)pvt->ranges[i].lim.hi & 0x000000ff) << 40) | lim; |
398 | } | 398 | } |
399 | 399 | ||
400 | static inline u16 extract_syndrome(u64 status) | ||
401 | { | ||
402 | return ((status >> 47) & 0xff) | ((status >> 16) & 0xff00); | ||
403 | } | ||
404 | |||
400 | /* | 405 | /* |
401 | * per-node ECC settings descriptor | 406 | * per-node ECC settings descriptor |
402 | */ | 407 | */ |
@@ -440,11 +445,10 @@ extern struct mcidev_sysfs_attribute amd64_dbg_attrs[NUM_DBG_ATTRS], | |||
440 | struct low_ops { | 445 | struct low_ops { |
441 | int (*early_channel_count) (struct amd64_pvt *pvt); | 446 | int (*early_channel_count) (struct amd64_pvt *pvt); |
442 | 447 | ||
443 | u64 (*get_error_address) (struct mem_ctl_info *mci, | 448 | u64 (*get_error_address) (struct mem_ctl_info *mci, struct mce *m); |
444 | struct err_regs *info); | ||
445 | void (*read_dram_ctl_register) (struct amd64_pvt *pvt); | 449 | void (*read_dram_ctl_register) (struct amd64_pvt *pvt); |
446 | void (*map_sysaddr_to_csrow) (struct mem_ctl_info *mci, | 450 | void (*map_sysaddr_to_csrow) (struct mem_ctl_info *mci, u64 sys_addr, |
447 | struct err_regs *info, u64 SystemAddr); | 451 | u16 syndrome); |
448 | int (*dbam_to_cs) (struct amd64_pvt *pvt, int cs_mode); | 452 | int (*dbam_to_cs) (struct amd64_pvt *pvt, int cs_mode); |
449 | int (*read_dct_pci_cfg) (struct amd64_pvt *pvt, int offset, | 453 | int (*read_dct_pci_cfg) (struct amd64_pvt *pvt, int offset, |
450 | u32 *val, const char *func); | 454 | u32 *val, const char *func); |