OSDN Git Service

alpha: fix lazy-FPU mis(merged/applied/whatnot)
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 7 Mar 2023 00:58:56 +0000 (19:58 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 7 Mar 2023 01:13:49 +0000 (20:13 -0500)
Looks like a braino that used to be fixed in e.g. #next.alpha
had gotten into alpha.git cherry-picked version of that patch.

Sure, alpha has no preempt, but preempt_enable() in place of
preempt_disable() is actively confusing the readers...

Other than that, the cherry-picked variant matches what I have.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/alpha/lib/fpreg.c

index 612c5ec..7c08b22 100644 (file)
@@ -23,7 +23,7 @@ alpha_read_fp_reg (unsigned long reg)
 
        if (unlikely(reg >= 32))
                return 0;
-       preempt_enable();
+       preempt_disable();
        if (current_thread_info()->status & TS_SAVED_FP)
                val = current_thread_info()->fp[reg];
        else switch (reg) {
@@ -133,7 +133,7 @@ alpha_read_fp_reg_s (unsigned long reg)
        if (unlikely(reg >= 32))
                return 0;
 
-       preempt_enable();
+       preempt_disable();
        if (current_thread_info()->status & TS_SAVED_FP) {
                LDT(0, current_thread_info()->fp[reg]);
                STS(0, val);