powerpc/prom_init: Move prom_radix_disable to __prombss
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 15 Oct 2018 02:49:54 +0000 (13:49 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 18 Oct 2018 13:56:17 +0000 (00:56 +1100)
Initialize it dynamically instead of statically

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/prom_init.c

index 84f763e0fe1d8ed5a1d46272b0397231fa0db370..7a5eb019256203aed0c6cc012be51e5e4ce7c6f2 100644 (file)
@@ -172,7 +172,9 @@ static unsigned long __prombss prom_tce_alloc_start;
 static unsigned long __prombss prom_tce_alloc_end;
 #endif
 
-static bool prom_radix_disable __initdata = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
+#ifdef CONFIG_PPC_PSERIES
+static bool prom_radix_disable __prombss;
+#endif
 
 struct platform_support {
        bool hash_mmu;
@@ -665,6 +667,8 @@ static void __init early_cmdline_parse(void)
 #endif
        }
 
+#ifdef CONFIG_PPC_PSERIES
+       prom_radix_disable = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
        opt = strstr(prom_cmd_line, "disable_radix");
        if (opt) {
                opt += 13;
@@ -680,6 +684,7 @@ static void __init early_cmdline_parse(void)
        }
        if (prom_radix_disable)
                prom_debug("Radix disabled from cmdline\n");
+#endif /* CONFIG_PPC_PSERIES */
 }
 
 #ifdef CONFIG_PPC_PSERIES