From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sebastian Siewior <bigeasy@linutronix.de>,
Alexander Graf <agraf@suse.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: [patch 07/20] KVM/PPC/Book3S HV: Use cpuhp_setup_state_nocalls_locked()
Date: Sat, 15 Apr 2017 19:01:14 +0200 [thread overview]
Message-ID: <20170415171651.824802220@linutronix.de> (raw)
In-Reply-To: 20170415170107.643253702@linutronix.de
[-- Attachment #1: KVMPPCBook3S_HV_Use_cpuhp_setup_state_nocalls_locked.patch --]
[-- Type: text/plain, Size: 1290 bytes --]
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
kvmppc_alloc_host_rm_ops() holds get_online_cpus() while invoking
cpuhp_setup_state_nocalls().
cpuhp_setup_state_nocalls() invokes get_online_cpus() as well. This is
correct, but prevents the conversion of the hotplug locking to a percpu
rwsem.
Use cpuhp_setup_state_nocalls_locked() to avoid the nested call.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexander Graf <agraf@suse.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/kvm/book3s_hv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -3336,10 +3336,10 @@ void kvmppc_alloc_host_rm_ops(void)
return;
}
- cpuhp_setup_state_nocalls(CPUHP_KVM_PPC_BOOK3S_PREPARE,
- "ppc/kvm_book3s:prepare",
- kvmppc_set_host_core,
- kvmppc_clear_host_core);
+ cpuhp_setup_state_nocalls_locked(CPUHP_KVM_PPC_BOOK3S_PREPARE,
+ "ppc/kvm_book3s:prepare",
+ kvmppc_set_host_core,
+ kvmppc_clear_host_core);
put_online_cpus();
}
next prev parent reply other threads:[~2017-04-15 17:32 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-15 17:01 [patch 00/20] cpu/hotplug: Convert get_online_cpus() to a percpu_rwsem Thomas Gleixner
2017-04-15 17:01 ` [patch 01/20] cpu/hotplug: Provide cpuhp_setup/remove_state[_nocalls]_locked() Thomas Gleixner
2017-04-15 17:01 ` [patch 02/20] stop_machine: Provide stop_machine_locked() Thomas Gleixner
2017-04-15 17:01 ` [patch 03/20] padata: Make padata_alloc() static Thomas Gleixner
2017-04-16 6:22 ` Jason A. Donenfeld
2017-04-17 9:14 ` Thomas Gleixner
2017-04-15 17:01 ` [patch 04/20] padata: Avoid nested calls to get_online_cpus() in pcrypt_init_padata() Thomas Gleixner
2017-04-15 17:01 ` [patch 05/20] x86/mtrr: Remove get_online_cpus() from mtrr_save_state() Thomas Gleixner
2017-04-15 17:01 ` [patch 06/20] cpufreq: Use cpuhp_setup_state_nocalls_locked() Thomas Gleixner
2017-04-15 22:54 ` Rafael J. Wysocki
2017-04-17 4:14 ` Viresh Kumar
2017-04-15 17:01 ` Thomas Gleixner [this message]
2017-04-15 17:01 ` [patch 08/20] hwtracing/coresight-etm3x: Use the locked version of cpuhp_setup_state_nocalls() Thomas Gleixner
2017-04-15 17:01 ` [patch 09/20] hwtracing/coresight-etm4x: Use cpuhp_setup_state_nocalls_locked() Thomas Gleixner
2017-04-15 17:01 ` [patch 10/20] perf/x86/intel/cqm: Use cpuhp_setup_state_locked() Thomas Gleixner
2017-04-15 17:01 ` [patch 11/20] ARM/hw_breakpoint: " Thomas Gleixner
2017-04-15 17:01 ` [patch 12/20] s390/kernel: Use stop_machine_locked() Thomas Gleixner
2017-04-15 17:01 ` [patch 13/20] powerpc/powernv: " Thomas Gleixner
2017-04-15 17:01 ` [patch 14/20] kernel/hotplug: Use stop_machine_locked() in takedown_cpu() Thomas Gleixner
2017-04-15 17:01 ` [patch 15/20] x86/perf: Drop EXPORT of perf_check_microcode Thomas Gleixner
2017-04-18 11:24 ` Borislav Petkov
2017-04-15 17:01 ` [patch 16/20] perf/x86/intel: Drop get_online_cpus() in intel_snb_check_microcode() Thomas Gleixner
2017-04-18 11:27 ` Borislav Petkov
2017-04-15 17:01 ` [patch 17/20] PCI: Use cpu_hotplug_disable() instead of get_online_cpus() Thomas Gleixner
2017-04-17 6:46 ` Peter Zijlstra
2017-04-17 7:40 ` Thomas Gleixner
2017-04-18 19:44 ` Bjorn Helgaas
2017-04-18 19:51 ` Thomas Gleixner
2017-04-15 17:01 ` [patch 18/20] PCI: Replace the racy recursion prevention Thomas Gleixner
2017-04-15 17:01 ` [patch 19/20] ACPI/processor: Use cpu_hotplug_disable() instead of get_online_cpus() Thomas Gleixner
2017-04-16 22:53 ` Rafael J. Wysocki
2017-04-15 17:01 ` [patch 20/20] cpu/hotplug: Convert hotplug locking to percpu rwsem Thomas Gleixner
2017-04-17 6:50 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170415171651.824802220@linutronix.de \
--to=tglx@linutronix.de \
--cc=agraf@suse.com \
--cc=benh@kernel.crashing.org \
--cc=bigeasy@linutronix.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).