From: Benjamin Herrenschmidt Date: Mon, 1 Aug 2005 05:34:49 +0000 (-0700) Subject: [PATCH] ppc64: Fix CONFIG_ALTIVEC not set X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57ee67af35183c60e924ebb6d6b3e1d2d9c03366;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] ppc64: Fix CONFIG_ALTIVEC not set The code that sets the altivec capability of the CPU based on firmware informations can enable altivec when the kernel has CONFIG_ALTIVEC disabled. This results in "interesting" crashes. Signed-off-by: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index 47727a6f734..5aca01ddd81 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c @@ -916,6 +916,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, } } +#ifdef CONFIG_ALTIVEC /* Check if we have a VMX and eventually update CPU features */ prop = (u32 *)get_flat_dt_prop(node, "ibm,vmx", NULL); if (prop && (*prop) > 0) { @@ -929,6 +930,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; } +#endif /* CONFIG_ALTIVEC */ /* * Check for an SMT capable CPU and set the CPU feature. We do