Commit 162e52a1 authored by Anna-Maria Gleixner's avatar Anna-Maria Gleixner Committed by Ingo Molnar

KVM/x86: Remove superfluous SMP function call

Since the following commit:

  1cf4f629 ("cpu/hotplug: Move online calls to hotplugged cpu")

... the CPU_ONLINE and CPU_DOWN_PREPARE notifiers are always run on the hot
plugged CPU, and as of commit:

  3b9d6da6 ("cpu/hotplug: Fix rollback during error-out in __cpu_disable()")

the CPU_DOWN_FAILED notifier also runs on the hot plugged CPU.  This patch
converts the SMP functional calls into direct calls.

smp_function_call_single() executes the function with interrupts
disabled. This calling convention is not preserved because there
is no reason to do so.
Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Radim Krcmar <rkrcmar@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kvm@vger.kernel.org
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160713153335.452527104@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 48d7f6c7
...@@ -5662,15 +5662,13 @@ static struct notifier_block kvmclock_cpufreq_notifier_block = { ...@@ -5662,15 +5662,13 @@ static struct notifier_block kvmclock_cpufreq_notifier_block = {
static int kvmclock_cpu_notifier(struct notifier_block *nfb, static int kvmclock_cpu_notifier(struct notifier_block *nfb,
unsigned long action, void *hcpu) unsigned long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu;
switch (action) { switch (action) {
case CPU_ONLINE: case CPU_ONLINE:
case CPU_DOWN_FAILED: case CPU_DOWN_FAILED:
smp_call_function_single(cpu, tsc_khz_changed, NULL, 1); tsc_khz_changed(NULL);
break; break;
case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE:
smp_call_function_single(cpu, tsc_bad, NULL, 1); tsc_bad(NULL);
break; break;
} }
return NOTIFY_OK; return NOTIFY_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment