ia64/xen-unstable

changeset 5252:a247de7b1fb0

bitkeeper revision 1.1625 (429d84a4tcD4ZWpKQyD4i0nn6K6LIg)

Add an explicit result field to multicall_entry_t, rather than abusing
the sixth argument field.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jun 01 09:49:24 2005 +0000 (2005-06-01)
parents 0e97dc32ddf6
children 3417d4aa3ff1
files freebsd-5.3-xen-sparse/i386-xen/xen/netfront/xn_netfront.c linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.11-xen-sparse/drivers/xen/usbback/usbback.c netbsd-2.0-xen-sparse/sys/arch/xen/xen/if_xennet.c xen/arch/x86/x86_32/asm-offsets.c xen/arch/x86/x86_64/asm-offsets.c xen/include/public/arch-ia64.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/xen.h
line diff
     1.1 --- a/freebsd-5.3-xen-sparse/i386-xen/xen/netfront/xn_netfront.c	Wed Jun 01 09:06:47 2005 +0000
     1.2 +++ b/freebsd-5.3-xen-sparse/i386-xen/xen/netfront/xn_netfront.c	Wed Jun 01 09:49:24 2005 +0000
     1.3 @@ -454,7 +454,7 @@ xn_alloc_rx_buffers(struct xn_softc *sc)
     1.4      (void)HYPERVISOR_multicall(xn_rx_mcl, i+1);
     1.5  
     1.6      /* Check return status of HYPERVISOR_dom_mem_op(). */
     1.7 -    if (unlikely(xn_rx_mcl[i].args[5] != i))
     1.8 +    if (unlikely(xn_rx_mcl[i].result != i))
     1.9          panic("Unable to reduce memory reservation\n");
    1.10  
    1.11      /* Above is a suitable barrier to ensure backend will see requests. */
     2.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Wed Jun 01 09:06:47 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Wed Jun 01 09:49:24 2005 +0000
     2.3 @@ -562,7 +562,7 @@ static void dispatch_rw_block_io(blkif_t
     2.4  
     2.5      for ( i = 0; i < nseg; i++ )
     2.6      {
     2.7 -        if ( unlikely(mcl[i].args[5] != 0) )
     2.8 +        if ( unlikely(mcl[i].result != 0) )
     2.9          {
    2.10              DPRINTK("invalid buffer -- could not remap it\n");
    2.11              fast_flush_area(pending_idx, nseg);
     3.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c	Wed Jun 01 09:06:47 2005 +0000
     3.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c	Wed Jun 01 09:49:24 2005 +0000
     3.3 @@ -296,12 +296,12 @@ static void net_rx_action(unsigned long 
     3.4          netif->stats.tx_packets++;
     3.5  
     3.6          /* The update_va_mapping() must not fail. */
     3.7 -        if ( unlikely(mcl[0].args[5] != 0) )
     3.8 +        if ( unlikely(mcl[0].result != 0) )
     3.9              BUG();
    3.10  
    3.11          /* Check the reassignment error code. */
    3.12          status = NETIF_RSP_OKAY;
    3.13 -        if ( unlikely(mcl[1].args[5] != 0) )
    3.14 +        if ( unlikely(mcl[1].result != 0) )
    3.15          {
    3.16              DPRINTK("Failed MMU update transferring to DOM%u\n", netif->domid);
    3.17              free_mfn(mdata >> PAGE_SHIFT);
    3.18 @@ -440,7 +440,7 @@ static void net_tx_action(unsigned long 
    3.19      while ( dealloc_cons != dp )
    3.20      {
    3.21          /* The update_va_mapping() must not fail. */
    3.22 -        if ( unlikely(mcl[0].args[5] != 0) )
    3.23 +        if ( unlikely(mcl[0].result != 0) )
    3.24              BUG();
    3.25  
    3.26          pending_idx = dealloc_ring[MASK_PEND_IDX(dealloc_cons++)];
    3.27 @@ -606,7 +606,7 @@ static void net_tx_action(unsigned long 
    3.28          memcpy(&txreq, &pending_tx_info[pending_idx].req, sizeof(txreq));
    3.29  
    3.30          /* Check the remap error code. */
    3.31 -        if ( unlikely(mcl[0].args[5] != 0) )
    3.32 +        if ( unlikely(mcl[0].result != 0) )
    3.33          {
    3.34              DPRINTK("Bad page frame\n");
    3.35              make_tx_response(netif, txreq.id, NETIF_RSP_ERROR);
     4.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c	Wed Jun 01 09:06:47 2005 +0000
     4.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c	Wed Jun 01 09:49:24 2005 +0000
     4.3 @@ -419,7 +419,7 @@ static void network_alloc_rx_buffers(str
     4.4      (void)HYPERVISOR_multicall(rx_mcl, i+1);
     4.5  
     4.6      /* Check return status of HYPERVISOR_dom_mem_op(). */
     4.7 -    if (unlikely(rx_mcl[i].args[5] != i))
     4.8 +    if (unlikely(rx_mcl[i].result != i))
     4.9          panic("Unable to reduce memory reservation\n");
    4.10  
    4.11      /* Above is a suitable barrier to ensure backend will see requests. */
     5.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/usbback/usbback.c	Wed Jun 01 09:06:47 2005 +0000
     5.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/usbback/usbback.c	Wed Jun 01 09:49:24 2005 +0000
     5.3 @@ -686,7 +686,7 @@ static void dispatch_usb_io(usbif_priv_t
     5.4          int j;
     5.5          for ( j = 0; j < i; j++ )
     5.6          {
     5.7 -            if ( unlikely(mcl[j].args[5] != 0) )
     5.8 +            if ( unlikely(mcl[j].result != 0) )
     5.9              {
    5.10                  printk(KERN_WARNING
    5.11  		       "invalid buffer %d -- could not remap it\n", j);
     6.1 --- a/netbsd-2.0-xen-sparse/sys/arch/xen/xen/if_xennet.c	Wed Jun 01 09:06:47 2005 +0000
     6.2 +++ b/netbsd-2.0-xen-sparse/sys/arch/xen/xen/if_xennet.c	Wed Jun 01 09:49:24 2005 +0000
     6.3 @@ -612,7 +612,7 @@ xennet_rx_push_buffer(struct xennet_soft
     6.4  	(void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
     6.5  
     6.6  	/* Check return status of HYPERVISOR_dom_mem_op(). */
     6.7 -	if ( rx_mcl[nr_pfns].args[5] != nr_pfns )
     6.8 +	if ( rx_mcl[nr_pfns].result != nr_pfns )
     6.9  		panic("Unable to reduce memory reservation\n");
    6.10  
    6.11  	/* Above is a suitable barrier to ensure backend will see requests. */
    6.12 @@ -912,7 +912,7 @@ network_alloc_rx_buffers(struct xennet_s
    6.13  	(void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
    6.14  
    6.15  	/* Check return status of HYPERVISOR_dom_mem_op(). */
    6.16 -	if (rx_mcl[nr_pfns].args[5] != nr_pfns)
    6.17 +	if (rx_mcl[nr_pfns].result != nr_pfns)
    6.18  		panic("Unable to reduce memory reservation\n");
    6.19  
    6.20  	/* Above is a suitable barrier to ensure backend will see requests. */
     7.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Wed Jun 01 09:06:47 2005 +0000
     7.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Wed Jun 01 09:49:24 2005 +0000
     7.3 @@ -88,7 +88,9 @@ void __dummy__(void)
     7.4      OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
     7.5      OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
     7.6      OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
     7.7 -    OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
     7.8 +    OFFSET(MULTICALL_arg5, multicall_entry_t, args[5]);
     7.9 +    OFFSET(MULTICALL_arg6, multicall_entry_t, args[6]);
    7.10 +    OFFSET(MULTICALL_result, multicall_entry_t, result);
    7.11      BLANK();
    7.12  
    7.13      DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
     8.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Wed Jun 01 09:06:47 2005 +0000
     8.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Wed Jun 01 09:49:24 2005 +0000
     8.3 @@ -88,7 +88,9 @@ void __dummy__(void)
     8.4      OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
     8.5      OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
     8.6      OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
     8.7 -    OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
     8.8 +    OFFSET(MULTICALL_arg5, multicall_entry_t, args[5]);
     8.9 +    OFFSET(MULTICALL_arg6, multicall_entry_t, args[6]);
    8.10 +    OFFSET(MULTICALL_result, multicall_entry_t, result);
    8.11      BLANK();
    8.12  
    8.13      DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
     9.1 --- a/xen/include/public/arch-ia64.h	Wed Jun 01 09:06:47 2005 +0000
     9.2 +++ b/xen/include/public/arch-ia64.h	Wed Jun 01 09:49:24 2005 +0000
     9.3 @@ -18,7 +18,6 @@
     9.4  
     9.5  /* NB. Both the following are 64 bits each. */
     9.6  typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
     9.7 -typedef unsigned long cpureg_t;   /* Full-sized register.                    */
     9.8  
     9.9  typedef struct
    9.10  {
    10.1 --- a/xen/include/public/arch-x86_32.h	Wed Jun 01 09:06:47 2005 +0000
    10.2 +++ b/xen/include/public/arch-x86_32.h	Wed Jun 01 09:49:24 2005 +0000
    10.3 @@ -77,7 +77,6 @@
    10.4  
    10.5  /* NB. Both the following are 32 bits each. */
    10.6  typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    10.7 -typedef unsigned long cpureg_t;   /* Full-sized register.                    */
    10.8  
    10.9  /*
   10.10   * Send an array of these to HYPERVISOR_set_trap_table()
    11.1 --- a/xen/include/public/arch-x86_64.h	Wed Jun 01 09:06:47 2005 +0000
    11.2 +++ b/xen/include/public/arch-x86_64.h	Wed Jun 01 09:49:24 2005 +0000
    11.3 @@ -111,7 +111,6 @@ struct switch_to_user {
    11.4  
    11.5  /* NB. Both the following are 64 bits each. */
    11.6  typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    11.7 -typedef unsigned long cpureg_t;   /* Full-sized register.                    */
    11.8  
    11.9  /*
   11.10   * Send an array of these to HYPERVISOR_set_trap_table().
    12.1 --- a/xen/include/public/xen.h	Wed Jun 01 09:06:47 2005 +0000
    12.2 +++ b/xen/include/public/xen.h	Wed Jun 01 09:49:24 2005 +0000
    12.3 @@ -59,16 +59,6 @@
    12.4  #define __HYPERVISOR_set_segment_base     25 /* x86/64 only */
    12.5  #define __HYPERVISOR_mmuext_op            26
    12.6  
    12.7 -/*
    12.8 - * MULTICALLS
    12.9 - * 
   12.10 - * Multicalls are listed in an array, with each element being a fixed size 
   12.11 - * (BYTES_PER_MULTICALL_ENTRY). Each is of the form (op, arg1, ..., argN)
   12.12 - * where each element of the tuple is a machine word. 
   12.13 - */
   12.14 -#define ARGS_PER_MULTICALL_ENTRY 8
   12.15 -
   12.16 -
   12.17  /* 
   12.18   * VIRTUAL INTERRUPTS
   12.19   * 
   12.20 @@ -281,7 +271,7 @@ typedef struct
   12.21  {
   12.22      memory_t ptr;       /* Machine address of PTE. */
   12.23      memory_t val;       /* New contents of PTE.    */
   12.24 -} PACKED mmu_update_t;
   12.25 +} mmu_update_t;
   12.26  
   12.27  /*
   12.28   * Send an array of these to HYPERVISOR_multicall().
   12.29 @@ -289,9 +279,9 @@ typedef struct
   12.30   */
   12.31  typedef struct
   12.32  {
   12.33 -    cpureg_t op;
   12.34 -    cpureg_t args[7];
   12.35 -} PACKED multicall_entry_t;
   12.36 +    unsigned long op, result;
   12.37 +    unsigned long args[6];
   12.38 +} multicall_entry_t;
   12.39  
   12.40  /* Event channel endpoints per domain. */
   12.41  #define NR_EVENT_CHANNELS 1024