ia64/xen-unstable

changeset 848:6eeb43baba4b

bitkeeper revision 1.527 (3f8fb4a16LPOSuutnwr8zgDB3Ws1Kw)

system.h:
Slightly better restore_flags in xenolinux.
author kaf24@scramble.cl.cam.ac.uk
date Fri Oct 17 09:21:37 2003 +0000 (2003-10-17)
parents 39d0706234b7
children 17e177bd54a9
files xenolinux-2.4.22-sparse/include/asm-xeno/system.h
line diff
     1.1 --- a/xenolinux-2.4.22-sparse/include/asm-xeno/system.h	Fri Oct 17 01:09:13 2003 +0000
     1.2 +++ b/xenolinux-2.4.22-sparse/include/asm-xeno/system.h	Fri Oct 17 09:21:37 2003 +0000
     1.3 @@ -320,21 +320,6 @@ static inline unsigned long __cmpxchg(vo
     1.4  #define set_wmb(var, value) do { var = value; wmb(); } while (0)
     1.5  
     1.6  
     1.7 -#define __save_flags(x)                                                       \
     1.8 -do {                                                                          \
     1.9 -    (x) = test_bit(EVENTS_MASTER_ENABLE_BIT,                                  \
    1.10 -                   &HYPERVISOR_shared_info->events_mask);                     \
    1.11 -    barrier();                                                                \
    1.12 -} while (0)
    1.13 -
    1.14 -#define __restore_flags(x)                                                    \
    1.15 -do {                                                                          \
    1.16 -    shared_info_t *_shared = HYPERVISOR_shared_info;                          \
    1.17 -    if (x) set_bit(EVENTS_MASTER_ENABLE_BIT, &_shared->events_mask);          \
    1.18 -    barrier();                                                                \
    1.19 -    if ( unlikely(_shared->events) && (x) ) do_hypervisor_callback(NULL);     \
    1.20 -} while (0)
    1.21 -
    1.22  #define __cli()                                                               \
    1.23  do {                                                                          \
    1.24      clear_bit(EVENTS_MASTER_ENABLE_BIT, &HYPERVISOR_shared_info->events_mask);\
    1.25 @@ -349,6 +334,15 @@ do {                                    
    1.26      if ( unlikely(_shared->events) ) do_hypervisor_callback(NULL);            \
    1.27  } while (0)
    1.28  
    1.29 +#define __save_flags(x)                                                       \
    1.30 +do {                                                                          \
    1.31 +    (x) = test_bit(EVENTS_MASTER_ENABLE_BIT,                                  \
    1.32 +                   &HYPERVISOR_shared_info->events_mask);                     \
    1.33 +    barrier();                                                                \
    1.34 +} while (0)
    1.35 +
    1.36 +#define __restore_flags(x)      do { if (x) __sti(); } while (0)
    1.37 +
    1.38  #define safe_halt()             ((void)0)
    1.39  
    1.40  #define __save_and_cli(x)	do { __save_flags(x); __cli(); } while(0);