tree 05ede7060812b3e07fec1cea199b10e60039aa6a
parent 1caf1f0f187d99eb898bdc216de5a761740fe814
author Benjamin Herrenschmidt <[EMAIL PROTECTED]> Mon, 01 Aug 2005 12:34:49 
-0700
committer Linus Torvalds <[EMAIL PROTECTED]> Tue, 02 Aug 2005 09:14:00 -0700

[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 <[EMAIL PROTECTED]>
Cc: Paul Mackerras <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/ppc64/kernel/prom.c |    2 ++
 1 files changed, 2 insertions(+)

diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
--- a/arch/ppc64/kernel/prom.c
+++ b/arch/ppc64/kernel/prom.c
@@ -916,6 +916,7 @@ static int __init early_init_dt_scan_cpu
                }
        }
 
+#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_cpu
                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
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to