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

[PATCH v2 1/5] xen/arm: Rename assign_static_memory_11() for consistency


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Fri, 8 Mar 2024 09:54:31 +0800
  • 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 (0)
  • 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=t+i1Nrwfs3RtzHQxrkA9Q/UxYobRSCipIPuuOohcu4M=; b=OqD7j2+pBbQKSJemR7k5d7fNhk4BHfbtJzX39H/LLWeERTWwYpeuN7LASrzZN+IdjSj1/nvIA0ySHSdHYXP0+WGHixnemoakFkbkKRSaktPC3yM3lYrZTMGc+uIS9flWHv+ZLzHxlBQxHsO+Vt9XjvMZN4dHanld0g1gyxYYGopmT2xAB1bFaoXMQXBUOH7UR3smiDB2aV7moQfTAwWlMhdD0reDlD3z6m7NJpgTtv845DXKxvSBwXJwaBJre035ElDMxu/AXr3vzUIZ2zJ7kSFxB2g5gKvFLXfD2zEf0Z8Awe3XU9STeL80NFaBbVUenD1q4Zie8FVjO3Xte5AO+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LrbOO0R3HbwVD8i17/u6NyTVrytsLJlqwJqo9h12AcfNq210pVfNaP9fTiTF2sGm/MJJVaSMw7uQpdG/al5Zt84NjgKwsHD0DeIRoPx7KBuhhzXVZ0fysQFwRmqHHd7R9Dhv0FYeVgrOxNwiKyBntTHx1iPZhU1JYvotco/WWwje0Iv46jk9xiYVXLHR7Ga7qjO42cbnUCiQpegOVkw6B2PKHz9MLTbSBJvXXVrSW8NWWjm5xg25S2QegpXK0b4Q42M37regoxg2jJ6GbGierOdqJ9eZfPrCC9DdDEo8xQ7ZqELEK87X5xhNzsfrr1fW027gCzxP6f36HOX0EBg51A==
  • Cc: Henry Wang <xin.wang2@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 08 Mar 2024 01:55:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Currently on Arm there are 4 functions to allocate memory as domain
RAM at boot time for different types of domains:
(1) allocate_memory(): To allocate memory for Dom0less DomUs that
    do not use static memory.
(2) allocate_static_memory(): To allocate memory for Dom0less DomUs
    that use static memory.
(3) allocate_memory_11(): To allocate memory for Dom0.
(4) assign_static_memory_11(): To allocate memory for Dom0less DomUs
    that use static memory and directmapped.

To keep consistency between the names and the in-code comment on top
of the functions, rename assign_static_memory_11() to
allocate_static_memory_11(). No functional change intended.

Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
---
v2:
- New patch
---
 xen/arch/arm/dom0less-build.c            | 2 +-
 xen/arch/arm/include/asm/static-memory.h | 8 ++++----
 xen/arch/arm/static-memory.c             | 5 +++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c
index fb63ec6fd1..1e1c8d83ae 100644
--- a/xen/arch/arm/dom0less-build.c
+++ b/xen/arch/arm/dom0less-build.c
@@ -806,7 +806,7 @@ static int __init construct_domU(struct domain *d,
     else if ( !is_domain_direct_mapped(d) )
         allocate_static_memory(d, &kinfo, node);
     else
-        assign_static_memory_11(d, &kinfo, node);
+        allocate_static_memory_11(d, &kinfo, node);
 
     rc = process_shm(d, &kinfo, node);
     if ( rc < 0 )
diff --git a/xen/arch/arm/include/asm/static-memory.h 
b/xen/arch/arm/include/asm/static-memory.h
index 3e3efd70c3..667e6d3804 100644
--- a/xen/arch/arm/include/asm/static-memory.h
+++ b/xen/arch/arm/include/asm/static-memory.h
@@ -9,7 +9,7 @@
 
 void allocate_static_memory(struct domain *d, struct kernel_info *kinfo,
                             const struct dt_device_node *node);
-void assign_static_memory_11(struct domain *d, struct kernel_info *kinfo,
+void allocate_static_memory_11(struct domain *d, struct kernel_info *kinfo,
                              const struct dt_device_node *node);
 void init_staticmem_pages(void);
 
@@ -22,9 +22,9 @@ static inline void allocate_static_memory(struct domain *d,
     ASSERT_UNREACHABLE();
 }
 
-static inline void assign_static_memory_11(struct domain *d,
-                                           struct kernel_info *kinfo,
-                                           const struct dt_device_node *node)
+static inline void allocate_static_memory_11(struct domain *d,
+                                             struct kernel_info *kinfo,
+                                             const struct dt_device_node *node)
 {
     ASSERT_UNREACHABLE();
 }
diff --git a/xen/arch/arm/static-memory.c b/xen/arch/arm/static-memory.c
index cffbab7241..20333a7f94 100644
--- a/xen/arch/arm/static-memory.c
+++ b/xen/arch/arm/static-memory.c
@@ -187,8 +187,9 @@ void __init allocate_static_memory(struct domain *d, struct 
kernel_info *kinfo,
  * The static memory will be directly mapped in the guest(Guest Physical
  * Address == Physical Address).
  */
-void __init assign_static_memory_11(struct domain *d, struct kernel_info 
*kinfo,
-                                    const struct dt_device_node *node)
+void __init allocate_static_memory_11(struct domain *d,
+                                      struct kernel_info *kinfo,
+                                      const struct dt_device_node *node)
 {
     u32 addr_cells, size_cells, reg_cells;
     unsigned int nr_banks, bank = 0;
-- 
2.34.1




 


Rackspace

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