diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-01-29 09:13:59 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-30 20:11:09 -0500 |
commit | 41d824bf61b507c001868861cddda25eaab23cd7 (patch) | |
tree | 63927b478d6298698ece2842dca37d174ac2fe61 /arch/powerpc/mm | |
parent | 1f62a1626e53e7b851e3e059cbd2fdc99cb85c05 (diff) |
[POWERPC] Allocate the hash table under 1G on cell
In order to support the fixed IOMMU mapping (in a subsequent patch),
we need the hash table to be inside the IOMMUs DMA window. This is
usually 2G, but let's make sure the hash table is under 1G as that
will satisfy the IOMMU requirements and also means the hash table will
be on node 0.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 7b4cacb0d4ba..32f416175db1 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -471,7 +471,7 @@ void __init htab_initialize(void) | |||
471 | unsigned long table; | 471 | unsigned long table; |
472 | unsigned long pteg_count; | 472 | unsigned long pteg_count; |
473 | unsigned long mode_rw; | 473 | unsigned long mode_rw; |
474 | unsigned long base = 0, size = 0; | 474 | unsigned long base = 0, size = 0, limit; |
475 | int i; | 475 | int i; |
476 | 476 | ||
477 | extern unsigned long tce_alloc_start, tce_alloc_end; | 477 | extern unsigned long tce_alloc_start, tce_alloc_end; |
@@ -505,9 +505,15 @@ void __init htab_initialize(void) | |||
505 | _SDR1 = 0; | 505 | _SDR1 = 0; |
506 | } else { | 506 | } else { |
507 | /* Find storage for the HPT. Must be contiguous in | 507 | /* Find storage for the HPT. Must be contiguous in |
508 | * the absolute address space. | 508 | * the absolute address space. On cell we want it to be |
509 | * in the first 1 Gig. | ||
509 | */ | 510 | */ |
510 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 511 | if (machine_is(cell)) |
512 | limit = 0x40000000; | ||
513 | else | ||
514 | limit = 0; | ||
515 | |||
516 | table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit); | ||
511 | 517 | ||
512 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 518 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
513 | htab_size_bytes); | 519 | htab_size_bytes); |