Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hyperv: Move arch/x86/hyperv/hv_proc.c to drivers/hv

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>

authored by

Nuno Das Neves and committed by
Wei Liu
0222eb30 e96204e5

+6 -10
+1 -1
arch/x86/hyperv/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 obj-y := hv_init.o mmu.o nested.o irqdomain.o ivm.o 3 - obj-$(CONFIG_X86_64) += hv_apic.o hv_proc.o 3 + obj-$(CONFIG_X86_64) += hv_apic.o 4 4 obj-$(CONFIG_HYPERV_VTL_MODE) += hv_vtl.o 5 5 6 6 ifdef CONFIG_X86_64
-4
arch/x86/hyperv/hv_proc.c drivers/hv/hv_proc.c
··· 6 6 #include <linux/slab.h> 7 7 #include <linux/cpuhotplug.h> 8 8 #include <linux/minmax.h> 9 - #include <asm/hypervisor.h> 10 9 #include <asm/mshyperv.h> 11 - #include <asm/apic.h> 12 - 13 - #include <asm/trace/hyperv.h> 14 10 15 11 /* 16 12 * See struct hv_deposit_memory. The first u64 is partition ID, the rest
-4
arch/x86/include/asm/mshyperv.h
··· 56 56 #define HV_AP_INIT_GPAT_DEFAULT 0x0007040600070406ULL 57 57 #define HV_AP_SEGMENT_LIMIT 0xffffffff 58 58 59 - int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages); 60 - int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id); 61 - int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags); 62 - 63 59 /* 64 60 * If the hypercall involves no input or output parameters, the hypervisor 65 61 * ignores the corresponding GPA pointer.
+1 -1
drivers/hv/Makefile
··· 13 13 hv_utils-y := hv_util.o hv_kvp.o hv_snapshot.o hv_utils_transport.o 14 14 15 15 # Code that must be built-in 16 - obj-$(subst m,y,$(CONFIG_HYPERV)) += hv_common.o 16 + obj-$(subst m,y,$(CONFIG_HYPERV)) += hv_common.o hv_proc.o
+4
include/asm-generic/mshyperv.h
··· 218 218 void *hv_alloc_hyperv_zeroed_page(void); 219 219 void hv_free_hyperv_page(void *addr); 220 220 221 + int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages); 222 + int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id); 223 + int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags); 224 + 221 225 /** 222 226 * hv_cpu_number_to_vp_number() - Map CPU to VP. 223 227 * @cpu_number: CPU number in Linux terms