From nobody Mon May 13 03:03:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) 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 1687168620089339.0484340552397; Mon, 19 Jun 2023 02:57:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.550921.860149 (Exim 4.92) (envelope-from ) id 1qBBcm-0006m1-O0; Mon, 19 Jun 2023 09:56:40 +0000 Received: by outflank-mailman (output) from mailman id 550921.860149; Mon, 19 Jun 2023 09:56:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBBcm-0006lu-L2; Mon, 19 Jun 2023 09:56:40 +0000 Received: by outflank-mailman (input) for mailman id 550921; Mon, 19 Jun 2023 09:56:40 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBBcm-0006ke-6J for xen-devel@lists.xenproject.org; Mon, 19 Jun 2023 09:56:40 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9514e56d-0e87-11ee-8611-37d641c3527e; Mon, 19 Jun 2023 11:56:38 +0200 (CEST) Received: from nico.bugseng.com (unknown [151.44.138.43]) by support.bugseng.com (Postfix) with ESMTPSA id A2DAF4EE0C8D; Mon, 19 Jun 2023 11:56:36 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9514e56d-0e87-11ee-8611-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [XEN PATCH v2 1/3] xen/arch/arm: fix violations of MISRA C:2012 Rule 3.1 Date: Mon, 19 Jun 2023 11:56:11 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1687168622168100001 Content-Type: text/plain; charset="utf-8" In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a few occurrences of nested '//' character sequences inside C-style comment blocks, which violate Rule 3.1. The patch aims to resolve those by removing the nested comments. Signed-off-by: Nicola Vetrini --- xen/arch/arm/include/asm/arm32/flushtlb.h | 8 ++++---- xen/arch/arm/include/asm/arm64/flushtlb.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/include/asm/arm32/flushtlb.h b/xen/arch/arm/inclu= de/asm/arm32/flushtlb.h index 22ee3b317b..bcbeac590b 100644 --- a/xen/arch/arm/include/asm/arm32/flushtlb.h +++ b/xen/arch/arm/include/asm/arm32/flushtlb.h @@ -4,10 +4,10 @@ /* * Every invalidation operation use the following patterns: * - * DSB ISHST // Ensure prior page-tables updates have completed - * TLBI... // Invalidate the TLB - * DSB ISH // Ensure the TLB invalidation has completed - * ISB // See explanation below + * DSB ISHST Ensure prior page-tables updates have completed + * TLBI... Invalidate the TLB + * DSB ISH Ensure the TLB invalidation has completed + * ISB See explanation below * * For Xen page-tables the ISB will discard any instructions fetched * from the old mappings. diff --git a/xen/arch/arm/include/asm/arm64/flushtlb.h b/xen/arch/arm/inclu= de/asm/arm64/flushtlb.h index 56c6fc763b..6066a2d703 100644 --- a/xen/arch/arm/include/asm/arm64/flushtlb.h +++ b/xen/arch/arm/include/asm/arm64/flushtlb.h @@ -4,10 +4,10 @@ /* * Every invalidation operation use the following patterns: * - * DSB ISHST // Ensure prior page-tables updates have completed - * TLBI... // Invalidate the TLB - * DSB ISH // Ensure the TLB invalidation has completed - * ISB // See explanation below + * DSB ISHST Ensure prior page-tables updates have completed + * TLBI... Invalidate the TLB + * DSB ISH Ensure the TLB invalidation has completed + * ISB See explanation below * * ARM64_WORKAROUND_REPEAT_TLBI: * Modification of the translation table for a virtual address might lead = to --=20 2.34.1 From nobody Mon May 13 03:03:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) 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 1687168620635823.3685790990054; Mon, 19 Jun 2023 02:57:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.550923.860160 (Exim 4.92) (envelope-from ) id 1qBBct-00075L-0C; Mon, 19 Jun 2023 09:56:47 +0000 Received: by outflank-mailman (output) from mailman id 550923.860160; Mon, 19 Jun 2023 09:56:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBBcs-00075C-SD; Mon, 19 Jun 2023 09:56:46 +0000 Received: by outflank-mailman (input) for mailman id 550923; Mon, 19 Jun 2023 09:56:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBBcr-0006ke-Hp for xen-devel@lists.xenproject.org; Mon, 19 Jun 2023 09:56:45 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 98516d38-0e87-11ee-8611-37d641c3527e; Mon, 19 Jun 2023 11:56:43 +0200 (CEST) Received: from nico.bugseng.com (unknown [151.44.138.43]) by support.bugseng.com (Postfix) with ESMTPSA id 8CE034EE0741; Mon, 19 Jun 2023 11:56:41 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 98516d38-0e87-11ee-8611-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Bertrand Marquis , Rahul Singh , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v2 2/3] xen/drivers/passthrough/arm/smmu-v3.c: fix violations of MISRA C:2012 Rule 3.1 Date: Mon, 19 Jun 2023 11:56:12 +0200 Message-Id: <3f8d720c09d603edcc608b1b73423c35ea8f6e3f.1687167502.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1687168622602100003 Content-Type: text/plain; charset="utf-8" In the file `xen/drivers/passthrough/arm/smmu-v3.c' there are a few occurre= nces of nested '//' character sequences inside C-style comment blocks, which vio= late Rule 3.1. The patch aims to resolve those by removing the nested comments. Signed-off-by: Nicola Vetrini --- xen/drivers/passthrough/arm/smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthroug= h/arm/smmu-v3.c index 720aa69ff2..f410863e10 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1047,10 +1047,10 @@ static int arm_smmu_atc_inv_domain(struct arm_smmu_= domain *smmu_domain, * before we read 'nr_ats_masters' in case of a concurrent call to * arm_smmu_enable_ats(): * - * // unmap() // arm_smmu_enable_ats() + * unmap() arm_smmu_enable_ats() * TLBI+SYNC atomic_inc(&nr_ats_masters); * smp_mb(); [...] - * atomic_read(&nr_ats_masters); pci_enable_ats() // writel() + * atomic_read(&nr_ats_masters); pci_enable_ats() (i.e. writel()) * * Ensures that we always see the incremented 'nr_ats_masters' count if * ATS was enabled at the PCI device before completion of the TLBI. --=20 2.34.1 From nobody Mon May 13 03:03:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) 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 1687168628102578.1784941455417; Mon, 19 Jun 2023 02:57:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.550924.860170 (Exim 4.92) (envelope-from ) id 1qBBcw-0007OG-9H; Mon, 19 Jun 2023 09:56:50 +0000 Received: by outflank-mailman (output) from mailman id 550924.860170; Mon, 19 Jun 2023 09:56:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBBcw-0007O4-3g; Mon, 19 Jun 2023 09:56:50 +0000 Received: by outflank-mailman (input) for mailman id 550924; Mon, 19 Jun 2023 09:56:49 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBBcv-0006UR-2H for xen-devel@lists.xenproject.org; Mon, 19 Jun 2023 09:56:49 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9b3da1dc-0e87-11ee-b234-6b7b168915f2; Mon, 19 Jun 2023 11:56:48 +0200 (CEST) Received: from nico.bugseng.com (unknown [151.44.138.43]) by support.bugseng.com (Postfix) with ESMTPSA id D895A4EE0C8C; Mon, 19 Jun 2023 11:56:45 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9b3da1dc-0e87-11ee-b234-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v2 3/3] xen: fix violations of MISRA C:2012 Rule 3.1 Date: Mon, 19 Jun 2023 11:56:13 +0200 Message-Id: <9c3c83c17cb3a4ee9cc1241cefc15840d23d107e.1687167502.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1687168629559100001 Content-Type: text/plain; charset="utf-8" In the files modified by this patch there are a few occurrences of nested '= //' character sequences inside C-style comment blocks, which violate Rule 3.1. The patch aims to resolve those by removing the nested comments. In the file `xen/common/xmalloc_tlsf.c' the comment has been deleted, following the suggestion of a review comment. In the file `xen/include/xen/atomic.h' the nested comment has been removed, since the code sample is already explained by the preceding comment. Signed-off-by: Nicola Vetrini --- xen/common/xmalloc_tlsf.c | 3 --- xen/include/xen/atomic.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c index 75bdf18c4e..4f9f60a39d 100644 --- a/xen/common/xmalloc_tlsf.c +++ b/xen/common/xmalloc_tlsf.c @@ -140,9 +140,6 @@ static inline void MAPPING_SEARCH(unsigned long *r, int= *fl, int *sl) *fl =3D flsl(*r) - 1; *sl =3D (*r >> (*fl - MAX_LOG2_SLI)) - MAX_SLI; *fl -=3D FLI_OFFSET; - /*if ((*fl -=3D FLI_OFFSET) < 0) // FL will be always >0! - *fl =3D *sl =3D 0; - */ *r &=3D ~t; } } diff --git a/xen/include/xen/atomic.h b/xen/include/xen/atomic.h index 529213ebbb..fa750a18ae 100644 --- a/xen/include/xen/atomic.h +++ b/xen/include/xen/atomic.h @@ -78,7 +78,7 @@ static inline void _atomic_set(atomic_t *v, int i); * int old =3D atomic_read(&v); * int new =3D old + 1; * if ( likely(old =3D=3D atomic_cmpxchg(&v, old, new)) ) - * break; // success! + * break; * } */ static inline int atomic_cmpxchg(atomic_t *v, int old, int new); --=20 2.34.1