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

Commit 9b9a5135 authored by Eric Dumazet's avatar Eric Dumazet Committed by Thomas Gleixner
Browse files

x86/msr: Make rdmsrl_safe_on_cpu() scheduling safe as well



When changing rdmsr_safe_on_cpu() to schedule, it was missed that
__rdmsr_safe_on_cpu() was also used by rdmsrl_safe_on_cpu()

Make rdmsrl_safe_on_cpu() a wrapper instead of copy/pasting the code which
was added for the completion handling.

Fixes: 07cde313 ("x86/msr: Allow rdmsr_safe_on_cpu() to schedule")
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lkml.kernel.org/r/20180328032233.153055-1-edumazet@google.com
parent 67bbd7a8
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -225,16 +225,13 @@ EXPORT_SYMBOL(wrmsrl_safe_on_cpu);

int rdmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q)
{
	u32 low, high;
	int err;
	struct msr_info rv;

	memset(&rv, 0, sizeof(rv));
	err = rdmsr_safe_on_cpu(cpu, msr_no, &low, &high);
	*q = (u64)high << 32 | low;

	rv.msr_no = msr_no;
	err = smp_call_function_single(cpu, __rdmsr_safe_on_cpu, &rv, 1);
	*q = rv.reg.q;

	return err ? err : rv.err;
	return err;
}
EXPORT_SYMBOL(rdmsrl_safe_on_cpu);