Skip to content

Commit

Permalink
[PATCH] ppc64: Fix CONFIG_ALTIVEC not set
Browse files Browse the repository at this point in the history
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 <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed Aug 2, 2005
1 parent 1caf1f0 commit 57ee67a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/ppc64/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 57ee67a

Please sign in to comment.