summaryrefslogtreecommitdiff
path: root/drivers/hv/channel.c
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2020-09-16 11:48:11 +0800
committerWei Liu <wei.liu@kernel.org>2020-09-28 08:55:13 +0000
commitbca6b91dfdd4347d8fe0bb97377dda0cacd51d82 (patch)
treed3ae396545293bc6f10334bb4cdd0c7f0684c651 /drivers/hv/channel.c
parentef514d3e38edf36764e61fc11366410041598ad9 (diff)
downloadlwn-bca6b91dfdd4347d8fe0bb97377dda0cacd51d82.tar.gz
lwn-bca6b91dfdd4347d8fe0bb97377dda0cacd51d82.zip
Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header
There will be more places other than vmbus where we need to calculate the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to hyperv generic header. Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20200916034817.30282-6-boqun.feng@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/channel.c')
-rw-r--r--drivers/hv/channel.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 45267b6d069e..fbdda9938039 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -22,19 +22,6 @@
#include "hyperv_vmbus.h"
-static unsigned long virt_to_hvpfn(void *addr)
-{
- phys_addr_t paddr;
-
- if (is_vmalloc_addr(addr))
- paddr = page_to_phys(vmalloc_to_page(addr)) +
- offset_in_page(addr);
- else
- paddr = __pa(addr);
-
- return paddr >> HV_HYP_PAGE_SHIFT;
-}
-
/*
* hv_gpadl_size - Return the real size of a gpadl, the size that Hyper-V uses
*