aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/head.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-04-16 18:24:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:36 -0400
commit187335a4ec72c9bc7f3f168d6858a41fcfb63302 (patch)
treed5f1ae0d320e6325ed056469773e855fc635c53d /arch/ppc64/kernel/head.S
parent547ee84cea37696d25c93306e909378a87db2f66 (diff)
[PATCH] ppc64: Detect altivec via firmware on unknown CPUs
This patch adds detection of the Altivec capability of the CPU via the firmware in addition to the cpu table. This allows newer CPUs that aren't in the table to still have working altivec support in the kernel. It also fixes a problem where if a CPU isn't recognized as having altivec features, and takes an altivec unavailable exception due to userland issuing altivec instructions, the kernel would happily enable it and context switch the registers ... but not all of them (it would basically forget vrsave). With this patch, the kernel will refuse to enable altivec when the feature isn't detected for the CPU (SIGILL). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/head.S')
-rw-r--r--arch/ppc64/kernel/head.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
index fe05f3fbf9d0..92a744c31ab1 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -922,7 +922,9 @@ fp_unavailable_common:
922altivec_unavailable_common: 922altivec_unavailable_common:
923 EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN) 923 EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
924#ifdef CONFIG_ALTIVEC 924#ifdef CONFIG_ALTIVEC
925BEGIN_FTR_SECTION
925 bne .load_up_altivec /* if from user, just load it up */ 926 bne .load_up_altivec /* if from user, just load it up */
927END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
926#endif 928#endif
927 bl .save_nvgprs 929 bl .save_nvgprs
928 addi r3,r1,STACK_FRAME_OVERHEAD 930 addi r3,r1,STACK_FRAME_OVERHEAD