Skip to content
Commit ca5d376e authored by Dou Liyang's avatar Dou Liyang Committed by Ingo Molnar
Browse files

x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized

Commit:

  9043442b

 ("locking/paravirt: Use new static key for controlling call of virt_spin_lock()")

sets the static virt_spin_lock_key to a value before jump_label_init()
has been called, which will result in a WARN().

Reorder the initialization sequence:

 - Move the native_pv_lock_init() into native_smp_prepare_cpus()
 - set the value in xen_init_lock_cpu()

to avoid calling into the not yet initialized static keys subsystem.

Suggested-by: default avatarJuergen Gross <jgross@suse.com>
Reported-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDou Liyang <douly.fnst@cn.fujitsu.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: boris.ostrovsky@oracle.com
Cc: bp@suse.de
Cc: luto@kernel.org
Cc: vkuznets@redhat.com
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/1509170804-3813-1-git-send-email-douly.fnst@cn.fujitsu.com
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent e319e1fb
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