]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hyperv: Move arch/x86/hyperv/hv_proc.c to drivers/hv
authorNuno Das Neves <nunodasneves@linux.microsoft.com>
Fri, 7 Feb 2025 19:03:22 +0000 (11:03 -0800)
committerWei Liu <wei.liu@kernel.org>
Thu, 13 Feb 2025 23:38:47 +0000 (23:38 +0000)
These helpers are not specific to x86_64 and will be needed by common code.
Remove some unnecessary #includes.

Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Link: https://lore.kernel.org/r/1738955002-20821-3-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1738955002-20821-3-git-send-email-nunodasneves@linux.microsoft.com>

arch/x86/hyperv/Makefile
arch/x86/include/asm/mshyperv.h
drivers/hv/Makefile
drivers/hv/hv_proc.c [moved from arch/x86/hyperv/hv_proc.c with 98% similarity]
include/asm-generic/mshyperv.h

index 3a1548054b4835295af195550bc2c44a53951a72..d55f494f471d4825ba695f74ba1fb130a374ed1e 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-y                  := hv_init.o mmu.o nested.o irqdomain.o ivm.o
-obj-$(CONFIG_X86_64)   += hv_apic.o hv_proc.o
+obj-$(CONFIG_X86_64)   += hv_apic.o
 obj-$(CONFIG_HYPERV_VTL_MODE)  += hv_vtl.o
 
 ifdef CONFIG_X86_64
index 8d3ada3e8d0debb27892476eb9e280c59f2145a1..7dfca93ef04850c21ec23e1c1ec4e099f40fcd76 100644 (file)
@@ -56,10 +56,6 @@ u64 hv_tdx_hypercall(u64 control, u64 param1, u64 param2);
 #define HV_AP_INIT_GPAT_DEFAULT                0x0007040600070406ULL
 #define HV_AP_SEGMENT_LIMIT            0xffffffff
 
-int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages);
-int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id);
-int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags);
-
 /*
  * If the hypercall involves no input or output parameters, the hypervisor
  * ignores the corresponding GPA pointer.
index b992c0ed182bddd089aa7a4f409f1312c811d396..9afcabb3fbd24f57dc381d5d6cf0e9e83c4c36fd 100644 (file)
@@ -13,4 +13,4 @@ hv_vmbus-$(CONFIG_HYPERV_TESTING)     += hv_debugfs.o
 hv_utils-y := hv_util.o hv_kvp.o hv_snapshot.o hv_utils_transport.o
 
 # Code that must be built-in
-obj-$(subst m,y,$(CONFIG_HYPERV)) += hv_common.o
+obj-$(subst m,y,$(CONFIG_HYPERV)) += hv_common.o hv_proc.o
similarity index 98%
rename from arch/x86/hyperv/hv_proc.c
rename to drivers/hv/hv_proc.c
index ac4c834d44357cad1ec182c1bc9c53185da9bfe3..3e410489f48033978777c39b8c185bfce9da086e 100644 (file)
@@ -6,11 +6,7 @@
 #include <linux/slab.h>
 #include <linux/cpuhotplug.h>
 #include <linux/minmax.h>
-#include <asm/hypervisor.h>
 #include <asm/mshyperv.h>
-#include <asm/apic.h>
-
-#include <asm/trace/hyperv.h>
 
 /*
  * See struct hv_deposit_memory. The first u64 is partition ID, the rest
index febeddf6cd8ad9c92e380c767b3eb103080d3ab6..7adc10a4fa3eaba9e1bf8eef564528010efdaed4 100644 (file)
@@ -218,6 +218,10 @@ void *hv_alloc_hyperv_page(void);
 void *hv_alloc_hyperv_zeroed_page(void);
 void hv_free_hyperv_page(void *addr);
 
+int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages);
+int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id);
+int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags);
+
 /**
  * hv_cpu_number_to_vp_number() - Map CPU to VP.
  * @cpu_number: CPU number in Linux terms