diff options
| author | Mukesh R <mrathor@linux.microsoft.com> | 2026-09-11 17:03:16 -0700 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2026-10-22 00:11:32 -0700 |
| commit | 28513249f2a97374947cce0ddf3003aeb407ccae (patch) | |
| tree | 00745219e2399fd8ddeb1edc41c478222edada97 | |
| parent | 70cd4623f3e5068a72c72791b96f2dcb4c991131 (diff) | |
mshv: Rename memory deposit memory functions to _old
Rename hv_call_deposit_pages() and hv_deposit_memory_node() to _old
to make reviewing the new functions much easier.
Signed-off-by: Mukesh R <mrathor@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
| -rw-r--r-- | drivers/hv/hv_proc.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/hv/hv_proc.c b/drivers/hv/hv_proc.c index 57b2c64197cb..57864bb5bcd8 100644 --- a/drivers/hv/hv_proc.c +++ b/drivers/hv/hv_proc.c @@ -13,10 +13,10 @@ * See struct hv_deposit_memory. The first u64 is partition ID, the rest * are GPAs. */ -#define HV_DEPOSIT_MAX (HV_HYP_PAGE_SIZE / sizeof(u64) - 1) +#define HV_DEPOSIT_MAX_OLD (HV_HYP_PAGE_SIZE / sizeof(u64) - 1) /* Deposits exact number of pages. Must be called with interrupts enabled. */ -int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages) +static int hv_call_deposit_pages_old(int node, u64 partition_id, u32 num_pages) { struct page **pages, *page; int *counts; @@ -29,7 +29,7 @@ int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages) struct hv_deposit_memory *input_page; unsigned long flags; - if (num_pages > HV_DEPOSIT_MAX) + if (num_pages > HV_DEPOSIT_MAX_OLD) return -E2BIG; if (!num_pages) return 0; @@ -40,7 +40,7 @@ int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages) return -ENOMEM; pages = page_address(page); - counts = kzalloc_objs(int, HV_DEPOSIT_MAX); + counts = kzalloc_objs(int, HV_DEPOSIT_MAX_OLD); if (!counts) { free_page((unsigned long)pages); return -ENOMEM; @@ -108,10 +108,14 @@ free_buf: kfree(counts); return ret; } + +int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages) +{ + return hv_call_deposit_pages_old(node, partition_id, num_pages); +} EXPORT_SYMBOL_GPL(hv_call_deposit_pages); -int hv_deposit_memory_node(int node, u64 partition_id, - u64 hv_status) +static int __maybe_unused hv_deposit_memory_node_old(int node, u64 partition_id, u64 hv_status) { u32 num_pages = 1; @@ -137,7 +141,12 @@ int hv_deposit_memory_node(int node, u64 partition_id, hv_status_err(hv_status, "Unexpected!\n"); return -ENOMEM; } - return hv_call_deposit_pages(node, partition_id, num_pages); + return hv_call_deposit_pages_old(node, partition_id, num_pages); +} + +int hv_deposit_memory_node(int node, u64 partition_id, u64 hv_status) +{ + return hv_deposit_memory_node_old(node, partition_id, hv_status); } EXPORT_SYMBOL_GPL(hv_deposit_memory_node); |
