From owner-p4-projects@FreeBSD.ORG Thu May 25 22:52:49 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 C256516A6C6; Thu, 25 May 2006 22:49:31 +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 8147916A872 for ; Thu, 25 May 2006 22:45:16 +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 4E82843D46 for ; Thu, 25 May 2006 22:45:16 +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 k4PMiJff079442 for ; Thu, 25 May 2006 22:44:19 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4PMiIla079439 for perforce@freebsd.org; Thu, 25 May 2006 22:44:18 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 25 May 2006 22:44:18 GMT Message-Id: <200605252244.k4PMiIla079439@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 97836 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: Thu, 25 May 2006 22:52:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=97836 Change 97836 by kmacy@kmacy_storage:sun4v_work on 2006/05/25 22:44:05 some generalization cleanups replace pmap_scrub_pages with hwblkclear Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#37 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#37 (text+ko) ==== @@ -1,4 +1,3 @@ - /*- * Copyright (c) 2006 Kip Macy * All rights reserved. @@ -86,9 +85,9 @@ struct fragment_header { struct tte_hash_fragment *fh_next; - uint16_t fh_count; - uint16_t fh_free_head; - uint8_t pad[52]; + uint8_t fh_count; + uint8_t fh_free_head; + uint8_t pad[sizeof(struct tte_hash_entry) - 10]; }; CTASSERT(sizeof(struct fragment_header) == sizeof(struct tte_hash_entry)); @@ -189,9 +188,7 @@ } } for (i = 0, tm = m; i < HASH_SIZE; i++, tm++) -#ifndef VM_PAGE_ALLOC_CONTIG_CAN_ALLOCATE_ZEROED_PAGES if ((tm->flags & PG_ZERO) == 0) -#endif pmap_zero_page(tm); th->th_hashtable = (void *)TLB_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m)); @@ -235,13 +232,13 @@ vm_page_free(m); } fh = th->th_fhtail = th->th_fhhead; - pmap_scrub_pages(TLB_DIRECT_TO_PHYS((vm_offset_t)th->th_fhhead), PAGE_SIZE); + hwblkclr(th->th_fhhead, PAGE_SIZE); #ifdef UNMANAGED_PAGES_ARE_TRACKED if (th->th_entries != 0) panic("%d remaining entries", th->th_entries); #else - pmap_scrub_pages(TLB_DIRECT_TO_PHYS((vm_offset_t)th->th_hashtable), th->th_size*PAGE_SIZE); + hwblkclr(th->th_hashtable, th->th_size*PAGE_SIZE); #endif } @@ -297,7 +294,7 @@ 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 +#ifdef NOISY_DEBUG printf("new fh=%p \n", fh); #endif