Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2006 00:15:05 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 97312 for review
Message-ID:  <200605170015.k4H0F5Ps011045@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97312

Change 97312 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/05/17 00:14:24

	remove unused lock functions

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#28 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#28 (text+ko) ====

@@ -122,6 +122,10 @@
 static struct vm_object thzone_obj;
 static int tte_hash_count = 0, tte_hash_max = 0;
 
+extern uint64_t hash_bucket_lock(tte_hash_field_t fields);
+
+extern void hash_bucket_unlock(tte_hash_field_t fields, uint64_t s);
+
 static tte_hash_t
 get_tte_hash(void)
 {
@@ -142,44 +146,7 @@
 	uma_zfree(thzone, th);
 }
 
-#if 0
-static uint64_t
-hash_bucket_lock(tte_hash_field_t fields) 
-{
-	uint64_t data;
-	int s;
-	s = intr_disable();
 
-	data = fields[0].tte.data & ~VTD_LOCK;
-	while (atomic_cmpset_long(&fields[0].tte.data, data, data | VTD_LOCK))
-		data = fields[0].tte.data & ~VTD_LOCK;
-
-	membar(Sync);
-	return (uint64_t)s;
-		
-}
-
-static void
-hash_bucket_unlock(tte_hash_field_t fields, uint64_t s) 
-{
-
-	membar(StoreStore|LoadStore);
-#ifdef DEBUG
-	if ((fields[0].tte.data & VTD_LOCK) == 0)
-		panic("trying to unlock bucket that isn't locked");
-#endif
-
-	fields[0].tte.data &= ~VTD_LOCK;
-	membar(Sync);
-	intr_restore(s);
-}
-
-#else 
-extern uint64_t hash_bucket_lock(tte_hash_field_t fields);
-
-extern void hash_bucket_unlock(tte_hash_field_t fields, uint64_t s);
-
-#endif
 void 
 tte_hash_init(void)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605170015.k4H0F5Ps011045>