Commit 68d086f8 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarAristeu Rozanski <arozansk@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e17a2f42
...@@ -963,7 +963,7 @@ static void calculate_dimm_size(struct i5400_pvt *pvt) ...@@ -963,7 +963,7 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
int dimm, max_dimms; int dimm, max_dimms;
char *p, *mem_buffer; char *p, *mem_buffer;
int space, n; int space, n;
int channel; int channel, branch;
/* ================= Generate some debug output ================= */ /* ================= Generate some debug output ================= */
space = PAGE_SIZE; space = PAGE_SIZE;
...@@ -1028,6 +1028,19 @@ static void calculate_dimm_size(struct i5400_pvt *pvt) ...@@ -1028,6 +1028,19 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
space -= n; 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 */ /* output the last message and free buffer */
debugf2("%s\n", mem_buffer); debugf2("%s\n", mem_buffer);
kfree(mem_buffer); kfree(mem_buffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment