From owner-p4-projects@FreeBSD.ORG Wed May 17 00:15:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1241E16A49E; Wed, 17 May 2006 00:15:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1A0616A498 for ; Wed, 17 May 2006 00:15:23 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D30C43D46 for ; Wed, 17 May 2006 00:15:23 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4H0F5db011051 for ; Wed, 17 May 2006 00:15:05 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4H0F5Ps011045 for perforce@freebsd.org; Wed, 17 May 2006 00:15:05 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 17 May 2006 00:15:05 GMT Message-Id: <200605170015.k4H0F5Ps011045@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 97312 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2006 00:15:24 -0000 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) {