From nobody Mon Feb 9 10:33:22 2026 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; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1662125784342743.1831508987717; Fri, 2 Sep 2022 06:36:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.397708.638368 (Exim 4.92) (envelope-from ) id 1oU6q2-0000vR-RC; Fri, 02 Sep 2022 13:36:02 +0000 Received: by outflank-mailman (output) from mailman id 397708.638368; Fri, 02 Sep 2022 13:36:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oU6q2-0000vK-Nb; Fri, 02 Sep 2022 13:36:02 +0000 Received: by outflank-mailman (input) for mailman id 397708; Fri, 02 Sep 2022 13:36:01 +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 1oU6q1-0008PC-Du for xen-devel@lists.xenproject.org; Fri, 02 Sep 2022 13:36:01 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 2e5e0a77-2ac4-11ed-934f-f50d60e1c1bd; Fri, 02 Sep 2022 15:36:00 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DB5C0ED1; Fri, 2 Sep 2022 06:36:05 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 796933F766; Fri, 2 Sep 2022 06:35:58 -0700 (PDT) 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: 2e5e0a77-2ac4-11ed-934f-f50d60e1c1bd From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Jean-Philippe Brucker , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Robin Murphy , Will Deacon Subject: [PATCH v2 02/10] xen/arm: smmuv3: Fix endianness annotations Date: Fri, 2 Sep 2022 14:34:54 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1662125785500100001 Content-Type: text/plain; charset="utf-8" From: Jean-Philippe Brucker Backport Linux commit 376cdf66f624. This is the clean backport without any changes. When building with C=3D1, sparse reports some issues regarding endianness annotations: arm-smmu-v3.c:221:26: warning: cast to restricted __le64 arm-smmu-v3.c:221:24: warning: incorrect type in assignment (different base= types) arm-smmu-v3.c:221:24: expected restricted __le64 [usertype] arm-smmu-v3.c:221:24: got unsigned long long [usertype] arm-smmu-v3.c:229:20: warning: incorrect type in argument 1 (different base= types) arm-smmu-v3.c:229:20: expected restricted __le64 [usertype] *[assigned] = dst arm-smmu-v3.c:229:20: got unsigned long long [usertype] *ent arm-smmu-v3.c:229:25: warning: incorrect type in argument 2 (different base= types) arm-smmu-v3.c:229:25: expected unsigned long long [usertype] *[assigned]= src arm-smmu-v3.c:229:25: got restricted __le64 [usertype] * arm-smmu-v3.c:396:20: warning: incorrect type in argument 1 (different base= types) arm-smmu-v3.c:396:20: expected restricted __le64 [usertype] *[assigned] = dst arm-smmu-v3.c:396:20: got unsigned long long * arm-smmu-v3.c:396:25: warning: incorrect type in argument 2 (different base= types) arm-smmu-v3.c:396:25: expected unsigned long long [usertype] *[assigned]= src arm-smmu-v3.c:396:25: got restricted __le64 [usertype] * arm-smmu-v3.c:1349:32: warning: invalid assignment: |=3D arm-smmu-v3.c:1349:32: left side has type restricted __le64 arm-smmu-v3.c:1349:32: right side has type unsigned long arm-smmu-v3.c:1396:53: warning: incorrect type in argument 3 (different bas= e types) arm-smmu-v3.c:1396:53: expected restricted __le64 [usertype] *dst arm-smmu-v3.c:1396:53: got unsigned long long [usertype] *strtab arm-smmu-v3.c:1424:39: warning: incorrect type in argument 1 (different bas= e types) arm-smmu-v3.c:1424:39: expected unsigned long long [usertype] *[assigned= ] strtab arm-smmu-v3.c:1424:39: got restricted __le64 [usertype] *l2ptr While harmless, they are incorrect and could hide actual errors during development. Fix them. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200918141856.629722-1-jean-philippe@linar= o.org Signed-off-by: Will Deacon Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 37= 6cdf66f624 Signed-off-by: Rahul Singh --- Changes in v2: - fix commit msg --- 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 340609264d..64d39bb4d3 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1037,7 +1037,7 @@ static int queue_insert_raw(struct arm_smmu_queue *q,= u64 *ent) return 0; } =20 -static void queue_read(__le64 *dst, u64 *src, size_t n_dwords) +static void queue_read(u64 *dst, __le64 *src, size_t n_dwords) { int i; =20 @@ -1436,7 +1436,7 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu= _master *master, u32 sid, arm_smmu_cmdq_issue_cmd(smmu, &prefetch_cmd); } =20 -static void arm_smmu_init_bypass_stes(u64 *strtab, unsigned int nent) +static void arm_smmu_init_bypass_stes(__le64 *strtab, unsigned int nent) { unsigned int i; =20 --=20 2.25.1