Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c41bf8fa authored by Jan Kiszka's avatar Jan Kiszka Committed by Andi Kleen
Browse files

[PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu



There are two callers of __unlazy_fpu, unlazy_fpu and __switch_to, and
none of them appear to require additional preempt_disable/enable here.
Let's open-code save_init_fpu in __unlazy_fpu to save a few ops.

Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 02b64dab
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -75,9 +75,10 @@ static inline void __save_init_fpu( struct task_struct *tsk )
}

#define __unlazy_fpu( tsk ) do {				\
	if (task_thread_info(tsk)->status & TS_USEDFPU) \
		save_init_fpu( tsk ); 			\
	else						\
	if (task_thread_info(tsk)->status & TS_USEDFPU) {	\
		__save_init_fpu(tsk);				\
		stts();						\
	} else							\
		tsk->fpu_counter = 0;				\
} while (0)