From: Michael Holzheu <holzheu@de.ibm.com>
To: greg@kroah.com
Cc: akpm@osdl.org, ioe-lkml@rameria.de, joern@wohnheim.fh-wedel.de,
linux-kernel@vger.kernel.org, mschwid2@de.ibm.com,
penberg@cs.helsinki.fi
Subject: Re: [PATCH] s390: Hypervisor File System
Date: Fri, 5 May 2006 15:22:49 +0200 [thread overview]
Message-ID: <20060505152249.520144f9.holzheu@de.ibm.com> (raw)
Greg KH <greg@kroah.com> wrote on 05/04/2006 05:34:11 PM:
> > So you want a new config option CONFIG_HYPERVISOR?
>
> Sure. But don't make it a user selectable config option, but rather,
> one your S390 option sets.
>
> That way the Xen and other groups can also set it when they need it.
>
[snip]
>
> The Xen people need it too. Now who knows when their code will ever hit
> mainline...
I added a invisible config option CONFIG_SYS_HYPERVISOR. If this
option is enabled, /sys/hypervisor is created. CONFIG_S390_HYPFS
enables this option automatically using "select".
This the following patch acceptable for you?
---
drivers/base/Kconfig | 4 ++++
drivers/base/Makefile | 2 +-
drivers/base/hypervisor.c | 30 ++++++++++++++++++++++++++++++
drivers/base/init.c | 1 +
include/linux/kobject.h | 4 ++++
5 files changed, 40 insertions(+), 1 deletion(-)
diff -urpN linux-2.6.16/drivers/base/Kconfig linux-2.6.16-hypervisor/drivers/base/Kconfig
--- linux-2.6.16/drivers/base/Kconfig 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16-hypervisor/drivers/base/Kconfig 2006-05-05 15:13:10.000000000 +0200
@@ -38,3 +38,7 @@ config DEBUG_DRIVER
If you are unsure about this, say N here.
endmenu
+
+config SYS_HYPERVISOR
+ bool
+ default n
diff -urpN linux-2.6.16/drivers/base/Makefile linux-2.6.16-hypervisor/drivers/base/Makefile
--- linux-2.6.16/drivers/base/Makefile 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16-hypervisor/drivers/base/Makefile 2006-05-05 15:12:48.000000000 +0200
@@ -3,7 +3,7 @@
obj-y := core.o sys.o bus.o dd.o \
driver.o class.o platform.o \
cpu.o firmware.o init.o map.o dmapool.o \
- attribute_container.o transport_class.o
+ attribute_container.o transport_class.o hypervisor.o
obj-y += power/
obj-$(CONFIG_FW_LOADER) += firmware_class.o
obj-$(CONFIG_NUMA) += node.o
diff -urpN linux-2.6.16/drivers/base/hypervisor.c linux-2.6.16-hypervisor/drivers/base/hypervisor.c
--- linux-2.6.16/drivers/base/hypervisor.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.16-hypervisor/drivers/base/hypervisor.c 2006-05-05 15:12:57.000000000 +0200
@@ -0,0 +1,30 @@
+/*
+ * hypervisor.c - /sys/hypervisor subsystem.
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#include <linux/kobject.h>
+#include <linux/device.h>
+
+#include "base.h"
+
+#ifdef CONFIG_SYS_HYPERVISOR
+
+decl_subsys(hypervisor, NULL, NULL);
+EXPORT_SYMBOL_GPL(hypervisor_subsys);
+
+int __init hypervisor_init(void)
+{
+ return subsystem_register(&hypervisor_subsys);
+}
+
+#else
+
+int __init hypervisor_init(void)
+{
+ return -1;
+}
+
+#endif /* CONFIG_SYS_HYPERVISOR */
diff -urpN linux-2.6.16/drivers/base/init.c linux-2.6.16-hypervisor/drivers/base/init.c
--- linux-2.6.16/drivers/base/init.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16-hypervisor/drivers/base/init.c 2006-05-05 15:12:40.000000000 +0200
@@ -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 -urpN linux-2.6.16/include/linux/kobject.h linux-2.6.16-hypervisor/include/linux/kobject.h
--- linux-2.6.16/include/linux/kobject.h 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16-hypervisor/include/linux/kobject.h 2006-05-05 15:13:35.000000000 +0200
@@ -186,6 +186,10 @@ struct subsystem _varname##_subsys = { \
/* The global /sys/kernel/ subsystem for people to chain off of */
extern struct subsystem kernel_subsys;
+#ifdef CONFIG_SYS_HYPERVISOR
+/* The global /sys/hypervisor/ subsystem */
+extern struct subsystem hypervisor_subsys;
+#endif /* CONFIG_SYS_HYPERVISOR */
/**
* Helpers for setting the kset of registered objects.
next reply other threads:[~2006-05-05 13:22 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-05 13:22 Michael Holzheu [this message]
2006-05-05 21:14 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2006-05-08 12:24 Michael Holzheu
2006-05-09 5:01 ` Greg KH
2006-04-28 17:37 Michael Holzheu
2006-04-28 17:47 ` Jörn Engel
2006-05-02 7:25 ` Michael Holzheu
2006-04-28 9:22 Michael Holzheu
2006-04-28 9:43 ` Jörn Engel
2006-04-28 11:53 ` Michael Holzheu
2006-04-28 15:48 ` Jörn Engel
2006-04-28 9:56 ` Andrew Morton
2006-04-28 17:36 ` Michael Holzheu
2006-04-28 17:43 ` Jörn Engel
2006-05-02 8:06 ` Michael Holzheu
2006-04-28 19:44 ` Andrew Morton
2006-04-28 10:36 ` Pekka J Enberg
2006-04-28 13:14 ` Michael Holzheu
2006-04-29 6:44 ` Andrew Morton
2006-04-29 7:51 ` Greg KH
2006-04-29 8:14 ` Andrew Morton
2006-05-03 8:48 ` Michael Holzheu
2006-05-03 22:10 ` Greg KH
2006-05-04 10:22 ` Michael Holzheu
2006-05-04 14:42 ` Greg KH
2006-05-04 15:01 ` Michael Holzheu
2006-05-04 15:34 ` Greg KH
2006-04-29 7:53 ` Greg KH
2006-04-29 8:41 ` Kyle Moffett
2006-04-29 21:55 ` Greg KH
2006-04-30 5:18 ` Kyle Moffett
2006-05-01 20:38 ` Greg KH
2006-05-01 23:29 ` Kyle Moffett
2006-05-02 4:00 ` Greg KH
2006-05-02 5:23 ` Kay Sievers
2006-05-02 5:37 ` Greg KH
2006-05-02 11:46 ` Kay Sievers
2006-05-02 21:28 ` Greg KH
2006-05-02 21:33 ` Kay Sievers
2006-05-02 21:54 ` Greg KH
2006-05-02 8:48 ` Kyle Moffett
2006-05-02 21:30 ` Greg KH
2006-05-02 21:49 ` Kay Sievers
2006-05-02 23:18 ` Kyle Moffett
2006-05-03 9:33 ` Michael Holzheu
2006-05-03 9:42 ` Pekka J Enberg
2006-05-03 12:11 ` Michael Holzheu
2006-05-03 12:33 ` Jörn Engel
2006-05-03 12:51 ` Michael Holzheu
2006-05-03 13:00 ` Jörn Engel
2006-05-03 13:18 ` Michael Holzheu
2006-05-03 13:22 ` Jörn Engel
2006-05-03 13:38 ` Michael Holzheu
2006-05-03 14:17 ` Martin Schwidefsky
2006-05-03 14:23 ` Michael Holzheu
2006-05-03 14:58 ` Martin Schwidefsky
2006-05-03 15:22 ` Michael Holzheu
2006-05-03 15:54 ` Valdis.Kletnieks
2006-05-03 10:01 ` Jörn Engel
2006-05-02 10:12 ` Michael Holzheu
2006-05-02 13:00 ` Michael Holzheu
2006-05-03 8:45 ` Michael Holzheu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060505152249.520144f9.holzheu@de.ibm.com \
--to=holzheu@de.ibm.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=ioe-lkml@rameria.de \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mschwid2@de.ibm.com \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®