Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Geoff Levand and committed by
Michael Ellerman
5ae74630 d4b18bd6

+7 -2
+7 -2
arch/powerpc/platforms/ps3/mm.c
··· 329 329 r->size = r->base = r->offset = 0; 330 330 map.total = map.rm.size; 331 331 } 332 + ps3_mm_set_repository_highmem(NULL); 332 333 } 333 334 334 335 /*============================================================================*/ ··· 1219 1218 1220 1219 /* Check if we got the highmem region from an earlier boot step */ 1221 1220 1222 - if (ps3_mm_get_repository_highmem(&map.r1)) 1223 - ps3_mm_region_create(&map.r1, map.total - map.rm.size); 1221 + if (ps3_mm_get_repository_highmem(&map.r1)) { 1222 + result = ps3_mm_region_create(&map.r1, map.total - map.rm.size); 1223 + 1224 + if (!result) 1225 + ps3_mm_set_repository_highmem(&map.r1); 1226 + } 1224 1227 1225 1228 /* correct map.total for the real total amount of memory we use */ 1226 1229 map.total = map.rm.size + map.r1.size;