]> asedeno.scripts.mit.edu Git - linux.git/commit
x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized
authorDou Liyang <douly.fnst@cn.fujitsu.com>
Sat, 28 Oct 2017 06:06:44 +0000 (14:06 +0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Oct 2017 08:17:29 +0000 (09:17 +0100)
commitca5d376e17072c1b60c3fee66f3be58ef018952d
tree9e955494aebbbdacb6d27b69838b67341813be97
parente319e1fbd9d42420ab6eec0bfd75eb9ad7ca63b1
x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized

Commit:

  9043442b43b1 ("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: Juergen Gross <jgross@suse.com>
Reported-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Thomas 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: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/smpboot.c
arch/x86/xen/spinlock.c