Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28292
b: refs/heads/master
c: 4039483
h: refs/heads/master
v: v3
  • Loading branch information
Michael Holzheu authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 6596a2d commit 9aac265
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e391553222211e07dfbe2f01c413b4e6d0ae32aa
refs/heads/master: 4039483fd3065920f035eed39ec59085421c0a4f
4 changes: 4 additions & 0 deletions trunk/drivers/base/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ config DEBUG_DRIVER
If you are unsure about this, say N here.

endmenu

config SYS_HYPERVISOR
bool
default n
1 change: 1 addition & 0 deletions trunk/drivers/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ obj-$(CONFIG_FW_LOADER) += firmware_class.o
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
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/base/hypervisor.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* hypervisor.c - /sys/hypervisor subsystem.
*
* 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);
}
1 change: 1 addition & 0 deletions trunk/drivers/base/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/kobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9aac265

Please sign in to comment.