aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-31 22:45:24 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-31 22:45:24 +0000
commit60b15848d70f192a6939129762c742ef7beec3eb (patch)
tree901e3cc278edba0526adac370086cf191f6e1708
parentfac8da34ab1ee51aa8b2ed32f0b290482e089401 (diff)
parent6eec4b1a9f528126ac738054f580477ec1653065 (diff)
downloadxen-60b15848d70f192a6939129762c742ef7beec3eb.tar.gz
xen-60b15848d70f192a6939129762c742ef7beec3eb.tar.bz2
xen-60b15848d70f192a6939129762c742ef7beec3eb.zip
bitkeeper revision 1.1622 (429ce9043RMzk7MgrblrJmyu0he3Xw)
Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
-rw-r--r--xen/arch/x86/dmi_scan.c1
-rw-r--r--xen/arch/x86/mtrr/main.c2
-rw-r--r--xen/arch/x86/setup.c1
-rw-r--r--xen/common/dom0_ops.c1
-rw-r--r--xen/common/domain.c63
-rw-r--r--xen/common/grant_table.c1
-rw-r--r--xen/common/keyhandler.c1
-rw-r--r--xen/common/schedule.c1
-rw-r--r--xen/include/xen/lib.h1
-rw-r--r--xen/include/xen/sched.h70
-rw-r--r--xen/include/xen/slab.h3
11 files changed, 77 insertions, 68 deletions
diff --git a/xen/arch/x86/dmi_scan.c b/xen/arch/x86/dmi_scan.c
index 1d42756dc1..13c8d97915 100644
--- a/xen/arch/x86/dmi_scan.c
+++ b/xen/arch/x86/dmi_scan.c
@@ -3,6 +3,7 @@
#include <xen/kernel.h>
#include <xen/string.h>
#include <xen/init.h>
+#include <xen/cache.h>
#include <xen/slab.h>
#include <xen/acpi.h>
#include <asm/io.h>
diff --git a/xen/arch/x86/mtrr/main.c b/xen/arch/x86/mtrr/main.c
index 50c2f428b4..48ea94ae1f 100644
--- a/xen/arch/x86/mtrr/main.c
+++ b/xen/arch/x86/mtrr/main.c
@@ -33,7 +33,7 @@
#include <xen/config.h>
#include <xen/init.h>
-#include <xen/slab.h>
+#include <xen/lib.h>
#include <xen/smp.h>
#include <xen/spinlock.h>
#include <asm/mtrr.h>
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index ecfc988f05..5a6221c05d 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -3,6 +3,7 @@
#include <xen/init.h>
#include <xen/lib.h>
#include <xen/sched.h>
+#include <xen/domain.h>
#include <xen/serial.h>
#include <xen/softirq.h>
#include <xen/acpi.h>
diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c
index 20cef35e29..1e5bcf5cf8 100644
--- a/xen/common/dom0_ops.c
+++ b/xen/common/dom0_ops.c
@@ -12,6 +12,7 @@
#include <xen/mm.h>
#include <public/dom0_ops.h>
#include <xen/sched.h>
+#include <xen/domain.h>
#include <xen/event.h>
#include <asm/domain_page.h>
#include <xen/trace.h>
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 06e748bd37..72b374e751 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -10,6 +10,7 @@
#include <xen/sched.h>
#include <xen/errno.h>
#include <xen/sched.h>
+#include <xen/domain.h>
#include <xen/mm.h>
#include <xen/event.h>
#include <xen/time.h>
@@ -223,6 +224,68 @@ void domain_destruct(struct domain *d)
send_guest_virq(dom0->exec_domain[0], VIRQ_DOM_EXC);
}
+void exec_domain_pause(struct exec_domain *ed)
+{
+ ASSERT(ed != current);
+ atomic_inc(&ed->pausecnt);
+ domain_sleep(ed);
+ sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor));
+}
+
+void domain_pause(struct domain *d)
+{
+ struct exec_domain *ed;
+
+ for_each_exec_domain( d, ed )
+ {
+ ASSERT(ed != current);
+ atomic_inc(&ed->pausecnt);
+ domain_sleep(ed);
+ }
+
+ sync_lazy_execstate_cpuset(d->cpuset);
+}
+
+void exec_domain_unpause(struct exec_domain *ed)
+{
+ ASSERT(ed != current);
+ if ( atomic_dec_and_test(&ed->pausecnt) )
+ domain_wake(ed);
+}
+
+void domain_unpause(struct domain *d)
+{
+ struct exec_domain *ed;
+
+ for_each_exec_domain( d, ed )
+ exec_domain_unpause(ed);
+}
+
+void domain_pause_by_systemcontroller(struct domain *d)
+{
+ struct exec_domain *ed;
+
+ for_each_exec_domain ( d, ed )
+ {
+ ASSERT(ed != current);
+ if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
+ domain_sleep(ed);
+ }
+
+ sync_lazy_execstate_cpuset(d->cpuset);
+}
+
+void domain_unpause_by_systemcontroller(struct domain *d)
+{
+ struct exec_domain *ed;
+
+ for_each_exec_domain ( d, ed )
+ {
+ if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
+ domain_wake(ed);
+ }
+}
+
/*
* set_info_guest is used for final setup, launching, and state modification
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 4bf52e43ff..97467983de 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -26,6 +26,7 @@
#define GRANT_DEBUG_VERBOSE 0
#include <xen/config.h>
+#include <xen/lib.h>
#include <xen/sched.h>
#include <xen/shadow.h>
#include <xen/mm.h>
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 34f9fd9291..a40cea65bc 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -10,6 +10,7 @@
#include <xen/serial.h>
#include <xen/sched.h>
#include <xen/softirq.h>
+#include <xen/domain.h>
#include <asm/debugger.h>
#define KEY_MAX 256
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 672abaffd4..1e5df627d1 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -26,6 +26,7 @@
#include <xen/init.h>
#include <xen/lib.h>
#include <xen/sched.h>
+#include <xen/domain.h>
#include <xen/delay.h>
#include <xen/event.h>
#include <xen/time.h>
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 719e0f0d4f..367456e99e 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -5,6 +5,7 @@
#include <stdarg.h>
#include <xen/config.h>
#include <xen/types.h>
+#include <xen/slab.h>
#include <xen/string.h>
#define BUG() do { \
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 0bfc2345b4..0462fda5c1 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -389,42 +389,12 @@ static inline int domain_runnable(struct exec_domain *ed)
!(ed->domain->domain_flags & (DOMF_shutdown|DOMF_crashed)) );
}
-static inline void exec_domain_pause(struct exec_domain *ed)
-{
- ASSERT(ed != current);
- atomic_inc(&ed->pausecnt);
- domain_sleep(ed);
- sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor));
-}
-
-static inline void domain_pause(struct domain *d)
-{
- struct exec_domain *ed;
-
- for_each_exec_domain( d, ed )
- {
- ASSERT(ed != current);
- atomic_inc(&ed->pausecnt);
- domain_sleep(ed);
- }
-
- sync_lazy_execstate_cpuset(d->cpuset);
-}
-
-static inline void exec_domain_unpause(struct exec_domain *ed)
-{
- ASSERT(ed != current);
- if ( atomic_dec_and_test(&ed->pausecnt) )
- domain_wake(ed);
-}
-
-static inline void domain_unpause(struct domain *d)
-{
- struct exec_domain *ed;
-
- for_each_exec_domain( d, ed )
- exec_domain_unpause(ed);
-}
+void exec_domain_pause(struct exec_domain *ed);
+void domain_pause(struct domain *d);
+void exec_domain_unpause(struct exec_domain *ed);
+void domain_unpause(struct domain *d);
+void domain_pause_by_systemcontroller(struct domain *d);
+void domain_unpause_by_systemcontroller(struct domain *d);
static inline void exec_domain_unblock(struct exec_domain *ed)
{
@@ -432,31 +402,6 @@ static inline void exec_domain_unblock(struct exec_domain *ed)
domain_wake(ed);
}
-static inline void domain_pause_by_systemcontroller(struct domain *d)
-{
- struct exec_domain *ed;
-
- for_each_exec_domain ( d, ed )
- {
- ASSERT(ed != current);
- if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
- domain_sleep(ed);
- }
-
- sync_lazy_execstate_cpuset(d->cpuset);
-}
-
-static inline void domain_unpause_by_systemcontroller(struct domain *d)
-{
- struct exec_domain *ed;
-
- for_each_exec_domain ( d, ed )
- {
- if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
- domain_wake(ed);
- }
-}
-
#define IS_PRIV(_d) \
(test_bit(_DOMF_privileged, &(_d)->domain_flags))
#define IS_CAPABLE_PHYSDEV(_d) \
@@ -464,9 +409,6 @@ static inline void domain_unpause_by_systemcontroller(struct domain *d)
#define VM_ASSIST(_d,_t) (test_bit((_t), &(_d)->vm_assist))
-#include <xen/slab.h>
-#include <xen/domain.h>
-
#endif /* __SCHED_H__ */
/*
diff --git a/xen/include/xen/slab.h b/xen/include/xen/slab.h
index a3a7daf7d6..4736dede90 100644
--- a/xen/include/xen/slab.h
+++ b/xen/include/xen/slab.h
@@ -2,9 +2,6 @@
#ifndef __SLAB_H__
#define __SLAB_H__
-#include <xen/config.h>
-#include <xen/mm.h>
-
/* Allocate space for typed object. */
#define xmalloc(_type) ((_type *)_xmalloc(sizeof(_type), __alignof__(_type)))