From owner-p4-projects@FreeBSD.ORG Tue Mar 21 03:06:33 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 EA3EC16A41F; Tue, 21 Mar 2006 03:06:32 +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 728CE16A401 for ; Tue, 21 Mar 2006 03:06:32 +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 3F2A743D45 for ; Tue, 21 Mar 2006 03:06:32 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2L36WUc094688 for ; Tue, 21 Mar 2006 03:06:32 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2L36Vwm094685 for perforce@freebsd.org; Tue, 21 Mar 2006 03:06:31 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 21 Mar 2006 03:06:31 GMT Message-Id: <200603210306.k2L36Vwm094685@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 93680 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: Tue, 21 Mar 2006 03:06:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=93680 Change 93680 by kmacy@kmacy_storage:sun4vtmp on 2006/03/21 03:06:07 implement get and clear bit functions Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte.c#3 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte.c#3 (text+ko) ==== @@ -117,7 +117,12 @@ void tte_clear_virt_bit(struct pmap *pmap, vm_offset_t va, uint64_t flags) { - UNIMPLEMENTED; + tte_t *tte; + + tte = tte_hash_lookup(pmap->pm_hash, va); + + if (tte) + *tte = *tte & ~flags; } void @@ -129,6 +134,11 @@ boolean_t tte_get_virt_bit(struct pmap *pmap, vm_offset_t va, uint64_t flags) { - UNIMPLEMENTED; - return (FALSE); + tte_t ttedata, *tte; + + tte = tte_hash_lookup(pmap->pm_hash, va); + + ttedata = tte ? *tte : 0; + + return ((ttedata & flags) == flags); }