summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2015-01-13 01:00:20 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2015-01-22 17:31:21 +1100
commit5ae74630ee4fa98bbba7a7cd8ee6919fd9f38561 (patch)
treec5607f56a8165918e080829097fd72ab055c2cdd
parentd4b18bd675b850fbf395304433952130034bdd89 (diff)
downloadlinux-5ae74630ee4fa98bbba7a7cd8ee6919fd9f38561.tar.gz
linux-5ae74630ee4fa98bbba7a7cd8ee6919fd9f38561.tar.bz2
linux-5ae74630ee4fa98bbba7a7cd8ee6919fd9f38561.zip
powerpc/ps3: Write highmem info to repository
Add calls to the ps3_mm_set_repository_highmem() routine when the ps3 r1 highmem region is either created or destroyed. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/platforms/ps3/mm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 04c1b938d762..b0f34663b1ae 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -329,6 +329,7 @@ static void ps3_mm_region_destroy(struct mem_region *r)
r->size = r->base = r->offset = 0;
map.total = map.rm.size;
}
+ ps3_mm_set_repository_highmem(NULL);
}
/*============================================================================*/
@@ -1218,8 +1219,12 @@ void __init ps3_mm_init(void)
/* Check if we got the highmem region from an earlier boot step */
- if (ps3_mm_get_repository_highmem(&map.r1))
- ps3_mm_region_create(&map.r1, map.total - map.rm.size);
+ if (ps3_mm_get_repository_highmem(&map.r1)) {
+ result = ps3_mm_region_create(&map.r1, map.total - map.rm.size);
+
+ if (!result)
+ ps3_mm_set_repository_highmem(&map.r1);
+ }
/* correct map.total for the real total amount of memory we use */
map.total = map.rm.size + map.r1.size;