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

Commit d64d02ce authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman
Browse files

powerpc: Call check_if_tm_restore_required() in enable_kernel_*()



Commit a0e72cf1 ("powerpc: Create msr_check_and_{set,clear}()")
removed a call to check_if_tm_restore_required() in the
enable_kernel_*() functions. Add them back in.

Fixes: a0e72cf1 ("powerpc: Create msr_check_and_{set,clear}()")
Reported-by: default avatarRashmica Gupta <rashmicy@gmail.com>
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d1e1cf2e
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -181,9 +181,11 @@ void enable_kernel_fp(void)

	msr_check_and_set(MSR_FP);

	if (current->thread.regs && (current->thread.regs->msr & MSR_FP))
	if (current->thread.regs && (current->thread.regs->msr & MSR_FP)) {
		check_if_tm_restore_required(current);
		__giveup_fpu(current);
	}
}
EXPORT_SYMBOL(enable_kernel_fp);
#endif /* CONFIG_PPC_FPU */

@@ -204,9 +206,11 @@ void enable_kernel_altivec(void)

	msr_check_and_set(MSR_VEC);

	if (current->thread.regs && (current->thread.regs->msr & MSR_VEC))
	if (current->thread.regs && (current->thread.regs->msr & MSR_VEC)) {
		check_if_tm_restore_required(current);
		__giveup_altivec(current);
	}
}
EXPORT_SYMBOL(enable_kernel_altivec);

/*
@@ -249,6 +253,7 @@ void enable_kernel_vsx(void)
	msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX);

	if (current->thread.regs && (current->thread.regs->msr & MSR_VSX)) {
		check_if_tm_restore_required(current);
		if (current->thread.regs->msr & MSR_FP)
			__giveup_fpu(current);
		if (current->thread.regs->msr & MSR_VEC)
@@ -289,9 +294,11 @@ void enable_kernel_spe(void)

	msr_check_and_set(MSR_SPE);

	if (current->thread.regs && (current->thread.regs->msr & MSR_SPE))
	if (current->thread.regs && (current->thread.regs->msr & MSR_SPE)) {
		check_if_tm_restore_required(current);
		__giveup_spe(current);
	}
}
EXPORT_SYMBOL(enable_kernel_spe);

void flush_spe_to_thread(struct task_struct *tsk)