aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/book3s64/hash_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/book3s64/hash_utils.c')
-rw-r--r--arch/powerpc/mm/book3s64/hash_utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
index 9a5963e07a82..b8ad14bb1170 100644
--- a/arch/powerpc/mm/book3s64/hash_utils.c
+++ b/arch/powerpc/mm/book3s64/hash_utils.c
@@ -1899,11 +1899,20 @@ void hash__setup_initial_memory_limit(phys_addr_t first_memblock_base,
1899 * 1899 *
1900 * For guests on platforms before POWER9, we clamp the it limit to 1G 1900 * For guests on platforms before POWER9, we clamp the it limit to 1G
1901 * to avoid some funky things such as RTAS bugs etc... 1901 * to avoid some funky things such as RTAS bugs etc...
1902 *
1903 * On POWER9 we limit to 1TB in case the host erroneously told us that
1904 * the RMA was >1TB. Effective address bits 0:23 are treated as zero
1905 * (meaning the access is aliased to zero i.e. addr = addr % 1TB)
1906 * for virtual real mode addressing and so it doesn't make sense to
1907 * have an area larger than 1TB as it can't be addressed.
1902 */ 1908 */
1903 if (!early_cpu_has_feature(CPU_FTR_HVMODE)) { 1909 if (!early_cpu_has_feature(CPU_FTR_HVMODE)) {
1904 ppc64_rma_size = first_memblock_size; 1910 ppc64_rma_size = first_memblock_size;
1905 if (!early_cpu_has_feature(CPU_FTR_ARCH_300)) 1911 if (!early_cpu_has_feature(CPU_FTR_ARCH_300))
1906 ppc64_rma_size = min_t(u64, ppc64_rma_size, 0x40000000); 1912 ppc64_rma_size = min_t(u64, ppc64_rma_size, 0x40000000);
1913 else
1914 ppc64_rma_size = min_t(u64, ppc64_rma_size,
1915 1UL << SID_SHIFT_1T);
1907 1916
1908 /* Finally limit subsequent allocations */ 1917 /* Finally limit subsequent allocations */
1909 memblock_set_current_limit(ppc64_rma_size); 1918 memblock_set_current_limit(ppc64_rma_size);