[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Simplify implementation of map_domain_mem.



ChangeSet 1.1664, 2005/06/03 15:10:37+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Simplify implementation of map_domain_mem.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 domain_page.c |   17 +----------------
 1 files changed, 1 insertion(+), 16 deletions(-)


diff -Nru a/xen/arch/x86/x86_32/domain_page.c 
b/xen/arch/x86/x86_32/domain_page.c
--- a/xen/arch/x86/x86_32/domain_page.c 2005-06-03 11:03:31 -04:00
+++ b/xen/arch/x86/x86_32/domain_page.c 2005-06-03 11:03:31 -04:00
@@ -24,20 +24,6 @@
 static unsigned int map_idx, epoch, shadow_epoch[NR_CPUS];
 static spinlock_t map_lock = SPIN_LOCK_UNLOCKED;
 
-/* Use a spare PTE bit to mark entries ready for recycling. */
-#define READY_FOR_TLB_FLUSH (1<<10)
-
-static void flush_all_ready_maps(void)
-{
-    l1_pgentry_t *cache = mapcache;
-    unsigned int i;
-
-    for ( i = 0; i < MAPCACHE_ENTRIES; i++ )
-        if ( (l1e_get_flags(cache[i]) & READY_FOR_TLB_FLUSH) )
-            cache[i] = l1e_empty();
-}
-
-
 void *map_domain_mem(unsigned long pa)
 {
     unsigned long va;
@@ -65,7 +51,6 @@
         if ( unlikely(idx == 0) )
         {
             ASSERT(flush_count++ == 0);
-            flush_all_ready_maps();
             perfc_incrc(domain_page_tlb_flush);
             local_flush_tlb();
             shadow_epoch[cpu] = ++epoch;
@@ -87,5 +72,5 @@
     ASSERT((void *)MAPCACHE_VIRT_START <= va);
     ASSERT(va < (void *)MAPCACHE_VIRT_END);
     idx = ((unsigned long)va - MAPCACHE_VIRT_START) >> PAGE_SHIFT;
-    l1e_add_flags(mapcache[idx], READY_FOR_TLB_FLUSH);
+    mapcache[idx] = l1e_empty();
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.