From nobody Mon Feb 9 01:16:15 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1565330935; cv=none; d=zoho.com; s=zohoarc; b=CjipJC+AX3gH+XPC4ccIBocOWkfztMTZQBUNTeDrZsFKhM5F1tOxFMogY334jQvpTVCIY73HsD1Rx0vl54JvPkvw1BXtyAWStqakr8tjhIlag75LdZDuvVGEoM/dp2BK8HtzRvfhqveT4dh28SOURjIOGY7sWqO8Jw/hTPbTQP4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565330935; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=el0PcciL+bvJIvZhzsUiecEdkwpL7nnOdpvxH8FJrFA=; b=nb5wLJilIpJ+AgeL1dEPJhoGBZ3wB9ifp6/ZJmgUDDreaOxB0/0UIB2Naxhj/AnnI8eBkwJpEDXZGKZGuUYxiasrxSeN5a1xAZxa4XPBW+G0y5VFvd1irLe9lr9AIUCiGoWCuZF3ejvIr7kgHBjYfTohFbSK8c5Evvzdy4s0eMc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1565330935354813.5770697492042; Thu, 8 Aug 2019 23:08:55 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvy4B-0006d2-HP; Fri, 09 Aug 2019 06:07:55 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvy4A-0006bo-23 for xen-devel@lists.xenproject.org; Fri, 09 Aug 2019 06:07:54 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 0580b8e7-ba6c-11e9-8980-bc764e045a96; Fri, 09 Aug 2019 06:07:53 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 05274AFBE; Fri, 9 Aug 2019 06:07:50 +0000 (UTC) X-Inumbo-ID: 0580b8e7-ba6c-11e9-8980-bc764e045a96 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Fri, 9 Aug 2019 08:07:44 +0200 Message-Id: <20190809060744.8985-6-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190809060744.8985-1-jgross@suse.com> References: <20190809060744.8985-1-jgross@suse.com> Subject: [Xen-devel] [PATCH v2 5/5] xen: modify several static locks to unique names X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" In order to have unique names when doing lock profiling several local locks "lock" need to be renamed. Signed-off-by: Juergen Gross --- xen/arch/x86/irq.c | 6 +++--- xen/arch/x86/time.c | 6 +++--- xen/common/keyhandler.c | 6 +++--- xen/common/perfc.c | 6 +++--- xen/common/trace.c | 6 +++--- xen/drivers/char/console.c | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 0ee33464d2..c348f9e6c9 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -867,14 +867,14 @@ void set_direct_apic_vector( void alloc_direct_apic_vector( uint8_t *vector, void (*handler)(struct cpu_user_regs *)) { - static DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(apic_alloc_lock); =20 - spin_lock(&lock); + spin_lock(&apic_alloc_lock); if (*vector =3D=3D 0) { *vector =3D alloc_hipriority_vector(); set_direct_apic_vector(*vector, handler); } - spin_unlock(&lock); + spin_unlock(&apic_alloc_lock); } =20 void do_IRQ(struct cpu_user_regs *regs) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index d8242295ef..9e8f3e65b1 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1426,9 +1426,9 @@ static void tsc_check_slave(void *unused) static void tsc_check_reliability(void) { unsigned int cpu =3D smp_processor_id(); - static DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(tsc_check_lock); =20 - spin_lock(&lock); + spin_lock(&tsc_check_lock); =20 tsc_check_count++; smp_call_function(tsc_check_slave, NULL, 0); @@ -1439,7 +1439,7 @@ static void tsc_check_reliability(void) while ( !cpumask_empty(&tsc_check_cpumask) ) cpu_relax(); =20 - spin_unlock(&lock); + spin_unlock(&tsc_check_lock); } =20 /* diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index c36baa4dff..6e4ff890db 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -371,9 +371,9 @@ static void read_clocks(unsigned char key) static u64 sumdif_stime =3D 0, maxdif_stime =3D 0; static u64 sumdif_cycles =3D 0, maxdif_cycles =3D 0; static u32 count =3D 0; - static DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(read_clocks_lock); =20 - spin_lock(&lock); + spin_lock(&read_clocks_lock); =20 smp_call_function(read_clocks_slave, NULL, 0); =20 @@ -408,7 +408,7 @@ static void read_clocks(unsigned char key) min_cycles =3D per_cpu(read_cycles_time, min_cycles_cpu); max_cycles =3D per_cpu(read_cycles_time, max_cycles_cpu); =20 - spin_unlock(&lock); + spin_unlock(&read_clocks_lock); =20 dif_stime =3D max_stime - min_stime; if ( dif_stime > maxdif_stime ) diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 3abe35892a..8a099fb0be 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -241,10 +241,10 @@ static int perfc_copy_info(XEN_GUEST_HANDLE_64(xen_sy= sctl_perfc_desc_t) desc, /* Dom0 control of perf counters */ int perfc_control(struct xen_sysctl_perfc_op *pc) { - static DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(perfc_control_lock); int rc; =20 - spin_lock(&lock); + spin_lock(&perfc_control_lock); =20 switch ( pc->cmd ) { @@ -262,7 +262,7 @@ int perfc_control(struct xen_sysctl_perfc_op *pc) break; } =20 - spin_unlock(&lock); + spin_unlock(&perfc_control_lock); =20 pc->nr_counters =3D NR_PERFCTRS; pc->nr_vals =3D perfc_nbr_vals; diff --git a/xen/common/trace.c b/xen/common/trace.c index d1ef81407b..a216bea00c 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -368,10 +368,10 @@ void __init init_trace_bufs(void) */ int tb_control(struct xen_sysctl_tbuf_op *tbc) { - static DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(tb_control_lock); int rc =3D 0; =20 - spin_lock(&lock); + spin_lock(&tb_control_lock); =20 switch ( tbc->cmd ) { @@ -432,7 +432,7 @@ int tb_control(struct xen_sysctl_tbuf_op *tbc) break; } =20 - spin_unlock(&lock); + spin_unlock(&tb_control_lock); =20 return rc; } diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 404d28a725..028900caa5 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -1165,7 +1165,7 @@ void panic(const char *fmt, ...) { va_list args; unsigned long flags; - static DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(panic_lock); static char buf[128]; =20 spin_debug_disable(); @@ -1173,7 +1173,7 @@ void panic(const char *fmt, ...) debugtrace_dump(); =20 /* Protects buf[] and ensure multi-line message prints atomically. */ - spin_lock_irqsave(&lock, flags); + spin_lock_irqsave(&panic_lock, flags); =20 va_start(args, fmt); (void)vsnprintf(buf, sizeof(buf), fmt, args); @@ -1193,7 +1193,7 @@ void panic(const char *fmt, ...) printk("Reboot in five seconds...\n"); #endif =20 - spin_unlock_irqrestore(&lock, flags); + spin_unlock_irqrestore(&panic_lock, flags); =20 debugger_trap_immediate(); =20 --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel