public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@ozlabs•org, cbe-oss-dev@ozlabs•org
Subject: [PATCH 2/3] powerpc: Remove SPU struct page's for PS3
Date: Tue, 13 Feb 2007 11:46:07 +1100	[thread overview]
Message-ID: <20070213004617.2C93BDDF19@ozlabs.org> (raw)
In-Reply-To: <1171327564.314011.545768742379.qpush@grosgo>

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>

 arch/powerpc/platforms/ps3/spu.c |   42 +--------------------------------------
 1 file changed, 2 insertions(+), 40 deletions(-)

Index: linux-cell/arch/powerpc/platforms/ps3/spu.c
===================================================================
--- linux-cell.orig/arch/powerpc/platforms/ps3/spu.c	2007-02-13 11:34:38.000000000 +1100
+++ linux-cell/arch/powerpc/platforms/ps3/spu.c	2007-02-13 11:37:07.000000000 +1100
@@ -170,31 +170,6 @@ static int __init construct_spu(struct s
 	return result;
 }
 
-static int __init add_spu_pages(unsigned long start_addr, unsigned long size)
-{
-	int result;
-	unsigned long start_pfn;
-	unsigned long nr_pages;
-	struct pglist_data *pgdata;
-	struct zone *zone;
-
-	BUG_ON(!mem_init_done);
-
-	start_pfn = start_addr >> PAGE_SHIFT;
-	nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
-	pgdata = NODE_DATA(0);
-	zone = pgdata->node_zones;
-
-	result = __add_pages(zone, start_pfn, nr_pages);
-
-	if (result)
-		pr_debug("%s:%d: __add_pages failed: (%d)\n",
-			__func__, __LINE__, result);
-
-	return result;
-}
-
 static void spu_unmap(struct spu *spu)
 {
 	iounmap(spu->priv2);
@@ -206,19 +181,6 @@ static void spu_unmap(struct spu *spu)
 static int __init setup_areas(struct spu *spu)
 {
 	struct table {char* name; unsigned long addr; unsigned long size;};
-	int result;
-
-	/* setup pages */
-
-	result = add_spu_pages(spu->local_store_phys, LS_SIZE);
-	if (result)
-		goto fail_add;
-
-	result = add_spu_pages(spu->problem_phys, sizeof(struct spu_problem));
-	if (result)
-		goto fail_add;
-
-	/* ioremap */
 
 	spu_pdata(spu)->shadow = __ioremap(
 		spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),
@@ -260,8 +222,8 @@ static int __init setup_areas(struct spu
 
 fail_ioremap:
 	spu_unmap(spu);
-fail_add:
-	return result;
+
+	return -ENOMEM;
 }
 
 static int __init setup_interrupts(struct spu *spu)

  parent reply	other threads:[~2007-02-13  0:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-13  0:46 [PATCH 0/3] spufs: mmap fixes and updates Benjamin Herrenschmidt
2007-02-13  0:46 ` [PATCH 1/3] spufs: remove need for struct page for SPEs Benjamin Herrenschmidt
2007-02-13 12:15   ` [Cbe-oss-dev] " Arnd Bergmann
2007-02-13  0:46 ` Benjamin Herrenschmidt [this message]
2007-02-13 12:16   ` [Cbe-oss-dev] [PATCH 2/3] powerpc: Remove SPU struct page's for PS3 Arnd Bergmann
2007-02-13  0:46 ` [PATCH 3/3] spufs: Fix bitrot of the SPU mmap facility Benjamin Herrenschmidt
2007-02-13 12:16   ` [Cbe-oss-dev] " Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2007-02-14  1:32 [PATCH 2/3] powerpc: Remove SPU struct page's for PS3 Noguchi, Masato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070213004617.2C93BDDF19@ozlabs.org \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=cbe-oss-dev@ozlabs$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox