aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index cf7981e1f063..abefab4722c2 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -376,6 +376,23 @@ struct amd64_pvt {
376 struct error_injection injection; 376 struct error_injection injection;
377}; 377};
378 378
379enum err_codes {
380 DECODE_OK = 0,
381 ERR_NODE = -1,
382 ERR_CSROW = -2,
383 ERR_CHANNEL = -3,
384};
385
386struct err_info {
387 int err_code;
388 struct mem_ctl_info *src_mci;
389 int csrow;
390 int channel;
391 u16 syndrome;
392 u32 page;
393 u32 offset;
394};
395
379static inline u64 get_dram_base(struct amd64_pvt *pvt, unsigned i) 396static inline u64 get_dram_base(struct amd64_pvt *pvt, unsigned i)
380{ 397{
381 u64 addr = ((u64)pvt->ranges[i].base.lo & 0xffff0000) << 8; 398 u64 addr = ((u64)pvt->ranges[i].base.lo & 0xffff0000) << 8;
@@ -449,7 +466,7 @@ static inline void amd64_remove_sysfs_inject_files(struct mem_ctl_info *mci)
449struct low_ops { 466struct low_ops {
450 int (*early_channel_count) (struct amd64_pvt *pvt); 467 int (*early_channel_count) (struct amd64_pvt *pvt);
451 void (*map_sysaddr_to_csrow) (struct mem_ctl_info *mci, u64 sys_addr, 468 void (*map_sysaddr_to_csrow) (struct mem_ctl_info *mci, u64 sys_addr,
452 u16 syndrome); 469 struct err_info *);
453 int (*dbam_to_cs) (struct amd64_pvt *pvt, u8 dct, unsigned cs_mode); 470 int (*dbam_to_cs) (struct amd64_pvt *pvt, u8 dct, unsigned cs_mode);
454 int (*read_dct_pci_cfg) (struct amd64_pvt *pvt, int offset, 471 int (*read_dct_pci_cfg) (struct amd64_pvt *pvt, int offset,
455 u32 *val, const char *func); 472 u32 *val, const char *func);