summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/traps.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2005-04-17 00:24:36 +0200
committerLinus Torvalds2005-04-17 00:24:36 +0200
commit187335a4ec72c9bc7f3f168d6858a41fcfb63302 (patch)
treed5f1ae0d320e6325ed056469773e855fc635c53d /arch/ppc64/kernel/traps.c
parent[PATCH] ppc64: Improve mapping of vDSO (diff)
downloadkernel-qcow2-linux-187335a4ec72c9bc7f3f168d6858a41fcfb63302.tar.gz
kernel-qcow2-linux-187335a4ec72c9bc7f3f168d6858a41fcfb63302.tar.xz
kernel-qcow2-linux-187335a4ec72c9bc7f3f168d6858a41fcfb63302.zip
[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/traps.c')
-rw-r--r--arch/ppc64/kernel/traps.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
index 10fc61f3f6a4..7e52cb2605e0 100644
--- a/arch/ppc64/kernel/traps.c
+++ b/arch/ppc64/kernel/traps.c
@@ -450,14 +450,12 @@ void kernel_fp_unavailable_exception(struct pt_regs *regs)
void altivec_unavailable_exception(struct pt_regs *regs)
{
-#ifndef CONFIG_ALTIVEC
if (user_mode(regs)) {
/* A user program has executed an altivec instruction,
but this kernel doesn't support altivec. */
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
return;
}
-#endif
printk(KERN_EMERG "Unrecoverable VMX/Altivec Unavailable Exception "
"%lx at %lx\n", regs->trap, regs->nip);
die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);