]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Drivers: hv: Remove hv_alloc/free_* helpers
authorLong Li <longli@microsoft.com>
Tue, 6 May 2025 00:56:37 +0000 (17:56 -0700)
committerWei Liu <wei.liu@kernel.org>
Fri, 23 May 2025 16:30:56 +0000 (16:30 +0000)
There are no users for those functions, remove them.

Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1746492997-4599-6-git-send-email-longli@linuxonhyperv.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1746492997-4599-6-git-send-email-longli@linuxonhyperv.com>

drivers/hv/hv_common.c
include/asm-generic/mshyperv.h

index 95c2497ffcffbf8474bd683b05fbf8483b01b847..49898d10fafff5ffdb08cf7991af05d724f6a258 100644 (file)
@@ -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;
 
 /*
index 6c51a25ed7b5732f68a0653f6a6c037e0aa95be8..a729b77983fab0873974de412832dd84df578527 100644 (file)
@@ -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