diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2017-05-24 10:15:19 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-05-26 10:10:38 +0200 |
commit | 547efeadd42a3c75e41e33c0637cba100fc18289 (patch) | |
tree | 2f3e5155b620687560803ba1c252f8110e5ab51c | |
parent | c5a81c8ff816d89941fe86961b286765d6ca2f5f (diff) | |
download | linux-547efeadd42a3c75e41e33c0637cba100fc18289.tar.bz2 |
x86/mtrr: Remove get_online_cpus() from mtrr_save_state()
mtrr_save_state() is invoked from native_cpu_up() which is in the context
of a CPU hotplug operation and therefor calling get_online_cpus() is
pointless.
While this works in the current get_online_cpus() implementation it
prevents from converting the hotplug locking to percpu rwsems.
Remove it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170524081547.651378834@linutronix.de
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 2bce84d91c2b..c5bb63be4ba1 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -807,10 +807,8 @@ void mtrr_save_state(void) if (!mtrr_enabled()) return; - get_online_cpus(); first_cpu = cpumask_first(cpu_online_mask); smp_call_function_single(first_cpu, mtrr_save_fixed_ranges, NULL, 1); - put_online_cpus(); } void set_mtrr_aps_delayed_init(void) |