[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN v3 10/12] xen/Arm: GICv3: Use ULL instead of UL for 64bits


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Fri, 11 Nov 2022 14:17:37 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1x+Puzll95MEDtEeq/rqhbLsQp4Myk6gWMYulb4I/w8=; b=fxUK2fB5c29H4g3lFQjHvlHl1Qu5EveoTP7/RpeXZAnvprfXnw+Rf2CrmAcE/t0iIARnhG/O+r41mZhqQCKSD+73z2nFp+mrfDWNlebkFy5VLSG1Ja6T6PGE/wXwS07LvlbaV7SGi+z32+fZ9lK4zHws7YVJi2ktgli2jPupaht64A3mnSA2QklwXl9a2vC5snNCUqcZUgo0mLTZbtHOZ5YXnDu37P758CL3gvWq10ZOnEIY60s7IahqVcyYvyW5nWoh+Se5LEksOdGzMHxIsMjiMThOeqD5bvKNXRZTPvOYfhPskIC0MHpGWcOWTHnUsvlxomrieXX/4ZydY1Lw6Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H3mAgt6KPzjmOdXw8z4wOzoKbz+pd/alfqtEyBLF/n4q2MCRbAzg6Zu44rKU7cX9WpyquVR41higJ2Qdz83qdOy9ZEIr8krpBF0XsuXqvRW1GT/iJDeIh6eJFHp7Bhh99vvRMZW3vtldU52P10fBHTHsK0Pgqeajg24pLC4Nu2XjY43RsvTlDh21UsBxrYsXAxpij9jhDhreeT2sc6GdPLEgAABLjvQY5qgHWOmr//v3i9orKuFS66OPvKFj0z1pjsbep/U8ntQWXqFX/pqSMPXWmjP4b/ZX0jC4IKhmch7KDxdxd3EVN4Du6Wy94V20QbZvfCgIPH3Ey3fTdmgLAw==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefanos@xxxxxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <michal.orzel@xxxxxxx>, <jgrall@xxxxxxxxxx>, <burzalodowa@xxxxxxxxx>, "Ayan Kumar Halder" <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Fri, 11 Nov 2022 14:18:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

"unsigned long long" is defined as 64 bits on AArch64 and AArch32
Thus, one should this instead of "unsigned long" which is 32 bits
on AArch32.

Also use 'PRIx64' instead of 'lx' or 'llx' to print uint64_t.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---

Changed from :-
v1 - 1. Replace PRIu64 with PRIx64 so that the values are printed in hex as
desired.
2. Use ULL in GITS_BASER_RO_MASK as MMIO registers are always unsigned.

v2 - 1. Removed changes to ITS and LPI as they are not supported for AArch32.

 xen/arch/arm/gic-v3.c                  | 4 ++--
 xen/arch/arm/include/asm/gic_v3_defs.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index 4722bb4daf..6457e7033c 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -417,12 +417,12 @@ static void gicv3_dump_state(const struct vcpu *v)
     if ( v == current )
     {
         for ( i = 0; i < gicv3_info.nr_lrs; i++ )
-            printk("   HW_LR[%d]=%llx\n", i, gicv3_ich_read_lr(i));
+            printk("   HW_LR[%d]=%" PRIx64 "\n", i, gicv3_ich_read_lr(i));
     }
     else
     {
         for ( i = 0; i < gicv3_info.nr_lrs; i++ )
-            printk("   VCPU_LR[%d]=%llx\n", i, v->arch.gic.v3.lr[i]);
+            printk("   VCPU_LR[%d]=%" PRIx64 "\n", i, v->arch.gic.v3.lr[i]);
     }
 }
 
diff --git a/xen/arch/arm/include/asm/gic_v3_defs.h 
b/xen/arch/arm/include/asm/gic_v3_defs.h
index 743ebb20fd..227533868f 100644
--- a/xen/arch/arm/include/asm/gic_v3_defs.h
+++ b/xen/arch/arm/include/asm/gic_v3_defs.h
@@ -195,7 +195,7 @@
 
 #define ICH_SGI_IRQMODE_SHIFT        40
 #define ICH_SGI_IRQMODE_MASK         0x1
-#define ICH_SGI_TARGET_OTHERS        1UL
+#define ICH_SGI_TARGET_OTHERS        1ULL
 #define ICH_SGI_TARGET_LIST          0
 #define ICH_SGI_IRQ_SHIFT            24
 #define ICH_SGI_IRQ_MASK             0xf
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.