ia64/xen-unstable

changeset 5248:2c827745787d

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
author cl349@firebug.cl.cam.ac.uk
date Tue May 31 22:45:24 2005 +0000 (2005-05-31)
parents 0d0d1ee9a48c 70e8e91ea6f6
children c00fe904876e
files xen/arch/x86/dmi_scan.c xen/arch/x86/mtrr/main.c xen/arch/x86/setup.c xen/common/dom0_ops.c xen/common/domain.c xen/common/grant_table.c xen/common/keyhandler.c xen/common/schedule.c xen/include/xen/lib.h xen/include/xen/sched.h xen/include/xen/slab.h
line diff
     1.1 --- a/xen/arch/x86/dmi_scan.c	Tue May 31 21:40:12 2005 +0000
     1.2 +++ b/xen/arch/x86/dmi_scan.c	Tue May 31 22:45:24 2005 +0000
     1.3 @@ -3,6 +3,7 @@
     1.4  #include <xen/kernel.h>
     1.5  #include <xen/string.h>
     1.6  #include <xen/init.h>
     1.7 +#include <xen/cache.h>
     1.8  #include <xen/slab.h>
     1.9  #include <xen/acpi.h>
    1.10  #include <asm/io.h>
     2.1 --- a/xen/arch/x86/mtrr/main.c	Tue May 31 21:40:12 2005 +0000
     2.2 +++ b/xen/arch/x86/mtrr/main.c	Tue May 31 22:45:24 2005 +0000
     2.3 @@ -33,7 +33,7 @@
     2.4  
     2.5  #include <xen/config.h>
     2.6  #include <xen/init.h>
     2.7 -#include <xen/slab.h>
     2.8 +#include <xen/lib.h>
     2.9  #include <xen/smp.h>
    2.10  #include <xen/spinlock.h>
    2.11  #include <asm/mtrr.h>
     3.1 --- a/xen/arch/x86/setup.c	Tue May 31 21:40:12 2005 +0000
     3.2 +++ b/xen/arch/x86/setup.c	Tue May 31 22:45:24 2005 +0000
     3.3 @@ -3,6 +3,7 @@
     3.4  #include <xen/init.h>
     3.5  #include <xen/lib.h>
     3.6  #include <xen/sched.h>
     3.7 +#include <xen/domain.h>
     3.8  #include <xen/serial.h>
     3.9  #include <xen/softirq.h>
    3.10  #include <xen/acpi.h>
     4.1 --- a/xen/common/dom0_ops.c	Tue May 31 21:40:12 2005 +0000
     4.2 +++ b/xen/common/dom0_ops.c	Tue May 31 22:45:24 2005 +0000
     4.3 @@ -12,6 +12,7 @@
     4.4  #include <xen/mm.h>
     4.5  #include <public/dom0_ops.h>
     4.6  #include <xen/sched.h>
     4.7 +#include <xen/domain.h>
     4.8  #include <xen/event.h>
     4.9  #include <asm/domain_page.h>
    4.10  #include <xen/trace.h>
     5.1 --- a/xen/common/domain.c	Tue May 31 21:40:12 2005 +0000
     5.2 +++ b/xen/common/domain.c	Tue May 31 22:45:24 2005 +0000
     5.3 @@ -10,6 +10,7 @@
     5.4  #include <xen/sched.h>
     5.5  #include <xen/errno.h>
     5.6  #include <xen/sched.h>
     5.7 +#include <xen/domain.h>
     5.8  #include <xen/mm.h>
     5.9  #include <xen/event.h>
    5.10  #include <xen/time.h>
    5.11 @@ -223,6 +224,68 @@ void domain_destruct(struct domain *d)
    5.12      send_guest_virq(dom0->exec_domain[0], VIRQ_DOM_EXC);
    5.13  }
    5.14  
    5.15 +void exec_domain_pause(struct exec_domain *ed)
    5.16 +{
    5.17 +    ASSERT(ed != current);
    5.18 +    atomic_inc(&ed->pausecnt);
    5.19 +    domain_sleep(ed);
    5.20 +    sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor));
    5.21 +}
    5.22 +
    5.23 +void domain_pause(struct domain *d)
    5.24 +{
    5.25 +    struct exec_domain *ed;
    5.26 +
    5.27 +    for_each_exec_domain( d, ed )
    5.28 +    {
    5.29 +        ASSERT(ed != current);
    5.30 +        atomic_inc(&ed->pausecnt);
    5.31 +        domain_sleep(ed);
    5.32 +    }
    5.33 +
    5.34 +    sync_lazy_execstate_cpuset(d->cpuset);
    5.35 +}
    5.36 +
    5.37 +void exec_domain_unpause(struct exec_domain *ed)
    5.38 +{
    5.39 +    ASSERT(ed != current);
    5.40 +    if ( atomic_dec_and_test(&ed->pausecnt) )
    5.41 +        domain_wake(ed);
    5.42 +}
    5.43 +
    5.44 +void domain_unpause(struct domain *d)
    5.45 +{
    5.46 +    struct exec_domain *ed;
    5.47 +
    5.48 +    for_each_exec_domain( d, ed )
    5.49 +        exec_domain_unpause(ed);
    5.50 +}
    5.51 +
    5.52 +void domain_pause_by_systemcontroller(struct domain *d)
    5.53 +{
    5.54 +    struct exec_domain *ed;
    5.55 +
    5.56 +    for_each_exec_domain ( d, ed )
    5.57 +    {
    5.58 +        ASSERT(ed != current);
    5.59 +        if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
    5.60 +            domain_sleep(ed);
    5.61 +    }
    5.62 +
    5.63 +    sync_lazy_execstate_cpuset(d->cpuset);
    5.64 +}
    5.65 +
    5.66 +void domain_unpause_by_systemcontroller(struct domain *d)
    5.67 +{
    5.68 +    struct exec_domain *ed;
    5.69 +
    5.70 +    for_each_exec_domain ( d, ed )
    5.71 +    {
    5.72 +        if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
    5.73 +            domain_wake(ed);
    5.74 +    }
    5.75 +}
    5.76 +
    5.77  
    5.78  /*
    5.79   * set_info_guest is used for final setup, launching, and state modification 
     6.1 --- a/xen/common/grant_table.c	Tue May 31 21:40:12 2005 +0000
     6.2 +++ b/xen/common/grant_table.c	Tue May 31 22:45:24 2005 +0000
     6.3 @@ -26,6 +26,7 @@
     6.4  #define GRANT_DEBUG_VERBOSE 0
     6.5  
     6.6  #include <xen/config.h>
     6.7 +#include <xen/lib.h>
     6.8  #include <xen/sched.h>
     6.9  #include <xen/shadow.h>
    6.10  #include <xen/mm.h>
     7.1 --- a/xen/common/keyhandler.c	Tue May 31 21:40:12 2005 +0000
     7.2 +++ b/xen/common/keyhandler.c	Tue May 31 22:45:24 2005 +0000
     7.3 @@ -10,6 +10,7 @@
     7.4  #include <xen/serial.h>
     7.5  #include <xen/sched.h>
     7.6  #include <xen/softirq.h>
     7.7 +#include <xen/domain.h>
     7.8  #include <asm/debugger.h>
     7.9  
    7.10  #define KEY_MAX 256
     8.1 --- a/xen/common/schedule.c	Tue May 31 21:40:12 2005 +0000
     8.2 +++ b/xen/common/schedule.c	Tue May 31 22:45:24 2005 +0000
     8.3 @@ -26,6 +26,7 @@
     8.4  #include <xen/init.h>
     8.5  #include <xen/lib.h>
     8.6  #include <xen/sched.h>
     8.7 +#include <xen/domain.h>
     8.8  #include <xen/delay.h>
     8.9  #include <xen/event.h>
    8.10  #include <xen/time.h>
     9.1 --- a/xen/include/xen/lib.h	Tue May 31 21:40:12 2005 +0000
     9.2 +++ b/xen/include/xen/lib.h	Tue May 31 22:45:24 2005 +0000
     9.3 @@ -5,6 +5,7 @@
     9.4  #include <stdarg.h>
     9.5  #include <xen/config.h>
     9.6  #include <xen/types.h>
     9.7 +#include <xen/slab.h>
     9.8  #include <xen/string.h>
     9.9  
    9.10  #define BUG() do {					\
    10.1 --- a/xen/include/xen/sched.h	Tue May 31 21:40:12 2005 +0000
    10.2 +++ b/xen/include/xen/sched.h	Tue May 31 22:45:24 2005 +0000
    10.3 @@ -389,42 +389,12 @@ static inline int domain_runnable(struct
    10.4               !(ed->domain->domain_flags & (DOMF_shutdown|DOMF_crashed)) );
    10.5  }
    10.6  
    10.7 -static inline void exec_domain_pause(struct exec_domain *ed)
    10.8 -{
    10.9 -    ASSERT(ed != current);
   10.10 -    atomic_inc(&ed->pausecnt);
   10.11 -    domain_sleep(ed);
   10.12 -    sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor));
   10.13 -}
   10.14 -
   10.15 -static inline void domain_pause(struct domain *d)
   10.16 -{
   10.17 -    struct exec_domain *ed;
   10.18 -
   10.19 -    for_each_exec_domain( d, ed )
   10.20 -    {
   10.21 -        ASSERT(ed != current);
   10.22 -        atomic_inc(&ed->pausecnt);
   10.23 -        domain_sleep(ed);
   10.24 -    }
   10.25 -
   10.26 -    sync_lazy_execstate_cpuset(d->cpuset);
   10.27 -}
   10.28 -
   10.29 -static inline void exec_domain_unpause(struct exec_domain *ed)
   10.30 -{
   10.31 -    ASSERT(ed != current);
   10.32 -    if ( atomic_dec_and_test(&ed->pausecnt) )
   10.33 -        domain_wake(ed);
   10.34 -}
   10.35 -
   10.36 -static inline void domain_unpause(struct domain *d)
   10.37 -{
   10.38 -    struct exec_domain *ed;
   10.39 -
   10.40 -    for_each_exec_domain( d, ed )
   10.41 -        exec_domain_unpause(ed);
   10.42 -}
   10.43 +void exec_domain_pause(struct exec_domain *ed);
   10.44 +void domain_pause(struct domain *d);
   10.45 +void exec_domain_unpause(struct exec_domain *ed);
   10.46 +void domain_unpause(struct domain *d);
   10.47 +void domain_pause_by_systemcontroller(struct domain *d);
   10.48 +void domain_unpause_by_systemcontroller(struct domain *d);
   10.49  
   10.50  static inline void exec_domain_unblock(struct exec_domain *ed)
   10.51  {
   10.52 @@ -432,31 +402,6 @@ static inline void exec_domain_unblock(s
   10.53          domain_wake(ed);
   10.54  }
   10.55  
   10.56 -static inline void domain_pause_by_systemcontroller(struct domain *d)
   10.57 -{
   10.58 -    struct exec_domain *ed;
   10.59 -
   10.60 -    for_each_exec_domain ( d, ed )
   10.61 -    {
   10.62 -        ASSERT(ed != current);
   10.63 -        if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
   10.64 -            domain_sleep(ed);
   10.65 -    }
   10.66 -
   10.67 -    sync_lazy_execstate_cpuset(d->cpuset);
   10.68 -}
   10.69 -
   10.70 -static inline void domain_unpause_by_systemcontroller(struct domain *d)
   10.71 -{
   10.72 -    struct exec_domain *ed;
   10.73 -
   10.74 -    for_each_exec_domain ( d, ed )
   10.75 -    {
   10.76 -        if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) )
   10.77 -            domain_wake(ed);
   10.78 -    }
   10.79 -}
   10.80 -
   10.81  #define IS_PRIV(_d)                                         \
   10.82      (test_bit(_DOMF_privileged, &(_d)->domain_flags))
   10.83  #define IS_CAPABLE_PHYSDEV(_d)                              \
   10.84 @@ -464,9 +409,6 @@ static inline void domain_unpause_by_sys
   10.85  
   10.86  #define VM_ASSIST(_d,_t) (test_bit((_t), &(_d)->vm_assist))
   10.87  
   10.88 -#include <xen/slab.h>
   10.89 -#include <xen/domain.h>
   10.90 -
   10.91  #endif /* __SCHED_H__ */
   10.92  
   10.93  /*
    11.1 --- a/xen/include/xen/slab.h	Tue May 31 21:40:12 2005 +0000
    11.2 +++ b/xen/include/xen/slab.h	Tue May 31 22:45:24 2005 +0000
    11.3 @@ -2,9 +2,6 @@
    11.4  #ifndef __SLAB_H__
    11.5  #define __SLAB_H__
    11.6  
    11.7 -#include <xen/config.h>
    11.8 -#include <xen/mm.h>
    11.9 -
   11.10  /* Allocate space for typed object. */
   11.11  #define xmalloc(_type) ((_type *)_xmalloc(sizeof(_type), __alignof__(_type)))
   11.12