ia64/xen-unstable

changeset 5303:d68bc64e2cfe

bitkeeper revision 1.1664 (42a064ddVMYCAab_WQM9CcyTOyYMgQ)

Simplify implementation of map_domain_mem.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 03 14:10:37 2005 +0000 (2005-06-03)
parents bbd1d54e014d
children 1bc9c3554d61 3c5a200df2c1
files xen/arch/x86/x86_32/domain_page.c
line diff
     1.1 --- a/xen/arch/x86/x86_32/domain_page.c	Fri Jun 03 13:59:33 2005 +0000
     1.2 +++ b/xen/arch/x86/x86_32/domain_page.c	Fri Jun 03 14:10:37 2005 +0000
     1.3 @@ -24,20 +24,6 @@ l1_pgentry_t *mapcache;
     1.4  static unsigned int map_idx, epoch, shadow_epoch[NR_CPUS];
     1.5  static spinlock_t map_lock = SPIN_LOCK_UNLOCKED;
     1.6  
     1.7 -/* Use a spare PTE bit to mark entries ready for recycling. */
     1.8 -#define READY_FOR_TLB_FLUSH (1<<10)
     1.9 -
    1.10 -static void flush_all_ready_maps(void)
    1.11 -{
    1.12 -    l1_pgentry_t *cache = mapcache;
    1.13 -    unsigned int i;
    1.14 -
    1.15 -    for ( i = 0; i < MAPCACHE_ENTRIES; i++ )
    1.16 -        if ( (l1e_get_flags(cache[i]) & READY_FOR_TLB_FLUSH) )
    1.17 -            cache[i] = l1e_empty();
    1.18 -}
    1.19 -
    1.20 -
    1.21  void *map_domain_mem(unsigned long pa)
    1.22  {
    1.23      unsigned long va;
    1.24 @@ -65,7 +51,6 @@ void *map_domain_mem(unsigned long pa)
    1.25          if ( unlikely(idx == 0) )
    1.26          {
    1.27              ASSERT(flush_count++ == 0);
    1.28 -            flush_all_ready_maps();
    1.29              perfc_incrc(domain_page_tlb_flush);
    1.30              local_flush_tlb();
    1.31              shadow_epoch[cpu] = ++epoch;
    1.32 @@ -87,5 +72,5 @@ void unmap_domain_mem(void *va)
    1.33      ASSERT((void *)MAPCACHE_VIRT_START <= va);
    1.34      ASSERT(va < (void *)MAPCACHE_VIRT_END);
    1.35      idx = ((unsigned long)va - MAPCACHE_VIRT_START) >> PAGE_SHIFT;
    1.36 -    l1e_add_flags(mapcache[idx], READY_FOR_TLB_FLUSH);
    1.37 +    mapcache[idx] = l1e_empty();
    1.38  }