Commit c610d65c authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/pseries: lift RTAS limit for hash

With the previous patch to switch to 64-bit mode after returning from
RTAS and before doing any memory accesses, the RMA limit need not be
clamped to 1GB to avoid RTAS bugs.

Keep the 1GB limit for older firmware (although this is more of a kernel
concern than RTAS), and remove it starting with POWER9.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 5eae82ca
...@@ -1853,11 +1853,13 @@ void hash__setup_initial_memory_limit(phys_addr_t first_memblock_base, ...@@ -1853,11 +1853,13 @@ void hash__setup_initial_memory_limit(phys_addr_t first_memblock_base,
* non-virtualized 64-bit hash MMU systems don't have a limitation * non-virtualized 64-bit hash MMU systems don't have a limitation
* on real mode access. * on real mode access.
* *
* We also clamp it to 1G to avoid some funky things * For guests on platforms before POWER9, we clamp the it limit to 1G
* such as RTAS bugs etc... * to avoid some funky things such as RTAS bugs etc...
*/ */
if (!early_cpu_has_feature(CPU_FTR_HVMODE)) { if (!early_cpu_has_feature(CPU_FTR_HVMODE)) {
ppc64_rma_size = min_t(u64, first_memblock_size, 0x40000000); ppc64_rma_size = first_memblock_size;
if (!early_cpu_has_feature(CPU_FTR_ARCH_300))
ppc64_rma_size = min_t(u64, ppc64_rma_size, 0x40000000);
/* Finally limit subsequent allocations */ /* Finally limit subsequent allocations */
memblock_set_current_limit(ppc64_rma_size); memblock_set_current_limit(ppc64_rma_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment