Skip to content

Commit 0222eb3

Browse files
NunoDasNevesliuw
authored andcommitted
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 <[email protected]> Signed-off-by: Nuno Das Neves <[email protected]> Link: https://lore.kernel.org/r/1738955002-20821-3-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <[email protected]> Message-ID: <1738955002-20821-3-git-send-email-nunodasneves@linux.microsoft.com>
1 parent e96204e commit 0222eb3

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

arch/x86/hyperv/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
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
44
obj-$(CONFIG_HYPERV_VTL_MODE) += hv_vtl.o
55

66
ifdef CONFIG_X86_64

arch/x86/include/asm/mshyperv.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ u64 hv_tdx_hypercall(u64 control, u64 param1, u64 param2);
5656
#define HV_AP_INIT_GPAT_DEFAULT 0x0007040600070406ULL
5757
#define HV_AP_SEGMENT_LIMIT 0xffffffff
5858

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-
6359
/*
6460
* If the hypercall involves no input or output parameters, the hypervisor
6561
* ignores the corresponding GPA pointer.

drivers/hv/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ hv_vmbus-$(CONFIG_HYPERV_TESTING) += hv_debugfs.o
1313
hv_utils-y := hv_util.o hv_kvp.o hv_snapshot.o hv_utils_transport.o
1414

1515
# 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

arch/x86/hyperv/hv_proc.c renamed to drivers/hv/hv_proc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
#include <linux/slab.h>
77
#include <linux/cpuhotplug.h>
88
#include <linux/minmax.h>
9-
#include <asm/hypervisor.h>
109
#include <asm/mshyperv.h>
11-
#include <asm/apic.h>
12-
13-
#include <asm/trace/hyperv.h>
1410

1511
/*
1612
* See struct hv_deposit_memory. The first u64 is partition ID, the rest

include/asm-generic/mshyperv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ void *hv_alloc_hyperv_page(void);
218218
void *hv_alloc_hyperv_zeroed_page(void);
219219
void hv_free_hyperv_page(void *addr);
220220

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+
221225
/**
222226
* hv_cpu_number_to_vp_number() - Map CPU to VP.
223227
* @cpu_number: CPU number in Linux terms

0 commit comments

Comments
 (0)