ia64/xen-unstable

changeset 1812:bd80b2bba0ce

bitkeeper revision 1.1102 (40f7cb26ScIvTp2P9LH-HLcauhcwTg)

Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@scramble.cl.cam.ac.uk
date Fri Jul 16 12:33:42 2004 +0000 (2004-07-16)
parents 50578ac46943 2243a562032d
children 66e83b24aca7 a2b2c8621a31
files linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/vbd.c xen/arch/x86/domain.c
line diff
     1.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/vbd.c	Fri Jul 16 09:22:25 2004 +0000
     1.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/vbd.c	Fri Jul 16 12:33:42 2004 +0000
     1.3 @@ -126,33 +126,30 @@ void vbd_grow(blkif_be_vbd_grow_t *grow)
     1.4      x->next                 = (blkif_extent_le_t *)NULL; 
     1.5  
     1.6      gd = get_gendisk(x->extent.device);
     1.7 -
     1.8 -    if (!gd || !gd->part)
     1.9 +    if ( (gd == NULL) || (gd->part == NULL) )
    1.10      {
    1.11          grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND; 
    1.12          DPRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device);
    1.13          goto out;
    1.14      }
    1.15  
    1.16 -    hd = &gd->part[MINOR(x->extent.device)];
    1.17 -
    1.18 -    if (!hd)
    1.19 +    if ( (hd = &gd->part[MINOR(x->extent.device)]) == NULL )
    1.20      {
    1.21          grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND; 
    1.22          DPRINTK("vbd_grow: HD device %08x doesn't exist.\n", x->extent.device);
    1.23          goto out;
    1.24      }
    1.25  
    1.26 -    printk("vbd_grow: requested_len %llu actual_len %lu\n", 
    1.27 -	   x->extent.sector_length,  hd->nr_sects );
    1.28 +    DPRINTK("vbd_grow: requested_len %llu actual_len %lu\n", 
    1.29 +            x->extent.sector_length, hd->nr_sects);
    1.30  
    1.31 -    /* this test assumes sector_start is zero, which in the new
    1.32 -       IO world it always will be -- We need to simpligy the 
    1.33 -       grow/shrink interface as we'll always be deadling with whole
    1.34 -       devices
    1.35 -    */
    1.36 +    /*
    1.37 +     * NB. This test assumes sector_start == 0, which is always the case
    1.38 +     * in Xen 1.3. In fact the whole grow/shrink interface could do with
    1.39 +     * some simplification.
    1.40 +     */
    1.41      if ( x->extent.sector_length > hd->nr_sects )
    1.42 -	x->extent.sector_length = hd->nr_sects;    
    1.43 +        x->extent.sector_length = hd->nr_sects;    
    1.44  
    1.45      for ( px = &vbd->extents; *px != NULL; px = &(*px)->next ) 
    1.46          continue;
     2.1 --- a/xen/arch/x86/domain.c	Fri Jul 16 09:22:25 2004 +0000
     2.2 +++ b/xen/arch/x86/domain.c	Fri Jul 16 12:33:42 2004 +0000
     2.3 @@ -197,9 +197,17 @@ void machine_restart(char * __unused)
     2.4      panic("Need to reinclude BIOS reboot code\n");
     2.5  }
     2.6  
     2.7 +
     2.8 +void __attribute__((noreturn)) __machine_halt(void *unused)
     2.9 +{
    2.10 +    for ( ; ; )
    2.11 +        __asm__ __volatile__ ( "cli; hlt" );
    2.12 +}
    2.13 +
    2.14  void machine_halt(void)
    2.15  {
    2.16 -    while(1){ safe_halt(); }
    2.17 +    smp_call_function(__machine_halt, NULL, 1, 1);
    2.18 +    __machine_halt(NULL);
    2.19  }
    2.20  
    2.21  void arch_do_createdomain(struct domain *d)