diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-08-01 01:34:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-01 22:14:00 -0400 |
commit | 57ee67af35183c60e924ebb6d6b3e1d2d9c03366 (patch) | |
tree | 05ede7060812b3e07fec1cea199b10e60039aa6a | |
parent | 1caf1f0f187d99eb898bdc216de5a761740fe814 (diff) |
[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 <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>
-rw-r--r-- | arch/ppc64/kernel/prom.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index 47727a6f7346..5aca01ddd81f 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, | |||
916 | } | 916 | } |
917 | } | 917 | } |
918 | 918 | ||
919 | #ifdef CONFIG_ALTIVEC | ||
919 | /* Check if we have a VMX and eventually update CPU features */ | 920 | /* Check if we have a VMX and eventually update CPU features */ |
920 | prop = (u32 *)get_flat_dt_prop(node, "ibm,vmx", NULL); | 921 | prop = (u32 *)get_flat_dt_prop(node, "ibm,vmx", NULL); |
921 | if (prop && (*prop) > 0) { | 922 | if (prop && (*prop) > 0) { |
@@ -929,6 +930,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
929 | cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; | 930 | cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; |
930 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; | 931 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; |
931 | } | 932 | } |
933 | #endif /* CONFIG_ALTIVEC */ | ||
932 | 934 | ||
933 | /* | 935 | /* |
934 | * Check for an SMT capable CPU and set the CPU feature. We do | 936 | * Check for an SMT capable CPU and set the CPU feature. We do |