ia64/xen-unstable

changeset 16576:40812c9d96e7

x86: avoid LOCK prefix in some cases where it's not necessary.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Dec 10 11:55:55 2007 +0000 (2007-12-10)
parents d4d3b2f1714d
children d9cd502d8df2
files xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/vlapic.c xen/arch/x86/traps.c xen/common/page_alloc.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Mon Dec 10 11:49:12 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Mon Dec 10 11:55:55 2007 +0000
     1.3 @@ -81,7 +81,7 @@ void hvm_enable(struct hvm_function_tabl
     1.4       * delays, but the vmexits simply slow things down).
     1.5       */
     1.6      memset(hvm_io_bitmap, ~0, sizeof(hvm_io_bitmap));
     1.7 -    clear_bit(0x80, hvm_io_bitmap);
     1.8 +    __clear_bit(0x80, hvm_io_bitmap);
     1.9  
    1.10      hvm_funcs   = *fns;
    1.11      hvm_enabled = 1;
     2.1 --- a/xen/arch/x86/hvm/vlapic.c	Mon Dec 10 11:49:12 2007 +0000
     2.2 +++ b/xen/arch/x86/hvm/vlapic.c	Mon Dec 10 11:55:55 2007 +0000
     2.3 @@ -408,7 +408,7 @@ static void vlapic_ipi(struct vlapic *vl
     2.4          if ( vlapic_match_dest(v, vlapic, short_hand, dest, dest_mode) )
     2.5          {
     2.6              if ( delivery_mode == APIC_DM_LOWEST )
     2.7 -                set_bit(v->vcpu_id, &lpr_map);
     2.8 +                __set_bit(v->vcpu_id, &lpr_map);
     2.9              else
    2.10                  vlapic_accept_irq(v, delivery_mode,
    2.11                                    vector, level, trig_mode);
     3.1 --- a/xen/arch/x86/traps.c	Mon Dec 10 11:49:12 2007 +0000
     3.2 +++ b/xen/arch/x86/traps.c	Mon Dec 10 11:55:55 2007 +0000
     3.3 @@ -677,25 +677,25 @@ static int emulate_forced_invalid_op(str
     3.4      if ( regs->eax == 1 )
     3.5      {
     3.6          /* Modify Feature Information. */
     3.7 -        clear_bit(X86_FEATURE_VME, &d);
     3.8 -        clear_bit(X86_FEATURE_PSE, &d);
     3.9 -        clear_bit(X86_FEATURE_PGE, &d);
    3.10 +        __clear_bit(X86_FEATURE_VME, &d);
    3.11 +        __clear_bit(X86_FEATURE_PSE, &d);
    3.12 +        __clear_bit(X86_FEATURE_PGE, &d);
    3.13          if ( !cpu_has_sep )
    3.14 -            clear_bit(X86_FEATURE_SEP, &d);
    3.15 +            __clear_bit(X86_FEATURE_SEP, &d);
    3.16  #ifdef __i386__
    3.17          if ( !supervisor_mode_kernel )
    3.18 -            clear_bit(X86_FEATURE_SEP, &d);
    3.19 +            __clear_bit(X86_FEATURE_SEP, &d);
    3.20  #endif
    3.21          if ( !IS_PRIV(current->domain) )
    3.22 -            clear_bit(X86_FEATURE_MTRR, &d);
    3.23 +            __clear_bit(X86_FEATURE_MTRR, &d);
    3.24      }
    3.25      else if ( regs->eax == 0x80000001 )
    3.26      {
    3.27          /* Modify Feature Information. */
    3.28  #ifdef __i386__
    3.29 -        clear_bit(X86_FEATURE_SYSCALL % 32, &d);
    3.30 +        __clear_bit(X86_FEATURE_SYSCALL % 32, &d);
    3.31  #endif
    3.32 -        clear_bit(X86_FEATURE_RDTSCP % 32, &d);
    3.33 +        __clear_bit(X86_FEATURE_RDTSCP % 32, &d);
    3.34      }
    3.35      else
    3.36      {
     4.1 --- a/xen/common/page_alloc.c	Mon Dec 10 11:49:12 2007 +0000
     4.2 +++ b/xen/common/page_alloc.c	Mon Dec 10 11:55:55 2007 +0000
     4.3 @@ -301,14 +301,15 @@ static void init_node_heap(int node)
     4.4      /* First node to be discovered has its heap metadata statically alloced. */
     4.5      static heap_by_zone_and_order_t _heap_static;
     4.6      static unsigned long avail_static[NR_ZONES];
     4.7 -    static unsigned long first_node_initialised;
     4.8 +    static int first_node_initialised;
     4.9  
    4.10      int i, j;
    4.11  
    4.12 -    if ( !test_and_set_bit(0, &first_node_initialised) )
    4.13 +    if ( !first_node_initialised )
    4.14      {
    4.15          _heap[node] = &_heap_static;
    4.16          avail[node] = avail_static;
    4.17 +        first_node_initialised = 1;
    4.18      }
    4.19      else
    4.20      {