mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xen: Rename xenmem_reservation_increase to xenmem_populate_physmap
@ 2025-07-25 10:12 Teddy Astie
  2025-07-28  5:50 ` Jürgen Groß
  0 siblings, 1 reply; 2+ messages in thread
From: Teddy Astie @ 2025-07-25 10:12 UTC (permalink / raw)
  To: xen-devel, linux-kernel
  Cc: Teddy Astie, Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko

xenmem_reservation_increase currently calls XENMEM_populate_physmap.
Rename the function to avoid confusion with XENMEM_increase_reservation.

Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
---
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
---
 drivers/xen/balloon.c         | 2 +-
 drivers/xen/grant-table.c     | 2 +-
 drivers/xen/mem-reservation.c | 4 ++--
 include/xen/mem-reservation.h | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 2de37dcd7556..ac52dfd03be4 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -407,7 +407,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages)
 		page = balloon_next_page(page);
 	}
 
-	rc = xenmem_reservation_increase(nr_pages, frame_list);
+	rc = xenmem_populate_physmap(nr_pages, frame_list);
 	if (rc <= 0)
 		return BP_EAGAIN;
 
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 04a6b470b15d..e1a5041b4b8a 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1125,7 +1125,7 @@ int gnttab_dma_free_pages(struct gnttab_dma_alloc_args *args)
 	for (i = 0; i < args->nr_pages; i++)
 		args->frames[i] = page_to_xen_pfn(args->pages[i]);
 
-	ret = xenmem_reservation_increase(args->nr_pages, args->frames);
+	ret = xenmem_populate_physmap(args->nr_pages, args->frames);
 	if (ret != args->nr_pages) {
 		pr_debug("Failed to increase reservation for DMA buffer\n");
 		ret = -EFAULT;
diff --git a/drivers/xen/mem-reservation.c b/drivers/xen/mem-reservation.c
index 24648836e0d4..332eab71e977 100644
--- a/drivers/xen/mem-reservation.c
+++ b/drivers/xen/mem-reservation.c
@@ -83,7 +83,7 @@ EXPORT_SYMBOL_GPL(__xenmem_reservation_va_mapping_reset);
 #endif /* CONFIG_XEN_HAVE_PVMMU */
 
 /* @frames is an array of PFNs */
-int xenmem_reservation_increase(int count, xen_pfn_t *frames)
+int xenmem_populate_physmap(int count, xen_pfn_t *frames)
 {
 	struct xen_memory_reservation reservation = {
 		.address_bits = 0,
@@ -96,7 +96,7 @@ int xenmem_reservation_increase(int count, xen_pfn_t *frames)
 	reservation.nr_extents = count;
 	return HYPERVISOR_memory_op(XENMEM_populate_physmap, &reservation);
 }
-EXPORT_SYMBOL_GPL(xenmem_reservation_increase);
+EXPORT_SYMBOL_GPL(xenmem_populate_physmap);
 
 /* @frames is an array of GFNs */
 int xenmem_reservation_decrease(int count, xen_pfn_t *frames)
diff --git a/include/xen/mem-reservation.h b/include/xen/mem-reservation.h
index a2ab516fcd2c..e2b78a517cd1 100644
--- a/include/xen/mem-reservation.h
+++ b/include/xen/mem-reservation.h
@@ -53,7 +53,7 @@ static inline void xenmem_reservation_va_mapping_reset(unsigned long count,
 #endif
 }
 
-int xenmem_reservation_increase(int count, xen_pfn_t *frames);
+int xenmem_populate_physmap(int count, xen_pfn_t *frames);
 
 int xenmem_reservation_decrease(int count, xen_pfn_t *frames);
 
-- 
2.50.1



Teddy Astie | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen: Rename xenmem_reservation_increase to xenmem_populate_physmap
  2025-07-25 10:12 [PATCH] xen: Rename xenmem_reservation_increase to xenmem_populate_physmap Teddy Astie
@ 2025-07-28  5:50 ` Jürgen Groß
  0 siblings, 0 replies; 2+ messages in thread
From: Jürgen Groß @ 2025-07-28  5:50 UTC (permalink / raw)
  To: Teddy Astie, xen-devel, linux-kernel
  Cc: Stefano Stabellini, Oleksandr Tyshchenko


[-- Attachment #1.1.1: Type: text/plain, Size: 551 bytes --]

On 25.07.25 12:12, Teddy Astie wrote:
> xenmem_reservation_increase currently calls XENMEM_populate_physmap.
> Rename the function to avoid confusion with XENMEM_increase_reservation.

Hmm, I'm not convinced this is a good move.

xenmem_reservation_increase() has the counterpart xenmem_reservation_decrease(),
which shouldn't change its name.

So for the caller the naming is consistent. It is just the implementation which
is using a different hypercall. IMO such a detail should not be propagated to
higher logical levels.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-28  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-25 10:12 [PATCH] xen: Rename xenmem_reservation_increase to xenmem_populate_physmap Teddy Astie
2025-07-28  5:50 ` Jürgen Groß

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®