Skip to contentSkip to conversation

x86, locking/spinlocks: Remove paravirt_ticketlocks_enabled

PATCH In review Waiman Long 2 participants 3 messages Jan 12, 2017

Subsystems (8)
lore
Share & tools
lore

Waiman Long

author reviewer
#0 lore raw

PATCH 1/1 x86, locking/spinlocks: Remove paravirt_ticketlocks_enabled

This is a follow-up of commit cfd8983f03c7b2 ("x86, locking/spinlocks:
Remove ticket (spin)lock implementation"). The static_key structure paravirt_ticketlocks_enabled is now removed as it is no longer used.

A simple build and boot test was done to verify it.

---
 arch/x86/include/asm/spinlock.h      | 3 ---
 arch/x86/kernel/kvm.c                | 1 -
 arch/x86/kernel/paravirt-spinlocks.c | 3 ---
 arch/x86/xen/spinlock.c              | 1 -
 4 files changed, 8 deletions(-)
arch/x86/include/asm/spinlock.h +0 -3
index 921bea7..6d39190 100644
@@ -23,9 +23,6 @@
 /* How long a lock should spin before we consider blocking */
 #define SPIN_THRESHOLD	(1 << 15)
 
-extern struct static_key paravirt_ticketlocks_enabled;
-static __always_inline bool static_key_false(struct static_key *key);
-
 #include <asm/qspinlock.h>
 
 /*
arch/x86/kernel/kvm.c +0 -1
index 36bc664..6750fdc 100644
@@ -627,7 +627,6 @@ static __init int kvm_spinlock_init_jump(void)
 	if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT))
 		return 0;
 
-	static_key_slow_inc(&paravirt_ticketlocks_enabled);
 	printk(KERN_INFO "KVM setup paravirtual spinlock\n");
 
 	return 0;
arch/x86/kernel/paravirt-spinlocks.c +0 -3
index 6d4bf81..6259327 100644
@@ -42,6 +42,3 @@ struct pv_lock_ops pv_lock_ops = {
 #endif /* SMP */
 };
 EXPORT_SYMBOL(pv_lock_ops);
-
-struct static_key paravirt_ticketlocks_enabled = STATIC_KEY_INIT_FALSE;
-EXPORT_SYMBOL(paravirt_ticketlocks_enabled);
arch/x86/xen/spinlock.c +0 -1
index e8a9ea7..a822606 100644
@@ -155,7 +155,6 @@ static __init int xen_init_spinlocks_jump(void)
 	if (!xen_domain())
 		return 0;
 
-	static_key_slow_inc(&paravirt_ticketlocks_enabled);
 	return 0;
 }
 early_initcall(xen_init_spinlocks_jump);
Signature · 1 line
1.8.3.1
#1 lore raw

arch/x86/xen/spinlock.c static __init int xen_init_spinlocks_jump(void) · line 160

Quoted 13 lines
arch/x86/xen/spinlock.c +0 -1
index e8a9ea7..a822606 100644
@@ -155,7 +155,6 @@ static __init int xen_init_spinlocks_jump(void)
 	if (!xen_domain())
 		return 0;
 
-	static_key_slow_inc(&paravirt_ticketlocks_enabled);
 	return 0;
 }
 early_initcall(xen_init_spinlocks_jump);

Looks that with this change there is not much left of xen_init_spinlocks_jump() and so it can be removed.

-boris

#2 lore raw
In reply to Waiman Long

arch/x86/xen/spinlock.c static __init int xen_init_spinlocks_jump(void) · line 160

Quoted 13 lines
arch/x86/xen/spinlock.c +0 -1
index e8a9ea7..a822606 100644
@@ -155,7 +155,6 @@ static __init int xen_init_spinlocks_jump(void)
 	if (!xen_domain())
 		return 0;
 
-	static_key_slow_inc(&paravirt_ticketlocks_enabled);
 	return 0;
 }
 early_initcall(xen_init_spinlocks_jump);

Looks that with this change there is not much left of xen_init_spinlocks_jump() and so it can be removed.

-boris

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel