From 46a971913611a23478283931460a95be962ce329 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 4 Oct 2011 12:29:52 -0700 Subject: [PATCH] Staging: hv: move hyperv code out of staging directory After many years wandering the desert, it is finally time for the Microsoft HyperV code to move out of the staging directory. Or at least the core hyperv bus code, and the utility driver, the rest still have some review to get through by the various subsystem maintainers. Signed-off-by: Greg Kroah-Hartman Signed-off-by: K. Y. Srinivasan --- drivers/Kconfig | 2 ++ drivers/Makefile | 2 ++ drivers/hv/Kconfig | 14 ++++++++++ drivers/hv/Makefile | 7 +++++ drivers/{staging => }/hv/channel.c | 2 +- drivers/{staging => }/hv/channel_mgmt.c | 2 +- drivers/{staging => }/hv/connection.c | 2 +- drivers/{staging => }/hv/hv.c | 2 +- drivers/{staging => }/hv/hv_kvp.c | 2 +- drivers/{staging => }/hv/hv_kvp.h | 0 drivers/{staging => }/hv/hv_util.c | 2 +- drivers/{staging => }/hv/hyperv_vmbus.h | 3 +- drivers/{staging => }/hv/ring_buffer.c | 2 +- drivers/{staging => }/hv/vmbus_drv.c | 2 +- drivers/staging/hv/Kconfig | 28 ++----------------- drivers/staging/hv/Makefile | 7 +---- drivers/staging/hv/hv_mouse.c | 3 +- drivers/staging/hv/hyperv_net.h | 2 +- drivers/staging/hv/storvsc_drv.c | 2 +- .../staging/hv => include/linux}/hyperv.h | 0 .../hv/tools => tools/hv}/hv_kvp_daemon.c | 0 21 files changed, 41 insertions(+), 45 deletions(-) create mode 100644 drivers/hv/Kconfig create mode 100644 drivers/hv/Makefile rename drivers/{staging => }/hv/channel.c (99%) rename drivers/{staging => }/hv/channel_mgmt.c (99%) rename drivers/{staging => }/hv/connection.c (99%) rename drivers/{staging => }/hv/hv.c (99%) rename drivers/{staging => }/hv/hv_kvp.c (99%) rename drivers/{staging => }/hv/hv_kvp.h (100%) rename drivers/{staging => }/hv/hv_util.c (99%) rename drivers/{staging => }/hv/hyperv_vmbus.h (99%) rename drivers/{staging => }/hv/ring_buffer.c (99%) rename drivers/{staging => }/hv/vmbus_drv.c (99%) rename {drivers/staging/hv => include/linux}/hyperv.h (100%) rename {drivers/staging/hv/tools => tools/hv}/hv_kvp_daemon.c (100%) diff --git a/drivers/Kconfig b/drivers/Kconfig index 95b9e7eefad..ce3c35f4041 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -130,4 +130,6 @@ source "drivers/iommu/Kconfig" source "drivers/virt/Kconfig" +source "drivers/hv/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index 7fa433a7030..ef693cfb481 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -127,3 +127,5 @@ obj-$(CONFIG_IOMMU_SUPPORT) += iommu/ # Virtualization drivers obj-$(CONFIG_VIRT_DRIVERS) += virt/ +obj-$(CONFIG_HYPERV) += hv/ + diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig new file mode 100644 index 00000000000..9fa09ac000a --- /dev/null +++ b/drivers/hv/Kconfig @@ -0,0 +1,14 @@ +config HYPERV + tristate "Microsoft Hyper-V client drivers" + depends on X86 && ACPI && PCI + help + Select this option to run Linux as a Hyper-V client operating + system. + +config HYPERV_UTILS + tristate "Microsoft Hyper-V Utilities driver" + depends on HYPERV && CONNECTOR && NLS + help + Select this option to enable the Hyper-V Utilities. + + diff --git a/drivers/hv/Makefile b/drivers/hv/Makefile new file mode 100644 index 00000000000..a23938b991c --- /dev/null +++ b/drivers/hv/Makefile @@ -0,0 +1,7 @@ +obj-$(CONFIG_HYPERV) += hv_vmbus.o +obj-$(CONFIG_HYPERV_UTILS) += hv_utils.o + +hv_vmbus-y := vmbus_drv.o \ + hv.o connection.o channel.o \ + channel_mgmt.o ring_buffer.o +hv_utils-y := hv_util.o hv_kvp.o diff --git a/drivers/staging/hv/channel.c b/drivers/hv/channel.c similarity index 99% rename from drivers/staging/hv/channel.c rename to drivers/hv/channel.c index b6f3d38a6db..406537420ff 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/hv/channel.c @@ -26,8 +26,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hyperv_vmbus.h" #define NUM_PAGES_SPANNED(addr, len) \ diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c similarity index 99% rename from drivers/staging/hv/channel_mgmt.c rename to drivers/hv/channel_mgmt.c index 9f007522a9d..41bf287baa1 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -28,8 +28,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hyperv_vmbus.h" struct vmbus_channel_message_table_entry { diff --git a/drivers/staging/hv/connection.c b/drivers/hv/connection.c similarity index 99% rename from drivers/staging/hv/connection.c rename to drivers/hv/connection.c index 649b91bcd8c..5f438b65006 100644 --- a/drivers/staging/hv/connection.c +++ b/drivers/hv/connection.c @@ -29,8 +29,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hyperv_vmbus.h" diff --git a/drivers/staging/hv/hv.c b/drivers/hv/hv.c similarity index 99% rename from drivers/staging/hv/hv.c rename to drivers/hv/hv.c index 06f1e158c27..931b7b03078 100644 --- a/drivers/staging/hv/hv.c +++ b/drivers/hv/hv.c @@ -25,8 +25,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hyperv_vmbus.h" /* The one and only */ diff --git a/drivers/staging/hv/hv_kvp.c b/drivers/hv/hv_kvp.c similarity index 99% rename from drivers/staging/hv/hv_kvp.c rename to drivers/hv/hv_kvp.c index 1e9515cc609..69c4c985dae 100644 --- a/drivers/staging/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -26,8 +26,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hv_kvp.h" diff --git a/drivers/staging/hv/hv_kvp.h b/drivers/hv/hv_kvp.h similarity index 100% rename from drivers/staging/hv/hv_kvp.h rename to drivers/hv/hv_kvp.h diff --git a/drivers/staging/hv/hv_util.c b/drivers/hv/hv_util.c similarity index 99% rename from drivers/staging/hv/hv_util.c rename to drivers/hv/hv_util.c index faa66074cc2..e0e3a6d0244 100644 --- a/drivers/staging/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -26,8 +26,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hv_kvp.h" diff --git a/drivers/staging/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h similarity index 99% rename from drivers/staging/hv/hyperv_vmbus.h rename to drivers/hv/hyperv_vmbus.h index 3d2d836c3cc..8261cb64931 100644 --- a/drivers/staging/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -28,8 +28,7 @@ #include #include #include - -#include "hyperv.h" +#include /* * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent diff --git a/drivers/staging/hv/ring_buffer.c b/drivers/hv/ring_buffer.c similarity index 99% rename from drivers/staging/hv/ring_buffer.c rename to drivers/hv/ring_buffer.c index 70e2e66fec7..f594ed09d7e 100644 --- a/drivers/staging/hv/ring_buffer.c +++ b/drivers/hv/ring_buffer.c @@ -25,8 +25,8 @@ #include #include +#include -#include "hyperv.h" #include "hyperv_vmbus.h" diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c similarity index 99% rename from drivers/staging/hv/vmbus_drv.c rename to drivers/hv/vmbus_drv.c index d2562afcce4..b0d08f980de 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -32,8 +32,8 @@ #include #include #include +#include -#include "hyperv.h" #include "hyperv_vmbus.h" diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig index 815f8c2f7cd..072185ebe95 100644 --- a/drivers/staging/hv/Kconfig +++ b/drivers/staging/hv/Kconfig @@ -1,39 +1,17 @@ -config HYPERV - tristate "Microsoft Hyper-V client drivers" - depends on X86 && ACPI && PCI - default n - help - Select this option to run Linux as a Hyper-V client operating - system. - -if HYPERV - config HYPERV_STORAGE tristate "Microsoft Hyper-V virtual storage driver" - depends on SCSI - default HYPERV + depends on HYPERV && SCSI help Select this option to enable the Hyper-V virtual storage driver. config HYPERV_NET tristate "Microsoft Hyper-V virtual network driver" - depends on NET - default HYPERV + depends on HYPERV && NET help Select this option to enable the Hyper-V virtual network driver. -config HYPERV_UTILS - tristate "Microsoft Hyper-V Utilities driver" - depends on CONNECTOR && NLS - default HYPERV - help - Select this option to enable the Hyper-V Utilities. - config HYPERV_MOUSE tristate "Microsoft Hyper-V mouse driver" - depends on HID - default HYPERV + depends on HYPERV && HID help Select this option to enable the Hyper-V mouse driver. - -endif diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile index bd176b1f231..e071c12c8f6 100644 --- a/drivers/staging/hv/Makefile +++ b/drivers/staging/hv/Makefile @@ -1,12 +1,7 @@ -obj-$(CONFIG_HYPERV) += hv_vmbus.o hv_timesource.o +obj-$(CONFIG_HYPERV) += hv_timesource.o obj-$(CONFIG_HYPERV_STORAGE) += hv_storvsc.o obj-$(CONFIG_HYPERV_NET) += hv_netvsc.o -obj-$(CONFIG_HYPERV_UTILS) += hv_utils.o obj-$(CONFIG_HYPERV_MOUSE) += hv_mouse.o -hv_vmbus-y := vmbus_drv.o \ - hv.o connection.o channel.o \ - channel_mgmt.o ring_buffer.o hv_storvsc-y := storvsc_drv.o hv_netvsc-y := netvsc_drv.o netvsc.o rndis_filter.o -hv_utils-y := hv_util.o hv_kvp.o diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index edbb4797db7..c354ade76ef 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -22,8 +22,7 @@ #include #include #include - -#include "hyperv.h" +#include struct hv_input_dev_info { diff --git a/drivers/staging/hv/hyperv_net.h b/drivers/staging/hv/hyperv_net.h index 366dd2b32b1..ac1ec840512 100644 --- a/drivers/staging/hv/hyperv_net.h +++ b/drivers/staging/hv/hyperv_net.h @@ -26,7 +26,7 @@ #define _HYPERV_NET_H #include -#include "hyperv.h" +#include /* Fwd declaration */ struct hv_netvsc_packet; diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index e4127163260..af185abbaa7 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include #include -#include "hyperv.h" #define STORVSC_RING_BUFFER_SIZE (20*PAGE_SIZE) static int storvsc_ringbuffer_size = STORVSC_RING_BUFFER_SIZE; diff --git a/drivers/staging/hv/hyperv.h b/include/linux/hyperv.h similarity index 100% rename from drivers/staging/hv/hyperv.h rename to include/linux/hyperv.h diff --git a/drivers/staging/hv/tools/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c similarity index 100% rename from drivers/staging/hv/tools/hv_kvp_daemon.c rename to tools/hv/hv_kvp_daemon.c -- 2.46.0