* [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"
@ 2019-06-26 8:57 Zhenzhong Duan
2019-06-27 21:24 ` Thomas Gleixner
2019-07-10 12:08 ` Juergen Gross
0 siblings, 2 replies; 4+ messages in thread
From: Zhenzhong Duan @ 2019-06-26 8:57 UTC (permalink / raw)
To: linux-kernel
Cc: Zhenzhong Duan, Waiman Long, Peter Zijlstra (Intel),
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Boris Ostrovsky,
Juergen Gross, Stefano Stabellini, Dou Liyang
This reverts commit ca5d376e17072c1b60c3fee66f3be58ef018952d.
Commit 8990cac6e5ea ("x86/jump_label: Initialize static branching
early") adds jump_label_init() call in setup_arch() to make static
keys initialized early, so we could use the original simpler code
again.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
arch/x86/kernel/smpboot.c | 3 +--
arch/x86/xen/spinlock.c | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 362dd89..44472ca 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1308,8 +1308,6 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
pr_info("CPU0: ");
print_cpu_info(&cpu_data(0));
- native_pv_lock_init();
-
uv_system_init();
set_mtrr_aps_delayed_init();
@@ -1339,6 +1337,7 @@ void __init native_smp_prepare_boot_cpu(void)
/* already set me in cpu_online_mask in boot_cpu_init() */
cpumask_set_cpu(me, cpu_callout_mask);
cpu_set_state_online(me);
+ native_pv_lock_init();
}
void __init calculate_max_logical_packages(void)
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 3776122..6deb490 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -68,11 +68,8 @@ void xen_init_lock_cpu(int cpu)
int irq;
char *name;
- if (!xen_pvspin) {
- if (cpu == 0)
- static_branch_disable(&virt_spin_lock_key);
+ if (!xen_pvspin)
return;
- }
WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n",
cpu, per_cpu(lock_kicker_irq, cpu));
@@ -124,6 +121,7 @@ void __init xen_init_spinlocks(void)
if (!xen_pvspin) {
printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
+ static_branch_disable(&virt_spin_lock_key);
return;
}
printk(KERN_DEBUG "xen: PV spinlocks enabled\n");
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"
2019-06-26 8:57 [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized" Zhenzhong Duan
@ 2019-06-27 21:24 ` Thomas Gleixner
2019-07-02 3:57 ` Boris Ostrovsky
2019-07-10 12:08 ` Juergen Gross
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2019-06-27 21:24 UTC (permalink / raw)
To: Zhenzhong Duan
Cc: linux-kernel, Waiman Long, Peter Zijlstra (Intel),
Ingo Molnar, Borislav Petkov, Boris Ostrovsky, Juergen Gross,
Stefano Stabellini, Dou Liyang
On Wed, 26 Jun 2019, Zhenzhong Duan wrote:
> This reverts commit ca5d376e17072c1b60c3fee66f3be58ef018952d.
>
> Commit 8990cac6e5ea ("x86/jump_label: Initialize static branching
> early") adds jump_label_init() call in setup_arch() to make static
> keys initialized early, so we could use the original simpler code
> again.
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> Cc: Waiman Long <longman@redhat.com>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Boris,
want you to pick that up or should I?
In case you take it:
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"
2019-06-27 21:24 ` Thomas Gleixner
@ 2019-07-02 3:57 ` Boris Ostrovsky
0 siblings, 0 replies; 4+ messages in thread
From: Boris Ostrovsky @ 2019-07-02 3:57 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Zhenzhong Duan, linux-kernel, Waiman Long, Peter Zijlstra (Intel),
Ingo Molnar, Borislav Petkov, Juergen Gross, Stefano Stabellini,
Dou Liyang
On Thu, Jun 27, 2019 at 11:24:41PM +0200, Thomas Gleixner wrote:
> On Wed, 26 Jun 2019, Zhenzhong Duan wrote:
>
> > This reverts commit ca5d376e17072c1b60c3fee66f3be58ef018952d.
> >
> > Commit 8990cac6e5ea ("x86/jump_label: Initialize static branching
> > early") adds jump_label_init() call in setup_arch() to make static
> > keys initialized early, so we could use the original simpler code
> > again.
> >
> > Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> > Cc: Waiman Long <longman@redhat.com>
> > Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Borislav Petkov <bp@alien8.de>
> > Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>
> Boris,
>
> want you to pick that up or should I?
>
> In case you take it:
>
> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
We will take it via Xen tree, thanks.
-boris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"
2019-06-26 8:57 [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized" Zhenzhong Duan
2019-06-27 21:24 ` Thomas Gleixner
@ 2019-07-10 12:08 ` Juergen Gross
1 sibling, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2019-07-10 12:08 UTC (permalink / raw)
To: Zhenzhong Duan, linux-kernel
Cc: Waiman Long, Peter Zijlstra (Intel),
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Boris Ostrovsky,
Stefano Stabellini, Dou Liyang
On 26.06.19 10:57, Zhenzhong Duan wrote:
> This reverts commit ca5d376e17072c1b60c3fee66f3be58ef018952d.
>
> Commit 8990cac6e5ea ("x86/jump_label: Initialize static branching
> early") adds jump_label_init() call in setup_arch() to make static
> keys initialized early, so we could use the original simpler code
> again.
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Applied to xen/tip.git for-linus-5.3
Juergen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-10 12:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 8:57 [PATCH RESEND] Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized" Zhenzhong Duan
2019-06-27 21:24 ` Thomas Gleixner
2019-07-02 3:57 ` Boris Ostrovsky
2019-07-10 12:08 ` Juergen Gross
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).