-
Kenneth W. Chen authored
The fast system-call fall-back-path has a race: it reads PSR, modifies some bits, then writes back the new PSR. Unfortunately, the contents of PSR may change between reading and writing it. For example, an interrupt could occur which could trigger a context-switch. The context-switch might in turn flush the floating-point-high (FPH) partition to memory, clear PSR.MFH, and set PSR.DFH. To prevent this race, the patch below turns off PSR.I before reading PSR. This fixes a floating-point corruption problem that was observed on a system with a libc which has the fast system-call support enabled. The performance impact is minimal (on the order of a handful of cycles). Signed-off-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Asit Mallick <asit.k.mallick@intel.com> Signed-off-by: David Mosberger <davidm@hpl.hp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
56d1317d