diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-08-03 06:21:26 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-28 20:53:37 -0400 |
commit | 180379dcefb39e8bd05d562b0685e9084dffcc0a (patch) | |
tree | d4a3f2bec69481d3f21903b5bee7c2d1a5e86c16 /arch/ppc64/kernel | |
parent | e88bcd1b29f63738b702e57d831758706162347e (diff) |
[PATCH] ppc64: Remove physbase from the lmb_property struct
We no longer need the lmb code to know about abs and phys addresses, so
remove the physbase variable from the lmb_property struct.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r-- | arch/ppc64/kernel/lmb.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/ppc64/kernel/lmb.c b/arch/ppc64/kernel/lmb.c index 111da736652b..6ed6312d848f 100644 --- a/arch/ppc64/kernel/lmb.c +++ b/arch/ppc64/kernel/lmb.c | |||
@@ -37,8 +37,6 @@ void lmb_dump_all(void) | |||
37 | for (i=0; i < lmb.memory.cnt ;i++) { | 37 | for (i=0; i < lmb.memory.cnt ;i++) { |
38 | udbg_printf(" memory.region[0x%x].base = 0x%lx\n", | 38 | udbg_printf(" memory.region[0x%x].base = 0x%lx\n", |
39 | i, lmb.memory.region[i].base); | 39 | i, lmb.memory.region[i].base); |
40 | udbg_printf(" .physbase = 0x%lx\n", | ||
41 | lmb.memory.region[i].physbase); | ||
42 | udbg_printf(" .size = 0x%lx\n", | 40 | udbg_printf(" .size = 0x%lx\n", |
43 | lmb.memory.region[i].size); | 41 | lmb.memory.region[i].size); |
44 | } | 42 | } |
@@ -50,8 +48,6 @@ void lmb_dump_all(void) | |||
50 | for (i=0; i < lmb.reserved.cnt ;i++) { | 48 | for (i=0; i < lmb.reserved.cnt ;i++) { |
51 | udbg_printf(" reserved.region[0x%x].base = 0x%lx\n", | 49 | udbg_printf(" reserved.region[0x%x].base = 0x%lx\n", |
52 | i, lmb.reserved.region[i].base); | 50 | i, lmb.reserved.region[i].base); |
53 | udbg_printf(" .physbase = 0x%lx\n", | ||
54 | lmb.reserved.region[i].physbase); | ||
55 | udbg_printf(" .size = 0x%lx\n", | 51 | udbg_printf(" .size = 0x%lx\n", |
56 | lmb.reserved.region[i].size); | 52 | lmb.reserved.region[i].size); |
57 | } | 53 | } |
@@ -97,7 +93,6 @@ lmb_coalesce_regions(struct lmb_region *rgn, unsigned long r1, unsigned long r2) | |||
97 | rgn->region[r1].size += rgn->region[r2].size; | 93 | rgn->region[r1].size += rgn->region[r2].size; |
98 | for (i=r2; i < rgn->cnt-1; i++) { | 94 | for (i=r2; i < rgn->cnt-1; i++) { |
99 | rgn->region[i].base = rgn->region[i+1].base; | 95 | rgn->region[i].base = rgn->region[i+1].base; |
100 | rgn->region[i].physbase = rgn->region[i+1].physbase; | ||
101 | rgn->region[i].size = rgn->region[i+1].size; | 96 | rgn->region[i].size = rgn->region[i+1].size; |
102 | } | 97 | } |
103 | rgn->cnt--; | 98 | rgn->cnt--; |
@@ -127,21 +122,12 @@ lmb_analyze(void) | |||
127 | unsigned long i; | 122 | unsigned long i; |
128 | unsigned long mem_size = 0; | 123 | unsigned long mem_size = 0; |
129 | unsigned long size_mask = 0; | 124 | unsigned long size_mask = 0; |
130 | #ifdef CONFIG_MSCHUNKS | ||
131 | unsigned long physbase = 0; | ||
132 | #endif | ||
133 | 125 | ||
134 | for (i=0; i < lmb.memory.cnt; i++) { | 126 | for (i=0; i < lmb.memory.cnt; i++) { |
135 | unsigned long lmb_size; | 127 | unsigned long lmb_size; |
136 | 128 | ||
137 | lmb_size = lmb.memory.region[i].size; | 129 | lmb_size = lmb.memory.region[i].size; |
138 | 130 | ||
139 | #ifdef CONFIG_MSCHUNKS | ||
140 | lmb.memory.region[i].physbase = physbase; | ||
141 | physbase += lmb_size; | ||
142 | #else | ||
143 | lmb.memory.region[i].physbase = lmb.memory.region[i].base; | ||
144 | #endif | ||
145 | mem_size += lmb_size; | 131 | mem_size += lmb_size; |
146 | size_mask |= lmb_size; | 132 | size_mask |= lmb_size; |
147 | } | 133 | } |
@@ -164,7 +150,6 @@ lmb_add_region(struct lmb_region *rgn, unsigned long base, unsigned long size) | |||
164 | adjacent = lmb_addrs_adjacent(base,size,rgnbase,rgnsize); | 150 | adjacent = lmb_addrs_adjacent(base,size,rgnbase,rgnsize); |
165 | if ( adjacent > 0 ) { | 151 | if ( adjacent > 0 ) { |
166 | rgn->region[i].base -= size; | 152 | rgn->region[i].base -= size; |
167 | rgn->region[i].physbase -= size; | ||
168 | rgn->region[i].size += size; | 153 | rgn->region[i].size += size; |
169 | coalesced++; | 154 | coalesced++; |
170 | break; | 155 | break; |
@@ -191,11 +176,9 @@ lmb_add_region(struct lmb_region *rgn, unsigned long base, unsigned long size) | |||
191 | for (i=rgn->cnt-1; i >= 0; i--) { | 176 | for (i=rgn->cnt-1; i >= 0; i--) { |
192 | if (base < rgn->region[i].base) { | 177 | if (base < rgn->region[i].base) { |
193 | rgn->region[i+1].base = rgn->region[i].base; | 178 | rgn->region[i+1].base = rgn->region[i].base; |
194 | rgn->region[i+1].physbase = rgn->region[i].physbase; | ||
195 | rgn->region[i+1].size = rgn->region[i].size; | 179 | rgn->region[i+1].size = rgn->region[i].size; |
196 | } else { | 180 | } else { |
197 | rgn->region[i+1].base = base; | 181 | rgn->region[i+1].base = base; |
198 | rgn->region[i+1].physbase = lmb_abs_to_phys(base); | ||
199 | rgn->region[i+1].size = size; | 182 | rgn->region[i+1].size = size; |
200 | break; | 183 | break; |
201 | } | 184 | } |
@@ -304,13 +287,7 @@ lmb_end_of_DRAM(void) | |||
304 | { | 287 | { |
305 | int idx = lmb.memory.cnt - 1; | 288 | int idx = lmb.memory.cnt - 1; |
306 | 289 | ||
307 | #ifdef CONFIG_MSCHUNKS | ||
308 | return (lmb.memory.region[idx].physbase + lmb.memory.region[idx].size); | ||
309 | #else | ||
310 | return (lmb.memory.region[idx].base + lmb.memory.region[idx].size); | 290 | return (lmb.memory.region[idx].base + lmb.memory.region[idx].size); |
311 | #endif /* CONFIG_MSCHUNKS */ | ||
312 | |||
313 | return 0; | ||
314 | } | 291 | } |
315 | 292 | ||
316 | /* | 293 | /* |