]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] ia64: fix floating-point preemption problem
authorPeter Chubb <peterc@gelato.unsw.edu.au>
Wed, 8 Jun 2005 22:50:20 +0000 (15:50 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 8 Jun 2005 23:21:14 +0000 (16:21 -0700)
commit05062d96a23ec0959ee5ea969f40813170c73c0e
tree9aa09b58ff455cc43b81cae10d3c4dac9fe9f462
parentf829fd23c87918374bac0d90404fe12f0e788d52
[PATCH] ia64: fix floating-point preemption problem

There've been reports of problems with CONFIG_PREEMPT=y and the high
floating point partition.  This is caused by the possibility of preemption
and rescheduling on a different processor while saving or restioirng the
high partition.

The only places where the FPU state is touched are in ptrace, in
switch_to(), and where handling a floating-point exception.  In switch_to()
preemption is off.  So it's only in trap.c and ptrace.c that we need to
prevent preemption.

Here is a patch that adds commentary to make the conditions clear, and adds
appropriate preempt_{en,dis}able() calls to make it so.  In trap.c I use
preempt_enable_no_resched(), as we're about to return to user space where
the preemption flag will be checked anyway.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ia64/kernel/ptrace.c
arch/ia64/kernel/traps.c
include/asm-ia64/processor.h