ia64/xen-unstable

changeset 4135:b5337b34feb7

bitkeeper revision 1.1236.25.19 (423553b79iCQL1CPX5dZyBiY8j8pnQ)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into arcadians.cl.cam.ac.uk:/auto/anfs/nos1/akw27/xeno-clone/xeno.bk
author akw27@arcadians.cl.cam.ac.uk
date Mon Mar 14 09:04:55 2005 +0000 (2005-03-14)
parents 634970ed570c 5e1e1c6d7457
children 095b6204d7f7
files linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c tools/xcs/xcs.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c	Mon Mar 14 01:20:58 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c	Mon Mar 14 09:04:55 2005 +0000
     1.3 @@ -77,7 +77,7 @@ void active_reqs_init(void)
     1.4  
     1.5  static inline unsigned long MAKE_ID(domid_t fe_dom, ACTIVE_RING_IDX idx)
     1.6  {
     1.7 -    return ( (fe_dom << 16) | idx );
     1.8 +    return ( (fe_dom << 16) | MASK_ACTIVE_IDX(idx) );
     1.9  }
    1.10  
    1.11  /*-----[ Ring helpers ]---------------------------------------------------*/
     2.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c	Mon Mar 14 01:20:58 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c	Mon Mar 14 09:04:55 2005 +0000
     2.3 @@ -355,24 +355,6 @@ int blktap_write_be_ring(blkif_response_
     2.4      return 0;
     2.5  }
     2.6  
     2.7 -static void blktap_fast_flush_area(int idx, int nr_pages)
     2.8 -{
     2.9 -    multicall_entry_t mcl[MMAP_PAGES_PER_REQUEST];
    2.10 -    int               i;
    2.11 -
    2.12 -    for ( i = 0; i < nr_pages; i++ )
    2.13 -    {
    2.14 -        mcl[i].op = __HYPERVISOR_update_va_mapping;
    2.15 -        mcl[i].args[0] = MMAP_VADDR(idx, i);
    2.16 -        mcl[i].args[1] = 0;
    2.17 -        mcl[i].args[2] = 0;
    2.18 -    }
    2.19 -
    2.20 -    mcl[nr_pages-1].args[2] = UVMF_FLUSH_TLB;
    2.21 -    if ( unlikely(HYPERVISOR_multicall(mcl, nr_pages) != 0) )
    2.22 -        BUG();
    2.23 -}
    2.24 -
    2.25  static int blktap_read_fe_ring(void)
    2.26  {
    2.27      /* This is called to read responses from the UFE ring. */
    2.28 @@ -398,7 +380,8 @@ static int blktap_read_fe_ring(void)
    2.29              DPRINTK("resp->fe_ring\n");
    2.30              ar = lookup_active_req(ID_TO_IDX(resp_s->id));
    2.31              blkif = ar->blkif;
    2.32 -            blktap_fast_flush_area(ID_TO_IDX(resp_s->id), ar->nr_pages);
    2.33 +            zap_page_range(blktap_vma, MMAP_VADDR(ID_TO_IDX(resp_s->id), 0), 
    2.34 +                    ar->nr_pages << PAGE_SHIFT, NULL);
    2.35              write_resp_to_fe_ring(blkif, resp_s);
    2.36              kick_fe_domain(blkif);
    2.37          }
     3.1 --- a/tools/xcs/xcs.c	Mon Mar 14 01:20:58 2005 +0000
     3.2 +++ b/tools/xcs/xcs.c	Mon Mar 14 09:04:55 2005 +0000
     3.3 @@ -97,7 +97,7 @@ static void map_dom_to_port(u32 dom, int
     3.4              exit(1);
     3.5          }
     3.6  
     3.7 -        for (; dom_port_map_size < dom + 10; dom_port_map_size++) {
     3.8 +        for (; dom_port_map_size < dom + 256; dom_port_map_size++) {
     3.9              dom_port_map[dom_port_map_size] = -1;
    3.10          }
    3.11      }
    3.12 @@ -123,7 +123,7 @@ static control_channel_t *add_interface(
    3.13      control_channel_t *cc=NULL, *oldcc;
    3.14      int ret;
    3.15      
    3.16 -    if (cc_list[dom_to_port(dom)] != NULL)
    3.17 +    if ((dom_to_port(dom) >= 0) && (cc_list[dom_to_port(dom)] != NULL))
    3.18      {
    3.19          return(cc_list[dom_to_port(dom)]);
    3.20      }
    3.21 @@ -155,10 +155,13 @@ static control_channel_t *add_interface(
    3.22          if ((oldcc->remote_dom != cc->remote_dom) ||
    3.23              (oldcc->remote_port != cc->remote_port))
    3.24          {
    3.25 -            DPRINTF("CC conflict! (port: %d, old dom: %u, new dom: %u)\n",
    3.26 -                    cc->local_port, oldcc->remote_dom, cc->remote_dom);
    3.27 +            DPRINTF("CC conflict! (port: %d, old dom: %u, new dom: %u, "
    3.28 +                    "old ref_count: %d)\n",
    3.29 +                    cc->local_port, oldcc->remote_dom, cc->remote_dom, 
    3.30 +                    oldcc->ref_count);
    3.31              map_dom_to_port(oldcc->remote_dom, -1);
    3.32              ctrl_chan_free(cc_list[cc->local_port]);
    3.33 +            cc_list[cc->local_port] = NULL;
    3.34          }
    3.35      }
    3.36       
    3.37 @@ -210,6 +213,8 @@ void put_interface(control_channel_t *cc
    3.38          {
    3.39              DPRINTF("Freeing cc on port %d.\n", cc->local_port);
    3.40              (void)evtchn_unbind(cc->local_port);
    3.41 +            cc_list[cc->local_port] = NULL;
    3.42 +            map_dom_to_port(cc->remote_dom, -1);
    3.43              ctrl_chan_free(cc);
    3.44          }
    3.45      }