* [PATCH] domain: domlist_update_lock can be static
@ 2026-06-29 14:05 Jan Beulich
2026-06-29 14:43 ` Andrew Cooper
2026-06-30 7:14 ` Oleksii Kurochko
0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2026-06-29 14:05 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Julien Grall, Stefano Stabellini, Anthony PERARD,
Michal Orzel, Roger Pau Monné
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 <jbeulich@suse.com>
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -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
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -697,8 +697,10 @@ static inline unsigned int domain_tot_pa
return 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];
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] domain: domlist_update_lock can be static
2026-06-29 14:05 [PATCH] domain: domlist_update_lock can be static Jan Beulich
@ 2026-06-29 14:43 ` Andrew Cooper
2026-06-30 7:14 ` Oleksii Kurochko
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2026-06-29 14:43 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Julien Grall, Stefano Stabellini, Anthony PERARD,
Michal Orzel, Roger Pau Monné
On 29/06/2026 3:05 pm, Jan Beulich wrote:
> 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 <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] domain: domlist_update_lock can be static
2026-06-29 14:05 [PATCH] domain: domlist_update_lock can be static Jan Beulich
2026-06-29 14:43 ` Andrew Cooper
@ 2026-06-30 7:14 ` Oleksii Kurochko
1 sibling, 0 replies; 3+ messages in thread
From: Oleksii Kurochko @ 2026-06-30 7:14 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Julien Grall, Stefano Stabellini, Anthony PERARD,
Michal Orzel, Roger Pau Monné
On 6/29/26 4:05 PM, Jan Beulich wrote:
> 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 <jbeulich@suse.com>
>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
~ Oleksii
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-30 7:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29 14:05 [PATCH] domain: domlist_update_lock can be static Jan Beulich
2026-06-29 14:43 ` Andrew Cooper
2026-06-30 7:14 ` Oleksii Kurochko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.