ia64/xen-unstable

changeset 10394:3d85c1136d63

Merge.
author sos22@douglas.cl.cam.ac.uk
date Tue Jun 13 15:19:50 2006 +0100 (2006-06-13)
parents e9dd58963e97 91d2f2258c56
children 88d867661599
files
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Jun 13 15:19:09 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Jun 13 15:19:50 2006 +0100
     1.3 @@ -407,7 +407,8 @@ static void blkif_restart_queue(void *ar
     1.4  {
     1.5  	struct blkfront_info *info = (struct blkfront_info *)arg;
     1.6  	spin_lock_irq(&blkif_io_lock);
     1.7 -	kick_pending_request_queues(info);
     1.8 +	if (info->connected == BLKIF_STATE_CONNECTED)
     1.9 +		kick_pending_request_queues(info);
    1.10  	spin_unlock_irq(&blkif_io_lock);
    1.11  }
    1.12  
    1.13 @@ -595,7 +596,8 @@ void do_blkif_request(request_queue_t *r
    1.14  			continue;
    1.15  		}
    1.16  
    1.17 -		if (RING_FULL(&info->ring))
    1.18 +		if (unlikely(info->connected != BLKIF_STATE_CONNECTED) ||
    1.19 +		    RING_FULL(&info->ring))
    1.20  			goto wait;
    1.21  
    1.22  		DPRINTK("do_blk_req %p: cmd %p, sec %lx, "
    1.23 @@ -768,17 +770,17 @@ static void blkif_recover(struct blkfron
    1.24  
    1.25  	(void)xenbus_switch_state(info->xbdev, XenbusStateConnected);
    1.26  
    1.27 +	spin_lock_irq(&blkif_io_lock);
    1.28 +
    1.29  	/* Now safe for us to use the shared ring */
    1.30 -	spin_lock_irq(&blkif_io_lock);
    1.31  	info->connected = BLKIF_STATE_CONNECTED;
    1.32 -	spin_unlock_irq(&blkif_io_lock);
    1.33  
    1.34  	/* Send off requeued requests */
    1.35  	flush_requests(info);
    1.36  
    1.37  	/* Kick any other new requests queued since we resumed */
    1.38 -	spin_lock_irq(&blkif_io_lock);
    1.39  	kick_pending_request_queues(info);
    1.40 +
    1.41  	spin_unlock_irq(&blkif_io_lock);
    1.42  }
    1.43  
     2.1 --- a/tools/libxc/xc_elf.h	Tue Jun 13 15:19:09 2006 +0100
     2.2 +++ b/tools/libxc/xc_elf.h	Tue Jun 13 15:19:50 2006 +0100
     2.3 @@ -170,13 +170,14 @@ typedef struct {
     2.4  #define EM_PARISC	15		/* HPPA */
     2.5  #define EM_SPARC32PLUS	18		/* Enhanced instruction set SPARC */
     2.6  #define EM_PPC		20		/* PowerPC */
     2.7 +#define EM_PPC64	21		/* PowerPC 64-bit */
     2.8  #define EM_ARM		40		/* Advanced RISC Machines ARM */
     2.9  #define EM_ALPHA	41		/* DEC ALPHA */
    2.10  #define EM_SPARCV9	43		/* SPARC version 9 */
    2.11  #define EM_ALPHA_EXP	0x9026		/* DEC ALPHA */
    2.12 +#define EM_IA_64	50		/* Intel Merced */
    2.13  #define EM_X86_64	62		/* AMD x86-64 architecture */
    2.14  #define EM_VAX		75		/* DEC VAX */
    2.15 -#define EM_NUM		15		/* number of machine types */
    2.16  
    2.17  /* Version */
    2.18  #define EV_NONE		0		/* Invalid */
     3.1 --- a/tools/libxc/xc_load_elf.c	Tue Jun 13 15:19:09 2006 +0100
     3.2 +++ b/tools/libxc/xc_load_elf.c	Tue Jun 13 15:19:50 2006 +0100
     3.3 @@ -22,6 +22,24 @@ loadelfsymtab(
     3.4      const char *image, int xch, uint32_t dom, xen_pfn_t *parray,
     3.5      struct domain_setup_info *dsi);
     3.6  
     3.7 +/*
     3.8 + * Elf header attributes we require for each supported host platform.
     3.9 + * These are checked in parseelfimage().
    3.10 + */
    3.11 +#if defined(__ia64__)
    3.12 +#define ELFCLASS   ELFCLASS64
    3.13 +#define ELFDATA    ELFDATA2LSB
    3.14 +#define ELFMACHINE EM_IA_64
    3.15 +#elif defined(__i386__)
    3.16 +#define ELFCLASS   ELFCLASS32
    3.17 +#define ELFDATA    ELFDATA2LSB
    3.18 +#define ELFMACHINE EM_386
    3.19 +#elif defined(__x86_64__)
    3.20 +#define ELFCLASS   ELFCLASS64
    3.21 +#define ELFDATA    ELFDATA2LSB
    3.22 +#define ELFMACHINE EM_X86_64
    3.23 +#endif
    3.24 +
    3.25  int probe_elf(const char *image,
    3.26                unsigned long image_size,
    3.27                struct load_funcs *load_funcs)
    3.28 @@ -61,16 +79,10 @@ static int parseelfimage(const char *ima
    3.29          return -EINVAL;
    3.30      }
    3.31  
    3.32 -    if (
    3.33 -#if defined(__i386__)
    3.34 -        (ehdr->e_ident[EI_CLASS] != ELFCLASS32) ||
    3.35 -        (ehdr->e_machine != EM_386) ||
    3.36 -#elif defined(__x86_64__)
    3.37 -        (ehdr->e_ident[EI_CLASS] != ELFCLASS64) ||
    3.38 -        (ehdr->e_machine != EM_X86_64) ||
    3.39 -#endif
    3.40 -        (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) ||
    3.41 -        (ehdr->e_type != ET_EXEC) )
    3.42 +    if ( (ehdr->e_ident[EI_CLASS] != ELFCLASS) ||
    3.43 +         (ehdr->e_machine != ELFMACHINE) ||
    3.44 +         (ehdr->e_ident[EI_DATA] != ELFDATA) ||
    3.45 +         (ehdr->e_type != ET_EXEC) )
    3.46      {
    3.47          ERROR("Kernel not a Xen-compatible Elf image.");
    3.48          return -EINVAL;
     4.1 --- a/xen/include/xen/elf.h	Tue Jun 13 15:19:09 2006 +0100
     4.2 +++ b/xen/include/xen/elf.h	Tue Jun 13 15:19:50 2006 +0100
     4.3 @@ -178,9 +178,9 @@ typedef struct {
     4.4  #define EM_ALPHA	41		/* DEC ALPHA */
     4.5  #define EM_SPARCV9	43		/* SPARC version 9 */
     4.6  #define EM_ALPHA_EXP	0x9026		/* DEC ALPHA */
     4.7 +#define EM_IA_64	50		/* Intel Merced */
     4.8  #define EM_X86_64	62		/* AMD x86-64 architecture */
     4.9  #define EM_VAX		75		/* DEC VAX */
    4.10 -#define EM_NUM		15		/* number of machine types */
    4.11  
    4.12  /* Version */
    4.13  #define EV_NONE		0		/* Invalid */