domain: domlist_update_lock can be static
PATCH 1/1 domain: domlist_update_lock can be static
For a long time (if not forever) this lock has been referenced only from a single CU. Misra C:2012 rule 8.7 (which we didn't accept yet) wants us to have such identifiers non-external.
Signed-off-by Jan Beulich <[email protected]>
xen/common/domain.c +1 -1
@@ -58,7 +58,7 @@ bool opt_dom0_vcpus_pin;boolean_param ("dom0_vcpus_pin" , opt_dom0_vcpus_pin);/* Protect updates/reads (resp.) of domain_list and domain_hash. */ -DEFINE_SPINLOCK (domlist_update_lock); +static DEFINE_SPINLOCK (domlist_update_lock);DEFINE_RCU_READ_LOCK (domlist_read_lock);#define DOMAIN_HASH_SIZE 256
xen/include/xen/sched.h +4 -2
@@ -697,8 +697,10 @@ static inline unsigned int domain_tot_pareturn d->tot_pages - d->extra_pages; } -/* Protect updates/reads (resp.) of domain_list and domain_hash. */ -extern spinlock_t domlist_update_lock; +/* +* Protect updates/reads (resp.) of domain_list and domain_hash, together with +* domlist_update_lock. +*/ extern rcu_read_lock_t domlist_read_lock;extern struct vcpu *idle_vcpu[NR_CPUS ];
Quoted 5 lines · Jan Beulich
For a long time (if not forever) this lock has been referenced only from a single CU. Misra C:2012 rule 8.7 (which we didn't accept yet) wants us to have such identifiers non-external.
Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>
Quoted 6 lines · Jan Beulich
For a long time (if not forever) this lock has been referenced only from a single CU. Misra C:2012 rule 8.7 (which we didn't accept yet) wants us to have such identifiers non-external.
Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Oleksii Kurochko <[email protected]>
~ Oleksii