Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297035
b: refs/heads/master
c: a4b4be3
h: refs/heads/master
i:
  297033: 429893c
  297031: 8010476
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Mar 21, 2012
1 parent d86a6e2 commit 864115e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0142877aa4e54dd9943fb727e9b386c36c8e3ab7
refs/heads/master: a4b4be3fd7a76021f67380b03d8bccebf067db72
6 changes: 3 additions & 3 deletions trunk/drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static LIST_HEAD(mc_devices);

#ifdef CONFIG_EDAC_DEBUG

static void edac_mc_dump_channel(struct channel_info *chan)
static void edac_mc_dump_channel(struct rank_info *chan)
{
debugf4("\tchannel = %p\n", chan);
debugf4("\tchannel->chan_idx = %d\n", chan->chan_idx);
Expand Down Expand Up @@ -156,7 +156,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
{
struct mem_ctl_info *mci;
struct csrow_info *csi, *csrow;
struct channel_info *chi, *chp, *chan;
struct rank_info *chi, *chp, *chan;
void *pvt;
unsigned size;
int row, chn;
Expand All @@ -181,7 +181,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
* rather than an imaginary chunk of memory located at address 0.
*/
csi = (struct csrow_info *)(((char *)mci) + ((unsigned long)csi));
chi = (struct channel_info *)(((char *)mci) + ((unsigned long)chi));
chi = (struct rank_info *)(((char *)mci) + ((unsigned long)chi));
pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL;

/* setup index and various internal pointers */
Expand Down
22 changes: 17 additions & 5 deletions trunk/include/linux/edac.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,22 @@ enum scrub_type {
* PS - I enjoyed writing all that about as much as you enjoyed reading it.
*/

struct channel_info {
int chan_idx; /* channel index */
u32 ce_count; /* Correctable Errors for this CHANNEL */
char label[EDAC_MC_LABEL_LEN + 1]; /* DIMM label on motherboard */
/**
* struct rank_info - contains the information for one DIMM rank
*
* @chan_idx: channel number where the rank is (typically, 0 or 1)
* @ce_count: number of correctable errors for this rank
* @label: DIMM label. Different ranks for the same DIMM should be
* filled, on userspace, with the same label.
* FIXME: The core currently won't enforce it.
* @csrow: A pointer to the chip select row structure (the parent
* structure). The location of the rank is given by
* the (csrow->csrow_idx, chan_idx) vector.
*/
struct rank_info {
int chan_idx;
u32 ce_count;
char label[EDAC_MC_LABEL_LEN + 1];
struct csrow_info *csrow; /* the parent */
};

Expand All @@ -335,7 +347,7 @@ struct csrow_info {

/* channel information for this csrow */
u32 nr_channels;
struct channel_info *channels;
struct rank_info *channels;
};

struct mcidev_sysfs_group {
Expand Down

0 comments on commit 864115e

Please sign in to comment.