From owner-p4-projects@FreeBSD.ORG Sat May 20 20:51:32 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 9029516A423; Sat, 20 May 2006 20:51: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 4816916A420 for ; Sat, 20 May 2006 20:51:30 +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 1115643D49 for ; Sat, 20 May 2006 20:51:30 +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 k4KKotMh099636 for ; Sat, 20 May 2006 20:50:55 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4KKose5099633 for perforce@freebsd.org; Sat, 20 May 2006 20:50:55 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 20 May 2006 20:50:55 GMT Message-Id: <200605202050.k4KKose5099633@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 97535 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: Sat, 20 May 2006 20:51:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=97535 Change 97535 by kmacy@kmacy_storage:sun4v_work on 2006/05/20 20:49:54 fix comments and turn off debugging by default Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#51 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#34 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#51 (text+ko) ==== @@ -74,7 +74,7 @@ #include -#if 1 +#if 0 #define PMAP_DEBUG #endif #ifndef PMAP_SHPGPERPROC @@ -187,6 +187,7 @@ #else #define DPRINTF(...) +#define KDPRINTF(...) #endif ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#34 (text+ko) ==== @@ -27,8 +27,6 @@ * $ Exp $ */ -#define DEBUG - #include #include #include @@ -298,7 +296,9 @@ fh->thf_head.fh_next = (void *)TLB_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m)); fh = th->th_fhtail = (void *)TLB_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m)); fh->thf_head.fh_free_head = 1; +#ifdef DEBUG printf("new fh=%p \n", fh); +#endif } newentry = &fh->thf_entries[fh->thf_head.fh_free_head]; @@ -497,8 +497,7 @@ { uint64_t hash_scratch; - /* This will break if a hash table ever grows above 32MB - * 2^(13+13) + /* This breaks if a hash table grows above 32MB */ hash_scratch = ((vm_offset_t)th->th_hashtable) | ((vm_offset_t)th->th_size); set_hash_kernel_scratchpad(hash_scratch); @@ -511,8 +510,7 @@ { uint64_t hash_scratch; - /* This will break if a hash table ever grows above 32MB - * 2^(13+13) + /* This breaks if a hash table grows above 32MB */ th->th_context = (uint16_t)context; hash_scratch = ((vm_offset_t)th->th_hashtable) | ((vm_offset_t)th->th_size); @@ -544,10 +542,7 @@ tte_tag, tte_data); hash_bucket_unlock(entry->the_fields, s); } -#ifdef DEBUG - if (tte_hash_lookup(th, va) == 0) - panic("va=0x%lx not found", va); -#endif + return (otte_data); }