diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-02-12 19:46:07 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-12 23:35:54 -0500 |
commit | 44430e0d3916ab6aaf0451fdb811f4f1803b741e (patch) | |
tree | 4aa86f4a6aac0a7edc839cbf789f18bf8f8990d2 | |
parent | 78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d (diff) |
[POWERPC] powerpc: Remove SPU struct pages for PS3
Struct page are no longer needed for SPUs, so let's not create them
on PS3 anymore.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/ps3/spu.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index d1929721b0e4..a397e4e17c13 100644 --- a/arch/powerpc/platforms/ps3/spu.c +++ b/arch/powerpc/platforms/ps3/spu.c | |||
@@ -170,31 +170,6 @@ static int __init construct_spu(struct spu *spu) | |||
170 | return result; | 170 | return result; |
171 | } | 171 | } |
172 | 172 | ||
173 | static int __init add_spu_pages(unsigned long start_addr, unsigned long size) | ||
174 | { | ||
175 | int result; | ||
176 | unsigned long start_pfn; | ||
177 | unsigned long nr_pages; | ||
178 | struct pglist_data *pgdata; | ||
179 | struct zone *zone; | ||
180 | |||
181 | BUG_ON(!mem_init_done); | ||
182 | |||
183 | start_pfn = start_addr >> PAGE_SHIFT; | ||
184 | nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
185 | |||
186 | pgdata = NODE_DATA(0); | ||
187 | zone = pgdata->node_zones; | ||
188 | |||
189 | result = __add_pages(zone, start_pfn, nr_pages); | ||
190 | |||
191 | if (result) | ||
192 | pr_debug("%s:%d: __add_pages failed: (%d)\n", | ||
193 | __func__, __LINE__, result); | ||
194 | |||
195 | return result; | ||
196 | } | ||
197 | |||
198 | static void spu_unmap(struct spu *spu) | 173 | static void spu_unmap(struct spu *spu) |
199 | { | 174 | { |
200 | iounmap(spu->priv2); | 175 | iounmap(spu->priv2); |
@@ -206,19 +181,6 @@ static void spu_unmap(struct spu *spu) | |||
206 | static int __init setup_areas(struct spu *spu) | 181 | static int __init setup_areas(struct spu *spu) |
207 | { | 182 | { |
208 | struct table {char* name; unsigned long addr; unsigned long size;}; | 183 | struct table {char* name; unsigned long addr; unsigned long size;}; |
209 | int result; | ||
210 | |||
211 | /* setup pages */ | ||
212 | |||
213 | result = add_spu_pages(spu->local_store_phys, LS_SIZE); | ||
214 | if (result) | ||
215 | goto fail_add; | ||
216 | |||
217 | result = add_spu_pages(spu->problem_phys, sizeof(struct spu_problem)); | ||
218 | if (result) | ||
219 | goto fail_add; | ||
220 | |||
221 | /* ioremap */ | ||
222 | 184 | ||
223 | spu_pdata(spu)->shadow = __ioremap( | 185 | spu_pdata(spu)->shadow = __ioremap( |
224 | spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), | 186 | spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), |
@@ -260,8 +222,8 @@ static int __init setup_areas(struct spu *spu) | |||
260 | 222 | ||
261 | fail_ioremap: | 223 | fail_ioremap: |
262 | spu_unmap(spu); | 224 | spu_unmap(spu); |
263 | fail_add: | 225 | |
264 | return result; | 226 | return -ENOMEM; |
265 | } | 227 | } |
266 | 228 | ||
267 | static int __init setup_interrupts(struct spu *spu) | 229 | static int __init setup_interrupts(struct spu *spu) |