aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-02-12 19:46:07 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-12 23:35:54 -0500
commit44430e0d3916ab6aaf0451fdb811f4f1803b741e (patch)
tree4aa86f4a6aac0a7edc839cbf789f18bf8f8990d2
parent78bde53e351bc89cff85d1c2c7e6d7c2ffdf120d (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.c42
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
173static 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
198static void spu_unmap(struct spu *spu) 173static 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)
206static int __init setup_areas(struct spu *spu) 181static 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
261fail_ioremap: 223fail_ioremap:
262 spu_unmap(spu); 224 spu_unmap(spu);
263fail_add: 225
264 return result; 226 return -ENOMEM;
265} 227}
266 228
267static int __init setup_interrupts(struct spu *spu) 229static int __init setup_interrupts(struct spu *spu)