diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2009-01-14 15:46:02 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-10 21:38:00 -0500 |
commit | c37682d907a615c9a8751748b58e9ba47d415429 (patch) | |
tree | 46e769d545f04a5aa7c2e743a332a9974b2fa9c9 | |
parent | 059f134f844ec52772353c95693fcb5b86e80193 (diff) |
lmb: Rework lmb_dump_all() output
The lmb_dump_all() output didn't include the RMO size, which is
interesting on powerpc. The output was also a bit spacey and not well
aligned, and didn't show you the end addresses.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | lib/lmb.c | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -29,33 +29,33 @@ static int __init early_lmb(char *p) | |||
29 | } | 29 | } |
30 | early_param("lmb", early_lmb); | 30 | early_param("lmb", early_lmb); |
31 | 31 | ||
32 | void lmb_dump_all(void) | 32 | static void lmb_dump(struct lmb_region *region, char *name) |
33 | { | 33 | { |
34 | unsigned long i; | 34 | unsigned long long base, size; |
35 | int i; | ||
36 | |||
37 | pr_info(" %s.cnt = 0x%lx\n", name, region->cnt); | ||
38 | |||
39 | for (i = 0; i < region->cnt; i++) { | ||
40 | base = region->region[i].base; | ||
41 | size = region->region[i].size; | ||
42 | |||
43 | pr_info(" %s[0x%x]\t0x%016llx - 0x%016llx, 0x%llx bytes\n", | ||
44 | name, i, base, base + size - 1, size); | ||
45 | } | ||
46 | } | ||
35 | 47 | ||
48 | void lmb_dump_all(void) | ||
49 | { | ||
36 | if (!lmb_debug) | 50 | if (!lmb_debug) |
37 | return; | 51 | return; |
38 | 52 | ||
39 | pr_info("lmb_dump_all:\n"); | 53 | pr_info("LMB configuration:\n"); |
40 | pr_info(" memory.cnt = 0x%lx\n", lmb.memory.cnt); | 54 | pr_info(" rmo_size = 0x%llx\n", (unsigned long long)lmb.rmo_size); |
41 | pr_info(" memory.size = 0x%llx\n", | 55 | pr_info(" memory.size = 0x%llx\n", (unsigned long long)lmb.memory.size); |
42 | (unsigned long long)lmb.memory.size); | ||
43 | for (i=0; i < lmb.memory.cnt ;i++) { | ||
44 | pr_info(" memory.region[0x%lx].base = 0x%llx\n", | ||
45 | i, (unsigned long long)lmb.memory.region[i].base); | ||
46 | pr_info(" .size = 0x%llx\n", | ||
47 | (unsigned long long)lmb.memory.region[i].size); | ||
48 | } | ||
49 | 56 | ||
50 | pr_info(" reserved.cnt = 0x%lx\n", lmb.reserved.cnt); | 57 | lmb_dump(&lmb.memory, "memory"); |
51 | pr_info(" reserved.size = 0x%llx\n", | 58 | lmb_dump(&lmb.reserved, "reserved"); |
52 | (unsigned long long)lmb.memory.size); | ||
53 | for (i=0; i < lmb.reserved.cnt ;i++) { | ||
54 | pr_info(" reserved.region[0x%lx].base = 0x%llx\n", | ||
55 | i, (unsigned long long)lmb.reserved.region[i].base); | ||
56 | pr_info(" .size = 0x%llx\n", | ||
57 | (unsigned long long)lmb.reserved.region[i].size); | ||
58 | } | ||
59 | } | 59 | } |
60 | 60 | ||
61 | static unsigned long lmb_addrs_overlap(u64 base1, u64 size1, u64 base2, | 61 | static unsigned long lmb_addrs_overlap(u64 base1, u64 size1, u64 base2, |