ia64/xen-unstable

changeset 8:6adfe177d29b

bitkeeper revision 1.7 (3debbf6e3uTST4qTwK-s500qgDGA7A)

domain.c, setup.c:
SMP fix
author kaf24@striker.cl.cam.ac.uk
date Mon Dec 02 20:15:42 2002 +0000 (2002-12-02)
parents 8621e74b0a17
children cfc178f9384e 6ae46e3dd10a
files BitKeeper/etc/logging_ok xen-2.4.16/arch/i386/setup.c xen-2.4.16/common/domain.c
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Mon Dec 02 11:09:28 2002 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Mon Dec 02 20:15:42 2002 +0000
     1.3 @@ -1,3 +1,4 @@
     1.4  akw27@boulderdash.cl.cam.ac.uk
     1.5  kaf24@plym.cl.cam.ac.uk
     1.6 +kaf24@striker.cl.cam.ac.uk
     1.7  smh22@boulderdash.cl.cam.ac.uk
     2.1 --- a/xen-2.4.16/arch/i386/setup.c	Mon Dec 02 11:09:28 2002 +0000
     2.2 +++ b/xen-2.4.16/arch/i386/setup.c	Mon Dec 02 20:15:42 2002 +0000
     2.3 @@ -295,8 +295,6 @@ void __init start_of_day(void)
     2.4      init_bh(IMMEDIATE_BH, immediate_bh);
     2.5      init_apic_mappings(); /* make APICs addressable in our pagetables. */
     2.6  
     2.7 -    sti();
     2.8 -
     2.9  #ifndef CONFIG_SMP    
    2.10      APIC_init_uniprocessor();
    2.11  #else
    2.12 @@ -308,6 +306,8 @@ void __init start_of_day(void)
    2.13                        */
    2.14  #endif
    2.15  
    2.16 +    sti();
    2.17 +
    2.18      zap_low_mappings();
    2.19      kmem_cache_init();
    2.20      kmem_cache_sizes_init(max_page);
     3.1 --- a/xen-2.4.16/common/domain.c	Mon Dec 02 11:09:28 2002 +0000
     3.2 +++ b/xen-2.4.16/common/domain.c	Mon Dec 02 20:15:42 2002 +0000
     3.3 @@ -35,6 +35,7 @@ struct task_struct *do_newdomain(void)
     3.4  {
     3.5      int retval;
     3.6      struct task_struct *p = NULL;
     3.7 +    unsigned long flags;
     3.8  
     3.9      retval = -ENOMEM;
    3.10      p = alloc_task_struct();
    3.11 @@ -56,9 +57,9 @@ struct task_struct *do_newdomain(void)
    3.12      p->blk_ring_base = (blk_ring_t *)(p->shared_info + 1);
    3.13      p->net_ring_base = (net_ring_t *)(p->blk_ring_base + 1);
    3.14      p->pg_head = p->tot_pages = 0;
    3.15 -    write_lock_irq(&tasklist_lock);
    3.16 +    write_lock_irqsave(&tasklist_lock, flags);
    3.17      SET_LINKS(p);
    3.18 -    write_unlock_irq(&tasklist_lock);
    3.19 +    write_unlock_irqrestore(&tasklist_lock, flags);
    3.20  
    3.21   newdomain_out:
    3.22      return(p);