aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/head.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-04-16 15:24:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:24:36 -0700
commit187335a4ec72c9bc7f3f168d6858a41fcfb63302 (patch)
treed5f1ae0d320e6325ed056469773e855fc635c53d /arch/ppc64/kernel/head.S
parent547ee84cea37696d25c93306e909378a87db2f66 (diff)
downloadlinux-187335a4ec72c9bc7f3f168d6858a41fcfb63302.tar.gz
[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 fe05f3fbf9d05..92a744c31ab18 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -922,7 +922,9 @@ fp_unavailable_common:
altivec_unavailable_common:
EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
#ifdef CONFIG_ALTIVEC
+BEGIN_FTR_SECTION
bne .load_up_altivec /* if from user, just load it up */
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
#endif
bl .save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD