summaryrefslogtreecommitdiffstats
path: root/drivers/edac/i5400_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2012-02-12 21:18:06 +0100
committerMauro Carvalho Chehab2012-05-29 00:13:51 +0200
commit68d086f89b8064d5576f8c1e47fa7ecb4fd6f141 (patch)
treea08bbec14c0519e6264fb1251a1a912683dbb752 /drivers/edac/i5400_edac.c
parentedac: Cleanup the logs for i7core and sb edac drivers (diff)
downloadkernel-qcow2-linux-68d086f89b8064d5576f8c1e47fa7ecb4fd6f141.tar.gz
kernel-qcow2-linux-68d086f89b8064d5576f8c1e47fa7ecb4fd6f141.tar.xz
kernel-qcow2-linux-68d086f89b8064d5576f8c1e47fa7ecb4fd6f141.zip
i5400_edac: improve debug messages to better represent the filled memory
Improves the debug output message, in order to better represent the memory controller hierarchy, when outputing the debug messages. No functional changes when debug is disabled. Reviewed-by: Aristeu Rozanski <arozansk@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i5400_edac.c')
-rw-r--r--drivers/edac/i5400_edac.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index ff7bf8050c9c..6640c29e1885 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -963,7 +963,7 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
int dimm, max_dimms;
char *p, *mem_buffer;
int space, n;
- int channel;
+ int channel, branch;
/* ================= Generate some debug output ================= */
space = PAGE_SIZE;
@@ -1028,6 +1028,19 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
space -= n;
}
+ space -= n;
+ debugf2("%s\n", mem_buffer);
+ p = mem_buffer;
+ space = PAGE_SIZE;
+
+ n = snprintf(p, space, " ");
+ p += n;
+ for (branch = 0; branch < MAX_BRANCHES; branch++) {
+ n = snprintf(p, space, " branch %d | ", branch);
+ p += n;
+ space -= n;
+ }
+
/* output the last message and free buffer */
debugf2("%s\n", mem_buffer);
kfree(mem_buffer);