Currently the pseries kernel advertises radix MMU support even if
the actual support is disabled via the CONFIG_PPC_RADIX_MMU option.

This adds a check for CONFIG_PPC_RADIX_MMU to avoid advertising radix
to the hypervisor.

Suggested-by: Paul Mackerras <pau...@ozlabs.org>
Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru>
---
 arch/powerpc/kernel/prom_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 02190e9..65879df 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1109,7 +1109,8 @@ static void __init prom_check_platform_support(void)
                }
        }
 
-       if (supported.radix_mmu && supported.radix_gtse) {
+       if (supported.radix_mmu && supported.radix_gtse &&
+           IS_ENABLED(CONFIG_PPC_RADIX_MMU)) {
                /* Radix preferred - but we require GTSE for now */
                prom_debug("Asking for radix with GTSE\n");
                ibm_architecture_vec.vec5.mmu = OV5_FEAT(OV5_MMU_RADIX);
-- 
2.11.0

Reply via email to