From: longli@linuxonhyperv.com
To: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Long Li <longli@microsoft.com>
Subject: [Patch v3 5/5] Drivers: hv: Remove hv_alloc/free_* helpers
Date: Mon, 5 May 2025 17:56:37 -0700 [thread overview]
Message-ID: <1746492997-4599-6-git-send-email-longli@linuxonhyperv.com> (raw)
In-Reply-To: <1746492997-4599-1-git-send-email-longli@linuxonhyperv.com>
From: Long Li <longli@microsoft.com>
There are no users for those functions, remove them.
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/hv/hv_common.c | 39 ----------------------------------
include/asm-generic/mshyperv.h | 4 ----
2 files changed, 43 deletions(-)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index a5a6250b1a12..421376cea17e 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -105,45 +105,6 @@ void __init hv_common_free(void)
hv_synic_eventring_tail = NULL;
}
-/*
- * Functions for allocating and freeing memory with size and
- * alignment HV_HYP_PAGE_SIZE. These functions are needed because
- * the guest page size may not be the same as the Hyper-V page
- * size. We depend upon kmalloc() aligning power-of-two size
- * allocations to the allocation size boundary, so that the
- * allocated memory appears to Hyper-V as a page of the size
- * it expects.
- */
-
-void *hv_alloc_hyperv_page(void)
-{
- BUILD_BUG_ON(PAGE_SIZE < HV_HYP_PAGE_SIZE);
-
- if (PAGE_SIZE == HV_HYP_PAGE_SIZE)
- return (void *)__get_free_page(GFP_KERNEL);
- else
- return kmalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
-}
-EXPORT_SYMBOL_GPL(hv_alloc_hyperv_page);
-
-void *hv_alloc_hyperv_zeroed_page(void)
-{
- if (PAGE_SIZE == HV_HYP_PAGE_SIZE)
- return (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
- else
- return kzalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
-}
-EXPORT_SYMBOL_GPL(hv_alloc_hyperv_zeroed_page);
-
-void hv_free_hyperv_page(void *addr)
-{
- if (PAGE_SIZE == HV_HYP_PAGE_SIZE)
- free_page((unsigned long)addr);
- else
- kfree(addr);
-}
-EXPORT_SYMBOL_GPL(hv_free_hyperv_page);
-
static void *hv_panic_page;
/*
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
index ccccb1cbf7df..4033508fbb11 100644
--- a/include/asm-generic/mshyperv.h
+++ b/include/asm-generic/mshyperv.h
@@ -236,10 +236,6 @@ int hv_common_cpu_init(unsigned int cpu);
int hv_common_cpu_die(unsigned int cpu);
void hv_identify_partition_type(void);
-void *hv_alloc_hyperv_page(void);
-void *hv_alloc_hyperv_zeroed_page(void);
-void hv_free_hyperv_page(void *addr);
-
/**
* hv_cpu_number_to_vp_number() - Map CPU to VP.
* @cpu_number: CPU number in Linux terms
--
2.34.1
next prev parent reply other threads:[~2025-05-06 0:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 0:56 [Patch v3 0/5] Fix uio_hv_generic on systems with >4k page sizes longli
2025-05-06 0:56 ` [Patch v3 1/5] Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary longli
2025-05-07 15:47 ` Michael Kelley
2025-05-06 0:56 ` [Patch v3 2/5] uio_hv_generic: Use correct size for interrupt and monitor pages longli
2025-05-07 15:47 ` Michael Kelley
2025-05-06 0:56 ` [Patch v3 3/5] uio_hv_generic: Align ring size to system page longli
2025-05-07 15:48 ` Michael Kelley
2025-05-06 0:56 ` [Patch v3 4/5] Drivers: hv: Use kzalloc for panic page allocation longli
2025-05-07 15:48 ` Michael Kelley
2025-05-06 0:56 ` longli [this message]
2025-05-07 15:49 ` [Patch v3 5/5] Drivers: hv: Remove hv_alloc/free_* helpers Michael Kelley
2025-05-08 18:48 ` [Patch v3 0/5] Fix uio_hv_generic on systems with >4k page sizes Wei Liu
2025-05-13 4:49 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1746492997-4599-6-git-send-email-longli@linuxonhyperv.com \
--to=longli@linuxonhyperv.com \
--cc=decui@microsoft.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox