From 14f9adebe150a3191f5beaaf7185ff2d2cc5be25 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 30 Jan 2008 01:13:59 +1100 Subject: [PATCH] --- yaml --- r: 81428 b: refs/heads/master c: 41d824bf61b507c001868861cddda25eaab23cd7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/mm/hash_utils_64.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 90355a8743a1..3e9395bf490d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f62a1626e53e7b851e3e059cbd2fdc99cb85c05 +refs/heads/master: 41d824bf61b507c001868861cddda25eaab23cd7 diff --git a/trunk/arch/powerpc/mm/hash_utils_64.c b/trunk/arch/powerpc/mm/hash_utils_64.c index 7b4cacb0d4ba..32f416175db1 100644 --- a/trunk/arch/powerpc/mm/hash_utils_64.c +++ b/trunk/arch/powerpc/mm/hash_utils_64.c @@ -471,7 +471,7 @@ void __init htab_initialize(void) unsigned long table; unsigned long pteg_count; unsigned long mode_rw; - unsigned long base = 0, size = 0; + unsigned long base = 0, size = 0, limit; int i; extern unsigned long tce_alloc_start, tce_alloc_end; @@ -505,9 +505,15 @@ void __init htab_initialize(void) _SDR1 = 0; } else { /* Find storage for the HPT. Must be contiguous in - * the absolute address space. + * the absolute address space. On cell we want it to be + * in the first 1 Gig. */ - table = lmb_alloc(htab_size_bytes, htab_size_bytes); + if (machine_is(cell)) + limit = 0x40000000; + else + limit = 0; + + table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit); DBG("Hash table allocated at %lx, size: %lx\n", table, htab_size_bytes);