aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/edac.h38
1 files changed, 25 insertions, 13 deletions
diff --git a/include/linux/edac.h b/include/linux/edac.h
index 9e628434e164..d68b01cad068 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -416,18 +416,20 @@ struct edac_mc_layer {
416/* FIXME: add the proper per-location error counts */ 416/* FIXME: add the proper per-location error counts */
417struct dimm_info { 417struct dimm_info {
418 char label[EDAC_MC_LABEL_LEN + 1]; /* DIMM label on motherboard */ 418 char label[EDAC_MC_LABEL_LEN + 1]; /* DIMM label on motherboard */
419 unsigned memory_controller; 419
420 unsigned csrow; 420 /* Memory location data */
421 unsigned csrow_channel; 421 unsigned location[EDAC_MAX_LAYERS];
422
423 struct mem_ctl_info *mci; /* the parent */
422 424
423 u32 grain; /* granularity of reported error in bytes */ 425 u32 grain; /* granularity of reported error in bytes */
424 enum dev_type dtype; /* memory device type */ 426 enum dev_type dtype; /* memory device type */
425 enum mem_type mtype; /* memory dimm type */ 427 enum mem_type mtype; /* memory dimm type */
426 enum edac_type edac_mode; /* EDAC mode for this dimm */ 428 enum edac_type edac_mode; /* EDAC mode for this dimm */
427 429
428 u32 nr_pages; /* number of pages in csrow */ 430 u32 nr_pages; /* number of pages on this dimm */
429 431
430 u32 ce_count; /* Correctable Errors for this dimm */ 432 unsigned csrow, cschannel; /* Points to the old API data */
431}; 433};
432 434
433/** 435/**
@@ -447,9 +449,10 @@ struct dimm_info {
447 */ 449 */
448struct rank_info { 450struct rank_info {
449 int chan_idx; 451 int chan_idx;
450 u32 ce_count;
451 struct csrow_info *csrow; 452 struct csrow_info *csrow;
452 struct dimm_info *dimm; 453 struct dimm_info *dimm;
454
455 u32 ce_count; /* Correctable Errors for this csrow */
453}; 456};
454 457
455struct csrow_info { 458struct csrow_info {
@@ -545,13 +548,18 @@ struct mem_ctl_info {
545 unsigned long (*ctl_page_to_phys) (struct mem_ctl_info * mci, 548 unsigned long (*ctl_page_to_phys) (struct mem_ctl_info * mci,
546 unsigned long page); 549 unsigned long page);
547 int mc_idx; 550 int mc_idx;
548 int nr_csrows;
549 struct csrow_info *csrows; 551 struct csrow_info *csrows;
552 unsigned nr_csrows, num_cschannel;
553
554 /* Memory Controller hierarchy */
555 unsigned n_layers;
556 struct edac_mc_layer *layers;
557 bool mem_is_per_rank;
550 558
551 /* 559 /*
552 * DIMM info. Will eventually remove the entire csrows_info some day 560 * DIMM info. Will eventually remove the entire csrows_info some day
553 */ 561 */
554 unsigned nr_dimms; 562 unsigned tot_dimms;
555 struct dimm_info *dimms; 563 struct dimm_info *dimms;
556 564
557 /* 565 /*
@@ -566,12 +574,16 @@ struct mem_ctl_info {
566 const char *dev_name; 574 const char *dev_name;
567 char proc_name[MC_PROC_NAME_MAX_LEN + 1]; 575 char proc_name[MC_PROC_NAME_MAX_LEN + 1];
568 void *pvt_info; 576 void *pvt_info;
569 u32 ue_noinfo_count; /* Uncorrectable Errors w/o info */
570 u32 ce_noinfo_count; /* Correctable Errors w/o info */
571 u32 ue_count; /* Total Uncorrectable Errors for this MC */
572 u32 ce_count; /* Total Correctable Errors for this MC */
573 unsigned long start_time; /* mci load start time (in jiffies) */ 577 unsigned long start_time; /* mci load start time (in jiffies) */
574 578
579 /*
580 * drivers shouldn't access those fields directly, as the core
581 * already handles that.
582 */
583 u32 ce_noinfo_count, ue_noinfo_count;
584 u32 ue_count, ce_count;
585 u32 *ce_per_layer[EDAC_MAX_LAYERS], *ue_per_layer[EDAC_MAX_LAYERS];
586
575 struct completion complete; 587 struct completion complete;
576 588
577 /* edac sysfs device control */ 589 /* edac sysfs device control */
@@ -584,7 +596,7 @@ struct mem_ctl_info {
584 * by the low level driver. 596 * by the low level driver.
585 * 597 *
586 * Set by the low level driver to provide attributes at the 598 * Set by the low level driver to provide attributes at the
587 * controller level, same level as 'ue_count' and 'ce_count' above. 599 * controller level.
588 * An array of structures, NULL terminated 600 * An array of structures, NULL terminated
589 * 601 *
590 * If attributes are desired, then set to array of attributes 602 * If attributes are desired, then set to array of attributes