diff options
author | Olof Johansson <olof@lixom.net> | 2005-08-28 22:42:10 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-29 23:32:08 -0400 |
commit | 7fea82ab1a74030f79a2adfac1af3d93b8638fc3 (patch) | |
tree | 9bf8a09179f60ddddbebceb4df34445eff12de16 /arch | |
parent | 6f9aa727433fe7647869c9b64ce2f7b5feac0052 (diff) |
[PATCH] PPC64: Don't try to claim memory from OF at 1GB mark
Some RS64-based machines (p620, F80, others) have problems with firmware
returning 0xdeadbeef instead of failure to allocations that end at the
1GB mark.
We have two options:
1. Detect the undocumented 0xdeadbeef return value and interpret it as
a failure.
2. Avoid allocating that high.
(2) is really the cleaner solution here. 768MB is plenty of room so use
that as the max alloc_top instead of 1GB.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/prom_init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c index adcf972711fc..122283a1d39a 100644 --- a/arch/ppc64/kernel/prom_init.c +++ b/arch/ppc64/kernel/prom_init.c | |||
@@ -892,7 +892,10 @@ static void __init prom_init_mem(void) | |||
892 | if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR ) | 892 | if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR ) |
893 | RELOC(alloc_top) = RELOC(rmo_top); | 893 | RELOC(alloc_top) = RELOC(rmo_top); |
894 | else | 894 | else |
895 | RELOC(alloc_top) = RELOC(rmo_top) = min(0x40000000ul, RELOC(ram_top)); | 895 | /* Some RS64 machines have buggy firmware where claims up at 1GB |
896 | * fails. Cap at 768MB as a workaround. Still plenty of room. | ||
897 | */ | ||
898 | RELOC(alloc_top) = RELOC(rmo_top) = min(0x30000000ul, RELOC(ram_top)); | ||
896 | 899 | ||
897 | prom_printf("memory layout at init:\n"); | 900 | prom_printf("memory layout at init:\n"); |
898 | prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); | 901 | prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); |