+ create-sys-hypervisor-when-needed.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     create /sys/hypervisor when needed

has been added to the -mm tree.  Its filename is

     create-sys-hypervisor-when-needed.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Michael Holzheu <holzheu@xxxxxxxxxx>

To have a home for all hypervisors, this patch creates /sys/hypervisor.

A new config option SYS_HYPERVISOR is introduced, which should to be set by
architecture dependent hypervisors (e.g.  s390 or Xen).

Acked-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Signed-off-by: Michael Holzheu <holzheu@xxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/base/Kconfig      |    4 ++++
 drivers/base/Makefile     |    1 +
 drivers/base/base.h       |    5 +++++
 drivers/base/hypervisor.c |   20 ++++++++++++++++++++
 drivers/base/init.c       |    1 +
 include/linux/kobject.h   |    2 ++
 6 files changed, 33 insertions(+)

diff -puN drivers/base/base.h~create-sys-hypervisor-when-needed drivers/base/base.h
--- 25/drivers/base/base.h~create-sys-hypervisor-when-needed	Mon May 15 14:40:52 2006
+++ 25-akpm/drivers/base/base.h	Mon May 15 14:40:52 2006
@@ -5,6 +5,11 @@ extern int devices_init(void);
 extern int buses_init(void);
 extern int classes_init(void);
 extern int firmware_init(void);
+#ifdef CONFIG_SYS_HYPERVISOR
+extern int hypervisor_init(void);
+#else
+static inline int hypervisor_init(void) { return 0; }
+#endif
 extern int platform_bus_init(void);
 extern int system_bus_init(void);
 extern int cpu_dev_init(void);
diff -puN /dev/null drivers/base/hypervisor.c
--- /dev/null	Thu Apr 11 07:25:15 2002
+++ 25-akpm/drivers/base/hypervisor.c	Mon May 15 14:40:52 2006
@@ -0,0 +1,20 @@
+/*
+ * hypervisor.c - /sys/hypervisor subsystem.
+ *
+ * Copyright (C) IBM Corp. 2006
+ *
+ * This file is released under the GPLv2
+ */
+
+#include <linux/kobject.h>
+#include <linux/device.h>
+
+#include "base.h"
+
+decl_subsys(hypervisor, NULL, NULL);
+EXPORT_SYMBOL_GPL(hypervisor_subsys);
+
+int __init hypervisor_init(void)
+{
+	return subsystem_register(&hypervisor_subsys);
+}
diff -puN drivers/base/init.c~create-sys-hypervisor-when-needed drivers/base/init.c
--- 25/drivers/base/init.c~create-sys-hypervisor-when-needed	Mon May 15 14:40:52 2006
+++ 25-akpm/drivers/base/init.c	Mon May 15 14:40:52 2006
@@ -27,6 +27,7 @@ void __init driver_init(void)
 	buses_init();
 	classes_init();
 	firmware_init();
+	hypervisor_init();
 
 	/* These are also core pieces, but must come after the
 	 * core core pieces.
diff -puN drivers/base/Kconfig~create-sys-hypervisor-when-needed drivers/base/Kconfig
--- 25/drivers/base/Kconfig~create-sys-hypervisor-when-needed	Mon May 15 14:40:52 2006
+++ 25-akpm/drivers/base/Kconfig	Mon May 15 14:40:52 2006
@@ -38,3 +38,7 @@ config DEBUG_DRIVER
 	  If you are unsure about this, say N here.
 
 endmenu
+
+config SYS_HYPERVISOR
+	bool
+	default n
diff -puN drivers/base/Makefile~create-sys-hypervisor-when-needed drivers/base/Makefile
--- 25/drivers/base/Makefile~create-sys-hypervisor-when-needed	Mon May 15 14:40:52 2006
+++ 25-akpm/drivers/base/Makefile	Mon May 15 14:40:52 2006
@@ -9,6 +9,7 @@ obj-$(CONFIG_FW_LOADER)	+= firmware_clas
 obj-$(CONFIG_NUMA)	+= node.o
 obj-$(CONFIG_MEMORY_HOTPLUG) += memory.o
 obj-$(CONFIG_SMP)	+= topology.o
+obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o
 
 ifeq ($(CONFIG_DEBUG_DRIVER),y)
 EXTRA_CFLAGS += -DDEBUG
diff -puN include/linux/kobject.h~create-sys-hypervisor-when-needed include/linux/kobject.h
--- 25/include/linux/kobject.h~create-sys-hypervisor-when-needed	Mon May 15 14:40:52 2006
+++ 25-akpm/include/linux/kobject.h	Mon May 15 14:40:52 2006
@@ -190,6 +190,8 @@ struct subsystem _varname##_subsys = { \
 
 /* The global /sys/kernel/ subsystem for people to chain off of */
 extern struct subsystem kernel_subsys;
+/* The global /sys/hypervisor/ subsystem  */
+extern struct subsystem hypervisor_subsys;
 
 /**
  * Helpers for setting the kset of registered objects.
_

Patches currently in -mm which might be from holzheu@xxxxxxxxxx are

create-sys-hypervisor-when-needed.patch
strstrip-api.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux