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

[XEN v6 08/12] xen: dt: Replace u64 with uint64_t as the callback function parameters for dt_for_each_range()


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Fri, 28 Apr 2023 18:55:39 +0100
  • 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=YOm2SpQiMUEOdheU2722eg0DN0nkyL2aqaeiPOs0j1M=; b=PFU3zbn4b2Z7u47mU7vqTKQxNb+/E1YpQcr8BrMnJo1u4PZKfAQGS1BQZa/wJ2vAt41OTkLjpdmiKKRZjZvLUSYLtylUjsi0p9LGIH/AjLa60YkRGV34ZTTk/fCych3TbuTU8AI51GXw1ZlFP6OZJbuQ37Q+X05RuvQoBQ2T2VX1ZLOwDCJfWPNvh6bNwjI/TjBGlsyCAnhW/R2vnbjvTvFgC3KR1d+4YS/yd2aTVQMPbACY93YUAFobHSRjhRnFrQxUZRTXUYRIldr1dXsBXFAPG3+Khq/lhU1irqvgj9YgawNaIbQvQGq5HDZU0coSLMuhEi8eGyu2QF+gWBl2og==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HBXlB1ZG6/vmMhaoU+FTj7J3FLddgv8NMNmGzN+5zsBrlXJskBWgla0qsKCXzXKQb3jeFfJl3RJ2EVZnWjV5UP16frOlDMLlkhtJRHmKm37TDsfulB9eGeqUkntWvCQ308UhlqxXRCRgLmf/us2OF8pgbB4rklum8PDXC7ZEmYQCMgMjq0wlWV5n2Z/iuSgXIp0xATKc4ojRTwSGjaaOPXG0ocrVWrZLubX/L7t3dLDKGqyZKpNzlR+9Mt6aW1DD8ZRjKmEDYb7vVUR4EGtaLATJ2Wh2Fpe+FdWBcuVR8Hu7Av40Z4AgNIx+YzNAOrxUYbdr2H7sgME1BFPYKbs/DA==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <george.dunlap@xxxxxxxxxx>, <jbeulich@xxxxxxxx>, <wl@xxxxxxx>, <rahul.singh@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Fri, 28 Apr 2023 17:59:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

In the callback functions invoked by dt_for_each_range() ie handle_pci_range(),
map_range_to_domain(), 'u64' should be replaced with 'uint64_t' as the data type
for the parameters. Also dt_for_each_range() invokes the callback functions with
'uint64_t' arguments.

There is another callback function ie is_bar_valid() which uses 'paddr_t'
instead of 'u64' or 'uint64_t'. We will change it in the subsequent commit.

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

v1-v5 - New patch introduced in v6.

 xen/arch/arm/domain_build.c      | 4 ++--
 xen/arch/arm/include/asm/setup.h | 2 +-
 xen/common/device_tree.c         | 4 ++--
 xen/include/xen/device_tree.h    | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 1c558fca0c..9865340eac 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1637,7 +1637,7 @@ out:
 }
 
 static int __init handle_pci_range(const struct dt_device_node *dev,
-                                   u64 addr, u64 len, void *data)
+                                   uint64_t addr, uint64_t len, void *data)
 {
     struct rangeset *mem_holes = data;
     paddr_t start, end;
@@ -2331,7 +2331,7 @@ static int __init map_dt_irq_to_domain(const struct 
dt_device_node *dev,
 }
 
 int __init map_range_to_domain(const struct dt_device_node *dev,
-                               u64 addr, u64 len, void *data)
+                               uint64_t addr, uint64_t len, void *data)
 {
     struct map_range_data *mr_data = data;
     struct domain *d = mr_data->d;
diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.h
index 47ce565d87..fe17cb0a4a 100644
--- a/xen/arch/arm/include/asm/setup.h
+++ b/xen/arch/arm/include/asm/setup.h
@@ -166,7 +166,7 @@ u32 device_tree_get_u32(const void *fdt, int node,
                         const char *prop_name, u32 dflt);
 
 int map_range_to_domain(const struct dt_device_node *dev,
-                        u64 addr, u64 len, void *data);
+                        uint64_t addr, uint64_t len, void *data);
 
 extern DEFINE_BOOT_PAGE_TABLE(boot_pgtable);
 
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 2163cf26d0..ab5f8df66c 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -997,7 +997,7 @@ int dt_device_get_paddr(const struct dt_device_node *dev, 
unsigned int index,
 
 int dt_for_each_range(const struct dt_device_node *dev,
                       int (*cb)(const struct dt_device_node *,
-                                u64 addr, u64 length,
+                                uint64_t addr, uint64_t length,
                                 void *),
                       void *data)
 {
@@ -1060,7 +1060,7 @@ int dt_for_each_range(const struct dt_device_node *dev,
 
     for ( ; rlen >= rone; rlen -= rone, ranges += rone )
     {
-        u64 a, s;
+        uint64_t a, s;
         int ret;
 
         memcpy(addr, ranges + na, 4 * pna);
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
index ce25b89c4b..b3888c1b96 100644
--- a/xen/include/xen/device_tree.h
+++ b/xen/include/xen/device_tree.h
@@ -681,7 +681,7 @@ int dt_for_each_irq_map(const struct dt_device_node *dev,
  */
 int dt_for_each_range(const struct dt_device_node *dev,
                       int (*cb)(const struct dt_device_node *,
-                                u64 addr, u64 length,
+                                uint64_t addr, uint64_t length,
                                 void *),
                       void *data);
 
-- 
2.17.1




 


Rackspace

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